[Xcb-commit] Branch 'xspec' - xcb-proto

Alp Toker alp at kemper.freedesktop.org
Mon Mar 6 12:31:44 PST 2006


 xcb-proto/src/extensions/shape.xml  |   28 +++----
 xcb-proto/src/extensions/xfixes.xml |   15 +---
 xcb-proto/src/xproto.xml            |  128 +++++++++++++++++++-----------------
 3 files changed, 88 insertions(+), 83 deletions(-)

New commits:
diff-tree 297cf6d464973050d9f3ed2def40822a442956cf (from 76d9ae1f7a84dc73c57f65978c2dcd96bded10db)
Author: Alp Toker <alp at atoker.com>
Date:   Mon Mar 6 20:31:35 2006 +0000

    Start annotating enumerations

diff --git a/xcb-proto/src/extensions/shape.xml b/xcb-proto/src/extensions/shape.xml
index 668fc40..9763016 100644
--- a/xcb-proto/src/extensions/shape.xml
+++ b/xcb-proto/src/extensions/shape.xml
@@ -26,25 +26,21 @@ sale, use or other dealings in this Soft
 authorization from the authors.
 -->
 <extension header="shape" xname="SHAPE" name="Shape">
-  <typedef oldname="CARD8" newname="SHAPE_OP"/>
-  <typedef oldname="CARD8" newname="SHAPE_KIND"/>
-<!-- Shape attributes of type SHAPE_OP. -->
-  <enum name="SO">
+  <enum type="CARD8" name="ShapeOp">
     <item name="set"/>
     <item name="union"/>
     <item name="intersect"/>
     <item name="subtract"/>
     <item name="invert"/>
   </enum>
-<!-- Shape attributes of type SHAPE_KIND. -->
-  <enum name="SK">
+  <enum type="CARD8" name="ShapeKind">
     <item name="bounding"/>
     <item name="clip"/>
 <!-- TODO: xspec: 'input' borrowed from xlib headers, validate -->
     <item name="input"/>
   </enum>
   <event name="Notify" number="0">
-    <field type="SHAPE_KIND" name="shape-kind"/>
+    <field type="ShapeKind" name="shape-kind"/>
     <field type="WINDOW" name="affected-window"/>
     <field type="INT16" name="extents-x"/>
     <field type="INT16" name="extents-y"/>
@@ -61,8 +57,8 @@ authorization from the authors.
     </reply>
   </request>
   <request name="Rectangles" opcode="1">
-    <field type="SHAPE_OP" name="operation"/>
-    <field type="SHAPE_KIND" name="destination-kind"/>
+    <field type="ShapeOp" name="operation"/>
+    <field type="ShapeKind" name="destination-kind"/>
     <field type="BYTE" name="ordering"/>
     <pad bytes="1"/>
     <field type="WINDOW" name="destination-window"/>
@@ -71,8 +67,8 @@ authorization from the authors.
     <list type="RECTANGLE" name="rectangles"/>
   </request>
   <request name="Mask" opcode="2">
-    <field type="SHAPE_OP" name="operation"/>
-    <field type="SHAPE_KIND" name="destination-kind"/>
+    <field type="ShapeOp" name="operation"/>
+    <field type="ShapeKind" name="destination-kind"/>
     <pad bytes="2"/>
     <field type="WINDOW" name="destination-window"/>
     <field type="INT16" name="x-offset"/>
@@ -80,9 +76,9 @@ authorization from the authors.
     <field type="PIXMAP" name="source-bitmap"/>
   </request>
   <request name="Combine" opcode="3">
-    <field type="SHAPE_OP" name="operation"/>
-    <field type="SHAPE_KIND" name="destination-kind"/>
-    <field type="SHAPE_KIND" name="source-kind"/>
+    <field type="ShapeOp" name="operation"/>
+    <field type="ShapeKind" name="destination-kind"/>
+    <field type="ShapeKind" name="source-kind"/>
     <pad bytes="1"/>
     <field type="WINDOW" name="destination-window"/>
     <field type="INT16" name="x-offset"/>
@@ -90,7 +86,7 @@ authorization from the authors.
     <field type="WINDOW" name="source-window"/>
   </request>
   <request name="Offset" opcode="4">
-    <field type="SHAPE_KIND" name="destination-kind"/>
+    <field type="ShapeKind" name="destination-kind"/>
     <pad bytes="3"/>
     <field type="WINDOW" name="destination-window"/>
     <field type="INT16" name="x-offset"/>
@@ -120,7 +116,7 @@ authorization from the authors.
   </request>
   <request name="GetRectangles" opcode="8">
     <field type="WINDOW" name="window"/>
-    <field type="SHAPE_KIND" name="source-kind"/>
+    <field type="ShapeKind" name="source-kind"/>
     <reply>
       <field type="BYTE" name="ordering"/>
       <field type="CARD32" name="rectangles-len"/>
diff --git a/xcb-proto/src/extensions/xfixes.xml b/xcb-proto/src/extensions/xfixes.xml
index 29c0f27..01de671 100644
--- a/xcb-proto/src/extensions/xfixes.xml
+++ b/xcb-proto/src/extensions/xfixes.xml
@@ -38,25 +38,22 @@ authorization from the authors.
       <pad bytes="16"/>
     </reply>
   </request>
-  <enum name="SaveSetMode">
+  <enum type="BYTE" name="SaveSetMode">
     <item name="insert"/>
     <item name="delete"/>
   </enum>
-  <enum name="SaveSetTarget">
+  <enum type="BYTE" name="SaveSetTarget">
     <item name="nearest"/>
     <item name="root"/>
   </enum>
-  <enum name="SaveSetMapping">
+  <enum type="BYTE" name="SaveSetMapping">
     <item name="map"/>
     <item name="unmap"/>
   </enum>
   <request name="ChangeSaveSet" opcode="1">
-<!-- SaveSetMode -->
-    <field type="BYTE" name="mode"/>
-<!-- SaveSetTarget -->
-    <field type="BYTE" name="target"/>
-<!-- SaveSetMapping -->
-    <field type="BYTE" name="map"/>
+    <field type="SaveSetMode" name="mode"/>
+    <field type="SaveSetTarget" name="target"/>
+    <field type="SaveSetMapping" name="map"/>
     <pad bytes="1"/>
     <field type="WINDOW" name="window"/>
   </request>
diff --git a/xcb-proto/src/xproto.xml b/xcb-proto/src/xproto.xml
index a39d8ef..e09550c 100644
--- a/xcb-proto/src/xproto.xml
+++ b/xcb-proto/src/xproto.xml
@@ -104,7 +104,7 @@ authorization from the authors.
   </event>
   <eventcopy name="LeaveNotify" number="8" ref="EnterNotify"/>
   <event name="FocusIn" number="9">
-    <field type="BYTE" name="detail"/>
+    <field type="FocusDetail" name="detail"/>
     <field type="WINDOW" name="event"/>
     <field type="BYTE" name="mode"/>
   </event>
@@ -139,7 +139,7 @@ authorization from the authors.
   <event name="VisibilityNotify" number="15">
     <pad bytes="1"/>
     <field type="WINDOW" name="window"/>
-    <field type="BYTE" name="state"/>
+    <field type="Visibility" name="state"/>
   </event>
   <event name="CreateNotify" number="16">
     <pad bytes="1"/>
@@ -282,7 +282,7 @@ authorization from the authors.
     <field type="CARD8" name="count"/>
   </event>
 <!-- Enumerations -->
-<enum name="Gravity">
+<enum type="CARD8" name="Gravity">
   <item name="forget"/>
   <item name="north-west"/>
   <item name="north"/>
@@ -304,7 +304,7 @@ authorization from the authors.
   <item name="server-interpreted"/>
   <item name="internet-v6"/>
 </enum>
-<enum name="BackingStoreUsage">
+<enum type="CARD8" name="BackingStoreUsage">
   <item name="never"/>
   <item name="not-useful"/>
   <item name="when-mapped"/>
@@ -318,12 +318,12 @@ authorization from the authors.
   <item name="true-color"/>
   <item name="direct-color"/>
 </enum>
-<enum name="WindowClass">
+<enum type="CARD16" name="WindowClass">
   <item name="copy-from-parent"/>
   <item name="input-output"/>
   <item name="input-only"/>
 </enum>
-<enum name="MapState">
+<enum type="CARD8" name="MapState">
   <item name="unmapped"/>
   <item name="unviewable"/>
   <item name="viewable"/>
@@ -335,11 +335,11 @@ authorization from the authors.
   <item name="bottom-if"/>
   <item name="opposite"/>
 </enum>
-<enum name="CirculateDirection">
+<enum type="CARD8" name="CirculateDirection">
   <item name="raise-lowest"/>
   <item name="lower-highest"/>
 </enum>
-<enum name="PropertyMode">
+<enum type="CARD8" name="PropertyMode">
   <item name="replace"/>
   <item name="prepend"/>
   <item name="append"/>
@@ -348,23 +348,23 @@ authorization from the authors.
   <item name="pointer-window"/>
   <item name="input-focus"/>
 </enum>
-<enum name="GrabMode">
+<enum type="BYTE" name="GrabMode">
   <item name="synchronous"/>
   <item name="asynchronous"/>
 </enum>
-<enum name="GrabStatus">
+<enum type="BYTE" name="GrabStatus">
   <item name="success"/>
   <item name="already-grabbed"/>
   <item name="invalid-time"/>
   <item name="not-viewable"/>
   <item name="frozen"/>
 </enum>
-<enum name="FocusRevert">
+<enum type="CARD8" name="FocusRevert">
   <item name="none"/>
   <item name="pointer-root"/>
   <item name="parent"/>
 </enum>
-<enum name="Direction">
+<enum type="BYTE" name="Direction">
   <item name="left-to-right"/>
   <item name="right-to-left"/>
 </enum>
@@ -402,36 +402,36 @@ authorization from the authors.
   <item name="chord"/>
   <item name="pie-slice"/>
 </enum>
-<enum name="Ordering">
+<enum type="BYTE" name="Ordering">
   <item name="unsorted"/>
   <item name="y-sorted"/>
   <item name="yx-sorted"/>
   <item name="yx-banded"/>
 </enum>
-<enum name="CoordinateMode">
+<enum type="BYTE" name="CoordinateMode">
   <item name="absolute"/>
   <item name="relative"/>
 </enum>
-<enum name="ShapeType">
+<enum type="CARD8" name="ShapeType">
   <item name="complex"/>
   <item name="nonconvex"/>
   <item name="convex"/>
 </enum>
-<enum name="ImageFormat">
+<enum type="CARD8" name="ImageFormat">
   <item name="bitmap"/>
   <item name="xy-pixmap"/>
   <item name="z-pixmap"/>
 </enum>
-<enum name="Allocation">
+<enum type="BYTE" name="Allocation">
   <item name="none"/>
   <item name="all"/>
 </enum>
-<enum name="QueryClass">
+<enum type="CARD8" name="QueryClass">
   <item name="cursor"/>
   <item name="tile"/>
   <item name="stipple"/>
 </enum>
-<enum name="CloseDownMode">
+<enum type="CARD8" name="CloseDownMode">
   <item name="destroy"/>
   <item name="retain-permanent"/>
   <item name="retain-temporary"/>
@@ -440,7 +440,8 @@ authorization from the authors.
   <item name="reset"/>
   <item name="activate"/>
 </enum>
-<enum name="Success">
+<enum type="BYTE" name="MappingStatus">
+  <item name="success"/>
   <item name="busy"/>
   <item name="failed"/>
 </enum>
@@ -448,7 +449,7 @@ authorization from the authors.
   <item name="normal"/>
   <item name="hint"/>
 </enum>
-<enum name="Visibility">
+<enum type="BYTE" name="Visibility">
   <item name="full"/>
   <item name="partial"/>
   <item name="none"/>
@@ -484,6 +485,16 @@ authorization from the authors.
   <item name="nand"/>
   <item name="set"/>
 </enum>
+<enum type="BYTE" name="FocusDetail">
+	<item name="ancestor"/>
+	<item name="virtual"/>
+	<item name="inferior"/>
+	<item name="nonlinear"/>
+	<item name="nonlinear-virtual"/>
+	<item name="pointer"/>
+	<item name="pointer-root"/>
+	<item name="none"/>
+</enum>
 <!-- The requests, in major number order. -->
 <!-- It is the caller's responsibility to free returned XCB*Rep objects. -->
 <!-- FIXME: The ListFontsWithInfo request is not supported by XCB. -->
@@ -586,7 +597,7 @@ authorization from the authors.
     <field type="WINDOW" name="parent"/>
     <field type="RECTANGLE"/>
     <field type="CARD16" name="border-width"/>
-    <field type="CARD16" name="class"/>
+    <field type="WindowClass" name="class"/>
     <field type="VISUALID" name="visual"/>
     <valueparam value-mask-type="CARD32" value-mask-name="value-mask" value-list-name="value-list"/>
   </request>
@@ -596,16 +607,16 @@ authorization from the authors.
     <valueparam value-mask-type="CARD32" value-mask-name="value-mask" value-list-name="value-list"/>
   </request>
   <struct name="WindowAttributes">
-    <field type="CARD8" name="backing-store"/>
+    <field type="BackingStoreUsage" name="backing-store"/>
     <field type="VISUALID" name="visual"/>
-    <field type="CARD16" name="class"/>
-    <field type="CARD8" name="bit-gravity"/>
-    <field type="CARD8" name="win-gravity"/>
+    <field type="WindowClass" name="class"/>
+    <field type="Gravity" name="bit-gravity"/>
+    <field type="Gravity" name="win-gravity"/>
     <field type="CARD32" name="backing-planes"/>
     <field type="CARD32" name="backing-pixel"/>
     <field type="BOOL" name="save-under"/>
     <field type="BOOL" name="map-is-installed"/>
-    <field type="CARD8" name="map-state"/>
+    <field type="MapState" name="map-state"/>
     <field type="BOOL" name="override-redirect"/>
     <field type="COLORMAP" name="colormap"/>
     <field type="CARD32" name="all-event-masks"/>
@@ -659,7 +670,7 @@ authorization from the authors.
     <valueparam value-mask-type="CARD16" value-mask-name="value-mask" value-list-name="value-list"/>
   </request>
   <request name="CirculateWindow" opcode="13">
-    <field type="CARD8" name="direction"/>
+    <field type="CirculateDirection" name="direction"/>
     <field type="WINDOW" name="window"/>
   </request>
   <struct name="Geometry">
@@ -714,7 +725,7 @@ authorization from the authors.
     </reply>
   </request>
   <request name="ChangeProperty" opcode="18">
-    <field type="CARD8" name="mode"/>
+    <field type="PropertyMode" name="mode"/>
     <field type="WINDOW" name="window"/>
     <field type="ATOM" name="property"/>
     <field type="ATOM" name="type"/>
@@ -801,13 +812,13 @@ authorization from the authors.
     <field type="BOOL" name="owner-events"/>
     <field type="WINDOW" name="grab-window"/>
     <field type="CARD16" name="event-mask"/>
-    <field type="BYTE" name="pointer-mode"/>
-    <field type="BYTE" name="keyboard-mode"/>
+    <field type="GrabMode" name="pointer-mode"/>
+    <field type="GrabMode" name="keyboard-mode"/>
     <field type="WINDOW" name="confine-to"/>
     <field type="CURSOR" name="cursor"/>
     <field type="TIMESTAMP" name="time"/>
     <reply>
-      <field type="BYTE" name="status"/>
+      <field type="GrabStatus" name="status"/>
     </reply>
   </request>
   <request name="UngrabPointer" opcode="27">
@@ -817,9 +828,10 @@ authorization from the authors.
   <request name="GrabButton" opcode="28">
     <field type="BOOL" name="owner-events"/>
     <field type="WINDOW" name="grab-window"/>
-    <field type="CARD16" name="event-mask"/>
-    <field type="CARD8" name="pointer-mode"/>
-    <field type="CARD8" name="keyboard-mode"/>
+		<field type="CARD16" name="event-mask"/>
+<!-- FIXME: type change? BYTE/CARD8 -->
+    <field type="GrabMode" name="pointer-mode"/>
+    <field type="GrabMode" name="keyboard-mode"/>
     <field type="WINDOW" name="confine-to"/>
     <field type="CURSOR" name="cursor"/>
     <field type="CARD8" name="button"/>
@@ -827,7 +839,7 @@ authorization from the authors.
     <field type="CARD16" name="modifiers"/>
   </request>
   <request name="UngrabButton" opcode="29">
-    <field type="CARD8" name="button"/>
+    <field type="BUTTON" name="button"/>
     <field type="WINDOW" name="grab-window"/>
     <field type="CARD16" name="modifiers"/>
     <pad bytes="2"/>
@@ -842,10 +854,10 @@ authorization from the authors.
     <field type="BOOL" name="owner-events"/>
     <field type="WINDOW" name="grab-window"/>
     <field type="TIMESTAMP" name="time"/>
-    <field type="BYTE" name="pointer-mode"/>
-    <field type="BYTE" name="keyboard-mode"/>
+    <field type="GrabMode" name="pointer-mode"/>
+    <field type="GrabMode" name="keyboard-mode"/>
     <reply>
-      <field type="BYTE" name="status"/>
+      <field type="GrabStatus" name="status"/>
     </reply>
   </request>
   <request name="UngrabKeyboard" opcode="32">
@@ -857,8 +869,8 @@ authorization from the authors.
     <field type="WINDOW" name="grab-window"/>
     <field type="CARD16" name="modifiers"/>
     <field type="KEYCODE" name="key"/>
-    <field type="CARD8" name="pointer-mode"/>
-    <field type="CARD8" name="keyboard-mode"/>
+    <field type="GrabMode" name="pointer-mode"/>
+    <field type="GrabMode" name="keyboard-mode"/>
   </request>
   <request name="UngrabKey" opcode="34">
     <field type="CARD8" name="key"/>
@@ -926,13 +938,13 @@ authorization from the authors.
     <field type="INT16" name="dst-y"/>
   </request>
   <request name="SetInputFocus" opcode="42">
-    <field type="CARD8" name="revert-to"/>
+    <field type="FocusRevert" name="revert-to"/>
     <field type="WINDOW" name="focus"/>
     <field type="TIMESTAMP" name="time"/>
   </request>
   <request name="GetInputFocus" opcode="43">
     <reply>
-      <field type="CARD8" name="revert-to"/>
+      <field type="FocusRevert" name="revert-to"/>
       <field type="WINDOW" name="focus"/>
     </reply>
   </request>
@@ -981,7 +993,7 @@ authorization from the authors.
       <field type="CARD16" name="max-char-or-byte2"/>
       <field type="CARD16" name="default-char"/>
       <field type="CARD16" name="properties-len"/>
-      <field type="BYTE" name="draw-direction"/>
+      <field type="Direction" name="draw-direction"/>
       <field type="CARD8" name="min-byte1"/>
       <field type="CARD8" name="max-byte1"/>
       <field type="BOOL" name="all-chars-exist"/>
@@ -1006,7 +1018,7 @@ authorization from the authors.
     <field type="FONTABLE" name="font"/>
     <list type="CHAR2B" name="string"/>
     <reply>
-      <field type="BYTE" name="draw-direction"/>
+      <field type="Direction" name="draw-direction"/>
       <field type="INT16" name="font-ascent"/>
       <field type="INT16" name="font-descent"/>
       <field type="INT16" name="overall-ascent"/>
@@ -1055,7 +1067,7 @@ authorization from the authors.
       <field type="CARD16" name="max-char-or-byte2"/>
       <field type="CARD16" name="default-char"/>
       <field type="CARD16" name="properties-len"/>
-      <field type="BYTE" name="draw-direction"/>
+      <field type="Direction" name="draw-direction"/>
       <field type="CARD8" name="min-byte1"/>
       <field type="CARD8" name="max-byte1"/>
       <field type="BOOL" name="all-chars-exist"/>
@@ -1122,7 +1134,7 @@ authorization from the authors.
     </list>
   </request>
   <request name="SetClipRectangles" opcode="59">
-    <field type="BYTE" name="ordering"/>
+    <field type="Ordering" name="ordering"/>
     <field type="GCONTEXT" name="gc"/>
     <field type="POINT" name="clip-origin"/>
     <list type="RECTANGLE" name="rectangles"/>
@@ -1160,13 +1172,13 @@ authorization from the authors.
     <field type="CARD32" name="bit-plane"/>
   </request>
   <request name="PolyPoint" opcode="64" combine-adjacent="true">
-    <field type="BYTE" name="coordinate-mode"/>
+    <field type="CoordinateMode" name="coordinate-mode"/>
     <field type="DRAWABLE" name="drawable"/>
     <field type="GCONTEXT" name="gc"/>
     <list type="POINT" name="points"/>
   </request>
   <request name="PolyLine" opcode="65" combine-adjacent="true">
-    <field type="BYTE" name="coordinate-mode"/>
+    <field type="CoordinateMode" name="coordinate-mode"/>
     <field type="DRAWABLE" name="drawable"/>
     <field type="GCONTEXT" name="gc"/>
     <list type="POINT" name="points"/>
@@ -1204,8 +1216,8 @@ authorization from the authors.
     <pad bytes="1"/>
     <field type="DRAWABLE" name="drawable"/>
     <field type="GCONTEXT" name="gc"/>
-    <field type="CARD8" name="shape"/>
-    <field type="CARD8" name="coordinate-mode"/>
+    <field type="ShapeType" name="shape"/>
+    <field type="CoordinateMode" name="coordinate-mode"/>
     <list type="POINT" name="points"/>
   </request>
   <request name="PolyFillRectangle" opcode="70" combine-adjacent="true">
@@ -1221,7 +1233,7 @@ authorization from the authors.
     <list type="ARC" name="arcs"/>
   </request>
   <request name="PutImage" opcode="72">
-    <field type="CARD8" name="format"/>
+    <field type="ImageFormat" name="format"/>
     <field type="DRAWABLE" name="drawable"/>
     <field type="GCONTEXT" name="gc"/>
     <field type="SIZE"/>
@@ -1233,7 +1245,7 @@ authorization from the authors.
   </request>
 <!-- FIXME: data array in reply will include padding, but ought not to. -->
   <request name="GetImage" opcode="73">
-    <field type="CARD8" name="format"/>
+    <field type="ImageFormat" name="format"/>
     <field type="DRAWABLE" name="drawable"/>
     <field type="RECTANGLE"/>
     <field type="CARD32" name="plane-mask"/>
@@ -1282,7 +1294,7 @@ authorization from the authors.
     </list>
   </request>
   <request name="CreateColormap" opcode="78">
-    <field type="BYTE" name="alloc"/>
+    <field type="Allocation" name="alloc"/>
     <field type="COLORMAP" name="mid"/>
     <field type="WINDOW" name="window"/>
     <field type="VISUALID" name="visual"/>
@@ -1466,7 +1478,7 @@ authorization from the authors.
     <field type="COLOR" name="back-color"/>
   </request>
   <request name="QueryBestSize" opcode="97">
-    <field type="CARD8" name="class"/>
+    <field type="QueryClass" name="class"/>
     <field type="DRAWABLE" name="drawable"/>
     <field type="SIZE" name="size"/>
     <reply>
@@ -1603,7 +1615,7 @@ authorization from the authors.
     <field type="CARD8" name="mode"/>
   </request>
   <request name="SetCloseDownMode" opcode="112">
-    <field type="CARD8" name="mode"/>
+    <field type="CloseDownMode" name="mode"/>
   </request>
   <request name="KillClient" opcode="113">
     <pad bytes="1"/>
@@ -1626,7 +1638,7 @@ authorization from the authors.
       <fieldref>map-len</fieldref>
     </list>
     <reply>
-      <field type="BYTE" name="status"/>
+      <field type="MappingStatus" name="status"/>
     </reply>
   </request>
   <request name="GetPointerMapping" opcode="117">
@@ -1647,7 +1659,7 @@ authorization from the authors.
       </op>
     </list>
     <reply>
-      <field type="BYTE" name="status"/>
+      <field type="MappingStatus" name="status"/>
     </reply>
   </request>
   <request name="GetModifierMapping" opcode="119">


More information about the xcb-commit mailing list