diff options
-rw-r--r-- | ChangeLog | 81 | ||||
-rw-r--r-- | Makefile.am | 11 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/XChgDCtl.c | 48 | ||||
-rw-r--r-- | src/XExtInt.c | 28 | ||||
-rw-r--r-- | src/XGetDCtl.c | 47 |
6 files changed, 126 insertions, 93 deletions
diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 81b785b..0000000 --- a/ChangeLog +++ /dev/null @@ -1,81 +0,0 @@ -2006-04-26 Adam Jackson <ajax@freedesktop.org> - - * configure.ac: - Bump to 1.0.1 - -2006-03-31 Daniel Stone <daniel@freedesktop.org> - - * **/*.[ch]: - Reindent with -bad -bap -c0 -cd0 -cp0 -ncdb -ci4 -cli0 -ncs -d0 -di4 - -i4 -ip4 -l80 -npcs -psl -sob -ss -ce -sc -br -cdw -lp -cbi0. - -2006-03-20 Adam Jackson <ajax@freedesktop.org> - - * src/Makefile.am: - Bug #6286: Fix build on Cygwin. (Yaakov Selkowitz) - -2006-02-12 Alan Coopersmith <alan.coopersmith@sun.com> - - * man/Makefile.am: - Bug #5628 <https://bugs.freedesktop.org/show_bug.cgi?id=5628> - Shadow pages not created correctly when MANDIR & MANSUFFIX don't match. - -2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Update package version number for final X11R7 release candidate. - -2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * man/Makefile.am: - Change *man_SOURCES ==> *man_PRE to fix autotools warnings. - -2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Update package version number for X11R7 RC3 release. - -2005-12-02 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - * src/Makefile.am: - Add check and cflags for malloc(0) returning NULL. - -2005-11-19 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * xi.pc.in: - Update pkgconfig files to separate library build-time dependencies - from application build-time dependencies. - -2005-10-18 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Update package version number for RC1 release. - -2005-10-11 Alan Coopersmith <alan.coopersmith@sun.com> - - * man/Makefile.am: - * configure.ac: - Use sed to put version number in man page - Add shadow man pages for man pages that document multiple functions. - -2005-10-05 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * src/Makefile.am: - Added missing file to EXTRA_DIST - -2005-07-08 Keith Packard <keithp@keithp.com> - - * .cvsignore: - * man/.cvsignore: - * src/.cvsignore: - * src/Makefile.am: - Add .cvsignore files - Switch _la_CFLAGS for AM_CFLAGS to clean up directory - -2005-05-22 Alan Coopersmith <alan.coopersmith@sun.com> - - * Makefile.am, src/Makefile.am, man/Makefile.am, configure.ac, - COPYING, NEWS, README, AUTHORS, xi.pc.in: - Initial autotooling. - diff --git a/Makefile.am b/Makefile.am index 059fffc..48b6eea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,4 +7,13 @@ SUBDIRS = src man pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xi.pc -EXTRA_DIST = xi.pc.in autogen.sh +EXTRA_DIST = xi.pc.in autogen.sh ChangeLog + +CLEANFILES = ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + GIT_DIR=${srcdir}/.git git-log > ChangeLog + +dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 3b34ffa..d443194 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) -AC_INIT(libXi, 1.0.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi) +AC_INIT(libXi, 1.1.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE @@ -15,7 +15,7 @@ AC_PROG_CC AC_PROG_LIBTOOL # Checks for pkg-config packages -PKG_CHECK_MODULES(XI, xproto x11 xextproto xext inputproto) +PKG_CHECK_MODULES(XI, xproto x11 xextproto xext inputproto >= 1.4) AC_SUBST(XI_CFLAGS) AC_SUBST(XI_LIBS) diff --git a/src/XChgDCtl.c b/src/XChgDCtl.c index be5d941..a196523 100644 --- a/src/XChgDCtl.c +++ b/src/XChgDCtl.c @@ -92,7 +92,7 @@ XChangeDeviceControl(dpy, dev, control, d) R = (XDeviceResolutionControl *) d; r.control = DEVICE_RESOLUTION; r.length = sizeof(xDeviceResolutionCtl) + - R->num_valuators * sizeof(int); + R->num_valuators * sizeof(int); r.first_valuator = R->first_valuator; r.num_valuators = R->num_valuators; req->length += ((unsigned)(r.length + 3) >> 2); @@ -107,6 +107,52 @@ XChangeDeviceControl(dpy, dev, control, d) } else return (rep.status); } + case DEVICE_TOUCHSCREEN: + { + XDeviceTSControl *T = (XDeviceTSControl *) d; + xDeviceTSCtl t; + + t.control = DEVICE_TOUCHSCREEN; + t.length = sizeof(t); + t.min_x = T->min_x; + t.max_x = T->max_x; + t.min_y = T->min_y; + t.max_y = T->max_y; + t.button_threshold = T->button_threshold; + + req->length += (sizeof(t) + 3) >> 2; + Data(dpy, (char *) &t, sizeof(t)); + + if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay(dpy); + SyncHandle(); + return NoSuchExtension; + } + else { + return rep.status; + } + } + case DEVICE_CORE: + { + XDeviceCoreControl *C = (XDeviceCoreControl *) d; + xDeviceCoreCtl c; + + c.control = DEVICE_CORE; + c.length = sizeof(c); + c.status = C->status; + + req->length += (sizeof(c) + 3) >> 2; + Data (dpy, (char *) &c, sizeof(c)); + + if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay(dpy); + SyncHandle(); + return NoSuchExtension; + } + else { + return rep.status; + } + } default: { xDeviceCtl u; diff --git a/src/XExtInt.c b/src/XExtInt.c index 811c0c3..e5baccb 100644 --- a/src/XExtInt.c +++ b/src/XExtInt.c @@ -122,7 +122,9 @@ XEXT_GENERATE_FIND_DISPLAY(XInput_find_display, xinput_info, {XI_Present, XI_Add_XSetDeviceValuators_Major, XI_Add_XSetDeviceValuators_Minor}, {XI_Present, XI_Add_XChangeDeviceControl_Major, - XI_Add_XChangeDeviceControl_Minor} + XI_Add_XChangeDeviceControl_Minor}, + {XI_Present, XI_Add_DevicePresenceNotify_Major, + XI_Add_DevicePresenceNotify_Minor} }; /*********************************************************************** @@ -251,6 +253,14 @@ Ones(mask) return (((y + (y >> 3)) & 030707070707) % 077); } +static int +_XiGetDevicePresenceNotifyEvent(Display * dpy) +{ + XExtDisplayInfo *info = XInput_find_display(dpy); + + return info->codes->first_event + XI_DevicePresenceNotify; +} + /*********************************************************************** * * Handle Input extension events. @@ -665,6 +675,22 @@ XInputWireToEvent(dpy, re, event) return (ENQUEUE_EVENT); } break; + + case XI_DevicePresenceNotify: + { + XDevicePresenceNotifyEvent *ev = (XDevicePresenceNotifyEvent *) re; + devicePresenceNotify *ev2 = (devicePresenceNotify *) event; + + fprintf(stderr, "got DevicePresenceNotify event (reltype=%d)\n", + reltype); + + *ev = *(XDevicePresenceNotifyEvent *) save; + ev->window = 0; + ev->time = ev2->time; + return (ENQUEUE_EVENT); + } + break; + default: printf("XInputWireToEvent: UNKNOWN WIRE EVENT! type=%d\n", type); break; diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c index 9862dcc..139f7e7 100644 --- a/src/XGetDCtl.c +++ b/src/XGetDCtl.c @@ -61,13 +61,11 @@ SOFTWARE. #include <X11/extensions/extutil.h> #include "XIint.h" -XDeviceControl * XGetDeviceControl(dpy, dev, control) - register Display * - dpy; - XDevice * - dev; - int - control; +XDeviceControl * +XGetDeviceControl(dpy, dev, control) + register Display *dpy; + XDevice *dev; + int control; { int size = 0; int nbytes, i; @@ -116,6 +114,15 @@ XDeviceControl * XGetDeviceControl(dpy, dev, control) (3 * sizeof(int) * r->num_valuators); break; } + case DEVICE_TOUCHSCREEN: + { + size += sizeof(xDeviceTSState); + break; + } + case DEVICE_CORE: + { + size += sizeof(xDeviceCoreState); + } default: size += d->length; break; @@ -152,6 +159,32 @@ XDeviceControl * XGetDeviceControl(dpy, dev, control) *iptr++ = *iptr2++; break; } + case DEVICE_TOUCHSCREEN: + { + xDeviceTSState *t = (xDeviceTSState *) d; + XDeviceTSState *T = (XDeviceTSState *) Device; + + T->control = DEVICE_TOUCHSCREEN; + T->length = sizeof(T); + T->min_x = t->min_x; + T->max_x = t->max_x; + T->min_y = t->min_y; + T->max_y = t->max_y; + T->button_threshold = t->button_threshold; + + break; + } + case DEVICE_CORE: + { + xDeviceCoreState *c = (xDeviceCoreState *) d; + XDeviceCoreState *C = (XDeviceCoreState *) Device; + + C->control = DEVICE_CORE; + C->length = sizeof(C); + C->status = c->status; + + break; + } default: break; } |