Update local copy of GPLv2 and FSF address in copyrights
[wmaker-crm.git] / src / icon.h
blob45e0314fe3ccefbd3bb57c7873cc54a2ab4eea82
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"
27 #include "funcs.h"
30 #define TILE_NORMAL 0
31 #define TILE_CLIP 1
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 *image;
44 unsigned int tile_type:4;
45 unsigned int show_title:1;
46 unsigned int has_titlebar:1;
47 unsigned int force_paint:1; /* True for icon update and repaint */
48 unsigned int selected:1;
49 unsigned int step:3; /* selection cycle step */
50 unsigned int shadowed:1; /* If the icon is to be blured */
51 unsigned int mapped:1;
52 unsigned int highlighted:1;
54 Pixmap pixmap;
56 WMHandlerID handlerID; /* timer handler ID for cycling select
57 * color */
58 } WIcon;
60 WIcon *wIconCreateWithIconFile(WScreen *scr, char *iconfile, int tile);
61 WIcon *wIconCreate(WWindow *wwin);
62 void wIconDestroy(WIcon *icon);
63 void wIconPaint(WIcon *icon);
64 void wIconUpdate(WIcon *icon);
65 void wIconChangeTitle(WIcon *icon, char *new_title);
66 void wIconChangeImage(WIcon *icon, RImage *new_image);
67 Bool wIconChangeImageFile(WIcon *icon, char *file);
68 void wIconSelect(WIcon *icon);
70 RImage *wIconValidateIconSize(WScreen *scr, RImage *icon);
72 char *wIconStore(WIcon *icon);
74 #ifdef NEWAPPICON
75 void wIconSetHighlited(WIcon *icon, Bool flag);
76 #endif /* NEWAPPICON */
78 #endif /* WMICON_H_ */