summaryrefslogtreecommitdiff
path: root/src/XExtInt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XExtInt.c')
-rw-r--r--src/XExtInt.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/src/XExtInt.c b/src/XExtInt.c
index eed6637..a1ade31 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -268,7 +268,8 @@ static XExtensionVersion versions[] = { {XI_Absent, 0, 0},
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 +925,9 @@ XInputWireToCookie(
case XI_ButtonRelease:
case XI_KeyPress:
case XI_KeyRelease:
+ case XI_TouchBegin:
+ case XI_TouchMotion:
+ case XI_TouchEnd:
*cookie = *(XGenericEventCookie*)save;
if (!wireToDeviceEvent((xXIDeviceEvent*)event, cookie))
{
@@ -1037,6 +1041,12 @@ sizeDeviceClassType(int type, int num_elements)
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;
@@ -1426,6 +1436,12 @@ size_classes(xXIAnyInfo* from, int nclasses)
case XIValuatorClass:
l = sizeDeviceClassType(XIValuatorClass, 0);
break;
+ case XITouchClass:
+ l = sizeDeviceClassType(XITouchClass, 0);
+ break;
+ case XITouchValuatorClass:
+ l = sizeDeviceClassType(XITouchValuatorClass, 0);
+ break;
}
len += l;
@@ -1526,6 +1542,35 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int nclasses)
}
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;