1 /* -*-c-*- */ 2 3 #ifndef FVWM_MISC_H 4 #define FVWM_MISC_H 5 6 #include "fvwm.h" 7 8 /* ---------------------------- included header files ---------------------- */ 9 10 /* ---------------------------- global definitions ------------------------- */ 11 12 enum 13 { 14 GRAB_ALL = 0, /* sum of all grabs */ 15 GRAB_STARTUP = 1, /* Startup busy cursor */ 16 GRAB_NORMAL = 2, /* DeferExecution, Move, Resize, ... */ 17 GRAB_MENU = 3, /* a menus.c grabing */ 18 GRAB_BUSY = 4, /* BusyCursor stuff */ 19 GRAB_BUSYMENU = 5, /* Allows menus.c to regrab the cursor */ 20 GRAB_PASSIVE = 6, /* Override of passive grab, only prevents grab 21 * to be released too early */ 22 GRAB_FREEZE_CURSOR = 7, /* Freeze the cursor shape if a window is 23 * pressed. */ 24 GRAB_MAXVAL /* last GRAB macro + 1 */ 25 }; 26 27 /* ---------------------------- global macros ------------------------------ */ 28 29 #ifdef ICON_DEBUG 30 #define ICON_DBG(X) fprintf X; 31 #else 32 #define ICON_DBG(X) 33 #endif 34 35 /* ---------------------------- type definitions --------------------------- */ 36 37 typedef enum 38 { 39 ADDED_NONE = 0, 40 ADDED_MENU, 41 ADDED_DECOR, 42 ADDED_FUNCTION 43 } last_added_item_t; 44 45 /* ---------------------------- forward declarations ----------------------- */ 46 47 /* ---------------------------- exported variables (globals) --------------- */ 48 49 /* ---------------------------- interface functions ------------------------ */ 50 51 Bool GrabEm( 52 int cursor, int grab_context); 53 Bool UngrabEm( 54 int ungrab_context); 55 int GetTwoArguments( 56 char *action, int *val1, int *val2, int *val1_unit, int *val2_unit); 57 void NewFontAndColor( 58 FlocaleFont *flf, Pixel color, Pixel backcolor); 59 void Keyboard_shortcuts( 60 XEvent *ev, FvwmWindow *fw, int *x_defect, int *y_defect, 61 int ReturnEvent); 62 Bool check_if_fvwm_window_exists( 63 FvwmWindow *fw); 64 int truncate_to_multiple( 65 int x, int m); 66 Bool IsRectangleOnThisPage(struct monitor *, const rectangle *rec, int desk); 67 FvwmWindow *get_pointer_fvwm_window(void); 68 Time get_server_time(void); 69 void fvwm_msg_report_app(void); 70 void fvwm_msg_report_app_and_workers(void); 71 void set_last_added_item(last_added_item_t type, void *item); 72 void print_g(char *text, rectangle *g); 73 74 #endif /* FVWM_MISC_H */ 75