From 4fce9448b6ec3785476ae85cb7c5c28c180b5e8b Mon Sep 17 00:00:00 2001 From: Daniel Martin Date: Tue, 15 Jan 2013 18:54:05 +0100 Subject: [PATCH 1/1] xinput: Cleanup implementation of XI up to v1.4 - Structural changes: * indent with spaces only (replaced tabs) * indent attributes * move structures in front of the first request using it (Otherwise c_client.py would generate uncompileable code if we fix the uninterpreted lists.) * add version-controlled section comments (types, requests, events, errors) and move structures into their corresponding section * sort events and eventcopys by number - Additions: * add various missing enums and structs (i.e. DeviceChange, DeviceControl, DeviceName, ...) * uncomment commented out requests * linked in various enums into fields (via enum or altenum) - Other changes: * link to the txt specification in the git repo * fixed comments for "uninterpreted lists" - API CHANGES: * Request: GetDeviceMotionEvents The reply contains a list of events (of coordinates). So, we rename num_coords to num_events. The field is called nevents_return in the specification. The list was commented out anyways, so the rename shouldn't affect that much. * Request: SendExtensionEvent The list 'events' is a mask, make it a CARD8 like every other mask. * Events: FocusIn/Out Those ones haven't been named properly. They are called DeviceFocusIn/Out in the specification. In XI2 the names FocusIn/Out are used to introduce new events and cause name clashes. So, we have to rename the existing FocusIn/Out and give them their proper names. * Structures: *Feedback{Ctl,State} Rename the field id to feedback_id, as it's called in the spec. The only lists using those structs are commented out yet. So, this might not be called an api break. Signed-off-by: Daniel Martin --- src/xinput.xml | 1398 +++++++++++++++++++++++++----------------------- 1 file changed, 719 insertions(+), 679 deletions(-) diff --git a/src/xinput.xml b/src/xinput.xml index 80416fe..2de7307 100644 --- a/src/xinput.xml +++ b/src/xinput.xml @@ -26,995 +26,1035 @@ sale, use or other dealings in this Software without prior written authorization from the authors. --> - + xproto - + + + - - 0 - 1 - - - - 0 - 1 - + - - - - name_len - - - - - - - - + + + + name_len + + + + + + + + - 0 - 1 - 2 - 3 - 4 + 0 + 1 + 2 + 3 + 4 - - - - - - - - - - - - - - - devices_len - - - - - - - 0 - 1 - 2 - 3 - 4 - 5 - 6 + 0 + 1 + 2 + 3 + 4 + 5 + 6 - - - + + 0 + 1 + + + + + + + + - - - - - - + + + + + + - - - + + + - - - + + + - - - - - - - axes_len - + + + + + + + axes_len + + + + + + + + + + + + len + + + + + + + + devices_len + + + + + + - - + + - - - - - - - - num_classes - - + + + + + + + + num_classes + + - - + + - - - - - - - - + + + + + + + + - - - - - num_classes - + + + + + num_classes + - - - - - - - - num_this_classes - - - num_all_classes - - + + + + + + + + num_this_classes + + + num_all_classes + + + + 0 + 1 + + - - - - - - num_classes - + + + + + + num_classes + - - - - - - - num_classes - - + + + + + + + num_classes + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - num_classes - - - - - - + + + + + + + + + + num_classes + + + + + + - - + + - - - - - - - - - - - - num_classes - + + + + + + + + + + + + num_classes + - - - - - + + + + + - - - - - - - - - - - - num_classes - + + + + + + + + + + + + num_classes + - - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - 32 + + + + + + + + + + + + + 32 + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - - num_keysyms - + + + + + + + num_keysyms + - - - - - - - + + + + + + + - - - - - + + + + + - + - --> - - - - - - + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - num_keysyms - + + + + + + + num_keysyms + - - - - - - - + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - length - - + + + + + + + + + + length + + - - - - - - - keycode_count - keysyms_per_keycode - - + + + + + + + keycode_count + keysyms_per_keycode + + - - - - - - - - - keycodes_per_modifier - 8 - - - + + + + + + + + + keycodes_per_modifier + 8 + + + - - - - - - keycodes_per_modifier - 8 - - - - - - - + + + + + + keycodes_per_modifier + 8 + + + + + + + - - - - - - - - map_size - - + + + + + + + + map_size + + - - - - - map_size - - - - - - + + + + + map_size + + + + + + - - - - - - - - - - - - - - - - - - - - - - - 32 - + + + + + + 32 + - - - - - - 32 - + + + + + + 32 + - - - - - - num_valuators - + + + + + + num_valuators + + + + + + + + + + + + + + + + + + - - - - - - - - - num_events - 32 - - - - num_classes - + + + + + + + + + num_events + 32 + + + + num_classes + - - - - + + + + - - - - - - num_valuators - - - - - - + + + + + + num_valuators + + + + + + - - - - - - - - - - - - - - - - + + 1 + 2 + 3 + 4 + 5 + - - - - - num_valuators - - - num_valuators - - - num_valuators - + + + + + num_valuators + + + num_valuators + + + num_valuators + - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - + + + + - + - --> - - - - - + - - - - - - num_valuators - + + + + + + num_valuators + - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - + + + + - + + + + + + + + + + + + + + + + + + + - - - - - 6 + + + + + + 6 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - - - - - - - - - + + + + + + + + + - + + + - - - - - - - + + + + + + + 4 - - + + 4 - - - 3 - + + + 3 + - - - - - - - + + + + + + + - - - - + + + + - - + + 28 - + - - + + 28 - + + + + + + + + + + + + - - - - + + + + - - - - + + + + + - + -- 2.34.1