cvsimport
[fvwm.git] / modules / FvwmIconBox / FvwmIconBox.h
blob0bf2774c1de198be074325f02396cb7c09b1007a
1 /* -*-c-*- */
2 /*
4 * Subroutine Prototypes
6 */
7 #include "libs/fvwmlib.h"
8 #include "libs/vpacket.h"
9 #include "libs/Flocale.h"
11 struct icon_info;
12 void MySendFvwmPipe(int *fd, char *message, unsigned long window);
13 Bool ExecIconBoxFunction(char *msg);
14 extern void CreateWindow(void);
15 extern Pixel GetColor(char *name);
16 extern Pixel GetHilite(Pixel background);
17 extern Pixel GetShadow(Pixel background);
18 extern void RedrawWindow(XEvent *evp);
19 extern void match_string(char *tline);
20 extern void Loop(void);
21 extern void ParseOptions(void);
22 extern char *safemalloc(int length);
23 extern int My_XNextEvent(Display *dpy, XEvent *event);
24 extern RETSIGTYPE DeadPipe(int nonsense);
25 extern void CreateIconWindow(struct icon_info *item);
26 extern void DrawIconWindow(struct icon_info *item);
27 extern void GetIconFromFile(struct icon_info *item);
28 extern void GetIconWindow(struct icon_info *item);
29 extern void GetIconBitmap(struct icon_info *item);
30 extern void process_message(unsigned long type,unsigned long *body);
31 /* extern Bool AddItem(unsigned long id, long desk, unsigned long flags); */
32 extern Bool AddItem(ConfigWinPacket *cfgpacket);
33 extern Bool DeleteItem(unsigned long id);
34 extern struct icon_info *UpdateItem(unsigned long type, unsigned long id, char *item);
35 extern void freeitem(struct icon_info *item, int d);
36 extern void RedrawHScrollbar(void);
37 extern void RedrawVScrollbar(void);
38 extern void RedrawIcons(XEvent *evp);
39 extern void GetIconwinSize(int *dx, int *dy);
40 extern void RedrawLeftButton(GC rgc, GC sgc);
41 extern void RedrawRightButton(GC rgc, GC sgc);
42 extern void RedrawTopButton(GC rgc, GC sgc);
43 extern void RedrawBottomButton(GC rgc, GC sgc);
44 extern struct icon_info *Search(Window w);
45 extern void ExecuteAction(int x, int y, struct icon_info *item);
46 extern void HScroll(int x);
47 extern void VScroll(int y);
48 extern void RedrawLabel(struct icon_info *item);
49 extern void parseplacement(char *tline);
50 extern void parseaction(char *tline);
51 extern void AdjustIconWindow(struct icon_info *item, int n);
52 extern int AdjustIconWindows(void);
53 extern struct icon_info *SetFlag(unsigned long id, int t);
54 extern void RedrawIcon(struct icon_info *item, int f, XEvent *evp);
55 extern void animate(struct icon_info *item, unsigned long *body);
56 extern void Next(void);
57 extern void Prev(void);
58 extern void GetDefaultPixmap(struct icon_info *item);
59 extern void parsemouse(char *tline);
60 extern void parsekey(char *tline);
61 extern void parseicon(char *tline);
62 extern Bool SortItem(struct icon_info *item);
63 extern struct icon_info *MinItem(struct icon_info *head);
64 extern void ExecuteKey(XEvent event);
65 extern int matchWildcards(const char *pattern, const char *string);
66 extern Bool GetBackPixmap(void);
67 extern int LookInList(struct icon_info *item);
68 extern char *stripcpy2(char *source);
69 extern void mapicons(void);
70 extern int window_cond(struct icon_info *item);
71 extern int itemcmp(struct icon_info *item1, struct icon_info *item2);
74 extern Display *dpy; /* which display are we talking to */
75 extern Window Root;
76 extern Window main_win;
77 extern Window holder_win;
78 extern Window icon_win;
79 extern int screen;
80 extern Pixel fore_pix, back_pix, icon_fore_pix, icon_back_pix;
81 extern GC NormalGC;
82 extern GC ReliefGC;
83 extern FlocaleFont *Ffont;
84 extern int ButtonWidth,ButtonHeight;
85 extern int num_rows;
86 extern int num_columns;
87 extern int Lines;
88 extern int interval;
89 extern int max_icon_width;
90 extern int max_icon_height;
91 extern int primary, secondary;
92 extern int icon_win_width, icon_win_height;
93 extern Pixmap IconwinPixmap;
94 extern char *IconwinPixmapFile;
96 struct icon_info
98 char *action;
99 char *name;
100 char *window_name;
101 char *res_class;
102 char *res_name;
103 char *icon_file;
104 int x;
105 int y;
106 int icon_w;
107 int icon_h;
108 Pixmap iconPixmap; /* pixmap for the icon */
109 Pixmap icon_maskPixmap;
110 Pixmap icon_alphaPixmap;
111 int icon_depth;
112 int icon_nalloc_pixels;
113 Pixel *icon_alloc_pixels;
114 int icon_no_limit;
115 Window IconWin;
116 Window icon_pixmap_w;
117 XWMHints *wmhints;
118 long id;
119 long desk;
120 window_flags flags;
121 long extra_flags;
122 struct icon_info *next;
123 struct icon_info *prev;
126 struct iconfile
128 char *name;
129 char *iconfile;
130 struct iconfile *next;
133 struct mousefunc
135 int mouse;
136 int type;
137 char *action;
138 struct mousefunc *next;
141 struct keyfunc
143 char *name;
144 KeyCode keycode;
145 char *action;
146 struct keyfunc *next;
149 extern struct icon_info *Head;
150 extern struct icon_info *Tail;
151 extern struct func *Actions;
152 extern struct iconfile *IconListHead;
153 extern struct iconfile *IconListTail;
155 extern char *imagePath;
157 extern int icon_relief;
161 #define NOPLACE -1
162 #define LEFT 0
163 #define RIGHT 1
164 #define TOP 2
165 #define BOTTOM 3
167 #define NO_CLICK 0
168 #define CLICK 1
169 #define ONE_AND_A_HALF_CLICKS 3
170 #define DOUBLE_CLICK 2
171 #define TIMEOUT 3
173 /* sorting */
174 #define UNSORT 0
175 #define WINDOWNAME 1
176 #define ICONNAME 2
177 #define RESNAME 3
178 #define RESCLASS 4
180 /* local flags */
181 #define HIDE_H (1<<0)
182 #define HIDE_V (1<<1)
183 #define SETWMICONSIZE (1<<2)
184 #define CURRENT_ONLY (1<<3)
186 #define DEFAULTICON (1<<0)
187 #define NONAME (1<<1)
188 #define NOCLASS (1<<2)