summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-05-03 11:49:31 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-05-10 09:21:10 +1000
commit0434d7776640861d0c8c19a02c2445d2f61627f8 (patch)
tree5bf6c53b345afe2278b7b2b3afe1bdeefa9e51c5 /test
parenta1162f80324c379bc7581e53275e8ff6d569f8b0 (diff)
Indent consistently
x-indent-all.sh from xorg/util/modular as of c2d630fab65dbe3409af3947f6f442782ddb026f Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'test')
-rw-r--r--test/eventcomm-test.c86
-rw-r--r--test/fake-symbols.c176
-rw-r--r--test/fake-symbols.h169
3 files changed, 203 insertions, 228 deletions
diff --git a/test/eventcomm-test.c b/test/eventcomm-test.c
index 92397d6..d471e98 100644
--- a/test/eventcomm-test.c
+++ b/test/eventcomm-test.c
@@ -55,7 +55,7 @@ create_pipe_fd(void)
static void
reset_data(struct SynapticsHwState **hw, struct CommData *comm,
- SynapticsPrivate *priv)
+ SynapticsPrivate * priv)
{
SynapticsHwStateFree(&comm->hwState);
memset(comm, 0, sizeof(struct CommData));
@@ -74,15 +74,12 @@ write_event(int fd, struct input_event *ev, int n)
write(fd, &syn, sizeof(syn));
}
-
static void
-test_buttons(int fd,
- InputInfoPtr pInfo,
- struct CommData *comm)
+test_buttons(int fd, InputInfoPtr pInfo, struct CommData *comm)
{
- SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
+ SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
struct SynapticsHwState *hw = NULL;
- struct input_event ev = {{0, 0}, EV_KEY, 0, 0};
+ struct input_event ev = { {0, 0}, EV_KEY, 0, 0 };
reset_data(&hw, comm, priv);
@@ -97,19 +94,19 @@ test_buttons(int fd,
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]);
+ _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);
}
@@ -122,19 +119,19 @@ test_buttons(int fd,
static void
test_read_hw_state(void)
{
- InputInfoRec info = {0};
- SynapticsPrivate private;
- struct SynapticsHwState *hw = NULL;
- struct CommData comm = {0};
+ 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 },
+ {{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));
@@ -199,7 +196,7 @@ static Bool
compare_hw_state(const struct SynapticsHwState *a,
const struct SynapticsHwState *b)
{
- #define COMPARE(x) \
+#define COMPARE(x) \
if (a->x != b->x) return a->x - b->x
COMPARE(millis);
@@ -216,7 +213,7 @@ compare_hw_state(const struct SynapticsHwState *a,
return memcmp(a->multi, b->multi, sizeof(a->multi));
COMPARE(middle);
- #undef COMPARE
+#undef COMPARE
return 0;
}
@@ -229,11 +226,11 @@ 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};
+ InputInfoRec info = { 0 };
+ SynapticsPrivate private;
+ struct SynapticsHwState *hw = NULL;
+ struct SynapticsHwState *hw_zero = NULL;
+ struct CommData comm = { 0 };
int known_abs[] = {
ABS_X,
@@ -262,7 +259,7 @@ test_ignore_hw_state(void)
BTN_TOUCH
};
- struct input_event ev = {{0, 0}, 0, 0, 1};
+ struct input_event ev = { {0, 0}, 0, 0, 1 };
memset(&private, 0, sizeof(private));
info.private = &private;
@@ -281,9 +278,7 @@ test_ignore_hw_state(void)
EventReadHwState(&info, &comm, hw); \
assert(compare_hw_state(hw, hw_zero) == 0);
-
- for (i = ABS_X; i < ABS_MAX; i++)
- {
+ for (i = ABS_X; i < ABS_MAX; i++) {
int j, skip = 0;
for (j = 0; j < ArrayLength(known_abs); j++) {
@@ -299,9 +294,9 @@ test_ignore_hw_state(void)
_assert_no_change(EV_ABS, i);
}
- for (i = KEY_RESERVED; i < KEY_MAX; 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;
@@ -321,7 +316,8 @@ test_ignore_hw_state(void)
SynapticsHwStateFree(&comm.hwState);
}
-int main (int argc, char **argv)
+int
+main(int argc, char **argv)
{
create_pipe_fd();
diff --git a/test/fake-symbols.c b/test/fake-symbols.c
index 65fad46..6f55c7b 100644
--- a/test/fake-symbols.c
+++ b/test/fake-symbols.c
@@ -1,38 +1,38 @@
#include "fake-symbols.h"
_X_EXPORT
-int xf86ReadSerial (int fd, void *buf, int count)
+ int
+xf86ReadSerial(int fd, void *buf, int count)
{
return 0;
}
-
_X_EXPORT int
-xf86WriteSerial (int fd, const void *buf, int count)
+xf86WriteSerial(int fd, const void *buf, int count)
{
return 0;
}
_X_EXPORT int
-xf86CloseSerial (int fd)
+xf86CloseSerial(int fd)
{
return 0;
}
_X_EXPORT int
-xf86WaitForInput (int fd, int timeout)
+xf86WaitForInput(int fd, int timeout)
{
return 0;
}
_X_EXPORT int
-xf86OpenSerial (OPTTYPE options)
+xf86OpenSerial(OPTTYPE options)
{
return 0;
}
_X_EXPORT int
-xf86SetSerialSpeed (int fd, int speed)
+xf86SetSerialSpeed(int fd, int speed)
{
return 0;
}
@@ -60,6 +60,7 @@ xf86AddNewOption(OPTTYPE head, const char *name, const char *val)
{
return NULL;
}
+
_X_EXPORT CONST char *
xf86FindOptionValue(OPTTYPE options, const char *name)
{
@@ -115,81 +116,69 @@ xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags)
}
_X_EXPORT int
-xf86ScaleAxis(int Cx,
- int to_max,
- int to_min,
- int from_max,
- int from_min )
+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);
+ X = (int) (((to_width * (Cx - from_min)) / from_width) + to_min);
}
else {
- X = 0;
- /*ErrorF ("Divide by Zero in xf86ScaleAxis\n");*/
+ X = 0;
+ /*ErrorF ("Divide by Zero in xf86ScaleAxis\n"); */
}
if (X > to_max)
- X = to_max;
+ X = to_max;
if (X < to_min)
- X = to_min;
+ X = to_min;
return X;
}
-
_X_EXPORT void
DeleteInputDeviceRequest(DeviceIntPtr pDev)
{
return;
}
-
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
_X_EXPORT void
-FreeInputAttributes(InputAttributes *attrs)
+FreeInputAttributes(InputAttributes * attrs)
{
return;
}
#endif
_X_EXPORT void
-xf86PostButtonEvent(DeviceIntPtr device,
- int is_absolute,
- int button,
- int is_down,
- int first_valuator,
- int num_valuators,
- ...)
+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, ...)
+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)
{
@@ -203,23 +192,22 @@ xf86OptionListDuplicate(OPTTYPE options)
}
_X_EXPORT Bool
-InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels,
+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)
+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)
+xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down)
{
return;
}
@@ -231,16 +219,14 @@ xf86SetIntOption(OPTTYPE optlist, const char *name, int deflt)
}
_X_EXPORT void
-xf86PostButtonEventP(DeviceIntPtr device,
- int is_absolute,
- int button,
- int is_down,
- int first_valuator,
- int num_valuators,
+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)
+ int *valuators)
{
return;
}
@@ -252,41 +238,38 @@ 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)
+XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
+ int format, int mode, unsigned long len,
+ OPTTYPE value, Bool sendevent)
{
return 0;
}
_X_EXPORT CARD32
-GetTimeInMillis (void)
+GetTimeInMillis(void)
{
return 0;
}
-
_X_EXPORT int
-NewInputDeviceRequest (InputOption *options,
+NewInputDeviceRequest(InputOption *options,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
- InputAttributes *attrs,
+ InputAttributes * attrs,
#endif
- DeviceIntPtr *pdev)
+ DeviceIntPtr *pdev)
{
return 0;
}
-
_X_EXPORT Bool
-InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
+InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc)
{
return FALSE;
}
-
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
-_X_EXPORT InputAttributes*
-DuplicateInputAttributes(InputAttributes *attrs)
+_X_EXPORT InputAttributes *
+DuplicateInputAttributes(InputAttributes * attrs)
{
return NULL;
}
@@ -299,14 +282,14 @@ ValidAtom(Atom atom)
}
_X_EXPORT Bool
-InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
+InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
{
return FALSE;
}
_X_EXPORT long
-XIRegisterPropertyHandler(DeviceIntPtr dev,
+XIRegisterPropertyHandler(DeviceIntPtr dev,
int (*SetProperty) (DeviceIntPtr dev,
Atom property,
XIPropertyValuePtr prop,
@@ -325,7 +308,6 @@ InitProximityClassDeviceStruct(DeviceIntPtr dev)
return 0;
}
-
_X_EXPORT void
xf86Msg(MessageType type, const char *format, ...)
{
@@ -344,21 +326,17 @@ xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...)
return;
}
-
_X_EXPORT void
-xf86PostMotionEventP(DeviceIntPtr device,
- int is_absolute,
- int first_valuator,
- int num_valuators,
+xf86PostMotionEventP(DeviceIntPtr device,
+ int is_absolute, int first_valuator, int num_valuators,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
- const
+ const
#endif
- int *valuators)
+ int *valuators)
{
return;
}
-
_X_EXPORT Bool
InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
int numMotionEvents, int mode)
@@ -366,56 +344,47 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
return FALSE;
}
-
_X_EXPORT OPTTYPE
-xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char* val)
+xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char *val)
{
return NULL;
}
-
_X_EXPORT OPTTYPE
xf86NextOption(OPTTYPE list)
{
return NULL;
}
-
_X_EXPORT int
-XIGetDeviceProperty (DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value)
+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,
+xf86PostProximityEventP(DeviceIntPtr device,
+ int is_in, int first_valuator, int num_valuators,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
const
#endif
- int *valuators)
+ int *valuators)
{
return;
}
-
_X_EXPORT Bool
InitFocusClassDeviceStruct(DeviceIntPtr dev)
{
@@ -430,12 +399,12 @@ xf86ProcessCommonOptions(InputInfoPtr pInfo, OPTTYPE list)
void
xf86CollectInputOptions(InputInfoPtr pInfo,
- const char **defaultOpts,
- OPTTYPE extraOpts)
+ const char **defaultOpts, OPTTYPE extraOpts)
{
}
-InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags)
+InputInfoPtr
+xf86AllocateInput(InputDriverPtr drv, int flags)
{
return NULL;
}
@@ -444,54 +413,63 @@ InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags)
ClientPtr serverClient;
-Bool QueueWorkProc (
- Bool (*function)(ClientPtr /* pClient */, pointer /* closure */),
- ClientPtr client, pointer closure)
+Bool
+QueueWorkProc(Bool (*function)
+ (ClientPtr /* pClient */ , pointer /* closure */ ),
+ ClientPtr client, pointer closure)
{
return FALSE;
}
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
-_X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators)
+_X_EXPORT ValuatorMask *
+valuator_mask_new(int num_valuators)
{
return NULL;
}
-_X_EXPORT void valuator_mask_free(ValuatorMask **mask)
+_X_EXPORT void
+valuator_mask_free(ValuatorMask **mask)
{
}
-_X_EXPORT int valuator_mask_get(const ValuatorMask *mask, int valuator)
+_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)
+_X_EXPORT void
+valuator_mask_set(ValuatorMask *mask, int valuator, int data)
{
}
-extern _X_EXPORT void valuator_mask_unset(ValuatorMask *mask, int bit)
+extern _X_EXPORT void
+valuator_mask_unset(ValuatorMask *mask, int bit)
{
}
-_X_EXPORT int valuator_mask_num_valuators(const ValuatorMask *mask)
+_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_zero(ValuatorMask *mask)
{
}
-_X_EXPORT void valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src)
+_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)
+_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 1fa1716..70049d0 100644
--- a/test/fake-symbols.h
+++ b/test/fake-symbols.h
@@ -6,113 +6,115 @@
#define CONST const
#else
#define OPTTYPE pointer
-#define CONST
+#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 xf86SetSerialSpeed (int fd, int speed);
-
-extern OPTTYPE xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val);
-extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val);
-extern char* xf86OptionName(OPTTYPE opt);
-extern CONST char* xf86FindOptionValue(OPTTYPE options, const char *name);
+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 xf86SetSerialSpeed(int fd, int speed);
+
+extern OPTTYPE xf86ReplaceIntOption(OPTTYPE optlist, const char *name,
+ const int val);
+extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name,
+ const char *val);
+extern char *xf86OptionName(OPTTYPE opt);
+extern CONST char *xf86FindOptionValue(OPTTYPE 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(OPTTYPE optlist, const char *name, char *deflt);
-
-extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, CONST 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, const char *val);
-extern CONST char* xf86FindOptionValue(OPTTYPE options, const char *name);
-extern char* xf86OptionName(OPTTYPE opt);
+extern OPTTYPE xf86AddNewOption(OPTTYPE 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 int xf86NameCmp(const char *s1, const char *s2);
-extern char * xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt);
+extern char *xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt);
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 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 );
+ 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);
+extern void FreeInputAttributes(InputAttributes * attrs);
#endif
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, ...);
+
+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);
+ XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable);
extern InputInfoPtr xf86FirstLocalDevice(void);
extern void xf86DeleteInput(InputInfoPtr pInp, int flags);
extern OPTTYPE xf86OptionListDuplicate(OPTTYPE options);
extern Bool
-InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels,
+
+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);
+
+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);
+ xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down);
extern int
-xf86SetIntOption(OPTTYPE optlist, const char *name, int deflt);
+ xf86SetIntOption(OPTTYPE 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,
+
+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);
+ int *valuators);
extern Bool
-InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc);
+ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc);
extern int
-XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
- int format, int mode, unsigned long len,
- OPTTYPE value, Bool sendevent);
-extern CARD32 GetTimeInMillis (void);
+
+XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
+ int format, int mode, unsigned long len,
+ OPTTYPE value, Bool sendevent);
+extern CARD32 GetTimeInMillis(void);
extern int
-NewInputDeviceRequest (InputOption *options,
+ NewInputDeviceRequest(InputOption *options,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
- InputAttributes *attrs,
+ InputAttributes * attrs,
#endif
DeviceIntPtr *pdev);
extern Bool
-InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc);
+ InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc);
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
-extern InputAttributes* DuplicateInputAttributes(InputAttributes *attrs);
+extern InputAttributes *DuplicateInputAttributes(InputAttributes * attrs);
#endif
extern int ValidAtom(Atom atom);
extern Bool
-InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
+
+InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func);
extern long
-XIRegisterPropertyHandler(DeviceIntPtr dev,
+
+XIRegisterPropertyHandler(DeviceIntPtr dev,
int (*SetProperty) (DeviceIntPtr dev,
Atom property,
XIPropertyValuePtr prop,
@@ -124,63 +126,62 @@ XIRegisterPropertyHandler(DeviceIntPtr dev,
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 xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format,
+ ...);
extern void
-xf86PostMotionEventP(DeviceIntPtr device,
- int is_absolute,
- int first_valuator,
- int num_valuators,
+
+xf86PostMotionEventP(DeviceIntPtr device,
+ int is_absolute, int first_valuator, int num_valuators,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
- const
+ const
#endif
- int *valuators);
+ 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);
+xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char *val);
extern OPTTYPE xf86NextOption(OPTTYPE list);
extern int
-XIGetDeviceProperty (DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value);
+
+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,
+
+xf86PostProximityEventP(DeviceIntPtr device,
+ int is_in, int first_valuator, int num_valuators,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
const
#endif
- int *valuators);
+ 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, OPTTYPE list);
extern void
-xf86CollectInputOptions(InputInfoPtr pInfo,
- const char **defaultOpts,
- OPTTYPE extraOpts);
-extern InputInfoPtr
-xf86AllocateInput(InputDriverPtr drv, int flags);
+xf86CollectInputOptions(InputInfoPtr pInfo,
+ const char **defaultOpts, OPTTYPE extraOpts);
+extern InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags);
extern ClientPtr serverClient;
-extern Bool QueueWorkProc (
- Bool (*function)(ClientPtr /* pClient */, pointer /* closure */),
- ClientPtr client, pointer closure);
+extern Bool
+QueueWorkProc(Bool (*function)
+ (ClientPtr /* pClient */ , pointer /* closure */ ),
+ ClientPtr client, pointer closure);
#endif