JWM Source Documentation
tray.h
Go to the documentation of this file.
1 
10 #ifndef TRAY_H
11 #define TRAY_H
12 
13 #include "hint.h"
14 
16 typedef unsigned char LayoutType;
17 #define LAYOUT_HORIZONTAL 0
18 #define LAYOUT_VERTICAL 1
21 typedef unsigned char TrayAlignmentType;
22 #define TALIGN_FIXED 0
23 #define TALIGN_LEFT 1
24 #define TALIGN_TOP 2
25 #define TALIGN_CENTER 3
26 #define TALIGN_RIGHT 4
27 #define TALIGN_BOTTOM 5
30 typedef unsigned char TrayAutoHideType;
31 #define THIDE_OFF 0
32 #define THIDE_LEFT 1
33 #define THIDE_RIGHT 2
34 #define THIDE_TOP 3
35 #define THIDE_BOTTOM 4
36 #define THIDE_RAISED 8
55 typedef struct TrayComponentType {
56 
61  struct TrayType *tray;
62 
64  void *object;
65 
66  int x;
67  int y;
69  int screenx;
70  int screeny;
76  int width;
77  int height;
79  char grabbed;
81  Window window;
82  Pixmap pixmap;
85  void (*Create)(struct TrayComponentType *cp);
86 
88  void (*Destroy)(struct TrayComponentType *cp);
89 
95  void (*SetSize)(struct TrayComponentType *cp, int width, int height);
96 
98  void (*Resize)(struct TrayComponentType *cp);
99 
102  int x, int y, int mask);
103 
106  int x, int y, int mask);
107 
110  int x, int y, int mask);
111 
115  void (*Redraw)(struct TrayComponentType *cp);
116 
119 
121 
123 typedef struct TrayType {
124 
128  int x;
129  int y;
134  int width;
135  int height;
143  char hidden;
145  Window window;
149 
152 
153  struct TrayType *next;
155 } TrayType;
156 
157 void InitializeTray(void);
158 void StartupTray(void);
159 void ShutdownTray(void);
160 void DestroyTray(void);
161 
165 TrayType *CreateTray(void);
166 
171 
177 
181 void ShowTray(TrayType *tp);
182 
184 void ShowAllTrays(void);
185 
189 void HideTray(TrayType *tp);
190 
192 void DrawTray(void);
193 
197 void DrawSpecificTray(const TrayType *tp);
198 
200 void RaiseTrays(void);
201 
203 void LowerTrays(void);
204 
209 void UpdateSpecificTray(const TrayType *tp, const TrayComponentType *cp);
210 
214 void ResizeTray(TrayType *tp);
215 
217 void ClearTrayDrawable(const TrayComponentType *cp);
218 
222 TrayType *GetTrays(void);
223 
227 unsigned int GetTrayCount(void);
228 
233 char ProcessTrayEvent(const XEvent *event);
234 
239 void SetAutoHideTray(TrayType *tp, TrayAutoHideType autohide);
240 
245 void SetTrayX(TrayType *tp, const char *str);
246 
251 void SetTrayY(TrayType *tp, const char *str);
252 
257 void SetTrayWidth(TrayType *tp, const char *str);
258 
263 void SetTrayHeight(TrayType *tp, const char *str);
264 
269 void SetTrayLayout(TrayType *tp, const char *str);
270 
276 
281 void SetTrayHorizontalAlignment(TrayType *tp, const char *str);
282 
287 void SetTrayVerticalAlignment(TrayType *tp, const char *str);
288 
289 #endif /* TRAY_H */
290 

joewing.net / Projects / JWM