[Xcb-commit] xcb/proto: 9 commits - doc src

Peter Harris peterh at kemper.freedesktop.org
Tue Jul 29 10:00:15 PDT 2014


 doc/xml-xcb.txt |    8 ++++++++
 src/xcb.xsd     |   35 ++++++++++++++++++-----------------
 src/xinput.xml  |    2 ++
 src/xkb.xml     |    4 ++++
 src/xproto.xml  |    8 ++++----
 5 files changed, 36 insertions(+), 21 deletions(-)

New commits:
commit 8d7ee5b6ba4cf343f7df70372a3e1f85b82aeed7
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Tue Jul 15 18:53:17 2014 +0200

    xkb: Add missing modLatches as comment to LatchLockState
    
    The field modLatches was missing in the request LatchLockState:
        http://cgit.freedesktop.org/xorg/proto/kbproto/tree/XKBproto.h#n141
    
    v2: Use a pad instead of a field, as the field would cause an API break.
        Though, keep the field commented out to document it.
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>
    Reviewed-by: Ran Benita <ran234 at gmail.com>

diff --git a/src/xkb.xml b/src/xkb.xml
index 04ab429..ad52ea2 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -1204,6 +1204,10 @@ authorization from the authors.
 		<field name="lockGroup" type="BOOL" />
 		<field name="groupLock" type="CARD8" enum="Group" />
 		<field name="affectModLatches" type="CARD8" mask="ModMask" />
+		<pad bytes="1" /> <!-- This pad is a workaround to prevent an API break,
+		                       which the following field (correct fix) would cause.
+		<field name="modLatches" type="CARD8" mask="ModMask" />
+		-->
 		<pad bytes="1" />
 		<field name="latchGroup" type="BOOL" />
 		<field name="groupLatch" type="CARD16" />
commit f8f4fcd3ba5bc0f259dd12ecdbad4e19ad30e66f
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Thu Jul 17 22:49:12 2014 +0200

    xinput: Add missing pad in XIChangeHierarchy
    
    A pad of 3 bytes was missing in the request XIChangeHierarchy:
        http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h#n439
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>
    Reviewed-by: Peter Harris <pharris at opentext.com>

diff --git a/src/xinput.xml b/src/xinput.xml
index f7239e8..86350de 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -1230,6 +1230,7 @@ authorization from the authors.
 
     <request name="XIChangeHierarchy" opcode="43">
         <field type="CARD8" name="num_changes" />
+        <pad bytes="3" />
         <list type="HierarchyChange" name="changes">
             <fieldref>num_changes</fieldref>
         </list>
commit 79fd940d76ca215ea6fe9533ff6ce55ed321a0cd
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Thu Jul 17 22:49:11 2014 +0200

    xinput: Add missing pad in DeviceResolutionCtl
    
    A pad of 2 bytes was missing in the struct DeviceResolutionCtl:
        http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n1382
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>
    Reviewed-by: Peter Harris <pharris at opentext.com>

diff --git a/src/xinput.xml b/src/xinput.xml
index 924c003..f7239e8 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -914,6 +914,7 @@ authorization from the authors.
         <field type="CARD16" name="len" />
         <field type="CARD8"  name="first_valuator" />
         <field type="CARD8"  name="num_valuators" />
+        <pad bytes="2" />
         <list type="CARD32"  name="resolution_values">
             <fieldref>num_valuators</fieldref>
         </list>
commit d10037321e8305046cc11af9c208319375cc22f4
Author: Ran Benita <ran234 at gmail.com>
Date:   Thu Nov 28 01:52:13 2013 +0200

    Add <fd> to xml-xcb.txt
    
    Signed-off-by: Ran Benita <ran234 at gmail.com>
    Reviewed-by: Daniel Martin <consume.noise at gmail.com>

diff --git a/doc/xml-xcb.txt b/doc/xml-xcb.txt
index 7311911..97ce5bf 100644
--- a/doc/xml-xcb.txt
+++ b/doc/xml-xcb.txt
@@ -201,6 +201,14 @@ enum; the value is restricted to one of the constants named in the enum.
   declares the data type of the field, and the name attribute gives the name
   of the field.
 
+<fd name="identifier" />
+
+  This element represents a file descriptor field passed with the request.  The
+  name attribute gives the name of the field.
+
+  While ordinary fields are encoded as part of the request, file descriptor
+  fields are generally passed via an out-of-band mechanism.
+
 <list type="identifier" name="identifier">expression</list>
 
   This element represents an array or list of fields in a data structure.  The
commit a66356e0d97e18f567a1fcc14e037fa190916463
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Fri Nov 22 23:26:54 2013 +0100

    schema: Restricted enum item values
    
    Restrict decimal values by using an xsd:unsignedInt instead of an
    xsd:integer. xsd:unsignedInt is an unsigned 32-bit integer.
    And restrict bit values by adding a type, which allows values within the
    range of [0, 32) only.
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>

diff --git a/src/xcb.xsd b/src/xcb.xsd
index 77a696f..59bb9a8 100644
--- a/src/xcb.xsd
+++ b/src/xcb.xsd
@@ -163,7 +163,7 @@ authorization from the authors.
         </xsd:complexType>
       </xsd:element>
       <xsd:element name="value" type="xsd:integer" />
-      <xsd:element name="bit" type="xsd:integer" />
+      <xsd:element name="bit" type="bitType" />
     </xsd:choice>
   </xsd:group>
   
@@ -224,6 +224,14 @@ authorization from the authors.
     <xsd:attribute name="ref" type="xsd:string" use="required" />
   </xsd:complexType>
 
+  <!-- Type for bit values -->
+  <xsd:simpleType name="bitType">
+    <xsd:restriction base="xsd:integer">
+      <xsd:minInclusive value="0" />
+      <xsd:maxExclusive value="32" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
   <!-- Type for documentation -->
   <xsd:group name="doc-fields">
     <xsd:sequence>
@@ -352,8 +360,8 @@ authorization from the authors.
             <xsd:element name="item">
               <xsd:complexType>
                 <xsd:choice minOccurs="1" maxOccurs="1">
-                  <xsd:element name="value" type="xsd:integer" />
-                  <xsd:element name="bit" type="xsd:integer" />
+                  <xsd:element name="value" type="xsd:unsignedInt" />
+                  <xsd:element name="bit" type="bitType" />
                 </xsd:choice>
                 <xsd:attribute name="name" type="xsd:string" use="required" />
               </xsd:complexType>
commit 3a0a402d9827cbe6fa5baf0e373e9772f3b3c702
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Fri Nov 22 23:26:53 2013 +0100

    schema: Remove dec-or-hex-integer and hex-integer type
    
    Reflect in the schema that hexadecimal values aren't supported in enum
    items (and expressions) by removing the 'dec-or-hex-integer' and
    'hex-integer' type.
    
    Hexadecimal values are not supported "as some languages have a different
    notation for hex-values" and therefor such hexadecimal values have been
    explicitly replaced with decimal values in other commits, see:
    
        183ecff Replaced hex-values with decimal ones
        8b3c120 did remaining replacements of hex constants with decimal
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>

diff --git a/src/xcb.xsd b/src/xcb.xsd
index 78da84f..77a696f 100644
--- a/src/xcb.xsd
+++ b/src/xcb.xsd
@@ -162,7 +162,7 @@ authorization from the authors.
           <xsd:attribute name="ref" use="required" type="xsd:string" />
         </xsd:complexType>
       </xsd:element>
-      <xsd:element name="value" type="dec-or-hex-integer" />
+      <xsd:element name="value" type="xsd:integer" />
       <xsd:element name="bit" type="xsd:integer" />
     </xsd:choice>
   </xsd:group>
@@ -224,18 +224,6 @@ authorization from the authors.
     <xsd:attribute name="ref" type="xsd:string" use="required" />
   </xsd:complexType>
 
-  <!-- Type for hex integers -->
-  <xsd:simpleType name="hex-integer">
-    <xsd:restriction base="xsd:string">
-      <xsd:pattern value="0x[0-9a-fA-F]+" />
-    </xsd:restriction>
-  </xsd:simpleType>
-
-  <!-- Type for integers in either decimal or hex -->
-  <xsd:simpleType name="dec-or-hex-integer">
-    <xsd:union memberTypes="xsd:integer hex-integer" />
-  </xsd:simpleType>
-
   <!-- Type for documentation -->
   <xsd:group name="doc-fields">
     <xsd:sequence>
@@ -364,7 +352,7 @@ authorization from the authors.
             <xsd:element name="item">
               <xsd:complexType>
                 <xsd:choice minOccurs="1" maxOccurs="1">
-                  <xsd:element name="value" type="dec-or-hex-integer" />
+                  <xsd:element name="value" type="xsd:integer" />
                   <xsd:element name="bit" type="xsd:integer" />
                 </xsd:choice>
                 <xsd:attribute name="name" type="xsd:string" use="required" />
commit cdc21ac0e6917eec3afd3b67c4263559f0150ace
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Fri Nov 22 23:26:52 2013 +0100

    schema: Add attribute 'name' to <fd>
    
    Do not allow any other attribute and make sure the attribute 'name' is
    set in an fd element by adding and declaring it as required in the
    schema.
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>

diff --git a/src/xcb.xsd b/src/xcb.xsd
index 85e3dde..78da84f 100644
--- a/src/xcb.xsd
+++ b/src/xcb.xsd
@@ -91,7 +91,11 @@ authorization from the authors.
   <xsd:element name="field" type="var" />
 
   <!-- fd passing parameter -->
-  <xsd:element name="fd" />
+  <xsd:element name="fd">
+    <xsd:complexType>
+      <xsd:attribute name="name" type="xsd:string" use="required" />
+    </xsd:complexType>
+  </xsd:element>
 
   <!-- list replaces ARRAYFIELD, LISTPARAM, and ARRAYREPLY.  The name and type
        are specified as attributes.  The content is an expression giving the
commit e28896530ddfd32440eefbef497940968225fa2e
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Fri Nov 22 23:26:51 2013 +0100

    schema: Set default attribute values
    
    Set the default values for the attributes combine-adjacent,
    no-sequence-number and xge to false.
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>

diff --git a/src/xcb.xsd b/src/xcb.xsd
index 580d258..85e3dde 100644
--- a/src/xcb.xsd
+++ b/src/xcb.xsd
@@ -317,7 +317,7 @@ authorization from the authors.
           <xsd:attribute name="name" type="xsd:string" use="required" />
           <xsd:attribute name="opcode" type="xsd:integer" use="required" />
           <xsd:attribute name="combine-adjacent" type="xsd:boolean"
-                         use="optional"/>
+                         use="optional" default="false" />
         </xsd:complexType>
       </xsd:element>
       <xsd:element name="event">
@@ -328,8 +328,9 @@ authorization from the authors.
                 <xsd:element ref="doc" minOccurs="0" maxOccurs="1" />
               </xsd:sequence>
               <xsd:attribute name="no-sequence-number" type="xsd:boolean"
-                             use="optional" />
-              <xsd:attribute name="xge" type="xsd:boolean" use="optional" />
+                             use="optional" default="false" />
+              <xsd:attribute name="xge" type="xsd:boolean"
+                             use="optional" default="false" />
             </xsd:extension>
           </xsd:complexContent>
         </xsd:complexType>
commit ee68a1c771e7caa9897f8ec5e5cdbec07ec59450
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Fri Nov 22 23:26:50 2013 +0100

    xproto: Fix EnterNotify documentation
    
    Fix a copy'n'paste mistake (from UnmapNotify) in the documentation of
    EnterNotify by changing the description for 'event', renaming
    'window' to 'child' and change its description too.
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>

diff --git a/src/xproto.xml b/src/xproto.xml
index 0779568..bfb8a4c 100644
--- a/src/xproto.xml
+++ b/src/xproto.xml
@@ -506,11 +506,11 @@ event.
     <doc>
       <brief>the pointer is in a different window</brief>
       <field name="event"><![CDATA[
-The reconfigured window or its parent, depending on whether `StructureNotify`
-or `SubstructureNotify` was selected.
+The window on which the event was generated.
       ]]></field>
-      <field name="window"><![CDATA[
-The window that was unmapped.
+      <field name="child"><![CDATA[
+If the `event` window has subwindows and the final pointer position is in one
+of them, then `child` is set to that subwindow, `XCB_WINDOW_NONE` otherwise.
       ]]></field>
       <field name="root"><![CDATA[
 The root window for the final cursor position.


More information about the xcb-commit mailing list