{"id":415,"date":"2009-07-30T11:00:14","date_gmt":"2009-07-30T01:30:14","guid":{"rendered":"http:\/\/www.clearchain.com\/blog\/?p=415"},"modified":"2009-07-30T13:20:20","modified_gmt":"2009-07-30T03:50:20","slug":"xinput-1-xinput-2-conversion-guide","status":"publish","type":"post","link":"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide","title":{"rendered":"Xinput 1 -> XInput 2 conversion guide"},"content":{"rendered":"<p>Recently I was tasked with porting <a href=\"http:\/\/www.gtk.org\/\">GTK+<\/a> to support Xinput 2 (XI2), and whilst the port isn&#8217;t finished I quickly discovered just how big the conversion was. This page is designed to help someone who is familiar with XInput 1 switch to XInput 2 &#8211; it&#8217;s certainly is by no means a complete guide and anyone reading this should also take a look at the various <a href=\"http:\/\/who-t.blogspot.com\/\">Input2 recipies published.<\/a><\/p>\n<p>XI2 is the first major rewrite of the <a href=\"http:\/\/www.x.org\/wiki\/XInputSpec\">XInput specification<\/a> in years and with it comes a lot of enhanced functionality, but also a <a href=\"http:\/\/cgit.freedesktop.org\/xorg\/lib\/libXi\/tree\/man\">new API<\/a>. The API was deliberately designed not to be backward compatible. Why? To prevent both XI1 and XI2 features to be intermingled. XI2 brings with it a new device model and a new input model. Both of these are incompatible with XI1. The decision to break the API was not a light one by <a href=\"http:\/\/who-t.blogspot.com\/\">Peter Hutterer<\/a>, the main XI2 developer.  Supporting XI1 would have ment future changes to XI2 would be impossible &#8211; there&#8217;s only so far you can push an out dated protocol and api. The added complexity of trying to maintain 2 code paths was also determined to be too high. XI2 is more than just a api\/abi change. It literally change the entire input subsystem of the <a href=\"http:\/\/www.x.org\">Xorg<\/a> Xserver. XI2 supports:<\/p>\n<ul>\n<li>Mulitple Independent Master Devices  (MPX)<\/li>\n<li>Subpixel Accuracy for input devices<\/li>\n<li>Support for 32bit key codes<\/li>\n<li>.. lots more See: <a href=\"http:\/\/fedoraproject.org\/wiki\/Features\/XI2\">http:\/\/fedoraproject.org\/wiki\/Features\/XI2<\/a> for full details<\/li>\n<\/ul>\n<p>With that in mind, the new XI2 API often leaves someone who&#8217;s been working with the XI1 wondering what the equivilant XI2 API call is.  Most functions have an equivilant in XI2 function though the usage has more often than not, changed dramatically. Below is some examples of how to convert XI1 code to XI2 compatible code and a list of <strong>some<\/strong> of the changes which have occurred. If you find something missing, please add to the comments.<\/p>\n<h2>Change Overview<\/h2>\n<p>The biggest change that any XI1 developer will notice is the <em><strong>XDevice *<\/strong><\/em> type has vanished. All XI2 devices make use of the <em><strong>XID<\/strong><\/em> type instead. Under the hoods, in the Xserver and XDevice really equates back to an XID anyway now. The next biggest change XI1 developers will notice is the entire XInput2 API has had shifted namespaces. All XInput2 functions, types, etc are now prefixed with XI (ie XIEventMask). This was designed to force segregation of XI1 -&gt; XI2 code.<\/p>\n<p>The header file you include has also changed. Instead of:<\/p>\n<pre>#include &lt;X11\/extensions\/XInput.h&gt;<\/pre>\n<p>It&#8217;s now:<\/p>\n<pre>#include &lt;X11\/extensions\/XInput<span style=\"text-decoration: underline;\"><strong>2<\/strong><\/span>.h&gt;<\/pre>\n<h2>Notable Changes<\/h2>\n<ul>\n<li>Proximity events are no longer supported, these are now reported as regular events on another axis (ie think of a pressure axis)<\/li>\n<li>Events are  longer use device classes, instead all events are type XIEvent (a type of XEvent). Hence there is no need to pass around an array of integer classes anymore when registering for events, instead a single XIEventMask will do what is needed. The macros XISetMask and XIGetMask help with using the mask.<\/li>\n<\/ul>\n<p>There&#8217;s also been a lot of changes to structures, functions, types and how they are used.<\/p>\n<h2>Event Changes<\/h2>\n<table border=\"1\">\n<tbody>\n<tr>\n<th>XI1 Event<\/th>\n<th>XI2 Event<\/th>\n<th>Notes<\/th>\n<\/tr>\n<tr>\n<td>XDeviceKeyEvent,\u00a0 XDeviceKeyPressedEvent, XDeviceKeyReleasedEvent, XDeviceButtonEvent,\u00a0 XDeviceButtonPressedEvent,\u00a0 XDeviceButtonReleasedEvent ,XDeviceMotionEvent<\/td>\n<td>XIDeviceEvent<\/td>\n<td>The various events are now incorporated into the one event type. XIDeviceEvent-&gt;evtype indicates the subtype of event. Ie XIMotion is a motion event for that device.<\/td>\n<\/tr>\n<tr>\n<td>XProximityNotifyEvent, XProximityInEvent, XProximityOutEvent<\/td>\n<td>XIDeviceEvent (See Note)<\/td>\n<td>Proximity Events have been replaced with device events. Proximity is represented as a value in the valuator on one of the axes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Structure\/Type Changes<\/h2>\n<table border=\"1\">\n<tbody>\n<tr>\n<th>XI1 Structure\/Type<\/th>\n<th>XI2 Structure\/Type<\/th>\n<th>Notes<\/th>\n<\/tr>\n<tr>\n<td>XDeviceState<\/td>\n<td>XIDeviceInfo<\/td>\n<td>XIDeviceInfo also contains  a name and classes<\/td>\n<\/tr>\n<tr>\n<td>XAnyClassPtr<\/td>\n<td>XIAnyClassInfo *<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>XValuatorInfo<\/td>\n<td>XIValuatorClassInfo<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>XInputClass<\/td>\n<td>XIAnyClassInfo<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>XEventClass<\/td>\n<td>XIEventMask<\/td>\n<td>Used for selecting events to be monitored.<br \/>\nOne mask is used per device.  Standard usage is:<\/p>\n<pre lang=\"c\">XIEventMask mask;\r\nmask.deviceid=\/\/some device or XIAllDevices for all devices&lt;\r\nmask.mask_len=2;\r\nmask.mask=calloc(mask.mask_len, sizeof(char));\r\nXISetMask(mask.mask, XI_ButtonPress);\r\n..\r\nXISelectEvents(display, win, &mask, 1)<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>XExtensionVersion<\/td>\n<td>Struct Removed<\/td>\n<td>XIQueryVersion should be used instead<\/td>\n<\/tr>\n<tr>\n<td>XDeviceKeyEvent, XDeviceKeyPressedEvent, XDeviceKeyReleasedEvent, XDeviceButtonEvent, XDeviceButtonPressedEvent, XDeviceButtonReleasedEvent,<\/td>\n<td>Structs Removed<\/td>\n<td>XIDeviceEvents are now used instead<\/td>\n<\/tr>\n<tr>\n<td>XDeviceFocusChangeEvnet, XDeviceFocusInEvent, XDeviceFocusOutEvent<\/td>\n<td>Structs Removed<\/td>\n<td>XIDeviceEvents are now used<\/td>\n<\/tr>\n<tr>\n<td>XProximityNotifyEvent, XProximityInEvent, XProximityOutEvent<\/td>\n<td>Structs Removed<\/td>\n<td>XIDeviceEvents are now used<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Function\/Macro Changes<\/h2>\n<table border=\"1\">\n<tbody>\n<tr>\n<th>XI1 Function<\/th>\n<th>XI2 Function<\/th>\n<th>Notes<\/th>\n<\/tr>\n<tr>\n<td>XFreeDeviceList<\/td>\n<td>XIFreeDeviceInfo<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>XDefineDeviceCursor<\/td>\n<td>XIDefineCursor<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>DeviceButton1Motion<\/p>\n<p>DeviceButton2Motion<\/p>\n<p>&#8230;<\/td>\n<td>(No Equivelant)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>XWarpPointer<\/p>\n<p>XWarpDevicePointer<\/td>\n<td>XIWarpPointer<\/td>\n<td>XIWarpPointer makes use of the device id like XWarpDevicePointer (XI1.5).   XWarpPointer is considered obsolete as it has no concept of a device<\/td>\n<\/tr>\n<tr>\n<td>XQueryDeviceState<\/td>\n<td>XIQueryDevice<\/td>\n<td>Return type is XIDeviceInfo *, can be called with deviceid = XIAllDevices to query all devices hence the ndevices return<\/td>\n<\/tr>\n<tr>\n<td>XFreeDeviceState<\/td>\n<td>XIFreeDeviceInfo<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>DeviceGrabButton<\/td>\n<td>XIGrabButton<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>XSelectExtensionEvent<\/td>\n<td>XISelectEvents<\/td>\n<td>Instead of a list of classes now a list of XIEventMask is used, one mask per device. XSelectExtensionEvent is still used for other extension events not related to XInput2<\/td>\n<\/tr>\n<tr>\n<td>XGetExtensionVersion<\/td>\n<td>XIQueryVersion<\/td>\n<td>If only XI1 is present this will be returned vi the major\/minor numbers (ie major = 1)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Examples<\/h2>\n<p>Below are some examples of how to use some of the new XI2 functions.<\/p>\n<h3>Event Processing &#8211; Registering For Events<\/h3>\n<p>A simple indication how to register for events (XI2 greatly simplifies this)<\/p>\n<ul>\n<li><strong>XInput 1 (Taken from: <a href=\"http:\/\/cgit.freedesktop.org\/xorg\/app\/xinput\/tree\/src\/test.c\">http:\/\/cgit.freedesktop.org\/xorg\/app\/xinput\/tree\/src\/test.c)<\/a> <\/strong><\/li>\n<\/ul>\n<pre lang=\"c\">static int           motion_type = INVALID_EVENT_TYPE;\r\nstatic int           button_press_type = INVALID_EVENT_TYPE;\r\nstatic int           button_release_type = INVALID_EVENT_TYPE;\r\nstatic int           key_press_type = INVALID_EVENT_TYPE;\r\nstatic int           key_release_type = INVALID_EVENT_TYPE;\r\nstatic int           proximity_in_type = INVALID_EVENT_TYPE;\r\nstatic int           proximity_out_type = INVALID_EVENT_TYPE;\r\n\r\nstatic int register_event(Display *dpy, XDeviceInfo *info)\r\n{\r\n    XEventClass         event_list[7];\r\n    int                 i;\r\n    XDevice             *device;\r\n    XInputClassInfo     *ip;\r\n\r\n    device = XOpenDevice(dpy, info->id);\r\n\r\n    \/\/ Check for open error\r\n    if (device->num_classes > 0) {\r\n        for (ip = device->classes, i=0; i<info->num_classes; ip++, i++) {\r\n            switch (ip->input_class) {\r\n            case ButtonClass:\r\n                DeviceButtonPress(device, button_press_type, event_list[number]); number++;\r\n                DeviceButtonRelease(device, button_release_type, event_list[number]); number++;\r\n                break;\r\n\r\n            case ValuatorClass:\r\n                DeviceMotionNotify(device, motion_type, event_list[number]); number++;\r\n                if (handle_proximity) {\r\n                    ProximityIn(device, proximity_in_type, event_list[number]); number++;\r\n                    ProximityOut(device, proximity_out_type, event_list[number]); number++;\r\n                }\r\n                break;\r\n\r\n            default:\r\n                fprintf(stderr, \"unknown class\\n\");\r\n                break;\r\n            }\r\n      }\r\n\r\n   if (XSelectExtensionEvent(dpy, root_win, event_list, number)) {\r\n            fprintf(stderr, \"error selecting extended events\\n\");\r\n            return 0;\r\n        }\r\n   }<\/pre>\n<ul>\n<li><strong>XInput 2:<br \/>\n(Taken from: <a href=\"http:\/\/who-t.blogspot.com\/2009\/05\/xi2-recipes-part-1.html\">http:\/\/who-t.blogspot.com\/2009\/05\/xi2-recipes-part-1.html<\/a>)<br \/>\n<\/strong><\/li>\n<pre lang=\"c\">XIEventMask eventmask;\r\nunsigned char mask[1] = { 0 }; \/* the actual mask *\/\r\n\r\neventmask.deviceid = 2;\r\neventmask.mask_len = sizeof(mask); \/* always in bytes *\/\r\neventmask.mask = mask;\r\n\/* now set the mask *\/\r\nXISetMask(mask, XI_ButtonPress);\r\nXISetMask(mask, XI_Motion);\r\nXISetMask(mask, XI_KeyPress);\r\n\r\n\/* select on the window *\/\r\nXISelectEvents(display, window, &eventmask, 1);<\/pre>\n<\/ul>\n<h3>Event Processing &#8211; Listening\/Processing Events<\/h3>\n<p>A simple indication how to get events from XI1 and XI2<\/p>\n<ul>\n<li><strong>XInput 1: <\/strong>\n<pre lang=\"c\">\/\/setup via other means\r\nint motion_type, button_press_type,button_release_type;\r\n\r\nvoid doEvents(Display    *dpy)\r\n{\r\n\r\n XEvent        Event;\r\n\r\n    while(1) {\r\n        XNextEvent(dpy, &Event);\r\n        if (Event.type == motion_type) {\r\n            XDeviceMotionEvent *motion = (XDeviceMotionEvent *) &Event;\r\n            ...\r\n\r\n        } else if ((Event.type == button_press_type) ||\r\n                   (Event.type == button_release_type)) {\r\n                      XDeviceButtonEvent *button = (XDeviceButtonEvent *) &Event;\r\n\r\n            ...\r\n        }else if ((Event.type= .... )){\r\n            ...\r\n     }\r\n}<\/pre>\n<\/li>\n<li><strong>XInput 2 <\/strong><strong> <\/strong>\n<pre lang=\"c\">\/\/Somewhere else...\r\n\r\nint xi_opcode;\r\nif (!XQueryExtension(display, \"XInputExtension\",&xi_opcode,&event, &error)) {\r\nprintf(\"X Input extension not available.\\n\");\r\nreturn EXIT_FAILURE;\r\n}<\/pre>\n<p><strong> <\/strong><\/p>\n<pre lang=\"c\">void doEvents (Display *dpy )\r\n{\r\n    while(1) {\r\n        XEvent        ev;\r\n        XGenericEventCookie *cookie = &ev.xcookie;\r\n        XNextEvent(dpy, &ev);\r\n\r\n        if (XGetEventData(dpy, cookie) && cookie->type == GenericEvent\r\n            && cookie->extension==xi_opcode)\r\n        {\r\n            XIDeviceEvent *event = cookie->data;\r\n\r\n            printf(\"EVENT type %d\\n\", event->evtype);\r\n            switch (event->evtype)\r\n            {\r\n                \/\/\r\n                \/\/ In all below event>deviceid contains the id of the device\r\n                \/\/\r\n                case XI_DeviceChanged:\r\n                    XIDeviceChangedEvent *dc = cookie->data;\r\n                    ...\r\n                    break;\r\n                case XI_HierarchyChanged:\r\n                    XIHierarchyEvent *he = cookie->data;\r\n                    ...\r\n                    break;\r\n                case XI_RawEvent:\r\n                    XIRawEvent *re = cookie->data;\r\n                    ...\r\n                    break;\r\n                case XI_FocusIn:\r\n                case XI_Enter:\r\n                    XIEnterEvent *ee = cookie->data;\r\n                    ...\r\n                    break;\r\n                case XI_FocusOut:\r\n                case XI_Leave:\r\n                    XILeaveEvent *le = cookie->data;\r\n                    ...\r\n                    break;\r\n                case XI_PropertyEvent:\r\n                    XIPropertyEvent *pe = cookie->data;\r\n                    ...\r\n                    break;\r\n                case XI_Motion:\r\n                case XI_ButtonPress:\r\n                case XI_ButtonRelease:\r\n                case XI_KeyPress:\r\n                case XI_KeyRelease:\r\n                    \/\/ do something with event (XIDeviceEvent contains data)\r\n                    break;\r\n            }\r\n        }\r\n     }\r\n  }<\/pre>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Details about the API changes between Xinput 1(XI1) and XInput 2 (XI2)<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,3,21,7],"tags":[225,226,228,219,77,227,110,221,220,224,223,222],"class_list":["post-415","post","type-post","status-publish","format-standard","hentry","category-computers","category-freedesktop","category-opensource","category-programming","tag-api","tag-conversion","tag-examples","tag-gtk","tag-mpx","tag-protocol","tag-toolkit","tag-xi1","tag-xi2","tag-xinput-1-5","tag-xinput1","tag-xinput2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Xinput 1 -&gt; XInput 2 conversion guide - ClearChain<\/title>\n<meta name=\"description\" content=\"Details about the API changes between Xinput 1(XI1) and XInput 2 (XI2)\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Benjamin Close\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide\"},\"author\":{\"name\":\"Benjamin Close\",\"@id\":\"https:\/\/www.clearchain.com\/blog\/#\/schema\/person\/aef6faa2c32188398139db9270ca1c98\"},\"headline\":\"Xinput 1 -> XInput 2 conversion guide\",\"datePublished\":\"2009-07-30T01:30:14+00:00\",\"dateModified\":\"2009-07-30T03:50:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide\"},\"wordCount\":865,\"commentCount\":2,\"keywords\":[\"api\",\"conversion\",\"examples\",\"gtk+\",\"MPX\",\"protocol\",\"toolkit\",\"XI1\",\"XI2\",\"XInput 1.5\",\"XInput1\",\"Xinput2\"],\"articleSection\":[\"Computers\",\"FreeDesktop\",\"OpenSource\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide\",\"url\":\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide\",\"name\":\"Xinput 1 -> XInput 2 conversion guide - ClearChain\",\"isPartOf\":{\"@id\":\"https:\/\/www.clearchain.com\/blog\/#website\"},\"datePublished\":\"2009-07-30T01:30:14+00:00\",\"dateModified\":\"2009-07-30T03:50:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.clearchain.com\/blog\/#\/schema\/person\/aef6faa2c32188398139db9270ca1c98\"},\"description\":\"Details about the API changes between Xinput 1(XI1) and XInput 2 (XI2)\",\"breadcrumb\":{\"@id\":\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.clearchain.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Xinput 1 -> XInput 2 conversion guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.clearchain.com\/blog\/#website\",\"url\":\"https:\/\/www.clearchain.com\/blog\/\",\"name\":\"ClearChain\",\"description\":\"-= Daily Happenings =-\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.clearchain.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.clearchain.com\/blog\/#\/schema\/person\/aef6faa2c32188398139db9270ca1c98\",\"name\":\"Benjamin Close\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.clearchain.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/19dca0aa372edfa901b93c556dfda2e78ad4434558fe4d139598e086315d714a?s=96&d=mm&r=pg\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/19dca0aa372edfa901b93c556dfda2e78ad4434558fe4d139598e086315d714a?s=96&d=mm&r=pg\",\"caption\":\"Benjamin Close\"},\"sameAs\":[\"http:\/\/www.clearchain.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Xinput 1 -> XInput 2 conversion guide - ClearChain","description":"Details about the API changes between Xinput 1(XI1) and XInput 2 (XI2)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide","twitter_misc":{"Written by":"Benjamin Close","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide#article","isPartOf":{"@id":"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide"},"author":{"name":"Benjamin Close","@id":"https:\/\/www.clearchain.com\/blog\/#\/schema\/person\/aef6faa2c32188398139db9270ca1c98"},"headline":"Xinput 1 -> XInput 2 conversion guide","datePublished":"2009-07-30T01:30:14+00:00","dateModified":"2009-07-30T03:50:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide"},"wordCount":865,"commentCount":2,"keywords":["api","conversion","examples","gtk+","MPX","protocol","toolkit","XI1","XI2","XInput 1.5","XInput1","Xinput2"],"articleSection":["Computers","FreeDesktop","OpenSource","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide","url":"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide","name":"Xinput 1 -> XInput 2 conversion guide - ClearChain","isPartOf":{"@id":"https:\/\/www.clearchain.com\/blog\/#website"},"datePublished":"2009-07-30T01:30:14+00:00","dateModified":"2009-07-30T03:50:20+00:00","author":{"@id":"https:\/\/www.clearchain.com\/blog\/#\/schema\/person\/aef6faa2c32188398139db9270ca1c98"},"description":"Details about the API changes between Xinput 1(XI1) and XInput 2 (XI2)","breadcrumb":{"@id":"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.clearchain.com\/blog\/posts\/xinput-1-xinput-2-conversion-guide#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.clearchain.com\/blog"},{"@type":"ListItem","position":2,"name":"Xinput 1 -> XInput 2 conversion guide"}]},{"@type":"WebSite","@id":"https:\/\/www.clearchain.com\/blog\/#website","url":"https:\/\/www.clearchain.com\/blog\/","name":"ClearChain","description":"-= Daily Happenings =-","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.clearchain.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.clearchain.com\/blog\/#\/schema\/person\/aef6faa2c32188398139db9270ca1c98","name":"Benjamin Close","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.clearchain.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/19dca0aa372edfa901b93c556dfda2e78ad4434558fe4d139598e086315d714a?s=96&d=mm&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/19dca0aa372edfa901b93c556dfda2e78ad4434558fe4d139598e086315d714a?s=96&d=mm&r=pg","caption":"Benjamin Close"},"sameAs":["http:\/\/www.clearchain.com"]}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/posts\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":31,"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"predecessor-version":[{"id":504,"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/posts\/415\/revisions\/504"}],"wp:attachment":[{"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.clearchain.com\/blog\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}