1998-09-29 22:36:29 +00:00
|
|
|
/*
|
1998-10-21 14:43:47 +00:00
|
|
|
* Window Maker window manager
|
2004-10-12 21:28:27 +00:00
|
|
|
*
|
2003-01-16 23:30:45 +00:00
|
|
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
2004-10-12 21:28:27 +00:00
|
|
|
*
|
1998-09-29 22:36:29 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
2010-10-08 01:32:11 +02:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
1998-09-29 22:36:29 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef WMICON_H_
|
|
|
|
|
#define WMICON_H_
|
|
|
|
|
|
|
|
|
|
#include "wcore.h"
|
|
|
|
|
#include "window.h"
|
|
|
|
|
#include "funcs.h"
|
|
|
|
|
|
|
|
|
|
#define TILE_NORMAL 0
|
|
|
|
|
#define TILE_CLIP 1
|
2013-04-12 01:42:41 +02:00
|
|
|
#define TILE_DRAWER 2
|
1998-09-29 22:36:29 +00:00
|
|
|
|
|
|
|
|
typedef struct WIcon {
|
2012-04-14 02:27:33 +02:00
|
|
|
WCoreWindow *core;
|
|
|
|
|
WWindow *owner; /* owner window */
|
|
|
|
|
char *icon_name; /* the icon name hint */
|
1998-09-29 22:36:29 +00:00
|
|
|
|
2012-04-14 02:27:33 +02:00
|
|
|
Window icon_win; /* client suplied icon window */
|
1998-09-29 22:36:29 +00:00
|
|
|
|
2012-04-14 02:27:33 +02:00
|
|
|
char *file; /* the file with the icon image */
|
|
|
|
|
RImage *file_image; /* the image from the file */
|
1998-09-29 22:36:29 +00:00
|
|
|
|
2012-04-14 02:27:33 +02:00
|
|
|
unsigned int tile_type:4;
|
|
|
|
|
unsigned int show_title:1;
|
|
|
|
|
unsigned int selected:1;
|
|
|
|
|
unsigned int step:3; /* selection cycle step */
|
|
|
|
|
unsigned int shadowed:1; /* If the icon is to be blured */
|
|
|
|
|
unsigned int mapped:1;
|
|
|
|
|
unsigned int highlighted:1;
|
1998-09-29 22:36:29 +00:00
|
|
|
|
2012-04-14 02:27:33 +02:00
|
|
|
Pixmap pixmap;
|
2004-10-12 21:28:27 +00:00
|
|
|
|
2012-04-14 02:27:33 +02:00
|
|
|
WMHandlerID handlerID; /* timer handler ID for cycling select
|
|
|
|
|
* color */
|
1998-09-29 22:36:29 +00:00
|
|
|
} WIcon;
|
|
|
|
|
|
2012-10-02 23:22:10 +02:00
|
|
|
WIcon *icon_create_for_dock(WScreen *scr, char *command, char *wm_instance, char *wm_class, int tile);
|
2012-10-01 23:53:06 +02:00
|
|
|
WIcon *icon_create_for_wwindow(WWindow *wwin);
|
2012-04-14 02:27:33 +02:00
|
|
|
|
2013-01-22 21:18:14 +01:00
|
|
|
void set_icon_image_from_database(WIcon *icon, char *wm_instance, char *wm_class, char *command);
|
1998-09-29 22:36:29 +00:00
|
|
|
void wIconDestroy(WIcon *icon);
|
|
|
|
|
void wIconPaint(WIcon *icon);
|
2013-04-08 19:40:46 +02:00
|
|
|
void wIconUpdate(WIcon *icon);
|
2012-04-14 02:27:33 +02:00
|
|
|
void wIconSelect(WIcon *icon);
|
2013-04-08 19:40:58 +02:00
|
|
|
void wIconChangeTitle(WIcon *icon, WWindow *wwin);
|
2012-11-03 19:54:05 +01:00
|
|
|
void update_icon_pixmap(WIcon *icon);
|
2012-04-14 02:27:33 +02:00
|
|
|
|
1998-09-29 22:36:29 +00:00
|
|
|
Bool wIconChangeImageFile(WIcon *icon, char *file);
|
|
|
|
|
|
2012-07-15 21:25:05 +02:00
|
|
|
RImage *wIconValidateIconSize(RImage *icon, int max_size);
|
2012-11-15 00:44:00 +01:00
|
|
|
RImage *get_rimage_icon_from_wm_hints(WIcon *icon);
|
1998-09-29 22:36:29 +00:00
|
|
|
|
2012-06-06 11:07:19 +02:00
|
|
|
char *wIconStore(WIcon *icon);
|
|
|
|
|
char *get_name_for_instance_class(char *wm_instance, char *wm_class);
|
1998-10-21 14:43:47 +00:00
|
|
|
|
2010-09-25 13:44:48 +02:00
|
|
|
void wIconSetHighlited(WIcon *icon, Bool flag);
|
2013-04-08 19:40:44 +02:00
|
|
|
void set_icon_image_from_image(WIcon *icon, RImage *image);
|
2012-11-16 21:53:57 +01:00
|
|
|
|
1998-09-29 22:36:29 +00:00
|
|
|
#endif /* WMICON_H_ */
|