Drop the half-baked test suite

This suite was never really maintained anyway, and it is quite hard to do so
anyway. The driver is linked to the server's API too tightly to easily do
independent testing. We need to re-implement stubs for the API the driver
uses, have to track API changes, etc. Not worth the effort.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2014-02-10 08:57:19 +10:00
parent e0069c1544
commit 5d8cdaf4b1
7 changed files with 1 additions and 961 deletions

View File

@@ -24,7 +24,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--with-sdkdir='$${includedir}/xorg' \
--with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d'
SUBDIRS = include src man tools conf test
SUBDIRS = include src man tools conf
MAINTAINERCLEANFILES = ChangeLog INSTALL
pkgconfigdir = $(libdir)/pkgconfig

View File

@@ -160,7 +160,6 @@ AC_CONFIG_FILES([Makefile
tools/Makefile
conf/Makefile
include/Makefile
test/Makefile
xorg-synaptics.pc])
AC_OUTPUT

6
test/.gitignore vendored
View File

@@ -1,6 +0,0 @@
# Add & Override patterns for xf86-input-synaptics
#
# Edit the following section as needed
# For example, !report.pc overrides *.pc. See 'man gitignore'
eventcomm-test

View File

@@ -1,19 +0,0 @@
if ENABLE_UNIT_TESTS
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include
AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
fake_syms = fake-symbols.c fake-symbols.h
if BUILD_EVENTCOMM
noinst_PROGRAMS = eventcomm-test
eventcomm_test_SOURCES = eventcomm-test.c\
$(top_srcdir)/src/eventcomm.c \
$(top_srcdir)/src/synproto.c \
$(fake_syms)
eventcomm_test_LDADD = $(MTDEV_LIBS) $(LIBEVDEV_LIBS)
AM_CPPFLAGS += $(LIBEVDEV_CFLAGS)
endif
TESTS = $(noinst_PROGRAMS)
endif

View File

@@ -1,326 +0,0 @@
/*
* Copyright © 2011 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation, and that the name of Red Hat
* not be used in advertising or publicity pertaining to distribution
* of the software without specific, written prior permission. Red
* Hat makes no representations about the suitability of this software
* for any purpose. It is provided "as is" without express or implied
* warranty.
*
* THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
* NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Authors:
* Peter Hutterer
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <assert.h>
#include "synapticsstr.h"
#include "eventcomm.h"
#define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
int fd_read, fd_write;
/* A syn event, always handy to have */
struct input_event syn = { {0, 0}, EV_SYN, SYN_REPORT, 0 };
static void
create_pipe_fd(void)
{
int pipefd[2];
assert(pipe(pipefd) != -1);
fd_read = pipefd[0];
fd_write = pipefd[1];
}
static void
reset_data(struct SynapticsHwState **hw, struct CommData *comm,
SynapticsPrivate * priv)
{
SynapticsHwStateFree(&comm->hwState);
memset(comm, 0, sizeof(struct CommData));
SynapticsHwStateFree(hw);
*hw = SynapticsHwStateAlloc(priv);
comm->hwState = SynapticsHwStateAlloc(priv);
}
/**
* Write n input events to fd, followed by the syn event.
*/
static void
write_event(int fd, struct input_event *ev, int n)
{
write(fd, ev, sizeof(struct input_event) * n);
write(fd, &syn, sizeof(syn));
}
static void
test_buttons(int fd, InputInfoPtr pInfo, struct CommData *comm)
{
SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
struct SynapticsHwState *hw = NULL;
struct input_event ev = { {0, 0}, EV_KEY, 0, 0 };
reset_data(&hw, comm, priv);
#define _test_press_release(_code, field) \
ev.code = (_code); \
ev.value = 1; \
write_event(fd, &ev, 1); \
EventReadHwState(pInfo, comm, hw); \
assert(hw->field == 1); \
ev.value = 0; /* button release */ \
write_event(fd_write, &ev, 1); \
EventReadHwState(pInfo, comm, hw); \
assert(hw->field == 0);
_test_press_release(BTN_LEFT, left);
_test_press_release(BTN_RIGHT, right);
_test_press_release(BTN_MIDDLE, middle);
_test_press_release(BTN_FORWARD, up);
_test_press_release(BTN_BACK, down);
_test_press_release(BTN_0, multi[0]);
_test_press_release(BTN_1, multi[1]);
_test_press_release(BTN_2, multi[2]);
_test_press_release(BTN_3, multi[3]);
_test_press_release(BTN_4, multi[4]);
_test_press_release(BTN_5, multi[5]);
_test_press_release(BTN_6, multi[6]);
_test_press_release(BTN_7, multi[7]);
SynapticsHwStateFree(&hw);
}
/**
* This test checks that the recognised event fields set the right hardware
* state. It's a fairly limited test and does not check whether any of the
* others change the HW state at all.
*/
static void
test_read_hw_state(void)
{
InputInfoRec info = { 0 };
SynapticsPrivate private;
struct SynapticsHwState *hw = NULL;
struct CommData comm = { 0 };
struct input_event ev[] = {
{{0, 0}, EV_KEY, BTN_TOOL_FINGER, 1},
{{0, 0}, EV_KEY, BTN_TOOL_DOUBLETAP, 1},
{{0, 0}, EV_KEY, BTN_TOOL_TRIPLETAP, 1},
{{0, 0}, EV_ABS, ABS_X, 42},
{{0, 0}, EV_ABS, ABS_Y, 21},
{{0, 0}, EV_ABS, ABS_PRESSURE, 56},
{{0, 0}, EV_ABS, ABS_TOOL_WIDTH, 204},
};
memset(&private, 0, sizeof(private));
info.private = &private;
info.fd = fd_read;
private.proto_data = EventProtoDataAlloc(fd_read);
/* just the syn event */
reset_data(&hw, &comm, &private);
write(fd_write, &syn, sizeof(syn));
EventReadHwState(&info, &comm, hw);
assert(hw->numFingers == 0);
/* one finger */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[0], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->numFingers == 1);
/* two fingers */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[1], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->numFingers == 2);
/* three fingers */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[2], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->numFingers == 3);
/* x/y data */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[3], 2);
EventReadHwState(&info, &comm, hw);
assert(hw->x == ev[3].value);
assert(hw->y == ev[4].value);
/* pressure */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[5], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->z == ev[5].value);
/* finger width */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[6], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->fingerWidth == ev[6].value);
/* the various buttons */
test_buttons(fd_write, &info, &comm);
free(private.proto_data);
SynapticsHwStateFree(&hw);
SynapticsHwStateFree(&comm.hwState);
}
static Bool
compare_hw_state(const struct SynapticsHwState *a,
const struct SynapticsHwState *b)
{
#define COMPARE(x) \
if (a->x != b->x) return a->x - b->x
COMPARE(millis);
COMPARE(x);
COMPARE(y);
COMPARE(z);
COMPARE(numFingers);
COMPARE(fingerWidth);
COMPARE(left);
COMPARE(right);
COMPARE(up);
COMPARE(down);
if (memcmp(a->multi, b->multi, sizeof(a->multi)))
return memcmp(a->multi, b->multi, sizeof(a->multi));
COMPARE(middle);
#undef COMPARE
return 0;
}
/**
* Make sure that axes/keys unknown to the driver don't change the hardware
* state.
*/
static void
test_ignore_hw_state(void)
{
int i;
InputInfoRec info = { 0 };
SynapticsPrivate private;
struct SynapticsHwState *hw = NULL;
struct SynapticsHwState *hw_zero = NULL;
struct CommData comm = { 0 };
int known_abs[] = {
ABS_X,
ABS_Y,
ABS_PRESSURE,
ABS_TOOL_WIDTH,
};
int known_keys[] = {
BTN_LEFT,
BTN_RIGHT,
BTN_MIDDLE,
BTN_FORWARD,
BTN_BACK,
BTN_0,
BTN_1,
BTN_2,
BTN_3,
BTN_4,
BTN_5,
BTN_6,
BTN_7,
BTN_TOOL_FINGER,
BTN_TOOL_DOUBLETAP,
BTN_TOOL_TRIPLETAP,
BTN_TOUCH
};
struct input_event ev = { {0, 0}, 0, 0, 1 };
memset(&private, 0, sizeof(private));
info.private = &private;
info.fd = fd_read;
private.proto_data = EventProtoDataAlloc(fd_read);
reset_data(&hw_zero, &comm, &private);
#define _assert_no_change(_type, _code) \
reset_data(&hw, &comm, &private); \
ev.type = _type; \
ev.code = _code; \
ev.value = 1; \
write_event(fd_write, &ev, 1); \
EventReadHwState(&info, &comm, hw); \
assert(compare_hw_state(hw, hw_zero) == 0);
for (i = ABS_X; i < ABS_MAX; i++) {
int j, skip = 0;
for (j = 0; j < ArrayLength(known_abs); j++) {
if (i == known_abs[j]) {
skip = 1;
break;
}
}
if (skip)
continue;
_assert_no_change(EV_ABS, i);
}
for (i = KEY_RESERVED; i < KEY_MAX; i++) {
int j, skip = 0;
for (j = 0; j < ArrayLength(known_keys); j++) {
if (i == known_keys[j]) {
skip = 1;
break;
}
}
if (skip)
continue;
_assert_no_change(EV_KEY, i);
}
free(private.proto_data);
SynapticsHwStateFree(&hw);
SynapticsHwStateFree(&hw_zero);
SynapticsHwStateFree(&comm.hwState);
}
int
main(int argc, char **argv)
{
create_pipe_fd();
test_read_hw_state();
test_ignore_hw_state();
return 0;
}

View File

@@ -1,452 +0,0 @@
#include "fake-symbols.h"
_X_EXPORT int
xf86ReadSerial(int fd, void *buf, int count)
{
return 0;
}
_X_EXPORT int
xf86WriteSerial(int fd, const void *buf, int count)
{
return 0;
}
_X_EXPORT int
xf86CloseSerial(int fd)
{
return 0;
}
_X_EXPORT int
xf86WaitForInput(int fd, int timeout)
{
return 0;
}
_X_EXPORT int
xf86OpenSerial(XF86OptionPtr options)
{
return 0;
}
_X_EXPORT int
xf86SetSerialSpeed(int fd, int speed)
{
return 0;
}
_X_EXPORT XF86OptionPtr
xf86ReplaceIntOption(XF86OptionPtr optlist, const char *name, const int val)
{
return NULL;
}
_X_EXPORT char *
xf86SetStrOption(XF86OptionPtr optlist, const char *name, const char *deflt)
{
return NULL;
}
_X_EXPORT int
xf86SetBoolOption(XF86OptionPtr optlist, const char *name, int deflt)
{
return 0;
}
_X_EXPORT XF86OptionPtr
xf86AddNewOption(XF86OptionPtr head, const char *name, const char *val)
{
return NULL;
}
_X_EXPORT const char *
xf86FindOptionValue(XF86OptionPtr options, const char *name)
{
return NULL;
}
_X_EXPORT char *
xf86OptionName(XF86OptionPtr opt)
{
return NULL;
}
_X_EXPORT char *
xf86OptionValue(XF86OptionPtr opt)
{
return NULL;
}
_X_EXPORT int
xf86NameCmp(const char *s1, const char *s2)
{
return 0;
}
_X_EXPORT void
xf86AddEnabledDevice(InputInfoPtr pInfo)
{
return;
}
_X_EXPORT void
xf86RemoveEnabledDevice(InputInfoPtr pInfo)
{
return;
}
_X_EXPORT Atom
XIGetKnownProperty(char *name)
{
return None;
}
_X_EXPORT void
xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags)
{
return;
}
_X_EXPORT int
xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min)
{
int X;
int64_t to_width = to_max - to_min;
int64_t from_width = from_max - from_min;
if (from_width) {
X = (int) (((to_width * (Cx - from_min)) / from_width) + to_min);
}
else {
X = 0;
/*ErrorF ("Divide by Zero in xf86ScaleAxis\n"); */
}
if (X > to_max)
X = to_max;
if (X < to_min)
X = to_min;
return X;
}
_X_EXPORT void
DeleteInputDeviceRequest(DeviceIntPtr pDev)
{
return;
}
_X_EXPORT void
FreeInputAttributes(InputAttributes * attrs)
{
return;
}
_X_EXPORT void
xf86PostButtonEvent(DeviceIntPtr device,
int is_absolute,
int button,
int is_down, int first_valuator, int num_valuators, ...)
{
return;
}
_X_EXPORT int
Xasprintf(char **ret, const char *format, ...)
{
return 0;
}
_X_EXPORT int
XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable)
{
return 0;
}
_X_EXPORT InputInfoPtr
xf86FirstLocalDevice(void)
{
return NULL;
}
_X_EXPORT void
xf86DeleteInput(InputInfoPtr pInp, int flags)
{
return;
}
_X_EXPORT XF86OptionPtr
xf86OptionListDuplicate(XF86OptionPtr options)
{
return NULL;
}
_X_EXPORT Bool
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels,
CARD8 *map)
{
return FALSE;
}
_X_EXPORT void
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval,
int maxval, int resolution, int min_res, int max_res,
int mode)
{
return;
}
_X_EXPORT void
xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down)
{
return;
}
_X_EXPORT int
xf86SetIntOption(XF86OptionPtr optlist, const char *name, int deflt)
{
return 0;
}
_X_EXPORT void
xf86PostButtonEventP(DeviceIntPtr device,
int is_absolute,
int button,
int is_down, int first_valuator, int num_valuators,
const int *valuators)
{
return;
}
_X_EXPORT Bool
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
{
return FALSE;
}
_X_EXPORT int
XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
int format, int mode, unsigned long len,
XF86OptionPtr value, Bool sendevent)
{
return 0;
}
_X_EXPORT CARD32
GetTimeInMillis(void)
{
return 0;
}
_X_EXPORT int
NewInputDeviceRequest(InputOption *options,
InputAttributes * attrs,
DeviceIntPtr *pdev)
{
return 0;
}
_X_EXPORT Bool
InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc)
{
return FALSE;
}
_X_EXPORT InputAttributes *
DuplicateInputAttributes(InputAttributes * attrs)
{
return NULL;
}
_X_EXPORT int
ValidAtom(Atom atom)
{
return None;
}
_X_EXPORT Bool
InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
{
return FALSE;
}
_X_EXPORT long
XIRegisterPropertyHandler(DeviceIntPtr dev,
int (*SetProperty) (DeviceIntPtr dev,
Atom property,
XIPropertyValuePtr prop,
BOOL checkonly),
int (*GetProperty) (DeviceIntPtr dev,
Atom property),
int (*DeleteProperty) (DeviceIntPtr dev,
Atom property))
{
return 0;
}
_X_EXPORT int
InitProximityClassDeviceStruct(DeviceIntPtr dev)
{
return 0;
}
_X_EXPORT void
xf86Msg(MessageType type, const char *format, ...)
{
return;
}
_X_EXPORT void
xf86MsgVerb(MessageType type, int verb, const char *format, ...)
{
return;
}
_X_EXPORT void
xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...)
{
return;
}
_X_EXPORT void
LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...)
{
return;
}
_X_EXPORT void
xf86PostMotionEventP(DeviceIntPtr device,
int is_absolute, int first_valuator, int num_valuators,
const int *valuators)
{
return;
}
_X_EXPORT Bool
InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
int numMotionEvents, int mode)
{
return FALSE;
}
_X_EXPORT XF86OptionPtr
xf86ReplaceStrOption(XF86OptionPtr optlist, const char *name, const char *val)
{
return NULL;
}
_X_EXPORT XF86OptionPtr
xf86NextOption(XF86OptionPtr list)
{
return NULL;
}
_X_EXPORT int
XIGetDeviceProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value)
{
return 0;
}
_X_EXPORT Atom
MakeAtom(const char *string, unsigned len, Bool makeit)
{
return None;
}
_X_EXPORT int
GetMotionHistorySize(void)
{
return 0;
}
_X_EXPORT void
xf86PostProximityEventP(DeviceIntPtr device,
int is_in, int first_valuator, int num_valuators,
const int *valuators)
{
return;
}
_X_EXPORT Bool
InitFocusClassDeviceStruct(DeviceIntPtr dev)
{
return FALSE;
}
void
xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr list)
{
}
void
xf86CollectInputOptions(InputInfoPtr pInfo,
const char **defaultOpts)
{
}
InputInfoPtr
xf86AllocateInput(void)
{
return NULL;
}
ClientPtr serverClient;
Bool
QueueWorkProc(Bool (*function)
(ClientPtr /* pClient */ , pointer /* closure */ ),
ClientPtr client, pointer closure)
{
return FALSE;
}
_X_EXPORT ValuatorMask *
valuator_mask_new(int num_valuators)
{
return NULL;
}
_X_EXPORT void
valuator_mask_free(ValuatorMask **mask)
{
}
_X_EXPORT int
valuator_mask_get(const ValuatorMask *mask, int valuator)
{
return 0;
}
_X_EXPORT void
valuator_mask_set(ValuatorMask *mask, int valuator, int data)
{
}
extern _X_EXPORT void
valuator_mask_unset(ValuatorMask *mask, int bit)
{
}
_X_EXPORT int
valuator_mask_num_valuators(const ValuatorMask *mask)
{
return 0;
}
_X_EXPORT void
valuator_mask_zero(ValuatorMask *mask)
{
}
_X_EXPORT void
valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src)
{
}
_X_EXPORT void
xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid,
uint16_t type, uint32_t flags, const ValuatorMask *mask)
{
}

View File

@@ -1,156 +0,0 @@
#include <xorg-server.h>
#include <xf86Xinput.h>
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(XF86OptionPtr options);
extern int xf86SetSerialSpeed(int fd, int speed);
extern XF86OptionPtr xf86ReplaceIntOption(XF86OptionPtr optlist, const char *name,
const int val);
extern XF86OptionPtr xf86AddNewOption(XF86OptionPtr head, const char *name,
const char *val);
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 *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(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 void xf86AddEnabledDevice(InputInfoPtr pInfo);
extern void xf86RemoveEnabledDevice(InputInfoPtr pInfo);
extern Atom XIGetKnownProperty(char *name);
extern void xf86AddInputDriver(InputDriverPtr driver, pointer module,
int flags);
extern int
xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min);
extern void DeleteInputDeviceRequest(DeviceIntPtr pDev);
extern void FreeInputAttributes(InputAttributes * attrs);
extern void
xf86PostButtonEvent(DeviceIntPtr device,
int is_absolute,
int button,
int is_down, int first_valuator, int num_valuators, ...);
extern int Xasprintf(char **ret, const char *format, ...);
extern int
XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable);
extern InputInfoPtr xf86FirstLocalDevice(void);
extern void xf86DeleteInput(InputInfoPtr pInp, int flags);
extern XF86OptionPtr xf86OptionListDuplicate(XF86OptionPtr options);
extern Bool
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels,
CARD8 *map);
extern void
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval,
int maxval, int resolution, int min_res, int max_res,
int mode);
extern void
xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down);
extern int
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,
const int *valuators);
extern Bool
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc);
extern int
XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
int format, int mode, unsigned long len,
XF86OptionPtr value, Bool sendevent);
extern CARD32 GetTimeInMillis(void);
extern int
NewInputDeviceRequest(InputOption *options,
InputAttributes * attrs,
DeviceIntPtr *pdev);
extern Bool
InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc);
extern InputAttributes *DuplicateInputAttributes(InputAttributes * attrs);
extern int ValidAtom(Atom atom);
extern Bool
InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func);
extern long
XIRegisterPropertyHandler(DeviceIntPtr dev,
int (*SetProperty) (DeviceIntPtr dev,
Atom property,
XIPropertyValuePtr prop,
BOOL checkonly),
int (*GetProperty) (DeviceIntPtr dev,
Atom property),
int (*DeleteProperty) (DeviceIntPtr dev,
Atom property));
extern int InitProximityClassDeviceStruct(DeviceIntPtr dev);
extern void xf86Msg(MessageType type, const char *format, ...);
extern void xf86MsgVerb(MessageType type, int verb, const char *format, ...);
extern void xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format,
...);
extern void
xf86PostMotionEventP(DeviceIntPtr device,
int is_absolute, int first_valuator, int num_valuators,
const int *valuators);
extern Bool
InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
int numMotionEvents, int mode);
extern XF86OptionPtr
xf86ReplaceStrOption(XF86OptionPtr optlist, const char *name, const char *val);
extern XF86OptionPtr xf86NextOption(XF86OptionPtr list);
extern int
XIGetDeviceProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value);
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,
const int *valuators);
extern Bool InitFocusClassDeviceStruct(DeviceIntPtr dev);
extern void
xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr list);
extern void
xf86CollectInputOptions(InputInfoPtr pInfo,
const char **defaultOpts);
extern InputInfoPtr xf86AllocateInput(void);
extern ClientPtr serverClient;
extern Bool
QueueWorkProc(Bool (*function)
(ClientPtr /* pClient */ , pointer /* closure */ ),
ClientPtr client, pointer closure);