Initial revision
[wmaker-crm.git] / src / icon.h
blobf9efe5cf7e7b1f8655fadaf79197f9c0952b51ba
1 /*
2 * WindowMaker window manager
3 *
4 * Copyright (c) 1997, 1998 Alfredo K. Kojima
5 *
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
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19 * USA.
23 #ifndef WMICON_H_
24 #define WMICON_H_
26 #include "wcore.h"
27 #include "window.h"
28 #include "funcs.h"
31 #define TILE_NORMAL 0
32 #define TILE_CLIP 1
35 typedef struct WIcon {
36 WCoreWindow *core;
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 *image;
45 short tile_type;
47 unsigned int show_title:1;
48 unsigned int has_titlebar:1;
49 unsigned int force_paint:1; /* True for icon update and repaint */
50 unsigned int selected:1;
51 unsigned int step:1;
52 unsigned int shadowed:1; /* If the icon is to be blured */
53 unsigned int mapped:1;
54 unsigned int highlighted:1;
56 Pixmap pixmap;
58 WMHandlerID handlerID; /* timer handler ID for cycling select
59 * color */
60 } WIcon;
62 WIcon *wIconCreateWithIconFile(WScreen *scr, char *iconfile, int tile);
63 WIcon *wIconCreate(WWindow *wwin);
64 void wIconDestroy(WIcon *icon);
65 void wIconPaint(WIcon *icon);
66 void wIconUpdate(WIcon *icon);
67 void wIconChangeTitle(WIcon *icon, char *new_title);
68 void wIconChangeImage(WIcon *icon, RImage *new_image);
69 Bool wIconChangeImageFile(WIcon *icon, char *file);
70 void wIconSelect(WIcon *icon);
72 RImage *wIconValidateIconSize(WScreen *scr, RImage *icon);
74 #endif /* WMICON_H_ */