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.
32 /* This is the border, in pixel, drawn around a Mini-Preview */
33 #define MINIPREVIEW_BORDER 1
35 typedef struct WIcon
{
37 WWindow
*owner
; /* owner window */
38 char *icon_name
; /* the icon name hint */
40 Window icon_win
; /* client suplied icon window */
42 char *file
; /* the file with the icon image */
43 RImage
*file_image
; /* the image from the file */
45 unsigned int tile_type
:4;
46 unsigned int show_title
:1;
47 unsigned int selected
:1;
48 unsigned int step
:3; /* selection cycle step */
49 unsigned int shadowed
:1; /* If the icon is to be blured */
50 unsigned int mapped
:1;
51 unsigned int highlighted
:1;
56 WMHandlerID handlerID
; /* timer handler ID for cycling select
60 WIcon
*icon_create_for_dock(WScreen
*scr
, const char *command
, const char *wm_instance
, const char *wm_class
, int tile
);
61 WIcon
*icon_create_for_wwindow(WWindow
*wwin
);
63 void set_icon_image_from_database(WIcon
*icon
, const char *wm_instance
, const char *wm_class
, const char *command
);
64 void wIconDestroy(WIcon
*icon
);
65 void wIconPaint(WIcon
*icon
);
66 void wIconUpdate(WIcon
*icon
);
67 void wIconSelect(WIcon
*icon
);
68 void wIconChangeTitle(WIcon
*icon
, WWindow
*wwin
);
69 void update_icon_pixmap(WIcon
*icon
);
71 int wIconChangeImageFile(WIcon
*icon
, const char *file
);
73 RImage
*wIconValidateIconSize(RImage
*icon
, int max_size
);
74 RImage
*get_rimage_icon_from_wm_hints(WIcon
*icon
);
76 char *wIconStore(WIcon
*icon
);
77 char *get_name_for_instance_class(const char *wm_instance
, const char *wm_class
);
79 void wIconSetHighlited(WIcon
*icon
, Bool flag
);
80 void set_icon_image_from_image(WIcon
*icon
, RImage
*image
);
81 void set_icon_minipreview(WIcon
*icon
, RImage
*image
);
83 void remove_cache_icon(char *filename
);
84 #endif /* WMICON_H_ */