Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-09-01 19:08:33 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-09-01 19:08:33 +0400
commitc23733d290c095ab77310b55c75293465891d5b8 (patch)
treed1cc657f3d6240e313d59c4d87cc775cf6ecc5cf /source/blender/windowmanager/wm_event_types.h
parent575cbf0172508eb9d846f1c62027a9c0f4fddd34 (diff)
Cleanup: Event defines -> enums.
Also made all event type values as hexadecimal (mixing decimal, hexa and char values is a nice way to make mistakes)!
Diffstat (limited to 'source/blender/windowmanager/wm_event_types.h')
-rw-r--r--source/blender/windowmanager/wm_event_types.h576
1 files changed, 297 insertions, 279 deletions
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index 6d3cdf6a270..d7335ccc654 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -36,92 +36,226 @@
#define __WM_EVENT_TYPES_H__
/* customdata type */
-#define EVT_DATA_GESTURE 1
-#define EVT_DATA_TIMER 2
-#define EVT_DATA_DRAGDROP 3
-#define EVT_DATA_NDOF_MOTION 4
+enum {
+ EVT_DATA_GESTURE = 1,
+ EVT_DATA_TIMER = 2,
+ EVT_DATA_DRAGDROP = 3,
+ EVT_DATA_NDOF_MOTION = 4,
+};
/* tablet active, matches GHOST_TTabletMode */
-#define EVT_TABLET_NONE 0
-#define EVT_TABLET_STYLUS 1
-#define EVT_TABLET_ERASER 2
-
-
-/* *** wmEvent.type *** */
-
-/* non-event, for example disabled timer */
-#define EVENT_NONE 0
-/* MOUSE : 0x00x */
-#define LEFTMOUSE 1
-#define MIDDLEMOUSE 2
-#define RIGHTMOUSE 3
-#define MOUSEMOVE 4
- /* only use if you want user option switch possible */
-#define ACTIONMOUSE 5
-#define SELECTMOUSE 6
- /* Extra mouse buttons */
-#define BUTTON4MOUSE 7
-#define BUTTON5MOUSE 8
- /* More mouse buttons - can't use 9 and 10 here (wheel) */
-#define BUTTON6MOUSE 18
-#define BUTTON7MOUSE 19
- /* Extra trackpad gestures */
-#define MOUSEPAN 14
-#define MOUSEZOOM 15
-#define MOUSEROTATE 16
- /* defaults from ghost */
-#define WHEELUPMOUSE 10
-#define WHEELDOWNMOUSE 11
- /* mapped with userdef */
-#define WHEELINMOUSE 12
-#define WHEELOUTMOUSE 13
- /* Successive MOUSEMOVE's are converted to this, so we can easily
- * ignore all but the most recent MOUSEMOVE (for better performance),
- * paint and drawing tools however will want to handle these. */
-#define INBETWEEN_MOUSEMOVE 17
-
-
-/* NDOF (from SpaceNavigator & friends)
- * These should be kept in sync with GHOST_NDOFManager.h
- * Ordering matters, exact values do not. */
-
-#define NDOF_MOTION 400
+enum {
+ EVT_TABLET_NONE = 0,
+ EVT_TABLET_STYLUS = 1,
+ EVT_TABLET_ERASER = 2,
+};
+/* ********** wmEvent.type ********** */
enum {
- // used internally, never sent
+ /* non-event, for example disabled timer */
+ EVENT_NONE = 0x0000,
+
+ /* ********** Start of Input devices. ********** */
+
+ /* MOUSE : 0x000x, 0x001x */
+ LEFTMOUSE = 0x0001,
+ MIDDLEMOUSE = 0x0002,
+ RIGHTMOUSE = 0x0003,
+ MOUSEMOVE = 0x0004,
+ /* only use if you want user option switch possible */
+ ACTIONMOUSE = 0x0005,
+ SELECTMOUSE = 0x0006,
+ /* Extra mouse buttons */
+ BUTTON4MOUSE = 0x0007,
+ BUTTON5MOUSE = 0x0008,
+ /* More mouse buttons - can't use 9 and 10 here (wheel) */
+ BUTTON6MOUSE = 0x0012,
+ BUTTON7MOUSE = 0x0013,
+ /* Extra trackpad gestures */
+ MOUSEPAN = 0x000e,
+ MOUSEZOOM = 0x000f,
+ MOUSEROTATE = 0x0010,
+ /* defaults from ghost */
+ WHEELUPMOUSE = 0x000a,
+ WHEELDOWNMOUSE = 0x000b,
+ /* mapped with userdef */
+ WHEELINMOUSE = 0x000c,
+ WHEELOUTMOUSE = 0x000d,
+ /* Successive MOUSEMOVE's are converted to this, so we can easily
+ * ignore all but the most recent MOUSEMOVE (for better performance),
+ * paint and drawing tools however will want to handle these. */
+ INBETWEEN_MOUSEMOVE = 0x0011,
+
+ /* *** Start of keyboard codes. *** */
+
+ /* standard keyboard.
+ * XXX from 0x0020 to 0x00ff, and 0x012c to 0x0140 for function keys! */
+ AKEY = 0x0061, /* 'a' */
+ BKEY = 0x0062, /* 'b' */
+ CKEY = 0x0063, /* 'c' */
+ DKEY = 0x0064, /* 'd' */
+ EKEY = 0x0065, /* 'e' */
+ FKEY = 0x0066, /* 'f' */
+ GKEY = 0x0067, /* 'g' */
+ HKEY = 0x0068, /* 'h' */
+ IKEY = 0x0069, /* 'i' */
+ JKEY = 0x006a, /* 'j' */
+ KKEY = 0x006b, /* 'k' */
+ LKEY = 0x006c, /* 'l' */
+ MKEY = 0x006d, /* 'm' */
+ NKEY = 0x006e, /* 'n' */
+ OKEY = 0x006f, /* 'o' */
+ PKEY = 0x0070, /* 'p' */
+ QKEY = 0x0071, /* 'q' */
+ RKEY = 0x0072, /* 'r' */
+ SKEY = 0x0073, /* 's' */
+ TKEY = 0x0074, /* 't' */
+ UKEY = 0x0075, /* 'u' */
+ VKEY = 0x0076, /* 'v' */
+ WKEY = 0x0077, /* 'w' */
+ XKEY = 0x0078, /* 'x' */
+ YKEY = 0x0079, /* 'y' */
+ ZKEY = 0x007a, /* 'z' */
+
+ ZEROKEY = 0x0030, /* '0' */
+ ONEKEY = 0x0031, /* '1' */
+ TWOKEY = 0x0032, /* '2' */
+ THREEKEY = 0x0033, /* '3' */
+ FOURKEY = 0x0034, /* '4' */
+ FIVEKEY = 0x0035, /* '5' */
+ SIXKEY = 0x0036, /* '6' */
+ SEVENKEY = 0x0037, /* '7' */
+ EIGHTKEY = 0x0038, /* '8' */
+ NINEKEY = 0x0039, /* '9' */
+
+ CAPSLOCKKEY = 0x00d3, /* 211 */
+
+ LEFTCTRLKEY = 0x00d4, /* 212 */
+ LEFTALTKEY = 0x00d5, /* 213 */
+ RIGHTALTKEY = 0x00d6, /* 214 */
+ RIGHTCTRLKEY = 0x00d7, /* 215 */
+ RIGHTSHIFTKEY = 0x00d8, /* 216 */
+ LEFTSHIFTKEY = 0x00d9, /* 217 */
+
+ ESCKEY = 0x00da, /* 218 */
+ TABKEY = 0x00db, /* 219 */
+ RETKEY = 0x00dc, /* 220 */
+ SPACEKEY = 0x00dd, /* 221 */
+ LINEFEEDKEY = 0x00de, /* 222 */
+ BACKSPACEKEY = 0x00df, /* 223 */
+ DELKEY = 0x00e0, /* 224 */
+ SEMICOLONKEY = 0x00e1, /* 225 */
+ PERIODKEY = 0x00e2, /* 226 */
+ COMMAKEY = 0x00e3, /* 227 */
+ QUOTEKEY = 0x00e4, /* 228 */
+ ACCENTGRAVEKEY = 0x00e5, /* 229 */
+ MINUSKEY = 0x00e6, /* 230 */
+ SLASHKEY = 0x00e8, /* 232 */
+ BACKSLASHKEY = 0x00e9, /* 233 */
+ EQUALKEY = 0x00ea, /* 234 */
+ LEFTBRACKETKEY = 0x00eb, /* 235 */
+ RIGHTBRACKETKEY = 0x00ec, /* 236 */
+
+ LEFTARROWKEY = 0x0089, /* 137 */
+ DOWNARROWKEY = 0x008a, /* 138 */
+ RIGHTARROWKEY = 0x008b, /* 139 */
+ UPARROWKEY = 0x008c, /* 140 */
+
+ PAD0 = 0x0096, /* 150 */
+ PAD1 = 0x0097, /* 151 */
+ PAD2 = 0x0098, /* 152 */
+ PAD3 = 0x0099, /* 153 */
+ PAD4 = 0x009a, /* 154 */
+ PAD5 = 0x009b, /* 155 */
+ PAD6 = 0x009c, /* 156 */
+ PAD7 = 0x009d, /* 157 */
+ PAD8 = 0x009e, /* 158 */
+ PAD9 = 0x009f, /* 159 */
+
+ PADPERIOD = 0x00c7, /* 199 */
+ PADASTERKEY = 0x00a0, /* 160 */
+ PADSLASHKEY = 0x00a1, /* 161 */
+ PADMINUS = 0x00a2, /* 162 */
+ PADENTER = 0x00a3, /* 163 */
+ PADPLUSKEY = 0x00a4, /* 164 */
+
+ PAUSEKEY = 0x00a5, /* 165 */
+ INSERTKEY = 0x00a6, /* 166 */
+ HOMEKEY = 0x00a7, /* 167 */
+ PAGEUPKEY = 0x00a8, /* 168 */
+ PAGEDOWNKEY = 0x00a9, /* 169 */
+ ENDKEY = 0x00aa, /* 170 */
+
+ UNKNOWNKEY = 0x00ab, /* 171 */
+ OSKEY = 0x00ac, /* 172 */
+ GRLESSKEY = 0x00ad, /* 173 */
+
+ /* XXX: are these codes ok? */
+ MEDIAPLAY = 0x00ae, /* 174 */
+ MEDIASTOP = 0x00af, /* 175 */
+ MEDIAFIRST = 0x00b0, /* 176 */
+ MEDIALAST = 0x00b1, /* 177 */
+
+ F1KEY = 0x012c, /* 300 */
+ F2KEY = 0x012d, /* 301 */
+ F3KEY = 0x012e, /* 302 */
+ F4KEY = 0x012f, /* 303 */
+ F5KEY = 0x0130, /* 304 */
+ F6KEY = 0x0131, /* 305 */
+ F7KEY = 0x0132, /* 306 */
+ F8KEY = 0x0133, /* 307 */
+ F9KEY = 0x0134, /* 308 */
+ F10KEY = 0x0135, /* 309 */
+ F11KEY = 0x0136, /* 310 */
+ F12KEY = 0x0137, /* 311 */
+ F13KEY = 0x0138, /* 312 */
+ F14KEY = 0x0139, /* 313 */
+ F15KEY = 0x013a, /* 314 */
+ F16KEY = 0x013b, /* 315 */
+ F17KEY = 0x013c, /* 316 */
+ F18KEY = 0x013d, /* 317 */
+ F19KEY = 0x013e, /* 318 */
+
+ /* *** End of keyboard codes. *** */
+
+ /* NDOF (from SpaceNavigator & friends)
+ * These should be kept in sync with GHOST_NDOFManager.h
+ * Ordering matters, exact values do not. */
+ NDOF_MOTION = 0x0190,
+ /* used internally, never sent */
NDOF_BUTTON_NONE = NDOF_MOTION,
- // these two are available from any 3Dconnexion device
+ /* these two are available from any 3Dconnexion device */
NDOF_BUTTON_MENU,
NDOF_BUTTON_FIT,
- // standard views
+ /* standard views */
NDOF_BUTTON_TOP,
NDOF_BUTTON_BOTTOM,
NDOF_BUTTON_LEFT,
NDOF_BUTTON_RIGHT,
NDOF_BUTTON_FRONT,
NDOF_BUTTON_BACK,
- // more views
+ /* more views */
NDOF_BUTTON_ISO1,
NDOF_BUTTON_ISO2,
- // 90 degree rotations
+ /* 90 degree rotations */
NDOF_BUTTON_ROLL_CW,
NDOF_BUTTON_ROLL_CCW,
NDOF_BUTTON_SPIN_CW,
NDOF_BUTTON_SPIN_CCW,
NDOF_BUTTON_TILT_CW,
NDOF_BUTTON_TILT_CCW,
- // device control
+ /* device control */
NDOF_BUTTON_ROTATE,
NDOF_BUTTON_PANZOOM,
NDOF_BUTTON_DOMINANT,
NDOF_BUTTON_PLUS,
NDOF_BUTTON_MINUS,
- // keyboard emulation
+ /* keyboard emulation */
NDOF_BUTTON_ESC,
NDOF_BUTTON_ALT,
NDOF_BUTTON_SHIFT,
NDOF_BUTTON_CTRL,
- // general-purpose buttons
+ /* general-purpose buttons */
NDOF_BUTTON_1,
NDOF_BUTTON_2,
NDOF_BUTTON_3,
@@ -132,180 +266,79 @@ enum {
NDOF_BUTTON_8,
NDOF_BUTTON_9,
NDOF_BUTTON_10,
- // more general-purpose buttons
+ /* more general-purpose buttons */
NDOF_BUTTON_A,
NDOF_BUTTON_B,
NDOF_BUTTON_C,
- // the end
- NDOF_LAST
+ /* the end */
+ NDOF_LAST,
+
+ /* ********** End of Input devices. ********** */
+
+ /* ********** Start of Blender internal events. ********** */
+
+ /* XXX Those are mixed inside keyboard 'area'! */
+ /* System: 0x010x */
+ INPUTCHANGE = 0x0103, /* input connected or disconnected */
+ WINDEACTIVATE = 0x0104, /* window is deactivated, focus lost */
+ /* Timer: 0x011x */
+ TIMER = 0x0110, /* timer event, passed on to all queues */
+ TIMER0 = 0x0111, /* timer event, slot for internal use */
+ TIMER1 = 0x0112, /* timer event, slot for internal use */
+ TIMER2 = 0x0113, /* timer event, slot for internal use */
+ TIMERJOBS = 0x0114, /* timer event, jobs system */
+ TIMERAUTOSAVE = 0x0115, /* timer event, autosave */
+ TIMERREPORT = 0x0116, /* timer event, reports */
+ TIMERREGION = 0x0117, /* timer event, region slide in/out */
+ TIMERF = 0x011F, /* last timer */
+
+ /* Tweak, gestures: 0x500x, 0x501x */
+ EVT_ACTIONZONE_AREA = 0x5000,
+ EVT_ACTIONZONE_REGION = 0x5001,
+ /* tweak events, for L M R mousebuttons */
+ EVT_TWEAK_L = 0x5002,
+ EVT_TWEAK_M = 0x5003,
+ EVT_TWEAK_R = 0x5004,
+ /* tweak events for action or select mousebutton */
+ EVT_TWEAK_A = 0x5005,
+ EVT_TWEAK_S = 0x5006,
+ EVT_GESTURE = 0x5010,
+
+ /* Misc Blender internals: 0x502x */
+ EVT_FILESELECT = 0x5020,
+ EVT_BUT_OPEN = 0x5021,
+ EVT_MODAL_MAP = 0x5022,
+ EVT_DROP = 0x5023,
+ EVT_BUT_CANCEL = 0x5024,
+
+ /* ********** End of Blender internal events. ********** */
};
-/* SYSTEM : 0x01xx */
-#define INPUTCHANGE 0x0103 /* input connected or disconnected */
-#define WINDEACTIVATE 0x0104 /* window is deactivated, focus lost */
-
-#define TIMER 0x0110 /* timer event, passed on to all queues */
-#define TIMER0 0x0111 /* timer event, slot for internal use */
-#define TIMER1 0x0112 /* timer event, slot for internal use */
-#define TIMER2 0x0113 /* timer event, slot for internal use */
-#define TIMERJOBS 0x0114 /* timer event, jobs system */
-#define TIMERAUTOSAVE 0x0115 /* timer event, autosave */
-#define TIMERREPORT 0x0116 /* timer event, reports */
-#define TIMERREGION 0x0117 /* timer event, region slide in/out */
-#define TIMERF 0x011F /* last timer */
+/* *********** wmEvent.type helpers. ********** */
/* test whether the event is timer event */
#define ISTIMER(event_type) (event_type >= TIMER && event_type <= TIMERF)
-/* standard keyboard */
-#define AKEY 'a'
-#define BKEY 'b'
-#define CKEY 'c'
-#define DKEY 'd'
-#define EKEY 'e'
-#define FKEY 'f'
-#define GKEY 'g'
-#define HKEY 'h'
-#define IKEY 'i'
-#define JKEY 'j'
-#define KKEY 'k'
-#define LKEY 'l'
-#define MKEY 'm'
-#define NKEY 'n'
-#define OKEY 'o'
-#define PKEY 'p'
-#define QKEY 'q'
-#define RKEY 'r'
-#define SKEY 's'
-#define TKEY 't'
-#define UKEY 'u'
-#define VKEY 'v'
-#define WKEY 'w'
-#define XKEY 'x'
-#define YKEY 'y'
-#define ZKEY 'z'
-
-#define ZEROKEY '0'
-#define ONEKEY '1'
-#define TWOKEY '2'
-#define THREEKEY '3'
-#define FOURKEY '4'
-#define FIVEKEY '5'
-#define SIXKEY '6'
-#define SEVENKEY '7'
-#define EIGHTKEY '8'
-#define NINEKEY '9'
-
-#define CAPSLOCKKEY 211
-
-#define LEFTCTRLKEY 212
-#define LEFTALTKEY 213
-#define RIGHTALTKEY 214
-#define RIGHTCTRLKEY 215
-#define RIGHTSHIFTKEY 216
-#define LEFTSHIFTKEY 217
-
-#define ESCKEY 218
-#define TABKEY 219
-#define RETKEY 220
-#define SPACEKEY 221
-#define LINEFEEDKEY 222
-#define BACKSPACEKEY 223
-#define DELKEY 224
-#define SEMICOLONKEY 225
-#define PERIODKEY 226
-#define COMMAKEY 227
-#define QUOTEKEY 228
-#define ACCENTGRAVEKEY 229
-#define MINUSKEY 230
-#define SLASHKEY 232
-#define BACKSLASHKEY 233
-#define EQUALKEY 234
-#define LEFTBRACKETKEY 235
-#define RIGHTBRACKETKEY 236
-
-#define LEFTARROWKEY 137
-#define DOWNARROWKEY 138
-#define RIGHTARROWKEY 139
-#define UPARROWKEY 140
-
-#define PAD0 150
-#define PAD1 151
-#define PAD2 152
-#define PAD3 153
-#define PAD4 154
-#define PAD5 155
-#define PAD6 156
-#define PAD7 157
-#define PAD8 158
-#define PAD9 159
-
-
-#define PADPERIOD 199
-#define PADSLASHKEY 161
-#define PADASTERKEY 160
-
-#define PADMINUS 162
-#define PADENTER 163
-#define PADPLUSKEY 164
-
-#define F1KEY 300
-#define F2KEY 301
-#define F3KEY 302
-#define F4KEY 303
-#define F5KEY 304
-#define F6KEY 305
-#define F7KEY 306
-#define F8KEY 307
-#define F9KEY 308
-#define F10KEY 309
-#define F11KEY 310
-#define F12KEY 311
-#define F13KEY 312
-#define F14KEY 313
-#define F15KEY 314
-#define F16KEY 315
-#define F17KEY 316
-#define F18KEY 317
-#define F19KEY 318
-
-#define PAUSEKEY 165
-#define INSERTKEY 166
-#define HOMEKEY 167
-#define PAGEUPKEY 168
-#define PAGEDOWNKEY 169
-#define ENDKEY 170
-
-#define UNKNOWNKEY 171
-#define OSKEY 172
-#define GRLESSKEY 173
-
-// XXX: are these codes ok?
-#define MEDIAPLAY 174
-#define MEDIASTOP 175
-#define MEDIAFIRST 176
-#define MEDIALAST 177
-
/* for event checks */
- /* only used for KM_TEXTINPUT, so assume that we want all user-inputtable ascii codes included */
- /* UNUSED - see wm_eventmatch - BUG [#30479] */
-// #define ISTEXTINPUT(event_type) (event_type >= ' ' && event_type <= 255)
+/* only used for KM_TEXTINPUT, so assume that we want all user-inputtable ascii codes included */
+/* UNUSED - see wm_eventmatch - BUG [#30479] */
+/* #define ISTEXTINPUT(event_type) (event_type >= ' ' && event_type <= 255) */
/* note, an alternative could be to check 'event->utf8_buf' */
- /* test whether the event is a key on the keyboard */
+/* test whether the event is a key on the keyboard */
#define ISKEYBOARD(event_type) (event_type >= ' ' && event_type <= 320)
- /* test whether the event is a modifier key */
+/* test whether the event is a modifier key */
#define ISKEYMODIFIER(event_type) ((event_type >= LEFTCTRLKEY && event_type <= LEFTSHIFTKEY) || event_type == OSKEY)
- /* test whether the event is a mouse button */
+/* test whether the event is a mouse button */
#define ISMOUSE(event_type) (event_type >= LEFTMOUSE && event_type <= BUTTON7MOUSE)
- /* test whether the event is tweak event */
+/* test whether the event is tweak event */
#define ISTWEAK(event_type) (event_type >= EVT_TWEAK_L && event_type <= EVT_GESTURE)
- /* test whether the event is a NDOF event */
+/* test whether the event is a NDOF event */
#define ISNDOF(event_type) (event_type >= NDOF_MOTION && event_type < NDOF_LAST)
/* test whether event type is acceptable as hotkey, excluding modifiers */
@@ -315,76 +348,61 @@ enum {
(event_type >= LEFTCTRLKEY && event_type <= LEFTSHIFTKEY) == false && \
(event_type >= UNKNOWNKEY && event_type <= GRLESSKEY) == false)
-/* **************** BLENDER GESTURE EVENTS (0x5000) **************** */
-
-#define EVT_ACTIONZONE_AREA 20480
-#define EVT_ACTIONZONE_REGION 20481
-
- /* tweak events, for L M R mousebuttons */
-#define EVT_TWEAK_L 20482
-#define EVT_TWEAK_M 20483
-#define EVT_TWEAK_R 20484
- /* tweak events for action or select mousebutton */
-#define EVT_TWEAK_A 20485
-#define EVT_TWEAK_S 20486
-
-#define EVT_GESTURE 20496
-
-/* value of tweaks and line gestures, note, KM_ANY (-1) works for this case too */
-#define EVT_GESTURE_N 1
-#define EVT_GESTURE_NE 2
-#define EVT_GESTURE_E 3
-#define EVT_GESTURE_SE 4
-#define EVT_GESTURE_S 5
-#define EVT_GESTURE_SW 6
-#define EVT_GESTURE_W 7
-#define EVT_GESTURE_NW 8
-/* value of corner gestures */
-#define EVT_GESTURE_N_E 9
-#define EVT_GESTURE_N_W 10
-#define EVT_GESTURE_E_N 11
-#define EVT_GESTURE_E_S 12
-#define EVT_GESTURE_S_E 13
-#define EVT_GESTURE_S_W 14
-#define EVT_GESTURE_W_S 15
-#define EVT_GESTURE_W_N 16
-
-/* **************** OTHER BLENDER EVENTS ********************* */
-
-/* event->type */
-#define EVT_FILESELECT 0x5020
-
-/* event->val */
-#define EVT_FILESELECT_OPEN 1
-#define EVT_FILESELECT_FULL_OPEN 2
-#define EVT_FILESELECT_EXEC 3
-#define EVT_FILESELECT_CANCEL 4
-#define EVT_FILESELECT_EXTERNAL_CANCEL 5
-
-/* event->type */
-#define EVT_BUT_OPEN 0x5021
-#define EVT_MODAL_MAP 0x5022
-#define EVT_DROP 0x5023
-#define EVT_BUT_CANCEL 0x5024
-
-/* NOTE: these defines are saved in keymap files, do not change values but just add new ones */
-#define GESTURE_MODAL_CANCEL 1
-#define GESTURE_MODAL_CONFIRM 2
-
-#define GESTURE_MODAL_SELECT 3
-#define GESTURE_MODAL_DESELECT 4
-
-#define GESTURE_MODAL_NOP 5 /* circle select when no mouse button is pressed */
-
-#define GESTURE_MODAL_CIRCLE_ADD 6 /* circle sel: larger brush */
-#define GESTURE_MODAL_CIRCLE_SUB 7 /* circle sel: smaller brush */
-
-#define GESTURE_MODAL_BEGIN 8 /* border select/straight line, activate, use release to detect which button */
-
-#define GESTURE_MODAL_IN 9
-#define GESTURE_MODAL_OUT 10
-
-#define GESTURE_MODAL_CIRCLE_SIZE 11 /* circle sel: size brush (for trackpad event) */
+
+/* ********** wmEvent.val ********** */
+
+/* Gestures */
+enum {
+ /* value of tweaks and line gestures, note, KM_ANY (-1) works for this case too */
+ EVT_GESTURE_N = 1,
+ EVT_GESTURE_NE = 2,
+ EVT_GESTURE_E = 3,
+ EVT_GESTURE_SE = 4,
+ EVT_GESTURE_S = 5,
+ EVT_GESTURE_SW = 6,
+ EVT_GESTURE_W = 7,
+ EVT_GESTURE_NW = 8,
+ /* value of corner gestures */
+ EVT_GESTURE_N_E = 9,
+ EVT_GESTURE_N_W = 10,
+ EVT_GESTURE_E_N = 11,
+ EVT_GESTURE_E_S = 12,
+ EVT_GESTURE_S_E = 13,
+ EVT_GESTURE_S_W = 14,
+ EVT_GESTURE_W_S = 15,
+ EVT_GESTURE_W_N = 16,
+};
+
+/* File select */
+enum {
+ EVT_FILESELECT_OPEN = 1,
+ EVT_FILESELECT_FULL_OPEN = 2,
+ EVT_FILESELECT_EXEC = 3,
+ EVT_FILESELECT_CANCEL = 4,
+ EVT_FILESELECT_EXTERNAL_CANCEL = 5,
+};
+
+/* Gesture */
+/* NOTE: these values are saved in keymap files, do not change them but just add new ones */
+enum {
+ GESTURE_MODAL_CANCEL = 1,
+ GESTURE_MODAL_CONFIRM = 2,
+
+ GESTURE_MODAL_SELECT = 3,
+ GESTURE_MODAL_DESELECT = 4,
+
+ GESTURE_MODAL_NOP = 5, /* circle select when no mouse button is pressed */
+
+ GESTURE_MODAL_CIRCLE_ADD = 6, /* circle sel: larger brush */
+ GESTURE_MODAL_CIRCLE_SUB = 7, /* circle sel: smaller brush */
+
+ GESTURE_MODAL_BEGIN = 8, /* border select/straight line, activate, use release to detect which button */
+
+ GESTURE_MODAL_IN = 9,
+ GESTURE_MODAL_OUT = 10,
+
+ GESTURE_MODAL_CIRCLE_SIZE = 11, /* circle sel: size brush (for trackpad event) */
+};
#endif /* __WM_EVENT_TYPES_H__ */