Add MIT-SHM AttachFd and CreateSegment requests
authorKeith Packard <keithp@keithp.com>
Fri, 18 Jan 2013 09:28:10 +0000 (01:28 -0800)
committerKeith Packard <keithp@keithp.com>
Thu, 7 Nov 2013 13:14:12 +0000 (05:14 -0800)
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
src/shm.xml

index adda509..71fce14 100644 (file)
@@ -26,7 +26,7 @@ sale, use or other dealings in this Software without prior written
 authorization from the authors.
 -->
 <xcb header="shm" extension-xname="MIT-SHM" extension-name="Shm"
-    major-version="1" minor-version="1">
+    major-version="1" minor-version="2">
   <import>xproto</import>
 
   <xidtype name="SEG" />
@@ -113,4 +113,23 @@ authorization from the authors.
     <field type="SEG" name="shmseg" />
     <field type="CARD32" name="offset" />
   </request>
+
+  <request name="AttachFd" opcode="6">
+    <field type="SEG" name="shmseg" />
+    <fd name="shm_fd" />
+    <field type="BOOL" name="read_only" />
+    <pad bytes="3" />
+  </request>
+
+  <request name="CreateSegment" opcode="7">
+    <field type="SEG" name="shmseg" />
+    <field type="CARD32" name="size" />
+    <field type="BOOL" name="read_only" />
+    <pad bytes="3" />
+    <reply>
+      <field type="CARD8" name="nfd" />
+      <fd name="shm_fd" />
+      <pad bytes="24" />
+    </reply>
+  </request>
 </xcb>