diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-09-10 10:08:41 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-11-25 13:04:39 +1000 |
commit | a48b52684e184cac7979247c4a5af4250a9aa809 (patch) | |
tree | 92e3e26a4df96dade327e753936e6bf64a8c9050 /src | |
parent | 4e8963e7b157aa61331824e57c16f467b2570c6b (diff) |
Replace LocalDevicePtr with InputInfoPtr.
LocalDevicePtr was removed with input ABI 12, but InputInfoPtr has been
around for years anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/acecad.c | 26 | ||||
-rw-r--r-- | src/acecad.h | 15 |
2 files changed, 20 insertions, 21 deletions
diff --git a/src/acecad.c b/src/acecad.c index 7bb80e4..2c2ff27 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -215,7 +215,7 @@ static char acecad_driver_name[11] = "usb_acecad"; #endif static Bool -AceCadAutoDevProbe(LocalDevicePtr local, int verb) +AceCadAutoDevProbe(InputInfoPtr local, int verb) { /* We are trying to find the right eventX device */ int i = 0; @@ -331,7 +331,7 @@ ProbeFound: static InputInfoPtr AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) { - LocalDevicePtr local = xf86AllocateInput(drv, 0); + InputInfoPtr local = xf86AllocateInput(drv, 0); AceCadPrivatePtr priv = xcalloc (1, sizeof(AceCadPrivateRec)); int speed; int msgtype; @@ -526,7 +526,7 @@ static Bool DeviceOn (DeviceIntPtr dev) { char buffer[256]; - LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; + InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate; AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private); xf86MsgVerb(X_INFO, 4, "%s Device On\n", local->name); @@ -569,7 +569,7 @@ DeviceOn (DeviceIntPtr dev) static Bool DeviceOff (DeviceIntPtr dev) { - LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; + InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate; AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private); xf86MsgVerb(X_INFO, 4, "%s Device Off\n", local->name); @@ -594,7 +594,7 @@ DeviceOff (DeviceIntPtr dev) static Bool DeviceClose (DeviceIntPtr dev) { - LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; + InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate; xf86MsgVerb(X_INFO, 4, "%s Device Close\n", local->name); @@ -604,7 +604,7 @@ DeviceClose (DeviceIntPtr dev) static void ControlProc(DeviceIntPtr dev, PtrCtrl *ctrl) { - LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; + InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate; xf86MsgVerb(X_INFO, 4, "%s Control Proc\n", local->name); } @@ -613,7 +613,7 @@ static Bool DeviceInit (DeviceIntPtr dev) { int rx, ry; - LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; + InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate; AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private); unsigned char map[] = {0, 1, 2, 3}; #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 @@ -754,7 +754,7 @@ DeviceInit (DeviceIntPtr dev) } static void -ReadInput (LocalDevicePtr local) +ReadInput (InputInfoPtr local) { int x, y, z; int prox, buttons; @@ -856,7 +856,7 @@ ReadInput (LocalDevicePtr local) #ifdef HAVE_LINUX_INPUT_H #define set_bit(byte,nb,bit) (bit ? byte | (1<<nb) : byte & (~(1<<nb))) static void -USBReadInput (LocalDevicePtr local) +USBReadInput (InputInfoPtr local) { int len; struct input_event * event; @@ -1011,7 +1011,7 @@ USBReadInput (LocalDevicePtr local) #endif static void -CloseProc (LocalDevicePtr local) +CloseProc (InputInfoPtr local) { } @@ -1021,7 +1021,7 @@ CloseProc (LocalDevicePtr local) * to simulate mouse events. */ static Bool -ConvertProc (LocalDevicePtr local, int first, int num, +ConvertProc (InputInfoPtr local, int first, int num, int v0, int v1, int v2, int v3, int v4, int v5, int *x, int *y) { @@ -1038,7 +1038,7 @@ ConvertProc (LocalDevicePtr local, int first, int num, static Bool -ReverseConvertProc (LocalDevicePtr local, +ReverseConvertProc (InputInfoPtr local, int x, int y, int *valuators) { @@ -1104,7 +1104,7 @@ QueryHardware (AceCadPrivatePtr priv) #ifdef HAVE_LINUX_INPUT_H static Bool -USBQueryHardware (LocalDevicePtr local) +USBQueryHardware (InputInfoPtr local) { AceCadPrivatePtr priv = (AceCadPrivatePtr) local->private; unsigned long bit[EV_MAX][NBITS(KEY_MAX)]; diff --git a/src/acecad.h b/src/acecad.h index fc06348..49721e0 100644 --- a/src/acecad.h +++ b/src/acecad.h @@ -100,21 +100,20 @@ static Bool DeviceOn (DeviceIntPtr); static Bool DeviceOff (DeviceIntPtr); static Bool DeviceClose (DeviceIntPtr); static Bool DeviceInit (DeviceIntPtr); -static void ReadInput (LocalDevicePtr); -static void CloseProc (LocalDevicePtr); -static Bool ConvertProc (LocalDevicePtr, int, int, int, int, int, int, int, int, int *, int *); -static Bool ReverseConvertProc(LocalDevicePtr , int , int , int*); +static void ReadInput (InputInfoPtr); +static void CloseProc (InputInfoPtr); +static Bool ConvertProc (InputInfoPtr, int, int, int, int, int, int, int, int, int *, int *); +static Bool ReverseConvertProc(InputInfoPtr , int , int , int*); static Bool QueryHardware (AceCadPrivatePtr); static void NewPacket (AceCadPrivatePtr priv); static Bool AceCadGetPacket (AceCadPrivatePtr); static InputInfoPtr AceCadPreInit(InputDriverPtr, IDevPtr , int); #ifdef HAVE_LINUX_INPUT_H -static void USBReadInput (LocalDevicePtr); -static Bool USBQueryHardware (LocalDevicePtr); +static void USBReadInput (InputInfoPtr); +static Bool USBQueryHardware (InputInfoPtr); static int IsUSBLine(int); static Bool fd_query_acecad(int, char*); -static Bool AceCadAutoDevProbe(LocalDevicePtr, int); +static Bool AceCadAutoDevProbe(InputInfoPtr, int); #endif - #endif |