aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorZephaniah E. Hull <warp@agamemnon.b5>2006-07-13 11:59:25 -0400
committerZephaniah E. Hull <warp@agamemnon.b5>2006-07-13 11:59:25 -0400
commitdc88668839f4613d60526aa78aed3e74eebe64ad (patch)
tree80cc7964787d76e270b42e1a46e2c2b6240de69d /src/evdev.h
parentUpdate the .gitignore files to remove some more noise. (diff)
downloadxf86-input-evdev-dc88668839f4613d60526aa78aed3e74eebe64ad.tar.gz
xf86-input-evdev-dc88668839f4613d60526aa78aed3e74eebe64ad.tar.bz2
xf86-input-evdev-dc88668839f4613d60526aa78aed3e74eebe64ad.zip
Split the New functions so that structs can be allocated and buttons
detected, and then stuff that depends on _other_ areas. (Specificly, axes and btn have a circular dependency on which one has to run first, this solves that.) Add button names, and a way to get a button number from a name. Add a function for checking to see if a button exists, takes the number from the previous function. Change the (unused) state array of pointers in the button struct to an array of pointers to functions for callback. Implemented the 'touch' feature, on by default if BTN_DIGI_TOUCH exists, won't, in rel mode, process x/y data unless it's down, and is used to try and make 'pick up stencil, move to other side of digitizer, set back down' not jump to the other side of the screen in rel mode. (This doesn't work as well as it could, but I'm fairly sure that it's due to the quality of the absolute input device I'm using, but feedback would be really nice.) FIXME: Update the manpage for this.
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/evdev.h b/src/evdev.h
index a399571..2a65530 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -151,7 +151,7 @@ typedef struct {
int real_buttons;
int buttons;
CARD8 map[EVDEV_MAXBUTTONS];
- int *state[EVDEV_MAXBUTTONS];
+ void (*callback[EVDEV_MAXBUTTONS])(InputInfoPtr pInfo, int button, int value);
} evdevBtnRec, *evdevBtnPtr;
typedef struct {
@@ -164,6 +164,9 @@ typedef struct {
int map[ABS_MAX];
int scale[2];
int screen; /* Screen number for this device. */
+ Bool use_touch;
+ Bool touch;
+ Bool reset;
} evdevAbsRec, *evdevAbsPtr;
typedef struct {
@@ -247,14 +250,18 @@ Bool evdevGetBits (int fd, evdevBitsPtr bits);
int EvdevBtnInit (DeviceIntPtr device);
int EvdevBtnOn (DeviceIntPtr device);
int EvdevBtnOff (DeviceIntPtr device);
-int EvdevBtnNew(InputInfoPtr pInfo);
+int EvdevBtnNew0(InputInfoPtr pInfo);
+int EvdevBtnNew1(InputInfoPtr pInfo);
void EvdevBtnProcess (InputInfoPtr pInfo, struct input_event *ev);
void EvdevBtnPostFakeClicks(InputInfoPtr pInfo, int button, int count);
+int EvdevBtnFind (InputInfoPtr pInfo, const char *button);
+int EvdevBtnExists (InputInfoPtr pInfo, int button);
int EvdevAxesInit (DeviceIntPtr device);
int EvdevAxesOn (DeviceIntPtr device);
int EvdevAxesOff (DeviceIntPtr device);
-int EvdevAxesNew(InputInfoPtr pInfo);
+int EvdevAxesNew0(InputInfoPtr pInfo);
+int EvdevAxesNew1(InputInfoPtr pInfo);
void EvdevAxesAbsProcess (InputInfoPtr pInfo, struct input_event *ev);
void EvdevAxesRelProcess (InputInfoPtr pInfo, struct input_event *ev);
void EvdevAxesSyn (InputInfoPtr pInfo);