summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Willich <sabotageandi@gmail.com>2011-08-06 22:56:54 +0200
committerAndreas Willich <sabotageandi@gmail.com>2011-08-06 22:56:54 +0200
commit05e2888845ef46a6851eeb8817811e7f2a5172f1 (patch)
tree01f71afdf31b80285ceaec7fe6dbb4f05a430ce5 /x11-libs/libXi
downloadsabotageandi-05e2888845ef46a6851eeb8817811e7f2a5172f1.tar.gz
sabotageandi-05e2888845ef46a6851eeb8817811e7f2a5172f1.tar.bz2
sabotageandi-05e2888845ef46a6851eeb8817811e7f2a5172f1.zip
ebuild push
Diffstat (limited to 'x11-libs/libXi')
-rw-r--r--x11-libs/libXi/Manifest5
-rw-r--r--x11-libs/libXi/files/libXi-xi2.1.patch355
-rw-r--r--x11-libs/libXi/libXi-1.4.2-r1.ebuild42
-rw-r--r--x11-libs/libXi/libXi-1.4.3.ebuild44
4 files changed, 446 insertions, 0 deletions
diff --git a/x11-libs/libXi/Manifest b/x11-libs/libXi/Manifest
new file mode 100644
index 0000000..1c4b4ca
--- /dev/null
+++ b/x11-libs/libXi/Manifest
@@ -0,0 +1,5 @@
+AUX libXi-xi2.1.patch 11188 RMD160 909fcd23461eca1a854d39c2a304ae26c8e96574 SHA1 dccae93e792e9d46d60ee44150810c52ce680521 SHA256 feffa065a785326d35280ceb769873224e75c16c20d7f080be20a2afff1f240a
+DIST libXi-1.4.2.tar.bz2 398801 RMD160 2753987b72a91683321bc02172901f1d5c5b5664 SHA1 97e60a60dd789287e47df807e487f4952dd4ff95 SHA256 272b8041efc0a0203fb0ba33481ddec989539aed862181b58c8c3e410e325691
+DIST libXi-1.4.3.tar.bz2 422637 RMD160 142d44e8e13abbb8a41826b7005f8ede1807e3ff SHA1 c66cfdee74e8d169a7992b5f257395e653ca761b SHA256 08c9d89a404740592621e6f5078414df86ccc78ca876e3da1af15639d81c74e0
+EBUILD libXi-1.4.2-r1.ebuild 1149 RMD160 3a78d26c6dbccd709ae2a545959292a33518ca08 SHA1 2ae24fd9709278dd035f4372712e7d9d01da980c SHA256 0b3ecc4aa481eec5caec31314f5b5528ce652e26c45af8a34ccaeed7dc7247a3
+EBUILD libXi-1.4.3.ebuild 1159 RMD160 6889dfec090e638af1820539191a2f1a9fb3c462 SHA1 8a713a869036dab8005c447acd9edaa6d3d3a738 SHA256 a2cb55e60cecf302aee545dd2c035cef4ec1843e439a1a4c12511f07b863eefb
diff --git a/x11-libs/libXi/files/libXi-xi2.1.patch b/x11-libs/libXi/files/libXi-xi2.1.patch
new file mode 100644
index 0000000..398a697
--- /dev/null
+++ b/x11-libs/libXi/files/libXi-xi2.1.patch
@@ -0,0 +1,355 @@
+--- a/include/X11/extensions/XInput2.h
++++ b/include/X11/extensions/XInput2.h
+@@ -135,6 +135,25 @@ typedef struct
+
+ typedef struct
+ {
++ int type;
++ int sourceid;
++ int mode;
++ int num_touches;
++} XITouchClassInfo;
++
++typedef struct
++{
++ int type;
++ int sourceid;
++ int number;
++ Atom label;
++ double min;
++ double max;
++ int resolution;
++} XITouchValuatorClassInfo;
++
++typedef struct
++{
+ int deviceid;
+ char *name;
+ int use;
+@@ -292,6 +311,20 @@ typedef struct {
+ int what;
+ } XIPropertyEvent;
+
++typedef struct {
++ int type; /* GenericEvent */
++ unsigned long serial; /* # of last request processed by server */
++ Bool send_event; /* true if this came from a SendEvent request */
++ Display *display; /* Display the event was read from */
++ int extension; /* XI extension offset */
++ int evtype;
++ Time time;
++ int deviceid;
++ int sourceid;
++ unsigned int touchid;
++ unsigned int flags;
++} XITouchOwnershipEvent;
++
+ _XFUNCPROTOBEGIN
+
+ extern Bool XIQueryPointer(
+@@ -415,6 +448,13 @@ extern Status XIAllowEvents(
+ Time time
+ );
+
++extern Status XIAllowTouchEvents(
++ Display* display,
++ int deviceid,
++ unsigned long touchid,
++ int event_mode
++);
++
+ extern int XIGrabButton(
+ Display* display,
+ int deviceid,
+@@ -466,6 +506,17 @@ extern int XIGrabFocusIn(
+ int num_modifiers,
+ XIGrabModifiers *modifiers_inout
+ );
++
++extern int XIGrabTouchBegin(
++ Display* display,
++ int deviceid,
++ Window grab_window,
++ int owner_events,
++ XIEventMask *mask,
++ int num_modifiers,
++ XIGrabModifiers *modifiers_inout
++);
++
+ extern Status XIUngrabButton(
+ Display* display,
+ int deviceid,
+@@ -496,6 +547,14 @@ extern Status XIUngrabFocusIn(
+ Display* display,
+ int deviceid,
+ Window grab_window,
++ int num_modifiers,
++ XIGrabModifiers *modifiers
++);
++
++extern Status XIUngrabTouchBegin(
++ Display* display,
++ int deviceid,
++ Window grab_window,
+ int num_modifiers,
+ XIGrabModifiers *modifiers
+ );
+--- a/src/XExtInt.c
++++ b/src/XExtInt.c
+@@ -146,6 +146,9 @@ static int
+ wireToEnterLeave(xXIEnterEvent *in, XGenericEventCookie *cookie);
+ static int
+ wireToPropertyEvent(xXIPropertyEvent *in, XGenericEventCookie *cookie);
++static int
++wireToTouchOwnershipEvent(xXITouchOwnershipEvent *in,
++ XGenericEventCookie *cookie);
+
+ static /* const */ XEvent emptyevent;
+
+@@ -268,7 +271,8 @@ static XExtensionVersion versions[] = {
+ XI_Add_DevicePresenceNotify_Minor},
+ {XI_Present, XI_Add_DeviceProperties_Major,
+ XI_Add_DeviceProperties_Minor},
+-{XI_Present, XI_2_Major, XI_2_Minor}
++{XI_Present, XI_2_Major, XI_2_Minor},
++{XI_Present, XI_2_Major, XI_2_1_Minor}
+ };
+
+ /***********************************************************************
+@@ -924,6 +928,10 @@ XInputWireToCookie(
+ case XI_ButtonRelease:
+ case XI_KeyPress:
+ case XI_KeyRelease:
++ case XI_TouchBegin:
++ case XI_TouchUpdate:
++ case XI_TouchUpdateUnowned:
++ case XI_TouchEnd:
+ *cookie = *(XGenericEventCookie*)save;
+ if (!wireToDeviceEvent((xXIDeviceEvent*)event, cookie))
+ {
+@@ -950,7 +958,16 @@ XInputWireToCookie(
+ break;
+ }
+ return ENQUEUE_EVENT;
+-
++ case XI_TouchOwnership:
++ *cookie = *(XGenericEventCookie*)save;
++ if (!wireToTouchOwnershipEvent((xXITouchOwnershipEvent*)event,
++ cookie))
++ {
++ printf("XInputWireToCookie: CONVERSION FAILURE! evtype=%d\n",
++ ge->evtype);
++ break;
++ }
++ return ENQUEUE_EVENT;
+ case XI_RawKeyPress:
+ case XI_RawKeyRelease:
+ case XI_RawButtonPress:
+@@ -1037,6 +1054,12 @@ sizeDeviceClassType(int type, int num_el
+ case XIValuatorClass:
+ l = sizeof(XIValuatorClassInfo);
+ break;
++ case XITouchClass:
++ l = sizeof(XITouchClassInfo);
++ break;
++ case XITouchValuatorClass:
++ l = sizeof(XITouchValuatorClassInfo);
++ break;
+ default:
+ printf("sizeDeviceClassType: unknown type %d\n", type);
+ break;
+@@ -1239,6 +1262,22 @@ copyPropertyEvent(XGenericEventCookie *c
+ }
+
+ static Bool
++copyTouchOwnershipEvent(XGenericEventCookie *cookie_in,
++ XGenericEventCookie *cookie_out)
++{
++ XITouchOwnershipEvent *in, *out;
++
++ in = cookie_in->data;
++
++ out = cookie_out->data = malloc(sizeof(XITouchOwnershipEvent));
++ if (!out)
++ return False;
++
++ *out = *in;
++ return True;
++}
++
++static Bool
+ copyRawEvent(XGenericEventCookie *cookie_in,
+ XGenericEventCookie *cookie_out)
+ {
+@@ -1297,8 +1336,15 @@ XInputCopyCookie(Display *dpy, XGenericE
+ case XI_ButtonRelease:
+ case XI_KeyPress:
+ case XI_KeyRelease:
++ case XI_TouchBegin:
++ case XI_TouchUpdate:
++ case XI_TouchUpdateUnowned:
++ case XI_TouchEnd:
+ ret = copyDeviceEvent(in, out);
+ break;
++ case XI_TouchOwnership:
++ ret = copyTouchOwnershipEvent(in, out);
++ break;
+ case XI_DeviceChanged:
+ ret = copyDeviceChangedEvent(in, out);
+ break;
+@@ -1427,6 +1473,12 @@ size_classes(xXIAnyInfo* from, int nclas
+ case XIValuatorClass:
+ l = sizeDeviceClassType(XIValuatorClass, 0);
+ break;
++ case XITouchClass:
++ l = sizeDeviceClassType(XITouchClass, 0);
++ break;
++ case XITouchValuatorClass:
++ l = sizeDeviceClassType(XITouchValuatorClass, 0);
++ break;
+ }
+
+ len += l;
+@@ -1527,6 +1579,35 @@ copy_classes(XIDeviceInfo* to, xXIAnyInf
+
+ }
+ break;
++ case XITouchClass:
++ {
++ XITouchClassInfo *cls_lib;
++ xXITouchInfo *cls_wire;
++
++ cls_wire = (xXITouchInfo*)any_wire;
++ cls_lib = next_block(&ptr_lib, sizeof(XITouchClassInfo));
++
++ cls_lib->mode = cls_wire->mode;
++ cls_lib->num_touches = cls_wire->num_touches;
++ }
++ break;
++ case XITouchValuatorClass:
++ {
++ XITouchValuatorClassInfo *cls_lib;
++ xXITouchValuatorInfo *cls_wire;
++
++ cls_wire = (xXITouchValuatorInfo*)any_wire;
++ cls_lib = next_block(&ptr_lib,
++ sizeof(XITouchValuatorClassInfo));
++
++ cls_lib->number = cls_wire->number;
++ cls_lib->label = cls_wire->label;
++ /* FIXME: fractional parts */
++ cls_lib->min = cls_wire->min.integral;
++ cls_lib->max = cls_wire->max.integral;
++ cls_lib->resolution = cls_wire->resolution;
++ }
++ break;
+ }
+ len += any_wire->length * 4;
+ ptr_wire += any_wire->length * 4;
+@@ -1697,6 +1778,28 @@ wireToEnterLeave(xXIEnterEvent *in, XGen
+
+ return 1;
+ }
++
++static int
++wireToTouchOwnershipEvent(xXITouchOwnershipEvent *in,
++ XGenericEventCookie *cookie)
++{
++ XITouchOwnershipEvent *out = malloc(sizeof(XITouchOwnershipEvent));
++
++ cookie->data = out;
++
++ out->type = in->type;
++ out->display = cookie->display;
++ out->extension = in->extension;
++ out->evtype = in->evtype;
++ out->send_event = ((in->type & 0x80) != 0);
++ out->time = in->time;
++ out->deviceid = in->deviceid;
++ out->sourceid = in->sourceid;
++ out->touchid = in->touchid;
++ out->flags = in->flags;
++
++ return 1;
++}
+
+ static int
+ wireToPropertyEvent(xXIPropertyEvent *in, XGenericEventCookie *cookie)
+--- a/src/XIAllowEvents.c
++++ b/src/XIAllowEvents.c
+@@ -51,3 +51,27 @@ XIAllowEvents(Display *dpy, int deviceid
+ SyncHandle();
+ return Success;
+ }
++
++Status
++XIAllowTouchEvents(Display *dpy, int deviceid, unsigned long touchid,
++ int event_mode)
++{
++ xXIAllowTouchEventsReq *req;
++
++ XExtDisplayInfo *extinfo = XInput_find_display(dpy);
++
++ LockDisplay(dpy);
++ if (_XiCheckExtInit(dpy, XInput_2_1, extinfo) == -1)
++ return (NoSuchExtension);
++
++ GetReq(XIAllowTouchEvents, req);
++ req->reqType = extinfo->codes->major_opcode;
++ req->ReqType = X_XIAllowTouchEvents;
++ req->deviceid = deviceid;
++ req->touchid = touchid;
++ req->mode = event_mode;
++
++ UnlockDisplay(dpy);
++ SyncHandle();
++ return Success;
++}
+--- a/src/XIPassiveGrab.c
++++ b/src/XIPassiveGrab.c
+@@ -145,6 +145,25 @@ XIGrabFocusIn(Display *dpy, int deviceid
+ modifiers_inout);
+ }
+
++int
++XIGrabTouchBegin(Display *dpy, int deviceid, Window grab_window,
++ Bool owner_events, XIEventMask *mask,
++ int num_modifiers, XIGrabModifiers *modifiers_inout)
++{
++ XExtDisplayInfo *extinfo = XInput_find_display(dpy);
++
++ LockDisplay(dpy);
++ if (_XiCheckExtInit(dpy, XInput_2_1, extinfo) == -1)
++ return -1;
++
++ UnlockDisplay(dpy);
++
++ return _XIPassiveGrabDevice(dpy, deviceid, XIGrabtypeTouchBegin, 0,
++ grab_window, None, GrabModeAsync, GrabModeAsync,
++ owner_events, mask, num_modifiers,
++ modifiers_inout);
++}
++
+ static int
+ _XIPassiveUngrabDevice(Display* dpy, int deviceid, int grabtype, int detail,
+ Window grab_window, int num_modifiers, XIGrabModifiers *modifiers)
+@@ -208,3 +227,19 @@ XIUngrabFocusIn(Display* display, int de
+ return _XIPassiveUngrabDevice(display, deviceid, XIGrabtypeFocusIn, 0,
+ grab_window, num_modifiers, modifiers);
+ }
++
++int
++XIUngrabTouchBegin(Display* display, int deviceid, Window grab_window,
++ int num_modifiers, XIGrabModifiers *modifiers)
++{
++ XExtDisplayInfo *extinfo = XInput_find_display(display);
++
++ LockDisplay(display);
++ if (_XiCheckExtInit(display, XInput_2_1, extinfo) == -1)
++ return -1;
++
++ UnlockDisplay(display);
++
++ return _XIPassiveUngrabDevice(display, deviceid, XIGrabtypeTouchBegin, 0,
++ grab_window, num_modifiers, modifiers);
++}
diff --git a/x11-libs/libXi/libXi-1.4.2-r1.ebuild b/x11-libs/libXi/libXi-1.4.2-r1.ebuild
new file mode 100644
index 0000000..8b9c99f
--- /dev/null
+++ b/x11-libs/libXi/libXi-1.4.2-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXi/libXi-1.4.2.ebuild,v 1.1 2011/03/19 10:41:40 scarabeus Exp $
+
+EAPI=4
+XORG_EAUTORECONF=yes
+XORG_DOC=doc
+inherit xorg-2
+
+DESCRIPTION="X.Org Xi library"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="utouch"
+
+RDEPEND=">=x11-libs/libX11-1.3
+ >=x11-libs/libXext-1.1
+ >=x11-proto/inputproto-2.0
+ >=x11-proto/xproto-7.0.13
+ >=x11-proto/xextproto-7.0.3"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ if use utouch ; then
+ epatch "${FILESDIR}/libXi-xi2.1.patch"
+ fi
+ xorg-2_src_prepare
+}
+
+
+pkg_setup() {
+ xorg-2_pkg_setup
+ CONFIGURE_OPTIONS="$(use_enable doc specs)
+ $(use_with doc xmlto)
+ $(use_with doc asciidoc)
+ --without-fop"
+}
+
+pkg_postinst() {
+ xorg-2_pkg_postinst
+
+ ewarn "Some special keys and keyboard layouts may stop working."
+ ewarn "To fix them, recompile xorg-server."
+}
diff --git a/x11-libs/libXi/libXi-1.4.3.ebuild b/x11-libs/libXi/libXi-1.4.3.ebuild
new file mode 100644
index 0000000..89f43de
--- /dev/null
+++ b/x11-libs/libXi/libXi-1.4.3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXi/libXi-1.4.3.ebuild,v 1.1 2011/06/07 14:14:01 chithanh Exp $
+
+EAPI=4
+
+XORG_DOC=doc
+inherit xorg-2
+
+DESCRIPTION="X.Org Xi library"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="utouch"
+
+RDEPEND=">=x11-libs/libX11-1.3
+ >=x11-libs/libXext-1.1
+ >=x11-proto/inputproto-2.0
+ >=x11-proto/xproto-7.0.13
+ >=x11-proto/xextproto-7.0.3"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ if use utouch ; then
+ epatch "${FILESDIR}/libXi-xi2.1.patch"
+ fi
+ xorg-2_src_prepare
+}
+
+
+pkg_setup() {
+ xorg-2_pkg_setup
+ XORG_CONFIGURE_OPTIONS=(
+ $(use_enable doc specs)
+ $(use_with doc xmlto)
+ $(use_with doc asciidoc)
+ --without-fop
+ )
+}
+
+pkg_postinst() {
+ xorg-2_pkg_postinst
+
+ ewarn "Some special keys and keyboard layouts may stop working."
+ ewarn "To fix them, recompile xorg-server."
+}