diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-03-23 16:19:18 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-10 09:42:54 +1000 |
commit | 3430f4af41184752d698dcbf4919469e36b3216c (patch) | |
tree | b546d98eb578af7fc946c2b21e42fd5ef4ee7b4e /test | |
parent | 13611cd34e267370690e06bef6a02064927c2078 (diff) |
Require xserver 1.12 and inputproto 2.2
This drops conditional compilation of multitouch support, smooth scrolling
support and old ABIs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/fake-symbols.c | 77 | ||||
-rw-r--r-- | test/fake-symbols.h | 81 |
2 files changed, 53 insertions, 105 deletions
diff --git a/test/fake-symbols.c b/test/fake-symbols.c index 6f55c7b..173e1af 100644 --- a/test/fake-symbols.c +++ b/test/fake-symbols.c @@ -1,7 +1,6 @@ #include "fake-symbols.h" -_X_EXPORT - int +_X_EXPORT int xf86ReadSerial(int fd, void *buf, int count) { return 0; @@ -26,7 +25,7 @@ xf86WaitForInput(int fd, int timeout) } _X_EXPORT int -xf86OpenSerial(OPTTYPE options) +xf86OpenSerial(XF86OptionPtr options) { return 0; } @@ -37,44 +36,44 @@ xf86SetSerialSpeed(int fd, int speed) return 0; } -_X_EXPORT OPTTYPE -xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val) +_X_EXPORT XF86OptionPtr +xf86ReplaceIntOption(XF86OptionPtr optlist, const char *name, const int val) { return NULL; } _X_EXPORT char * -xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt) +xf86SetStrOption(XF86OptionPtr optlist, const char *name, const char *deflt) { return NULL; } _X_EXPORT int -xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt) +xf86SetBoolOption(XF86OptionPtr optlist, const char *name, int deflt) { return 0; } -_X_EXPORT OPTTYPE -xf86AddNewOption(OPTTYPE head, const char *name, const char *val) +_X_EXPORT XF86OptionPtr +xf86AddNewOption(XF86OptionPtr head, const char *name, const char *val) { return NULL; } -_X_EXPORT CONST char * -xf86FindOptionValue(OPTTYPE options, const char *name) +_X_EXPORT const char * +xf86FindOptionValue(XF86OptionPtr options, const char *name) { return NULL; } _X_EXPORT char * -xf86OptionName(OPTTYPE opt) +xf86OptionName(XF86OptionPtr opt) { return NULL; } _X_EXPORT char * -xf86OptionValue(OPTTYPE opt) +xf86OptionValue(XF86OptionPtr opt) { return NULL; } @@ -86,7 +85,7 @@ xf86NameCmp(const char *s1, const char *s2) } _X_EXPORT char * -xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt) +xf86CheckStrOption(XF86OptionPtr optlist, const char *name, char *deflt) { return NULL; } @@ -144,13 +143,11 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) return; } -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 _X_EXPORT void FreeInputAttributes(InputAttributes * attrs) { return; } -#endif _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, @@ -185,8 +182,8 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) return; } -_X_EXPORT OPTTYPE -xf86OptionListDuplicate(OPTTYPE options) +_X_EXPORT XF86OptionPtr +xf86OptionListDuplicate(XF86OptionPtr options) { return NULL; } @@ -213,7 +210,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down) } _X_EXPORT int -xf86SetIntOption(OPTTYPE optlist, const char *name, int deflt) +xf86SetIntOption(XF86OptionPtr optlist, const char *name, int deflt) { return 0; } @@ -223,10 +220,7 @@ xf86PostButtonEventP(DeviceIntPtr device, int is_absolute, int button, int is_down, int first_valuator, int num_valuators, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 - const -#endif - int *valuators) + const int *valuators) { return; } @@ -240,7 +234,7 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc) _X_EXPORT int XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, int format, int mode, unsigned long len, - OPTTYPE value, Bool sendevent) + XF86OptionPtr value, Bool sendevent) { return 0; } @@ -253,9 +247,7 @@ GetTimeInMillis(void) _X_EXPORT int NewInputDeviceRequest(InputOption *options, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 InputAttributes * attrs, -#endif DeviceIntPtr *pdev) { return 0; @@ -267,13 +259,11 @@ InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc) return FALSE; } -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 _X_EXPORT InputAttributes * DuplicateInputAttributes(InputAttributes * attrs) { return NULL; } -#endif _X_EXPORT int ValidAtom(Atom atom) @@ -329,10 +319,7 @@ xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...) _X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 - const -#endif - int *valuators) + const int *valuators) { return; } @@ -344,14 +331,14 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, return FALSE; } -_X_EXPORT OPTTYPE -xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char *val) +_X_EXPORT XF86OptionPtr +xf86ReplaceStrOption(XF86OptionPtr optlist, const char *name, const char *val) { return NULL; } -_X_EXPORT OPTTYPE -xf86NextOption(OPTTYPE list) +_X_EXPORT XF86OptionPtr +xf86NextOption(XF86OptionPtr list) { return NULL; } @@ -377,10 +364,7 @@ GetMotionHistorySize(void) _X_EXPORT void xf86PostProximityEventP(DeviceIntPtr device, int is_in, int first_valuator, int num_valuators, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 - const -#endif - int *valuators) + const int *valuators) { return; } @@ -391,26 +375,23 @@ InitFocusClassDeviceStruct(DeviceIntPtr dev) return FALSE; } -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 void -xf86ProcessCommonOptions(InputInfoPtr pInfo, OPTTYPE list) +xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr list) { } void xf86CollectInputOptions(InputInfoPtr pInfo, - const char **defaultOpts, OPTTYPE extraOpts) + const char **defaultOpts) { } InputInfoPtr -xf86AllocateInput(InputDriverPtr drv, int flags) +xf86AllocateInput(void) { return NULL; } -#endif - ClientPtr serverClient; Bool @@ -421,7 +402,6 @@ QueueWorkProc(Bool (*function) return FALSE; } -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 _X_EXPORT ValuatorMask * valuator_mask_new(int num_valuators) { @@ -464,12 +444,9 @@ _X_EXPORT void valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src) { } -#endif -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 16 _X_EXPORT void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type, uint32_t flags, const ValuatorMask *mask) { } -#endif diff --git a/test/fake-symbols.h b/test/fake-symbols.h index 70049d0..76d8e63 100644 --- a/test/fake-symbols.h +++ b/test/fake-symbols.h @@ -1,40 +1,32 @@ #include <xorg-server.h> #include <xf86Xinput.h> -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14 -#define OPTTYPE XF86OptionPtr -#define CONST const -#else -#define OPTTYPE pointer -#define CONST -#endif - extern int xf86ReadSerial(int fd, void *buf, int count); extern int xf86WriteSerial(int fd, const void *buf, int count); extern int xf86CloseSerial(int fd); extern int xf86WaitForInput(int fd, int timeout); -extern int xf86OpenSerial(OPTTYPE options); +extern int xf86OpenSerial(XF86OptionPtr options); extern int xf86SetSerialSpeed(int fd, int speed); -extern OPTTYPE xf86ReplaceIntOption(OPTTYPE optlist, const char *name, +extern XF86OptionPtr xf86ReplaceIntOption(XF86OptionPtr optlist, const char *name, const int val); -extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, +extern XF86OptionPtr xf86AddNewOption(XF86OptionPtr head, const char *name, const char *val); -extern char *xf86OptionName(OPTTYPE opt); -extern CONST char *xf86FindOptionValue(OPTTYPE options, const char *name); +extern char *xf86OptionName(XF86OptionPtr opt); +extern const char *xf86FindOptionValue(XF86OptionPtr options, const char *name); extern int xf86NameCmp(const char *s1, const char *s2); -extern char *xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt); +extern char *xf86CheckStrOption(XF86OptionPtr optlist, const char *name, char *deflt); -extern char *xf86SetStrOption(OPTTYPE optlist, const char *name, - CONST char *deflt); -extern int xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt); -extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, +extern char *xf86SetStrOption(XF86OptionPtr optlist, const char *name, + const char *deflt); +extern int xf86SetBoolOption(XF86OptionPtr optlist, const char *name, int deflt); +extern XF86OptionPtr xf86AddNewOption(XF86OptionPtr head, const char *name, const char *val); -extern CONST char *xf86FindOptionValue(OPTTYPE options, const char *name); -extern char *xf86OptionName(OPTTYPE opt); -extern char *xf86OptionValue(OPTTYPE opt); +extern const char *xf86FindOptionValue(XF86OptionPtr options, const char *name); +extern char *xf86OptionName(XF86OptionPtr opt); +extern char *xf86OptionValue(XF86OptionPtr opt); extern int xf86NameCmp(const char *s1, const char *s2); -extern char *xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt); +extern char *xf86CheckStrOption(XF86OptionPtr optlist, const char *name, char *deflt); extern void xf86AddEnabledDevice(InputInfoPtr pInfo); extern void xf86RemoveEnabledDevice(InputInfoPtr pInfo); extern Atom XIGetKnownProperty(char *name); @@ -44,10 +36,7 @@ extern int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min); extern void DeleteInputDeviceRequest(DeviceIntPtr pDev); - -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 extern void FreeInputAttributes(InputAttributes * attrs); -#endif extern void xf86PostButtonEvent(DeviceIntPtr device, @@ -60,7 +49,7 @@ extern int extern InputInfoPtr xf86FirstLocalDevice(void); extern void xf86DeleteInput(InputInfoPtr pInp, int flags); -extern OPTTYPE xf86OptionListDuplicate(OPTTYPE options); +extern XF86OptionPtr xf86OptionListDuplicate(XF86OptionPtr options); extern Bool InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels, @@ -73,17 +62,14 @@ InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, extern void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down); extern int - xf86SetIntOption(OPTTYPE optlist, const char *name, int deflt); + xf86SetIntOption(XF86OptionPtr optlist, const char *name, int deflt); extern void xf86PostButtonEventP(DeviceIntPtr device, int is_absolute, int button, int is_down, int first_valuator, int num_valuators, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 - const -#endif - int *valuators); + const int *valuators); extern Bool InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc); @@ -91,22 +77,18 @@ extern int XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, int format, int mode, unsigned long len, - OPTTYPE value, Bool sendevent); + XF86OptionPtr value, Bool sendevent); extern CARD32 GetTimeInMillis(void); extern int NewInputDeviceRequest(InputOption *options, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 InputAttributes * attrs, -#endif DeviceIntPtr *pdev); extern Bool InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc); -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 extern InputAttributes *DuplicateInputAttributes(InputAttributes * attrs); -#endif extern int ValidAtom(Atom atom); extern Bool @@ -130,23 +112,19 @@ extern void xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...); extern void - xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 - const -#endif - int *valuators); + const int *valuators); extern Bool InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, int numMotionEvents, int mode); -extern OPTTYPE -xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char *val); +extern XF86OptionPtr +xf86ReplaceStrOption(XF86OptionPtr optlist, const char *name, const char *val); -extern OPTTYPE xf86NextOption(OPTTYPE list); +extern XF86OptionPtr xf86NextOption(XF86OptionPtr list); extern int @@ -157,26 +135,20 @@ extern Atom MakeAtom(const char *string, unsigned len, Bool makeit); extern int GetMotionHistorySize(void); extern void - xf86PostProximityEventP(DeviceIntPtr device, int is_in, int first_valuator, int num_valuators, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 - const -#endif - int *valuators); + const int *valuators); extern Bool InitFocusClassDeviceStruct(DeviceIntPtr dev); -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 extern void - xf86ProcessCommonOptions(InputInfoPtr pInfo, OPTTYPE list); + xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr list); extern void - xf86CollectInputOptions(InputInfoPtr pInfo, - const char **defaultOpts, OPTTYPE extraOpts); + const char **defaultOpts); -extern InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags); +extern InputInfoPtr xf86AllocateInput(void); extern ClientPtr serverClient; @@ -184,4 +156,3 @@ extern Bool QueueWorkProc(Bool (*function) (ClientPtr /* pClient */ , pointer /* closure */ ), ClientPtr client, pointer closure); -#endif |