Export JSTK_* constants with joystick-properties.h

This commit is contained in:
Sascha Hlusiak
2008-12-28 17:28:50 +01:00
parent 79028fc80f
commit f81b9077d1
2 changed files with 28 additions and 22 deletions

View File

@@ -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"

View File

@@ -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 {