aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorZephaniah E. Hull <warp@aehallh.com>2006-04-08 17:23:06 +0000
committerZephaniah E. Hull <warp@aehallh.com>2006-04-08 17:23:06 +0000
commitc97fdb44493e55f3456222855293016a596ff56e (patch)
treeee32d366365e870a35ab04bdcd173d4a4b00f7e1 /src/evdev.h
parentUnlibcwrap. Bump server version requirement. Bump to 1.1.0. (diff)
downloadxf86-input-evdev-c97fdb44493e55f3456222855293016a596ff56e.tar.gz
xf86-input-evdev-c97fdb44493e55f3456222855293016a596ff56e.tar.bz2
xf86-input-evdev-c97fdb44493e55f3456222855293016a596ff56e.zip
Remove evdev_abs.c and evdev_rel.c. Added evdev_axes.c.
Change the calls to refer to EvdevAxes instead of Abs and Rel. Include mipointer.h. (Fixes a compile error.) Remove an unused variable from EvdevReadInput. Removed evdev_abs.c and evdev_rel.c, added evdev_axes.c. Added count to rel and abs. Moved btnMap from rel to the new axes. Shuffle some includes, and include stdarg.h. Removed. New, a mix of rel and abs that should actually work in the rel case. Rearrange include order. btnMap was moved from being part of rel to being part of axes. Removed. Rearrange include order. Rearrange include order. NOTE: This commit has been compile tested, not run tested. I have some other changes to make before I can do more heavy testing.
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/evdev.h b/src/evdev.h
index 797bc9f..80e01f1 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -56,17 +56,21 @@
#ifndef EVDEV_BRAIN_H_
#define EVDEV_BRAIN_H_
+#define _XF86_ANSIC_H
+#define XF86_LIBC_H
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <linux/input.h>
-#include <xf86Xinput.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stdarg.h>
+#include <xf86Xinput.h>
#define BITS_PER_LONG (sizeof(long) * 8)
#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
@@ -145,6 +149,7 @@ typedef struct {
int axes;
int n; /* Which abs_v is current, and which is previous. */
int v[2][ABS_MAX];
+ int count;
int min[ABS_MAX];
int max[ABS_MAX];
int map[ABS_MAX];
@@ -157,11 +162,17 @@ typedef struct {
typedef struct {
int axes;
int v[REL_MAX];
- CARD8 btnMap[REL_MAX][2];
+ int count;
int map[REL_MAX];
} evdevRelRec, *evdevRelPtr;
typedef struct {
+ int axes;
+ int v[ABS_MAX];
+ CARD8 btnMap[ABS_MAX][2];
+} evdevAxesRec, *evdevAxesPtr;
+
+typedef struct {
char *xkb_rules;
char *xkb_model;
char *xkb_layout;
@@ -179,6 +190,7 @@ typedef struct _evdevState {
evdevAbsPtr abs;
evdevRelPtr rel;
evdevKeyPtr key;
+ evdevAxesPtr axes;
} evdevStateRec, *evdevStatePtr;
typedef struct _evdevDevice {
@@ -232,19 +244,13 @@ int EvdevBtnNew(InputInfoPtr pInfo);
void EvdevBtnProcess (InputInfoPtr pInfo, struct input_event *ev);
void EvdevBtnPostFakeClicks(InputInfoPtr pInfo, int button, int count);
-int EvdevAbsInit (DeviceIntPtr device);
-int EvdevAbsOn (DeviceIntPtr device);
-int EvdevAbsOff (DeviceIntPtr device);
-int EvdevAbsNew(InputInfoPtr pInfo);
-void EvdevAbsProcess (InputInfoPtr pInfo, struct input_event *ev);
-void EvdevAbsSyn (InputInfoPtr pInfo);
-
-int EvdevRelInit (DeviceIntPtr device);
-int EvdevRelOn (DeviceIntPtr device);
-int EvdevRelOff (DeviceIntPtr device);
-int EvdevRelNew(InputInfoPtr pInfo);
-void EvdevRelProcess (InputInfoPtr pInfo, struct input_event *ev);
-void EvdevRelSyn (InputInfoPtr pInfo);
+int EvdevAxesInit (DeviceIntPtr device);
+int EvdevAxesOn (DeviceIntPtr device);
+int EvdevAxesOff (DeviceIntPtr device);
+int EvdevAxesNew(InputInfoPtr pInfo);
+void EvdevAxesAbsProcess (InputInfoPtr pInfo, struct input_event *ev);
+void EvdevAxesRelProcess (InputInfoPtr pInfo, struct input_event *ev);
+void EvdevAxesSyn (InputInfoPtr pInfo);
int EvdevKeyInit (DeviceIntPtr device);
int EvdevKeyNew (InputInfoPtr pInfo);