eventdefs.h (2538B)
1 #ifndef LTK_EVENTDEFS_H 2 #define LTK_EVENTDEFS_H 3 4 /* FIXME: add to config */ 5 #define DOUBLECLICK_TIME 250 6 /* square of distance to make calculation simpler */ 7 #define DOUBLECLICK_DISTSQ 25 8 /* FIXME: reduce amount of scroll/motion events */ 9 10 typedef enum { 11 LTK_UNKNOWN_EVENT, /* FIXME: a bit weird */ 12 LTK_BUTTONPRESS_EVENT, 13 LTK_BUTTONRELEASE_EVENT, 14 /* double-click/release */ 15 LTK_2BUTTONPRESS_EVENT, 16 LTK_2BUTTONRELEASE_EVENT, 17 /* triple-click/release */ 18 LTK_3BUTTONPRESS_EVENT, 19 LTK_3BUTTONRELEASE_EVENT, 20 LTK_SCROLL_EVENT, 21 LTK_MOTION_EVENT, 22 LTK_KEYPRESS_EVENT, 23 LTK_KEYRELEASE_EVENT, 24 LTK_CONFIGURE_EVENT, 25 LTK_EXPOSE_EVENT, 26 LTK_WINDOWCLOSE_EVENT, 27 LTK_KEYBOARDCHANGE_EVENT, 28 } ltk_event_type; 29 30 /* FIXME: button mask also in motion */ 31 32 typedef enum { 33 LTK_BUTTONL, 34 LTK_BUTTONM, 35 LTK_BUTTONR, 36 } ltk_button_type; 37 38 /* FIXME: better sorting (the current order is just copied from config.c) */ 39 /* FIXME: use the Xlib definitions to optimize for the common case? */ 40 typedef enum { 41 LTK_KEY_NONE = 0, 42 LTK_KEY_BACKSPACE, 43 LTK_KEY_BEGIN, 44 LTK_KEY_BREAK, 45 LTK_KEY_CANCEL, 46 LTK_KEY_CLEAR, 47 LTK_KEY_DELETE, 48 LTK_KEY_DOWN, 49 LTK_KEY_END, 50 LTK_KEY_ESCAPE, 51 LTK_KEY_EXECUTE, 52 53 LTK_KEY_F1, 54 LTK_KEY_F10, 55 LTK_KEY_F11, 56 LTK_KEY_F12, 57 LTK_KEY_F2, 58 LTK_KEY_F3, 59 LTK_KEY_F4, 60 LTK_KEY_F5, 61 LTK_KEY_F6, 62 LTK_KEY_F7, 63 LTK_KEY_F8, 64 LTK_KEY_F9, 65 66 LTK_KEY_FIND, 67 LTK_KEY_HELP, 68 LTK_KEY_HOME, 69 LTK_KEY_INSERT, 70 71 LTK_KEY_KP_0, 72 LTK_KEY_KP_1, 73 LTK_KEY_KP_2, 74 LTK_KEY_KP_3, 75 LTK_KEY_KP_4, 76 LTK_KEY_KP_5, 77 LTK_KEY_KP_6, 78 LTK_KEY_KP_7, 79 LTK_KEY_KP_8, 80 LTK_KEY_KP_9, 81 LTK_KEY_KP_ADD, 82 LTK_KEY_KP_BEGIN, 83 LTK_KEY_KP_DECIMAL, 84 LTK_KEY_KP_DELETE, 85 LTK_KEY_KP_DIVIDE, 86 LTK_KEY_KP_DOWN, 87 LTK_KEY_KP_END, 88 LTK_KEY_KP_ENTER, 89 LTK_KEY_KP_EQUAL, 90 LTK_KEY_KP_HOME, 91 LTK_KEY_KP_INSERT, 92 LTK_KEY_KP_LEFT, 93 LTK_KEY_KP_MULTIPLY, 94 LTK_KEY_KP_NEXT, 95 LTK_KEY_KP_PAGE_DOWN, 96 LTK_KEY_KP_PAGE_UP, 97 LTK_KEY_KP_PRIOR, 98 LTK_KEY_KP_RIGHT, 99 LTK_KEY_KP_SEPARATOR, 100 LTK_KEY_KP_SPACE, 101 LTK_KEY_KP_SUBTRACT, 102 LTK_KEY_KP_TAB, 103 LTK_KEY_KP_UP, 104 105 LTK_KEY_LEFT, 106 LTK_KEY_LINEFEED, 107 LTK_KEY_MENU, 108 LTK_KEY_MODE_SWITCH, 109 LTK_KEY_NEXT, 110 LTK_KEY_NUM_LOCK, 111 LTK_KEY_PAGE_DOWN, 112 LTK_KEY_PAGE_UP, 113 LTK_KEY_PAUSE, 114 LTK_KEY_PRINT, 115 LTK_KEY_PRIOR, 116 117 LTK_KEY_REDO, 118 LTK_KEY_RETURN, 119 LTK_KEY_RIGHT, 120 LTK_KEY_SCRIPT_SWITCH, 121 LTK_KEY_SCROLL_LOCK, 122 LTK_KEY_SELECT, 123 LTK_KEY_SPACE, 124 LTK_KEY_SYS_REQ, 125 LTK_KEY_TAB, 126 LTK_KEY_UP, 127 LTK_KEY_UNDO 128 } ltk_keysym; 129 130 typedef enum { 131 LTK_MOD_NONE = 0, 132 LTK_MOD_CTRL = 1, 133 LTK_MOD_SHIFT = 2, 134 LTK_MOD_ALT = 4, 135 LTK_MOD_SUPER = 8 136 } ltk_mod_type; 137 138 #endif /* LTK_EVENTDEFS_H */