diff options
author | Sascha Hlusiak <saschahlusiak@arcor.de> | 2008-12-28 17:28:50 +0100 |
---|---|---|
committer | Sascha Hlusiak <saschahlusiak@arcor.de> | 2008-12-28 17:28:50 +0100 |
commit | f81b9077d13b614262556a7401068f016fe2b365 (patch) | |
tree | c49d1062713fd04f3b7108c863a6dbfa9b36a9d8 | |
parent | 79028fc80fe7cbd452a18b4ddf92c328a1fe1393 (diff) |
Export JSTK_* constants with joystick-properties.h
-rw-r--r-- | include/joystick-properties.h | 27 | ||||
-rw-r--r-- | src/jstk.h | 23 |
2 files changed, 28 insertions, 22 deletions
diff --git a/include/joystick-properties.h b/include/joystick-properties.h index 178df26..603394d 100644 --- a/include/joystick-properties.h +++ b/include/joystick-properties.h @@ -30,6 +30,33 @@ */ + +/** To be used with property JSTK_PROP_AXIS_TYPE **/ +typedef enum _JSTK_TYPE { + JSTK_TYPE_NONE=0, /* Axis value is not relevant */ + JSTK_TYPE_BYVALUE, /* Speed of cursor is relative to amplitude */ + JSTK_TYPE_ACCELERATED, /* Speed is accelerated */ + JSTK_TYPE_ABSOLUTE /* The amplitude defines the cursor position */ +} JSTK_TYPE; + + +/** To be used with properties JSTK_PROP_AXIS_MAPPING, JSTK_PROP_BUTTON_MAPPING */ +typedef enum _JSTK_MAPPING { + JSTK_MAPPING_NONE=0, /* Nothing */ + JSTK_MAPPING_X, /* X-Axis */ + JSTK_MAPPING_Y, /* Y-Axis */ + JSTK_MAPPING_ZX, /* Horizontal scrolling */ + JSTK_MAPPING_ZY, /* Vertical scrolling */ + JSTK_MAPPING_BUTTON, /* Mouse button */ + JSTK_MAPPING_KEY, /* Keyboard event */ + JSTK_MAPPING_SPEED_MULTIPLY, /* Will amplify all axis movement */ + JSTK_MAPPING_DISABLE, /* Disable mouse and key events */ + JSTK_MAPPING_DISABLE_MOUSE, /* Disable only mouse events */ + JSTK_MAPPING_DISABLE_KEYS /* Disable only key events */ +} JSTK_MAPPING; + + + /** Controls the verbosity of the driver */ /* 8 bit (0..20) */ #define JSTK_PROP_DEBUGLEVEL "Debug Level" @@ -26,6 +26,7 @@ #include <xf86Xinput.h> #include <X11/extensions/XIproto.h> +#include "joystick-properties.h" /* definitions */ #define MAXBUTTONS 32 @@ -68,28 +69,6 @@ typedef void(*jstkCloseDeviceProc)(JoystickDevPtr joystick); typedef int(*jstkReadDataProc)(JoystickDevPtr joystick, JOYSTICKEVENT *event, int *number); - -typedef enum _JSTK_TYPE { - JSTK_TYPE_NONE=0, /* Axis value is not relevant */ - JSTK_TYPE_BYVALUE, /* Speed of cursor is relative to amplitude */ - JSTK_TYPE_ACCELERATED, /* Speed is accelerated */ - JSTK_TYPE_ABSOLUTE /* The amplitude defines the cursor position */ -} JSTK_TYPE; - -typedef enum _JSTK_MAPPING { - JSTK_MAPPING_NONE=0, /* Nothing */ - JSTK_MAPPING_X, /* X-Axis */ - JSTK_MAPPING_Y, /* Y-Axis */ - JSTK_MAPPING_ZX, /* Horizontal scrolling */ - JSTK_MAPPING_ZY, /* Vertical scrolling */ - JSTK_MAPPING_BUTTON, /* Mouse button */ - JSTK_MAPPING_KEY, /* Keyboard event */ - JSTK_MAPPING_SPEED_MULTIPLY, /* Will amplify all axis movement */ - JSTK_MAPPING_DISABLE, /* Disable mouse and key events */ - JSTK_MAPPING_DISABLE_MOUSE, /* Disable only mouse events */ - JSTK_MAPPING_DISABLE_KEYS /* Disable only key events */ -} JSTK_MAPPING; - typedef unsigned int KEYSCANCODES [MAXKEYSPERBUTTON]; typedef struct _AXIS { |