Add (and use) KeyButMask enum.
[free-sw/xcb/proto] / src / xcb.xsd
index 47f8c69..54a7370 100644 (file)
@@ -30,23 +30,29 @@ authorization from the authors.
   <xsd:element name="xcb">
     <xsd:complexType>
       <xsd:group ref="macro" minOccurs="0" maxOccurs="unbounded" />
-      <xsd:attribute name="header" type="xsd:string" />
+      <xsd:attribute name="header" type="xsd:string" use="required" />
       <xsd:attribute name="extension-xname" type="xsd:string" use="optional" />
       <xsd:attribute name="extension-name"  type="xsd:string" use="optional" />
+      <xsd:attribute name="extension-multiword" type="xsd:boolean" use="optional" default="false" />
+      <xsd:attribute name="major-version"   type="xsd:integer" use="optional" />
+      <xsd:attribute name="minor-version"   type="xsd:integer" use="optional" />
     </xsd:complexType>
   </xsd:element>
 
   <!-- Padding -->
   <xsd:element name="pad">
     <xsd:complexType>
-      <xsd:attribute name="bytes" type="xsd:integer" />
+      <xsd:attribute name="bytes" type="xsd:integer" use="required" />
     </xsd:complexType>
   </xsd:element>
 
   <!-- Type for fields or parameters with attributes "name" and "type" -->
   <xsd:complexType name="var">
-    <xsd:attribute name="name" type="xsd:string" />
-    <xsd:attribute name="type" type="xsd:string" />
+    <xsd:attribute name="name" type="xsd:string" use="required" />
+    <xsd:attribute name="type" type="xsd:string" use="required" />
+    <xsd:attribute name="enum" type="xsd:string" use="optional" />
+    <xsd:attribute name="altenum" type="xsd:string" use="optional" />
+    <xsd:attribute name="mask" type="xsd:string" use="optional" />
   </xsd:complexType>
 
   <!-- field replaces FIELD, PARAM, and REPLY. -->
@@ -65,9 +71,6 @@ authorization from the authors.
     </xsd:complexType>
   </xsd:element>
 
-  <!-- Parameters in requests that are not sent with the request. -->
-  <xsd:element name="localfield" type="var" />
-  
   <!-- Expressions -->
   <xsd:group name="expression">
     <xsd:choice>
@@ -77,7 +80,7 @@ authorization from the authors.
             <xsd:group ref="expression" />
             <xsd:group ref="expression" />
           </xsd:sequence>
-          <xsd:attribute name="op">
+          <xsd:attribute name="op" use="required">
             <xsd:simpleType>
               <xsd:restriction base="xsd:string">
                 <xsd:pattern value="\+|-|\*|/|&amp;|&lt;&lt;" />
@@ -88,6 +91,7 @@ authorization from the authors.
       </xsd:element>
       <xsd:element name="fieldref" type="xsd:string" />
       <xsd:element name="value" type="dec-or-hex-integer" />
+      <xsd:element name="bit" type="xsd:integer" />
     </xsd:choice>
   </xsd:group>
   
@@ -106,9 +110,11 @@ authorization from the authors.
   <!-- BITMASK/LISTofVALUE parameter pairs. -->
   <xsd:element name="valueparam">
     <xsd:complexType>
-      <xsd:attribute name="value-mask-type" type="xsd:string" />
-      <xsd:attribute name="value-mask-name" type="xsd:string" />
-      <xsd:attribute name="value-list-name" type="xsd:string" />
+      <xsd:attribute name="value-mask-type" type="xsd:string" use="required" />
+      <xsd:attribute name="value-mask-name" type="xsd:string" use="required" />
+      <!-- This pad is currently needed only by ConfigureWindow.  Sigh. -->
+      <xsd:attribute name="value-mask-pad" type="xsd:integer" use="optional" />
+      <xsd:attribute name="value-list-name" type="xsd:string" use="required" />
     </xsd:complexType>
   </xsd:element>
 
@@ -123,21 +129,21 @@ authorization from the authors.
   <!-- Type for a structure -->
   <xsd:complexType name="struct">
     <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" />
-    <xsd:attribute name="name" type="xsd:string" />
+    <xsd:attribute name="name" type="xsd:string" use="required" />
   </xsd:complexType>
 
   <!-- Type for a packet structure -->
   <xsd:complexType name="packet-struct">
     <xsd:group ref="fields" minOccurs="0" maxOccurs="unbounded" />
-    <xsd:attribute name="name" type="xsd:string" />
-    <xsd:attribute name="number" type="xsd:integer" />
+    <xsd:attribute name="name" type="xsd:string" use="required" />
+    <xsd:attribute name="number" type="xsd:integer" use="required" />
   </xsd:complexType>
 
   <!-- Type for a packet structure copy -->
   <xsd:complexType name="packet-struct-copy">
-    <xsd:attribute name="name" type="xsd:string" />
-    <xsd:attribute name="number" type="xsd:integer" />
-    <xsd:attribute name="ref" type="xsd:string" />
+    <xsd:attribute name="name" type="xsd:string" use="required" />
+    <xsd:attribute name="number" type="xsd:integer" use="required" />
+    <xsd:attribute name="ref" type="xsd:string" use="required" />
   </xsd:complexType>
 
   <!-- Type for hex integers -->
@@ -159,26 +165,30 @@ authorization from the authors.
           <xsd:sequence>
             <xsd:choice minOccurs="0" maxOccurs="unbounded">
               <xsd:group ref="fields" />
-              <xsd:element ref="localfield" />
               <xsd:element ref="exprfield" />
               <xsd:element ref="valueparam" />
             </xsd:choice>
             <xsd:element name="reply" minOccurs="0" maxOccurs="1">
               <xsd:complexType>
-                <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" />
+                <xsd:choice minOccurs="1" maxOccurs="unbounded">
+                  <xsd:group ref="fields" />
+                  <xsd:element ref="valueparam" />
+                </xsd:choice>
               </xsd:complexType>
             </xsd:element>
           </xsd:sequence>
-          <xsd:attribute name="name" type="xsd:string" />
-          <xsd:attribute name="opcode" type="xsd:integer" />
-          <xsd:attribute name="combine-adjacent" type="xsd:boolean" />
+          <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"/>
         </xsd:complexType>
       </xsd:element>
       <xsd:element name="event">
         <xsd:complexType>
           <xsd:complexContent>
             <xsd:extension base="packet-struct">
-              <xsd:attribute name="no-sequence-number" type="xsd:boolean" />
+              <xsd:attribute name="no-sequence-number" type="xsd:boolean"
+                             use="optional" />
             </xsd:extension>
           </xsd:complexContent>
         </xsd:complexType>
@@ -190,7 +200,16 @@ authorization from the authors.
       <xsd:element name="union" type="struct" />
       <xsd:element name="xidtype">
         <xsd:complexType>
-          <xsd:attribute name="name" type="xsd:string" />
+          <xsd:attribute name="name" type="xsd:string" use="required" />
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="xidunion">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="type" type="xsd:string"
+                         minOccurs="1" maxOccurs="unbounded" />
+          </xsd:sequence>
+          <xsd:attribute name="name" type="xsd:string" use="required" />
         </xsd:complexType>
       </xsd:element>
       <xsd:element name="enum">
@@ -199,17 +218,17 @@ authorization from the authors.
             <xsd:element name="item">
               <xsd:complexType>
                 <xsd:group ref="expression" minOccurs="0" maxOccurs="1" />
-                <xsd:attribute name="name" type="xsd:string" />
+                <xsd:attribute name="name" type="xsd:string" use="required" />
               </xsd:complexType>
             </xsd:element>
           </xsd:sequence>
-          <xsd:attribute name="name" type="xsd:string" />
+          <xsd:attribute name="name" type="xsd:string" use="required" />
         </xsd:complexType>
       </xsd:element>
       <xsd:element name="typedef">
         <xsd:complexType>
-          <xsd:attribute name="oldname" type="xsd:string" />
-          <xsd:attribute name="newname" type="xsd:string" />
+          <xsd:attribute name="oldname" type="xsd:string" use="required" />
+          <xsd:attribute name="newname" type="xsd:string" use="required" />
         </xsd:complexType>
       </xsd:element>
       <!-- The import element allows a protocol description to reference the