aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Xinput.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
committermarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
commit81f91c615982e50bb62708201569c33a3cd3d973 (patch)
tree4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/hw/xfree86/common/xf86Xinput.h
parentb571a562410f565af2bdde52d9f7f9a23ffae04f (diff)
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Xinput.h')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.h76
1 files changed, 43 insertions, 33 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h
index 2ca2073f9..aa9e9d507 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.h
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.h
@@ -52,9 +52,6 @@
#ifndef _xf86Xinput_h
#define _xf86Xinput_h
-#ifndef NEED_EVENTS
-#define NEED_EVENTS
-#endif
#include "xf86str.h"
#include "inputstr.h"
#include <X11/extensions/XI.h>
@@ -83,6 +80,14 @@
#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
@@ -152,53 +157,58 @@ typedef struct _DeviceAssocRec
} DeviceAssocRec, *DeviceAssocPtr;
/* xf86Globals.c */
-extern InputInfoPtr xf86InputDevs;
+extern _X_EXPORT InputInfoPtr xf86InputDevs;
/* xf86Xinput.c */
-void InitExtInput(void);
-void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
+extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
int first_valuator, int num_valuators, ...);
-void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute,
+extern _X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute,
int first_valuator, int num_valuators, int *valuators);
-void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
+extern _X_EXPORT void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
int first_valuator, int num_valuators, ...);
-void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button,
+extern _X_EXPORT void xf86PostProximityEventP(DeviceIntPtr device, int is_in, int first_valuator,
+ int num_valuators, int *valuators);
+extern _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button,
int is_down, int first_valuator, int num_valuators,
...);
-void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down,
+extern _X_EXPORT void xf86PostButtonEventP(DeviceIntPtr device, int is_absolute, int button,
+ int is_down, int first_valuator, int num_valuators,
+ int *valuators);
+extern _X_EXPORT void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down,
int is_absolute, int first_valuator, int num_valuators,
...);
-void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code,
+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);
+extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code,
int is_down);
-int xf86ActivateDevice(LocalDevicePtr local);
-LocalDevicePtr xf86FirstLocalDevice(void);
-int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow);
-void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, int y);
-void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options);
-void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval,
+extern _X_EXPORT int xf86ActivateDevice(LocalDevicePtr local);
+extern _X_EXPORT LocalDevicePtr xf86FirstLocalDevice(void);
+extern _X_EXPORT int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow);
+extern _X_EXPORT void xf86XInputSetScreen(LocalDevicePtr local, 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);
-void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum);
-void xf86AddEnabledDevice(InputInfoPtr pInfo);
-void xf86RemoveEnabledDevice(InputInfoPtr pInfo);
-void xf86DisableDevice(DeviceIntPtr dev, Bool panic);
-void xf86EnableDevice(DeviceIntPtr dev);
+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);
/* xf86Helper.c */
-void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags);
-void xf86DeleteInputDriver(int drvIndex);
-InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags);
-InputDriverPtr xf86LookupInputDriver(const char *name);
-InputInfoPtr xf86LookupInput(const char *name);
-void xf86DeleteInput(InputInfoPtr pInp, int flags);
-void xf86MotionHistoryAllocate(LocalDevicePtr local);
-int xf86GetMotionEvents(DeviceIntPtr dev, xTimecoord *buff,
- unsigned long start, unsigned long stop,
- ScreenPtr pScreen, BOOL core);
+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);
/* xf86Option.c */
-void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts,
+extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts,
pointer extraOpts);