diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-08-18 07:21:55 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-08-18 07:22:18 +0300 |
commit | b10d0058d72da3051895481ae5830a7b668b7d80 (patch) | |
tree | 987bcae7e565745b1371e60c7d74ffce2668aac7 /source/blender/windowmanager/wm_event_types.h | |
parent | a195dd15d4373ff0e240566795ff7795ca7485e6 (diff) |
NDOF: compile 3D mouse code only if WITH_INPUT_NDOF
When WITH_INPUT_NDOF is disabled, 3D mouse handling code is removed
from:
- GHOST (was mostly done, finished the job)
- window manager
- various editors
- RNA
- keymaps
The input tab of user prefs does not show 3D mouse settings. Key map
editor does not show NDOF mappings.
DNA does not change.
On my Mac the compiled binary is 42KB smaller after this change. It
runs fine WITH_INPUT_NDOF on or off.
Diffstat (limited to 'source/blender/windowmanager/wm_event_types.h')
-rw-r--r-- | source/blender/windowmanager/wm_event_types.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 3085f138846..0936b294d1b 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -40,7 +40,9 @@ enum { EVT_DATA_GESTURE = 1, EVT_DATA_TIMER = 2, EVT_DATA_DRAGDROP = 3, +#ifdef WITH_INPUT_NDOF EVT_DATA_NDOF_MOTION = 4, +#endif }; /* tablet active, matches GHOST_TTabletMode */ @@ -236,6 +238,7 @@ enum { /* *** End of keyboard codes. *** */ +#ifdef WITH_INPUT_NDOF /* NDOF (from SpaceNavigator & friends) * These should be kept in sync with GHOST_NDOFManager.h * Ordering matters, exact values do not. */ @@ -290,6 +293,7 @@ enum { NDOF_BUTTON_C, /* the end */ NDOF_LAST, +#endif /* WITH_INPUT_NDOF */ /* ********** End of Input devices. ********** */ @@ -369,8 +373,12 @@ enum { /* test whether the event is tweak event */ #define ISTWEAK(event_type) ((event_type) >= EVT_TWEAK_L && (event_type) <= EVT_GESTURE) +#ifdef WITH_INPUT_NDOF /* test whether the event is a NDOF event */ -#define ISNDOF(event_type) ((event_type) >= NDOF_MOTION && (event_type) < NDOF_LAST) +# define ISNDOF(event_type) ((event_type) >= NDOF_MOTION && (event_type) < NDOF_LAST) +#else +# define ISNDOF(event_type) false +#endif /* test whether event type is acceptable as hotkey, excluding modifiers */ #define ISHOTKEY(event_type) \ |