JWM Source Documentation
tray.h
Go to the documentation of this file.
00001 00010 #ifndef TRAY_H 00011 #define TRAY_H 00012 00013 #include "hint.h" 00014 00015 struct TimeType; 00016 00018 typedef enum { 00019 LAYOUT_HORIZONTAL, 00020 LAYOUT_VERTICAL 00021 } LayoutType; 00022 00024 typedef enum { 00025 TALIGN_FIXED, 00026 TALIGN_LEFT, 00027 TALIGN_TOP, 00028 TALIGN_CENTER, 00029 TALIGN_RIGHT, 00030 TALIGN_BOTTOM 00031 } TrayAlignmentType; 00032 00050 typedef struct TrayComponentType { 00051 00056 struct TrayType *tray; 00057 00059 void *object; 00060 00061 int x; 00062 int y; 00064 int screenx; 00065 int screeny; 00068 int requestedWidth; 00069 int requestedHeight; 00071 int width; 00072 int height; 00074 int grabbed; 00076 Window window; 00077 Pixmap pixmap; 00080 void (*Create)(struct TrayComponentType *cp); 00081 00083 void (*Destroy)(struct TrayComponentType *cp); 00084 00090 void (*SetSize)(struct TrayComponentType *cp, int width, int height); 00091 00093 void (*Resize)(struct TrayComponentType *cp); 00094 00096 void (*ProcessButtonPress)(struct TrayComponentType *cp, 00097 int x, int y, int mask); 00098 00100 void (*ProcessButtonRelease)(struct TrayComponentType *cp, 00101 int x, int y, int mask); 00102 00104 void (*ProcessMotionEvent)(struct TrayComponentType *cp, 00105 int x, int y, int mask); 00106 00108 struct TrayComponentType *next; 00109 00110 } TrayComponentType; 00111 00113 typedef struct TrayType { 00114 00115 int x; 00116 int y; 00118 int requestedWidth; 00119 int requestedHeight; 00121 int width; 00122 int height; 00124 int border; 00125 WinLayerType layer; 00126 LayoutType layout; 00127 TrayAlignmentType valign; 00128 TrayAlignmentType halign; 00130 int autoHide; 00131 int hidden; 00133 Window window; 00136 struct TrayComponentType *components; 00137 00139 struct TrayComponentType *componentsTail; 00140 00141 struct TrayType *next; 00143 } TrayType; 00144 00145 void InitializeTray(); 00146 void StartupTray(); 00147 void ShutdownTray(); 00148 void DestroyTray(); 00149 00153 TrayType *CreateTray(); 00154 00158 TrayComponentType *CreateTrayComponent(); 00159 00164 void AddTrayComponent(TrayType *tp, TrayComponentType *cp); 00165 00169 void ShowTray(TrayType *tp); 00170 00172 void ShowAllTrays(); 00173 00177 void HideTray(TrayType *tp); 00178 00180 void DrawTray(); 00181 00185 void DrawSpecificTray(const TrayType *tp); 00186 00191 void UpdateSpecificTray(const TrayType *tp, const TrayComponentType *cp); 00192 00196 void ResizeTray(TrayType *tp); 00197 00201 TrayType *GetTrays(); 00202 00206 int GetTrayCount(); 00207 00213 Window GetSupportingWindow(); 00214 00219 int ProcessTrayEvent(const XEvent *event); 00220 00227 void SignalTray(const struct TimeType *now, int x, int y); 00228 00233 void SetAutoHideTray(TrayType *tp, int v); 00234 00239 void SetTrayX(TrayType *tp, const char *str); 00240 00245 void SetTrayY(TrayType *tp, const char *str); 00246 00251 void SetTrayWidth(TrayType *tp, const char *str); 00252 00257 void SetTrayHeight(TrayType *tp, const char *str); 00258 00263 void SetTrayLayout(TrayType *tp, const char *str); 00264 00269 void SetTrayLayer(TrayType *tp, const char *str); 00270 00275 void SetTrayBorder(TrayType *tp, const char *str); 00276 00281 void SetTrayHorizontalAlignment(TrayType *tp, const char *str); 00282 00287 void SetTrayVerticalAlignment(TrayType *tp, const char *str); 00288 00292 void SetTrayOpacity(const char *str); 00293 00294 #endif /* TRAY_H */ 00295