wmaker: add miniwindow apercu
[wmaker-crm.git] / src / icon.h
blobaf82f5c2657b60b944e8f98c338eca76856a0c61
1 /*
2 * Window Maker window manager
4 * Copyright (c) 1997-2003 Alfredo K. Kojima
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef WMICON_H_
23 #define WMICON_H_
25 #include "wcore.h"
26 #include "window.h"
28 #define TILE_NORMAL 0
29 #define TILE_CLIP 1
30 #define TILE_DRAWER 2
32 #define APERCU_BORDER 2
34 typedef struct WIcon {
35 WCoreWindow *core;
36 WWindow *owner; /* owner window */
37 char *icon_name; /* the icon name hint */
39 Window icon_win; /* client suplied icon window */
41 char *file; /* the file with the icon image */
42 RImage *file_image; /* the image from the file */
44 unsigned int tile_type:4;
45 unsigned int show_title:1;
46 unsigned int selected:1;
47 unsigned int step:3; /* selection cycle step */
48 unsigned int shadowed:1; /* If the icon is to be blured */
49 unsigned int mapped:1;
50 unsigned int highlighted:1;
52 Pixmap pixmap;
53 Pixmap apercu;
55 WMHandlerID handlerID; /* timer handler ID for cycling select
56 * color */
57 } WIcon;
59 WIcon *icon_create_for_dock(WScreen *scr, const char *command, const char *wm_instance, const char *wm_class, int tile);
60 WIcon *icon_create_for_wwindow(WWindow *wwin);
62 void set_icon_image_from_database(WIcon *icon, const char *wm_instance, const char *wm_class, const char *command);
63 void wIconDestroy(WIcon *icon);
64 void wIconPaint(WIcon *icon);
65 void wIconUpdate(WIcon *icon);
66 void wIconSelect(WIcon *icon);
67 void wIconChangeTitle(WIcon *icon, WWindow *wwin);
68 void update_icon_pixmap(WIcon *icon);
70 int wIconChangeImageFile(WIcon *icon, const char *file);
72 RImage *wIconValidateIconSize(RImage *icon, int max_size);
73 RImage *get_rimage_icon_from_wm_hints(WIcon *icon);
75 char *wIconStore(WIcon *icon);
76 char *get_name_for_instance_class(const char *wm_instance, const char *wm_class);
78 void wIconSetHighlited(WIcon *icon, Bool flag);
79 void set_icon_image_from_image(WIcon *icon, RImage *image);
80 void set_icon_apercu(WIcon *icon, RImage *image);
82 #endif /* WMICON_H_ */