app.h (1266B)
1 #include <WMaker.h> 2 #include <WINGs/WINGs.h> 3 4 struct State { 5 int debug; 6 int dirty; 7 char filename[PATH_MAX]; 8 int file_open; /* Is any file opened/created right now? */ 9 }; 10 11 struct WMNewApp { 12 struct State state; 13 WMAppContext* app; 14 Pixmap app_icon; 15 RImage* app_image; 16 Pixmap app_mask; 17 XClassHint* class_hint; 18 Display* dpy; 19 XWMHints* hints; 20 WMMenu* main_menu; 21 struct WMMainWindow* mainwin; 22 RContext* rctx; 23 WMScreen* scr; 24 WMPixmap* wmpixmap; 25 }; 26 27 extern struct WMNewApp wma; 28 29 void cleanup(); 30 void debug_print_state(struct WMNewApp* wma); 31 int error(const int code, const char* msg, ...); 32 void exit_action(WMWidget* self, void* data); 33 void exit_menu_action(void* data, int code, Time timestamp); 34 void handle_keypress(XEvent* event, void* data); 35 void info_panel_action(WMWidget* self, void* data); 36 void info_panel_menu_action(void* data, int code, Time timestamp); 37 void init_state(struct State* state); 38 void not_implemented(WMWidget* self, void* data); 39 void open_action(WMWidget* self, void* data); 40 void open_menu_action(void* data, int code, Time timestamp); 41 void save_action(WMWidget* self, void* data); 42 void save_menu_action(void* data, int code, Time timestamp); 43 void usage(const char* arg0); 44 void WMLog(const struct WMNewApp* wma, const char* msg, ...);