ChangeLog | 94 +++++++++++++++++ configure.ac | 4 debian/changelog | 9 + debian/control | 4 src/xf86Elo.c | 300 +++++++++++++------------------------------------------ 5 files changed, 183 insertions(+), 228 deletions(-)
New commits: commit a0d81891725ac61e5deb9b972d9d85f9fffd383e Author: Cyril Brulebois <[email protected]> Date: Tue Jun 28 11:53:31 2011 +0200 Upload to unstable. diff --git a/debian/changelog b/debian/changelog index 960b2f1..edde1a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -xserver-xorg-input-elographics (1:1.3.0-1) UNRELEASED; urgency=low +xserver-xorg-input-elographics (1:1.3.0-1) unstable; urgency=low * New upstream release: - Support Xserver 1.10 (Closes: #625114). * Bump xserver-xorg-dev build-dep accordingly. * Bump Standards-Version to 3.9.2 (no changes). - -- Cyril Brulebois <[email protected]> Tue, 28 Jun 2011 11:36:12 +0200 + -- Cyril Brulebois <[email protected]> Tue, 28 Jun 2011 11:53:27 +0200 xserver-xorg-input-elographics (1:1.2.4-2) unstable; urgency=low commit 15908c70c7829327fe0a1632cc6125d22d80b056 Author: Cyril Brulebois <[email protected]> Date: Tue Jun 28 11:53:20 2011 +0200 Bump Standards-Version to 3.9.2 (no changes). diff --git a/debian/changelog b/debian/changelog index 1a02e84..960b2f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ xserver-xorg-input-elographics (1:1.3.0-1) UNRELEASED; urgency=low * New upstream release: - Support Xserver 1.10 (Closes: #625114). * Bump xserver-xorg-dev build-dep accordingly. + * Bump Standards-Version to 3.9.2 (no changes). -- Cyril Brulebois <[email protected]> Tue, 28 Jun 2011 11:36:12 +0200 diff --git a/debian/control b/debian/control index dff3b4e..ed9a17a 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,7 @@ Build-Depends: x11proto-core-dev, x11proto-randr-dev, xutils-dev -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-input-elographics Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-input-elographics.git commit 88512350b4475f0744961b83a141316227699e36 Author: Cyril Brulebois <[email protected]> Date: Tue Jun 28 11:50:59 2011 +0200 Bump xserver-xorg-dev build-dep accordingly. diff --git a/debian/changelog b/debian/changelog index 2bf1635..1a02e84 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ xserver-xorg-input-elographics (1:1.3.0-1) UNRELEASED; urgency=low * New upstream release: - Support Xserver 1.10 (Closes: #625114). + * Bump xserver-xorg-dev build-dep accordingly. -- Cyril Brulebois <[email protected]> Tue, 28 Jun 2011 11:36:12 +0200 diff --git a/debian/control b/debian/control index 95c71de..dff3b4e 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Build-Depends: dh-autoreconf, pkg-config, quilt, - xserver-xorg-dev (>= 2:1.9.4), + xserver-xorg-dev (>= 2:1.10), x11proto-input-dev, x11proto-core-dev, x11proto-randr-dev, commit 40dbe625c7ce4535c66fe3b595842d9101555d8a Author: Cyril Brulebois <[email protected]> Date: Tue Jun 28 11:41:40 2011 +0200 Bump changelogs. diff --git a/ChangeLog b/ChangeLog index 2d0f513..ca91e47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,97 @@ +commit 7c324ede65c17e5c747b28f40b9fd19f21b79d9d +Author: Peter Hutterer <[email protected]> +Date: Mon Jun 27 14:48:11 2011 +1000 + + elographics 1.3.0 + + Signed-off-by: Peter Hutterer <[email protected]> + +commit 6c9a801a5c1d7e694ff7f4f097599f2b96357982 +Author: Peter Hutterer <[email protected]> +Date: Mon Jun 27 14:47:32 2011 +1000 + + Require server 1.10 + + And remove the manual input ABI check. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit 6fd22a9d64f07a480d177e877189a3a3ebf7cb90 +Author: Peter Hutterer <[email protected]> +Date: Fri Dec 3 09:34:46 2010 +1000 + + Support input ABI 12 + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Cyril Brulebois <[email protected]> + +commit 3dac6ffa77c046b3d754f0a1105fe8ecc7377911 +Author: Peter Hutterer <[email protected]> +Date: Fri Dec 3 09:33:55 2010 +1000 + + Remove refcount field, dropped from the server + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Cyril Brulebois <[email protected]> + +commit 447f547fbb7d11ec56ea578292908192175b3828 +Author: Peter Hutterer <[email protected]> +Date: Fri Dec 3 09:29:36 2010 +1000 + + Drop close_proc, conversion_proc, reverse_conversion_proc + + All three are not called by the server anymore. + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Cyril Brulebois <[email protected]> + +commit 61b249e75e357fc8974e3892517f251ecf36fda5 +Author: Peter Hutterer <[email protected]> +Date: Fri Dec 3 09:27:24 2010 +1000 + + Drop driver-specific motion history size handling. + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Cyril Brulebois <[email protected]> + +commit 8d90c971582b90c96901036203841064cb9f7a84 +Author: Peter Hutterer <[email protected]> +Date: Fri Dec 3 09:27:05 2010 +1000 + + Require server 1.9, drop earlier ABI support + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Cyril Brulebois <[email protected]> + +commit 7f35fe7d26c48622896fec8cab475f510601802b +Author: Peter Hutterer <[email protected]> +Date: Fri Dec 3 09:23:15 2010 +1000 + + Replace LocalDevicePtr with InputInfoPtr + + Both describe the same struct, LocalDevicePtr has been removed from the + server. + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Cyril Brulebois <[email protected]> + +commit 0f3df8923d4d48b24b565becefa12d676c48a61a +Author: Peter Hutterer <[email protected]> +Date: Fri Dec 3 09:21:23 2010 +1000 + + unifdef XFree86LOADER + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Cyril Brulebois <[email protected]> + +commit 787c1a94dec338da8585b7fad37f1b5fc973b2ad +Author: Peter Hutterer <[email protected]> +Date: Fri Dec 3 09:35:06 2010 +1000 + + Bump to 1.2.99 + + Signed-off-by: Peter Hutterer <[email protected]> + commit 607aed76023e71509b260dc23da7c150c1eff825 Author: Peter Hutterer <[email protected]> Date: Wed Jun 9 12:18:14 2010 +1000 diff --git a/debian/changelog b/debian/changelog index 542bf6c..2bf1635 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-input-elographics (1:1.3.0-1) UNRELEASED; urgency=low + + * New upstream release: + - Support Xserver 1.10 (Closes: #625114). + + -- Cyril Brulebois <[email protected]> Tue, 28 Jun 2011 11:36:12 +0200 + xserver-xorg-input-elographics (1:1.2.4-2) unstable; urgency=low * Switch to dh: commit 7c324ede65c17e5c747b28f40b9fd19f21b79d9d Author: Peter Hutterer <[email protected]> Date: Mon Jun 27 14:48:11 2011 +1000 elographics 1.3.0 Signed-off-by: Peter Hutterer <[email protected]> diff --git a/configure.ac b/configure.ac index 9fd1fc6..a91be89 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-input-elographics], - 1.2.99, + 1.3.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-input-elographics) commit 6c9a801a5c1d7e694ff7f4f097599f2b96357982 Author: Peter Hutterer <[email protected]> Date: Mon Jun 27 14:47:32 2011 +1000 Require server 1.10 And remove the manual input ABI check. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/configure.ac b/configure.ac index 0d881e6..9fd1fc6 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,7 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.0] xproto $REQUIRED_MODULES) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10.0] xproto $REQUIRED_MODULES) sdkdir=$(pkg-config --variable=sdkdir xorg-server) XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" diff --git a/src/xf86Elo.c b/src/xf86Elo.c index f5b31d7..5aba02f 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -58,10 +58,6 @@ #include "xf86Module.h" -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 -#error "Need server with input ABI 12." -#endif - /** * models to be treated specially. */ commit 6fd22a9d64f07a480d177e877189a3a3ebf7cb90 Author: Peter Hutterer <[email protected]> Date: Fri Dec 3 09:34:46 2010 +1000 Support input ABI 12 Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Cyril Brulebois <[email protected]> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 4c3426f..f5b31d7 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -58,6 +58,10 @@ #include "xf86Module.h" +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 +#error "Need server with input ABI 12." +#endif + /** * models to be treated specially. */ @@ -725,13 +729,15 @@ xf86EloControl(DeviceIntPtr dev, -1, -1, 9500, 0 /* min_res */, - 9500 /* max_res */); + 9500 /* max_res */, + Absolute); InitValuatorAxisStruct(dev, 1, axis_labels[1], -1, -1, 10500, 0 /* min_res */, - 10500 /* max_res */); + 10500 /* max_res */, + Absolute); } if (InitFocusClassDeviceStruct(dev) == FALSE) { @@ -859,22 +865,14 @@ xf86EloControl(DeviceIntPtr dev, * *************************************************************************** */ -static InputInfoPtr -xf86EloAllocate(InputDriverPtr drv, IDevPtr dev) +static int +xf86EloAllocate(InputDriverPtr drv, InputInfoPtr pInfo) { - InputInfoPtr pInfo; EloPrivatePtr priv; priv = malloc(sizeof(EloPrivateRec)); if (!priv) - return NULL; - - pInfo = xf86AllocateInput(drv, 0); - - if (!pInfo) { - free(priv); - return NULL; - } + return BadAlloc; priv->input_dev = strdup(ELO_PORT); priv->min_x = 0; @@ -892,19 +890,15 @@ xf86EloAllocate(InputDriverPtr drv, IDevPtr dev) priv->packet_buf_p = 0; priv->swap_axes = 0; - pInfo->name = xstrdup(dev->identifier); pInfo->flags = 0 /* XI86_NO_OPEN_ON_INIT */; pInfo->device_control = xf86EloControl; pInfo->read_input = xf86EloReadInput; pInfo->control_proc = NULL; pInfo->switch_mode = NULL; - pInfo->fd = -1; - pInfo->atom = 0; - pInfo->dev = NULL; pInfo->private = priv; pInfo->type_name = "Elographics TouchScreen"; - return pInfo; + return Success; } @@ -921,7 +915,7 @@ xf86EloUninit(InputDriverPtr drv, xf86DeleteInput(pInfo, 0); } -static const char *default_options[] = { +static char *default_options[] = { "BaudRate", "9600", "StopBits", "1", "DataBits", "8", @@ -930,42 +924,37 @@ static const char *default_options[] = { NULL }; -static InputInfoPtr +static int xf86EloInit(InputDriverPtr drv, - IDevPtr dev, + InputInfoPtr pInfo, int flags) { - InputInfoPtr pInfo=NULL; EloPrivatePtr priv=NULL; char *str; int portrait = 0; int height, width; char *opt_model; Model* model; + int rc; - pInfo = xf86EloAllocate(drv, dev); - if (!pInfo) { - return NULL; - } - priv = pInfo->private; - pInfo->conf_idev = dev; + rc = xf86EloAllocate(drv, pInfo); + if (rc != Success) + return rc; - xf86CollectInputOptions(pInfo, default_options, NULL); - /* Process the common options. */ - xf86ProcessCommonOptions(pInfo, pInfo->options); + priv = pInfo->private; str = xf86FindOptionValue(pInfo->options, "Device"); if (!str) { xf86Msg(X_ERROR, "%s: No Device specified in Elographics module config.\n", - dev->identifier); + pInfo->name); if (priv) { if (priv->input_dev) { free(priv->input_dev); } free(priv); } - return pInfo; + return BadValue; } priv->input_dev = strdup(str); @@ -1027,14 +1016,14 @@ xf86EloInit(InputDriverPtr drv, height = priv->max_y - priv->min_y; if (width == 0) { xf86Msg(X_ERROR, "Elographics: Cannot configure touchscreen with width 0\n"); - return pInfo; + return BadValue; } else if (width < 0) { xf86Msg(X_INFO, "Elographics: reverse x mode (minimum x position >= maximum x position)\n"); } if (height == 0) { xf86Msg(X_ERROR, "Elographics: Cannot configure touchscreen with height 0\n"); - return pInfo; + return BadValue; } else if (height < 0) { xf86Msg(X_INFO, "Elographics: reverse y mode (minimum y position >= maximum y position)\n"); @@ -1061,9 +1050,7 @@ xf86EloInit(InputDriverPtr drv, priv->swap_axes = (priv->swap_axes==0) ? 1 : 0; } - /* mark the device configured */ - pInfo->flags |= XI86_CONFIGURED; - return pInfo; + return Success; } _X_EXPORT InputDriverRec ELOGRAPHICS = { @@ -1073,6 +1060,7 @@ _X_EXPORT InputDriverRec ELOGRAPHICS = { xf86EloInit, /* pre-init */ xf86EloUninit, /* un-init */ NULL, /* module */ + default_options }; static pointer commit 3dac6ffa77c046b3d754f0a1105fe8ecc7377911 Author: Peter Hutterer <[email protected]> Date: Fri Dec 3 09:33:55 2010 +1000 Remove refcount field, dropped from the server Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Cyril Brulebois <[email protected]> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 527ad1c..4c3426f 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -1073,7 +1073,6 @@ _X_EXPORT InputDriverRec ELOGRAPHICS = { xf86EloInit, /* pre-init */ xf86EloUninit, /* un-init */ NULL, /* module */ - 0 /* ref count */ }; static pointer commit 447f547fbb7d11ec56ea578292908192175b3828 Author: Peter Hutterer <[email protected]> Date: Fri Dec 3 09:29:36 2010 +1000 Drop close_proc, conversion_proc, reverse_conversion_proc All three are not called by the server anymore. Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Cyril Brulebois <[email protected]> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 7b5e5e2..527ad1c 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -303,73 +303,6 @@ xf86EloGetPacket(unsigned char *buffer, } } -/* - *************************************************************************** - * - * xf86EloConvert -- - * Convert extended valuators to x and y suitable for core motion - * events. Return True if ok and False if the requested conversion - * can't be done for the specified valuators. - * - *************************************************************************** - */ -static Bool -xf86EloConvert(InputInfoPtr pInfo, - int first, - int num, - int v0, - int v1, - int v2, - int v3, - int v4, - int v5, - int *x, - int *y) -{ - EloPrivatePtr priv = (EloPrivatePtr) pInfo->private; - int width = priv->max_x - priv->min_x; - int height = priv->max_y - priv->min_y; - int input_x, input_y; - - if (first != 0 || num != 2) { - return FALSE; - } - - DBG(3, ErrorF("EloConvert: Screen(%d) - v0(%d), v1(%d)\n", priv->screen_no, v0, v1)); - - if (width == 0) width = 1; - if (height == 0) height = 1; - - if (priv->swap_axes) { - input_x = v1; - input_y = v0; - } - else { - input_x = v0; - input_y = v1; - } - *x = (priv->screen_width * (input_x - priv->min_x)) / width; - *y = (priv->screen_height - - (priv->screen_height * (input_y - priv->min_y)) / height); - - /* - * MHALAS: Based on the description in xf86XInputSetScreen - * this code must be called from ReadInput BEFORE any events - * are posted but this method is called FROM xf86PostMotionEvent - * Therefore I have moved this method into xf86EloReadInput - */ - /* - * Need to check if still on the correct screen. - * This call is here so that this work can be done after - * calib and before posting the event. - */ -/* xf86XInputSetScreen(pInfo, priv->screen_no, *x, *y); */ - - DBG(3, ErrorF("EloConvert: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, *x, *y)); - - return TRUE; -} - /* *************************************************************************** @@ -964,10 +897,7 @@ xf86EloAllocate(InputDriverPtr drv, IDevPtr dev) pInfo->device_control = xf86EloControl; pInfo->read_input = xf86EloReadInput; pInfo->control_proc = NULL; - pInfo->close_proc = NULL; pInfo->switch_mode = NULL; - pInfo->conversion_proc = xf86EloConvert; - pInfo->reverse_conversion_proc = NULL; pInfo->fd = -1; pInfo->atom = 0; pInfo->dev = NULL; commit 61b249e75e357fc8974e3892517f251ecf36fda5 Author: Peter Hutterer <[email protected]> Date: Fri Dec 3 09:27:24 2010 +1000 Drop driver-specific motion history size handling. Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Cyril Brulebois <[email protected]> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 3569017..7b5e5e2 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -781,7 +781,7 @@ xf86EloControl(DeviceIntPtr dev, * screen to fit one meter. */ if (InitValuatorClassDeviceStruct(dev, 2, axis_labels, - pInfo->history_size, Absolute) == FALSE) { + GetMotionHistorySize(), Absolute) == FALSE) { ErrorF("Unable to allocate Elographics touchscreen ValuatorClassDeviceStruct\n"); return !Success; } @@ -973,7 +973,6 @@ xf86EloAllocate(InputDriverPtr drv, IDevPtr dev) pInfo->dev = NULL; pInfo->private = priv; pInfo->type_name = "Elographics TouchScreen"; - pInfo->history_size = 0; return pInfo; } commit 8d90c971582b90c96901036203841064cb9f7a84 Author: Peter Hutterer <[email protected]> Date: Fri Dec 3 09:27:05 2010 +1000 Require server 1.9, drop earlier ABI support Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Cyril Brulebois <[email protected]> diff --git a/configure.ac b/configure.ac index 9309d83..0d881e6 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,7 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages -PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.0] xproto $REQUIRED_MODULES) sdkdir=$(pkg-config --variable=sdkdir xorg-server) XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 924916b..3569017 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -402,16 +402,6 @@ xf86EloReadInput(InputInfoPtr pInfo) EloPrivatePtr priv = (EloPrivatePtr)(pInfo->private); int cur_x, cur_y; int state; -#if GET_ABI_MAJOR(XINPUT_ABI) == 0 - int first = 0; /* since convert is expecting 0 */ - int num = 2; /* since convert is expecting 0 */ - int v0 = 0; /* = cur_x - based on the debug output this is what v0 is */ - int v1 = 0; /* = cur_y based on the debug output this is what v0 is */ - int v2 = 0; /* not used in convert */ - int v3 = 0; /* not used in convert */ - int v4 = 0; /* not used in convert */ - int v5 = 0; /* not used in convert */ -#endif DBG(4, ErrorF("Entering ReadInput\n")); @@ -436,31 +426,6 @@ xf86EloReadInput(InputInfoPtr pInfo) cur_x = WORD_ASSEMBLY(priv->packet_buf[3], priv->packet_buf[4]); cur_y = WORD_ASSEMBLY(priv->packet_buf[5], priv->packet_buf[6]); state = priv->packet_buf[2] & 0x07; -#if GET_ABI_MAJOR(XINPUT_ABI) == 0 - /* - * MHALAS: Based on the description in xf86XInputSetScreen - * this code must be called from ReadInput BEFORE any events - * are posted but this method is called FROM xf86PostMotionEvent - * Therefore I have moved this method into xf86EloReadInput - */ - /* - * Need to check if still on the correct screen. - * This call is here so that this work can be done after - * calib and before posting the event. - */ - - DBG(3, ErrorF("EloConvert Before Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); - v0 = cur_x; /* based on the debug output this is what v0 is */ - v1 = cur_y; /* based on the debug output this is what v1 is */ - /* - * Use the conversion method to send correct coordinates - * since it contains all necessary logic - */ - xf86EloConvert(pInfo, first, num, v0, v1, v2, v3, v4, v5, &cur_x, &cur_y); - DBG(3, ErrorF("EloConvert During Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); - xf86XInputSetScreen(pInfo, priv->screen_no, cur_x, cur_y); - DBG(3, ErrorF("EloConvert After Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); -#endif /* * Send events. @@ -776,10 +741,8 @@ xf86EloControl(DeviceIntPtr dev, unsigned char map[] = { 0, 1 }; unsigned char req[ELO_PACKET_SIZE]; unsigned char reply[ELO_PACKET_SIZE]; -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 Atom btn_label; Atom axis_labels[2] = { 0, 0 }; -#endif switch(mode) { @@ -797,11 +760,7 @@ xf86EloControl(DeviceIntPtr dev, /* * Device reports button press for up to 1 button. */ - if (InitButtonClassDeviceStruct(dev, 1, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 - &btn_label, -#endif - map) == FALSE) { + if (InitButtonClassDeviceStruct(dev, 1, &btn_label, map) == FALSE) { ErrorF("Unable to allocate Elographics touchscreen ButtonClassDeviceStruct\n"); return !Success; } @@ -821,13 +780,7 @@ xf86EloControl(DeviceIntPtr dev, * max and min values scaled from the approximate size of the * screen to fit one meter. */ - if (InitValuatorClassDeviceStruct(dev, 2, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 - axis_labels, -#endif -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 - xf86GetMotionEvents, -#endif + if (InitValuatorClassDeviceStruct(dev, 2, axis_labels, pInfo->history_size, Absolute) == FALSE) { ErrorF("Unable to allocate Elographics touchscreen ValuatorClassDeviceStruct\n"); return !Success; @@ -835,17 +788,13 @@ xf86EloControl(DeviceIntPtr dev, else { /* I will map coordinates myself */ InitValuatorAxisStruct(dev, 0, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 axis_labels[0], -#endif -1, -1, 9500, 0 /* min_res */, 9500 /* max_res */); InitValuatorAxisStruct(dev, 1, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 axis_labels[1], -#endif -1, -1, 10500, 0 /* min_res */, commit 7f35fe7d26c48622896fec8cab475f510601802b Author: Peter Hutterer <[email protected]> Date: Fri Dec 3 09:23:15 2010 +1000 Replace LocalDevicePtr with InputInfoPtr Both describe the same struct, LocalDevicePtr has been removed from the server. Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Cyril Brulebois <[email protected]> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 876f318..924916b 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -314,7 +314,7 @@ xf86EloGetPacket(unsigned char *buffer, *************************************************************************** */ static Bool -xf86EloConvert(LocalDevicePtr local, +xf86EloConvert(InputInfoPtr pInfo, int first, int num, int v0, @@ -326,7 +326,7 @@ xf86EloConvert(LocalDevicePtr local, int *x, int *y) { - EloPrivatePtr priv = (EloPrivatePtr) local->private; + EloPrivatePtr priv = (EloPrivatePtr) pInfo->private; int width = priv->max_x - priv->min_x; int height = priv->max_y - priv->min_y; int input_x, input_y; @@ -363,7 +363,7 @@ xf86EloConvert(LocalDevicePtr local, * This call is here so that this work can be done after * calib and before posting the event. */ -/* xf86XInputSetScreen(local, priv->screen_no, *x, *y); */ +/* xf86XInputSetScreen(pInfo, priv->screen_no, *x, *y); */ DBG(3, ErrorF("EloConvert: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, *x, *y)); @@ -397,9 +397,9 @@ xf86EloConvert(LocalDevicePtr local, *************************************************************************** */ static void -xf86EloReadInput(LocalDevicePtr local) +xf86EloReadInput(InputInfoPtr pInfo) { - EloPrivatePtr priv = (EloPrivatePtr)(local->private); + EloPrivatePtr priv = (EloPrivatePtr)(pInfo->private); int cur_x, cur_y; int state; #if GET_ABI_MAJOR(XINPUT_ABI) == 0 @@ -423,7 +423,7 @@ xf86EloReadInput(LocalDevicePtr local) if(xf86EloGetPacket(priv->packet_buf, &priv->packet_buf_p, &priv->checksum, - local->fd) != Success) + pInfo->fd) != Success) continue; /* @@ -456,9 +456,9 @@ xf86EloReadInput(LocalDevicePtr local) * Use the conversion method to send correct coordinates * since it contains all necessary logic */ - xf86EloConvert(local, first, num, v0, v1, v2, v3, v4, v5, &cur_x, &cur_y); + xf86EloConvert(pInfo, first, num, v0, v1, v2, v3, v4, v5, &cur_x, &cur_y); DBG(3, ErrorF("EloConvert During Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); - xf86XInputSetScreen(local, priv->screen_no, cur_x, cur_y); + xf86XInputSetScreen(pInfo, priv->screen_no, cur_x, cur_y); DBG(3, ErrorF("EloConvert After Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); #endif @@ -469,13 +469,13 @@ xf86EloReadInput(LocalDevicePtr local) * location has changed as DIX assumes this. This is why we always * emit a motion, regardless of the kind of packet processed. */ - xf86PostMotionEvent(local->dev, TRUE, 0, 2, cur_x, cur_y); + xf86PostMotionEvent(pInfo->dev, TRUE, 0, 2, cur_x, cur_y); /* * Emit a button press or release. */ if (state == ELO_PRESS || state == ELO_RELEASE) { - xf86PostButtonEvent(local->dev, TRUE, 1, state == ELO_PRESS, 0, 2, cur_x, cur_y); + xf86PostButtonEvent(pInfo->dev, TRUE, 1, state == ELO_PRESS, 0, 2, cur_x, cur_y); } DBG(3, ErrorF("TouchScreen: x(%d), y(%d), %s\n", @@ -483,7 +483,7 @@ xf86EloReadInput(LocalDevicePtr local) (state == ELO_PRESS) ? "Press" : ((state == ELO_RELEASE) ? "Release" : "Stream"))); } } - while (xf86WaitForInput(local->fd, 0) > 0); /* don't wait, just check */ + while (xf86WaitForInput(pInfo->fd, 0) > 0); /* don't wait, just check */ } @@ -771,8 +771,8 @@ static Bool xf86EloControl(DeviceIntPtr dev, int mode) { - LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; - EloPrivatePtr priv = (EloPrivatePtr)(local->private); + InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate; + EloPrivatePtr priv = (EloPrivatePtr)(pInfo->private); unsigned char map[] = { 0, 1 }; unsigned char req[ELO_PACKET_SIZE]; unsigned char reply[ELO_PACKET_SIZE]; @@ -828,7 +828,7 @@ xf86EloControl(DeviceIntPtr dev, #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 xf86GetMotionEvents, #endif - local->history_size, Absolute) == FALSE) { + pInfo->history_size, Absolute) == FALSE) { ErrorF("Unable to allocate Elographics touchscreen ValuatorClassDeviceStruct\n"); return !Success; } @@ -859,7 +859,7 @@ xf86EloControl(DeviceIntPtr dev, /* * Allocate the motion events buffer. */ - xf86MotionHistoryAllocate(local); + xf86MotionHistoryAllocate(pInfo); DBG(2, ErrorF("Done.\n")); @@ -869,11 +869,11 @@ xf86EloControl(DeviceIntPtr dev, case DEVICE_ON: DBG(2, ErrorF("Elographics touchscreen on...\n")); - if (local->fd < 0) { + if (pInfo->fd < 0) { DBG(2, ErrorF("Elographics touchscreen opening : %s\n", priv->input_dev)); - local->fd = xf86OpenSerial(local->options); - if (local->fd < 0) { + pInfo->fd = xf86OpenSerial(pInfo->options); + if (pInfo->fd < 0) { Error("Unable to open Elographics touchscreen device"); return !Success; } @@ -886,7 +886,7 @@ xf86EloControl(DeviceIntPtr dev, */ memset(req, 0, ELO_PACKET_SIZE); req[1] = tolower(ELO_PARAMETER); - if (xf86EloSendQuery(req, reply, local->fd) != Success) { + if (xf86EloSendQuery(req, reply, pInfo->fd) != Success) { priv->is_a_2310 = 1; ErrorF("Not at the specified rate or model 2310, will continue\n"); } @@ -896,7 +896,7 @@ xf86EloControl(DeviceIntPtr dev, */ memset(req, 0, ELO_PACKET_SIZE); req[1] = tolower(ELO_ID); - if (xf86EloSendQuery(req, reply, local->fd) == Success) { + if (xf86EloSendQuery(req, reply, pInfo->fd) == Success) { xf86EloPrintIdent(reply, priv); } else { @@ -911,7 +911,7 @@ xf86EloControl(DeviceIntPtr dev, req[1] = ELO_MODE; req[3] = ELO_TOUCH_MODE | ELO_STREAM_MODE | ELO_UNTOUCH_MODE; req[4] = ELO_TRACKING_MODE; - if (xf86EloSendControl(req, local->fd) != Success) { + if (xf86EloSendControl(req, pInfo->fd) != Success) { DBG(2, ErrorF("Unable to change Elographics touchscreen operating mode... Maybe it's GeneralTouch touchscreen...\n")); } @@ -922,11 +922,11 @@ xf86EloControl(DeviceIntPtr dev, req[1] = ELO_REPORT; req[2] = priv->untouch_delay; req[3] = priv->report_delay; - if (xf86EloSendControl(req, local->fd) != Success) { + if (xf86EloSendControl(req, pInfo->fd) != Success) { DBG(2, ErrorF("Unable to change Elographics touchscreen reports timings... Maybe it's GeneralTouch touchscreen...\n")); } } - xf86AddEnabledDevice(local); + xf86AddEnabledDevice(pInfo); dev->public.on = TRUE; } @@ -941,11 +941,11 @@ xf86EloControl(DeviceIntPtr dev, case DEVICE_OFF: DBG(2, ErrorF("Elographics touchscreen off...\n")); dev->public.on = FALSE; - if (local->fd >= 0) { - xf86RemoveEnabledDevice(local); + if (pInfo->fd >= 0) { + xf86RemoveEnabledDevice(pInfo); } - SYSCALL(close(local->fd)); - local->fd = -1; + SYSCALL(close(pInfo->fd)); + pInfo->fd = -1; DBG(2, ErrorF("Done\n")); return Success; @@ -956,11 +956,11 @@ xf86EloControl(DeviceIntPtr dev, case DEVICE_CLOSE: DBG(2, ErrorF("Elographics touchscreen close...\n")); dev->public.on = FALSE; - if (local->fd >= 0) { - xf86RemoveEnabledDevice(local); + if (pInfo->fd >= 0) { + xf86RemoveEnabledDevice(pInfo); } - SYSCALL(close(local->fd)); - local->fd = -1; + SYSCALL(close(pInfo->fd)); + pInfo->fd = -1; DBG(2, ErrorF("Done\n")); return Success; @@ -977,19 +977,19 @@ xf86EloControl(DeviceIntPtr dev, * *************************************************************************** */ -static LocalDevicePtr +static InputInfoPtr xf86EloAllocate(InputDriverPtr drv, IDevPtr dev) { - LocalDevicePtr local; + InputInfoPtr pInfo; EloPrivatePtr priv; priv = malloc(sizeof(EloPrivateRec)); if (!priv) return NULL; - local = xf86AllocateInput(drv, 0); + pInfo = xf86AllocateInput(drv, 0); - if (!local) { + if (!pInfo) { free(priv); return NULL; } @@ -1010,37 +1010,37 @@ xf86EloAllocate(InputDriverPtr drv, IDevPtr dev) priv->packet_buf_p = 0; -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

