aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Xinput.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-15 16:51:22 +0000
committermarha <marha@users.sourceforge.net>2010-11-15 16:51:22 +0000
commitf586b49ae23c573681b939ca44b3f418c83c84b2 (patch)
treeffafe2da4517c5121ab4a8c64966e72829147215 /xorg-server/hw/xfree86/common/xf86Xinput.h
parent728ff03357b2dfd7048ab093183a239a0ba044c4 (diff)
parent3a82f8a35b2c6d094cf9d0d5a3ccb9dd9b85f626 (diff)
downloadvcxsrv-f586b49ae23c573681b939ca44b3f418c83c84b2.tar.gz
vcxsrv-f586b49ae23c573681b939ca44b3f418c83c84b2.tar.bz2
vcxsrv-f586b49ae23c573681b939ca44b3f418c83c84b2.zip
svn merge "^/branches/released" .
Solved mouse motion bug in new version of dix/getevents.c
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Xinput.h')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.h122
1 files changed, 42 insertions, 80 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h
index 727f26107..15ab82421 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.h
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.h
@@ -59,161 +59,123 @@
#include "XIstubs.h"
/* Input device flags */
-#define XI86_OPEN_ON_INIT 0x01 /* open the device at startup time */
-#define XI86_CONFIGURED 0x02 /* the device has been configured */
#define XI86_ALWAYS_CORE 0x04 /* device always controls the pointer */
/* the device sends Xinput and core pointer events */
#define XI86_SEND_CORE_EVENTS XI86_ALWAYS_CORE
-/* if the device is the core pointer or is sending core events, and
- * SEND_DRAG_EVENTS is false, and a buttons is done, then no motion events
- * (mouse drag action) are sent. This is mainly to allow a touch screen to be
- * used with netscape and other browsers which do strange things if the mouse
- * moves between button down and button up. With a touch screen, this motion
- * is common due to the user's finger moving slightly.
- */
-#define XI86_SEND_DRAG_EVENTS 0x08
-#define XI86_CORE_POINTER 0x10 /* device is the core pointer */
-#define XI86_CORE_KEYBOARD 0x20 /* device is the core keyboard */
-#define XI86_POINTER_CAPABLE 0x40 /* capable of being a core pointer */
-#define XI86_KEYBOARD_CAPABLE 0x80 /* capable of being a core keyboard */
-
-#define XI_PRIVATE(dev) \
- (((LocalDevicePtr)((dev)->public.devicePrivate))->private)
-
-/* Valuator verification macro */
-#define XI_VERIFY_VALUATORS(num_valuators) \
- if (num_valuators > MAX_VALUATORS) { \
- xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" \
- " MAX_VALUATORS\n", __FUNCTION__, num_valuators); \
- return; \
- }
-
-/* Stupid API backwards-compatibility. */
-#define TS_Raw 60
-#define TS_Scaled 61
/* This holds the input driver entry and module information. */
typedef struct _InputDriverRec {
int driverVersion;
char * driverName;
void (*Identify)(int flags);
- struct _LocalDeviceRec *(*PreInit)(struct _InputDriverRec *drv,
- IDevPtr dev, int flags);
+ int (*PreInit)(struct _InputDriverRec *drv,
+ struct _InputInfoRec* pInfo, int flags);
void (*UnInit)(struct _InputDriverRec *drv,
- struct _LocalDeviceRec *pInfo,
+ struct _InputInfoRec *pInfo,
int flags);
pointer module;
+ char ** default_options;
} InputDriverRec, *InputDriverPtr;
/* This is to input devices what the ScrnInfoRec is to screens. */
-typedef struct _LocalDeviceRec {
- struct _LocalDeviceRec *next;
+typedef struct _InputInfoRec {
+ struct _InputInfoRec *next;
char * name;
+ char * driver;
+
int flags;
Bool (*device_control)(DeviceIntPtr device, int what);
- void (*read_input)(struct _LocalDeviceRec *local);
- int (*control_proc)(struct _LocalDeviceRec *local,
+ void (*read_input)(struct _InputInfoRec *local);
+ int (*control_proc)(struct _InputInfoRec *local,
xDeviceCtl *control);
- void (*close_proc)(struct _LocalDeviceRec *local);
int (*switch_mode)(ClientPtr client, DeviceIntPtr dev,
int mode);
- Bool (*conversion_proc)(struct _LocalDeviceRec *local,
- int first, int num, int v0,
- int v1, int v2, int v3, int v4,
- int v5, int *x, int *y);
- Bool (*reverse_conversion_proc)(
- struct _LocalDeviceRec *local,
- int x, int y, int *valuators);
int (*set_device_valuators)
- (struct _LocalDeviceRec *local,
+ (struct _InputInfoRec *local,
int *valuators, int first_valuator,
int num_valuators);
int fd;
- Atom atom;
DeviceIntPtr dev;
pointer private;
- int private_flags;
- unsigned int first;
- unsigned int last;
- int old_x;
- int old_y;
char * type_name;
- IntegerFeedbackPtr always_core_feedback;
- IDevPtr conf_idev;
InputDriverPtr drv;
pointer module;
pointer options;
- unsigned int history_size;
InputAttributes *attrs;
-} LocalDeviceRec, *LocalDevicePtr, InputInfoRec, *InputInfoPtr;
-
-typedef struct _DeviceAssocRec
-{
- char * config_section_name;
- LocalDevicePtr (*device_allocate)(void);
-} DeviceAssocRec, *DeviceAssocPtr;
+} *InputInfoPtr;
/* xf86Globals.c */
-extern _X_EXPORT InputInfoPtr xf86InputDevs;
+extern InputInfoPtr xf86InputDevs;
/* xf86Xinput.c */
extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
int first_valuator, int num_valuators, ...);
extern _X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute,
- int first_valuator, int num_valuators, int *valuators);
+ int first_valuator, int num_valuators, const int *valuators);
+extern _X_EXPORT void xf86PostMotionEventM(DeviceIntPtr device, int is_absolute,
+ const ValuatorMask *mask);
extern _X_EXPORT void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
int first_valuator, int num_valuators, ...);
extern _X_EXPORT void xf86PostProximityEventP(DeviceIntPtr device, int is_in, int first_valuator,
- int num_valuators, int *valuators);
+ int num_valuators, const int *valuators);
+extern _X_EXPORT void xf86PostProximityEventM(DeviceIntPtr device, int is_in,
+ const ValuatorMask *mask);
extern _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button,
int is_down, int first_valuator, int num_valuators,
...);
extern _X_EXPORT void xf86PostButtonEventP(DeviceIntPtr device, int is_absolute, int button,
int is_down, int first_valuator, int num_valuators,
- int *valuators);
+ const int *valuators);
+extern _X_EXPORT void xf86PostButtonEventM(DeviceIntPtr device, int is_absolute, int button,
+ int is_down, const ValuatorMask *mask);
extern _X_EXPORT void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down,
int is_absolute, int first_valuator, int num_valuators,
...);
+extern _X_EXPORT void xf86PostKeyEventM(DeviceIntPtr device, unsigned int key_code, int is_down,
+ int is_absolute, const ValuatorMask *mask);
extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_code, int is_down,
int is_absolute, int first_valuator, int num_valuators,
- int *valuators);
+ const int *valuators);
extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code,
int is_down);
-extern _X_EXPORT int xf86ActivateDevice(LocalDevicePtr local);
-extern _X_EXPORT LocalDevicePtr xf86FirstLocalDevice(void);
+extern _X_EXPORT InputInfoPtr xf86FirstLocalDevice(void);
extern _X_EXPORT int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min);
-extern _X_EXPORT void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, int y);
+extern _X_EXPORT void xf86XInputSetScreen(InputInfoPtr pInfo, int screen_number, int x, int y);
extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options);
extern _X_EXPORT void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval,
int maxval, int resolution, int min_res,
- int max_res);
+ int max_res, int mode);
extern _X_EXPORT void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum);
extern _X_EXPORT void xf86AddEnabledDevice(InputInfoPtr pInfo);
extern _X_EXPORT void xf86RemoveEnabledDevice(InputInfoPtr pInfo);
extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic);
extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev);
/* not exported */
-int xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL is_auto);
+int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto);
/* xf86Helper.c */
extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags);
extern _X_EXPORT void xf86DeleteInputDriver(int drvIndex);
-extern _X_EXPORT InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags);
extern _X_EXPORT InputDriverPtr xf86LookupInputDriver(const char *name);
extern _X_EXPORT InputInfoPtr xf86LookupInput(const char *name);
extern _X_EXPORT void xf86DeleteInput(InputInfoPtr pInp, int flags);
-extern _X_EXPORT void xf86MotionHistoryAllocate(LocalDevicePtr local);
+extern _X_EXPORT void xf86MotionHistoryAllocate(InputInfoPtr pInfo);
+extern _X_EXPORT void xf86IDrvMsgVerb(InputInfoPtr dev,
+ MessageType type, int verb,
+ const char *format, ...) _X_ATTRIBUTE_PRINTF(4,5);
+extern _X_EXPORT void xf86IDrvMsg(InputInfoPtr dev,
+ MessageType type,
+ const char *format, ...) _X_ATTRIBUTE_PRINTF(3,4);
+extern _X_EXPORT void xf86VIDrvMsgVerb(InputInfoPtr dev,
+ MessageType type,
+ int verb,
+ const char *format,
+ va_list args);
/* xf86Option.c */
-extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts,
- pointer extraOpts);
-
-
-/* Legacy hatred */
-#define SendCoreEvents 59
-#define DontSendCoreEvents 60
+extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts);
#endif /* _xf86Xinput_h */