wok annotate xorg-xf86-input-microtouch/stuff/microtouch.u @ rev 7814

Up: virtualbox-ose to 4.0.0.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Dec 24 22:11:36 2010 +0000 (2010-12-24)
parents
children
rev   line source
pascal@6642 1 --- src/microtouch.c
pascal@6642 2 +++ src/microtouch.c
pascal@6642 3 @@ -404,6 +404,10 @@
pascal@6642 4 MuTPrivatePtr priv = (MuTPrivatePtr) (local->private);
pascal@6642 5 unsigned char map[] =
pascal@6642 6 {0, 1};
pascal@6642 7 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6642 8 + Atom btn_label;
pascal@6642 9 + Atom axis_labels[2] = { 0, 0 };
pascal@6642 10 +#endif
pascal@6642 11
pascal@6642 12 /*
pascal@6642 13 * these have to be here instead of in the SetupProc, because when the
pascal@6642 14 @@ -415,7 +419,11 @@
pascal@6642 15 /*
pascal@6642 16 * Device reports button press for 1 button.
pascal@6642 17 */
pascal@6642 18 - if (InitButtonClassDeviceStruct (dev, 1, map) == FALSE)
pascal@6642 19 + if (InitButtonClassDeviceStruct (dev, 1,
pascal@6642 20 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6642 21 + &btn_label,
pascal@6642 22 +#endif
pascal@6642 23 + map) == FALSE)
pascal@6642 24 {
pascal@6642 25 ErrorF ("Unable to allocate MicroTouch touchscreen ButtonClassDeviceStruct\n");
pascal@6642 26 return !Success;
pascal@6642 27 @@ -425,7 +433,13 @@
pascal@6642 28 * Device reports motions on 2 axes in absolute coordinates.
pascal@6642 29 * Axes min and max values are reported in raw coordinates.
pascal@6642 30 */
pascal@6642 31 - if (InitValuatorClassDeviceStruct (dev, 2, xf86GetMotionEvents,
pascal@6642 32 + if (InitValuatorClassDeviceStruct (dev, 2,
pascal@6642 33 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6642 34 + axis_labels,
pascal@6642 35 +#endif
pascal@6642 36 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
pascal@6642 37 + xf86GetMotionEvents,
pascal@6642 38 +#endif
pascal@6642 39 local->history_size, Absolute) == FALSE)
pascal@6642 40 {
pascal@6642 41 ErrorF ("Unable to allocate MicroTouch touchscreen ValuatorClassDeviceStruct\n");
pascal@6642 42 @@ -433,11 +447,19 @@
pascal@6642 43 }
pascal@6642 44 else
pascal@6642 45 {
pascal@6642 46 - InitValuatorAxisStruct (dev, 0, priv->min_x, priv->max_x,
pascal@6642 47 + InitValuatorAxisStruct (dev, 0,
pascal@6642 48 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6642 49 + axis_labels[0],
pascal@6642 50 +#endif
pascal@6642 51 + priv->min_x, priv->max_x,
pascal@6642 52 9500,
pascal@6642 53 0 /* min_res */ ,
pascal@6642 54 9500 /* max_res */ );
pascal@6642 55 - InitValuatorAxisStruct (dev, 1, priv->min_y, priv->max_y,
pascal@6642 56 + InitValuatorAxisStruct (dev, 1,
pascal@6642 57 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6642 58 + axis_labels[1],
pascal@6642 59 +#endif
pascal@6642 60 + priv->min_y, priv->max_y,
pascal@6642 61 10500,
pascal@6642 62 0 /* min_res */ ,
pascal@6642 63 10500 /* max_res */ );