summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-04-18 19:55:52 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-04-18 19:55:52 +0000
commit72aa7e5cb343204109b4e42d0e52a0d0f3aa0fed (patch)
treeb8e5d673d87b15c8b2151dfbe781b43dbd54cdad
parentce98885a4fb988df957cae61b00c5d97e21f7e56 (diff)
Update to xcb-proto 1.6.
-rw-r--r--proto/xcb-proto/Makefile3
-rw-r--r--proto/xcb-proto/NEWS11
-rw-r--r--proto/xcb-proto/configure.ac2
-rw-r--r--proto/xcb-proto/py-compile36
-rw-r--r--proto/xcb-proto/src/Makefile.am1
-rw-r--r--proto/xcb-proto/src/dri2.xml152
-rw-r--r--proto/xcb-proto/src/shape.xml1
-rw-r--r--proto/xcb-proto/src/xcb.xsd2
-rw-r--r--proto/xcb-proto/src/xf86dri.xml4
-rw-r--r--proto/xcb-proto/src/xfixes.xml3
-rw-r--r--proto/xcb-proto/src/xproto.xml72
-rw-r--r--proto/xcb-proto/xcbgen/xtypes.py28
12 files changed, 265 insertions, 50 deletions
diff --git a/proto/xcb-proto/Makefile b/proto/xcb-proto/Makefile
index 9294b0822..ac6d35f11 100644
--- a/proto/xcb-proto/Makefile
+++ b/proto/xcb-proto/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.3 2009/05/31 16:35:28 matthieu Exp $
+# $OpenBSD: Makefile,v 1.4 2010/04/18 19:55:51 matthieu Exp $
PKGCONFIG= xcb-proto.pc
@@ -9,6 +9,7 @@ FILES= \
composite.xml \
damage.xml \
dpms.xml \
+ dri2.xml \
glx.xml \
randr.xml \
record.xml \
diff --git a/proto/xcb-proto/NEWS b/proto/xcb-proto/NEWS
index e9a6a51cb..e6028d602 100644
--- a/proto/xcb-proto/NEWS
+++ b/proto/xcb-proto/NEWS
@@ -1,3 +1,14 @@
+Release 1.6 (2009-12-02)
+=======================
+* Add DRI2 protocol, based off of dri2proto.h and the server code. (v2)
+* xf86dri.xml seems to have been wrong forever. Fixes bug #16894.
+* shape: add missing padding bytes to GetRectangles
+* Add XML description for the Generic Event extension.
+* Add XML description for the XFree86VidMode extension.
+* Fix typo in xf86vidmode.xml
+* Fix length calculation for xfixes/FetchRegion reply
+* Add pre-defined atoms to Atom enum
+
Release 1.5 (2009-05-09)
========================
* Add support for mod mask Any
diff --git a/proto/xcb-proto/configure.ac b/proto/xcb-proto/configure.ac
index f3a489e2b..1a6ca0152 100644
--- a/proto/xcb-proto/configure.ac
+++ b/proto/xcb-proto/configure.ac
@@ -3,7 +3,7 @@
AC_PREREQ(2.57)
AC_INIT([XCB Proto],
- 1.5,
+ 1.6,
[xcb@lists.freedesktop.org])
AC_CONFIG_SRCDIR([xcb-proto.pc.in])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
diff --git a/proto/xcb-proto/py-compile b/proto/xcb-proto/py-compile
index d6e900b30..3f9d05b60 100644
--- a/proto/xcb-proto/py-compile
+++ b/proto/xcb-proto/py-compile
@@ -1,9 +1,10 @@
#!/bin/sh
# py-compile - Compile a Python program
-scriptversion=2005-05-14.22
+scriptversion=2009-04-28.21; # UTC
-# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software
+# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,9 +17,7 @@ scriptversion=2005-05-14.22
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -103,38 +102,38 @@ else
fi
$PYTHON -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
files = '''$files'''
-print 'Byte-compiling python modules...'
-for file in string.split(files):
+sys.stdout.write('Byte-compiling python modules...\n')
+for file in files.split():
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
- continue
- print file,
+ continue
+ sys.stdout.write(file)
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'c', path)
-print" || exit $?
+sys.stdout.write('\n')" || exit $?
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
files = '''$files'''
-print 'Byte-compiling python modules (optimized versions) ...'
-for file in string.split(files):
+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
+for file in files.split():
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
- continue
- print file,
+ continue
+ sys.stdout.write(file)
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'o', path)
-print" 2>/dev/null || :
+sys.stdout.write('\n')" 2>/dev/null || :
# Local Variables:
# mode: shell-script
@@ -142,5 +141,6 @@ print" 2>/dev/null || :
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
diff --git a/proto/xcb-proto/src/Makefile.am b/proto/xcb-proto/src/Makefile.am
index 3caaed246..0f0dfbcda 100644
--- a/proto/xcb-proto/src/Makefile.am
+++ b/proto/xcb-proto/src/Makefile.am
@@ -5,6 +5,7 @@ xcbinclude_HEADERS = \
composite.xml \
damage.xml \
dpms.xml \
+ dri2.xml \
glx.xml \
randr.xml \
record.xml \
diff --git a/proto/xcb-proto/src/dri2.xml b/proto/xcb-proto/src/dri2.xml
new file mode 100644
index 000000000..7fea94839
--- /dev/null
+++ b/proto/xcb-proto/src/dri2.xml
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2005 Jeremy Kolb.
+Copyright © 2009 Intel Corporation
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the names of the authors or their
+institutions shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from the authors.
+-->
+
+<xcb header="dri2" extension-xname="DRI2" extension-name="DRI2"
+ major-version="1" minor-version="1">
+ <import>xproto</import>
+
+ <enum name="Attachment">
+ <item name="BufferFrontLeft" />
+ <item name="BufferBackLeft" />
+ <item name="BufferFrontRight" />
+ <item name="BufferBackRight" />
+ <item name="BufferDepth" />
+ <item name="BufferStencil" />
+ <item name="BufferAccum" />
+ <item name="BufferFakeFrontLeft" />
+ <item name="BufferFakeFrontRight" />
+ <item name="BufferDepthStencil" />
+ </enum>
+
+ <enum name="DriverType">
+ <item name="DRI" />
+ </enum>
+
+ <!-- Types -->
+
+ <struct name="DRI2Buffer">
+ <field type="CARD32" name="attachment" enum="Attachment" />
+ <field type="CARD32" name="name" />
+ <field type="CARD32" name="pitch" />
+ <field type="CARD32" name="cpp" />
+ <field type="CARD32" name="flags" />
+ </struct>
+
+ <struct name="AttachFormat">
+ <field type="CARD32" name="attachment" enum="Attachment" />
+ <field type="CARD32" name="format" />
+ </struct>
+
+ <!-- Requests -->
+ <request name="QueryVersion" opcode="0">
+ <field type="CARD32" name="major_version" />
+ <field type="CARD32" name="minor_version" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD32" name="major_version" />
+ <field type="CARD32" name="minor_version" />
+ </reply>
+ </request>
+
+ <request name="Connect" opcode="1">
+ <field type="WINDOW" name="window" />
+ <field type="CARD32" name="driver_type" enum="DriverType" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD32" name="driver_name_length" />
+ <field type="CARD32" name="device_name_length" />
+ <pad bytes="16" />
+ <list type="char" name="driver_name">
+ <fieldref>driver_name_length</fieldref>
+ </list>
+ <list type="char" name="device_name">
+ <fieldref>device_name_length</fieldref>
+ </list>
+ </reply>
+ </request>
+
+ <request name="Authenticate" opcode="2">
+ <field type="WINDOW" name="window" />
+ <field type="CARD32" name="magic" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD32" name="authenticated" />
+ </reply>
+ </request>
+
+ <request name="CreateDrawable" opcode="3">
+ <field type="DRAWABLE" name="drawable" />
+ </request>
+
+ <request name="DestroyDrawable" opcode="4">
+ <field type="DRAWABLE" name="drawable" />
+ </request>
+
+ <request name="GetBuffers" opcode="5">
+ <field type="DRAWABLE" name="drawable" />
+ <field type="CARD32" name="count" />
+ <list type="CARD32" name="attachments" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD32" name="width" />
+ <field type="CARD32" name="height" />
+ <field type="CARD32" name="count" />
+ <pad bytes="12" />
+ <list type="DRI2Buffer" name="buffers">
+ <fieldref>count</fieldref>
+ </list>
+ </reply>
+ </request>
+
+ <request name="CopyRegion" opcode="6">
+ <field type="DRAWABLE" name="drawable" />
+ <field type="CARD32" name="region" />
+ <field type="CARD32" name="dest" />
+ <field type="CARD32" name="src" />
+ <reply>
+ <pad bytes="1" />
+ </reply>
+ </request>
+
+ <request name="GetBuffersWithFormat" opcode="7">
+ <field type="DRAWABLE" name="drawable" />
+ <field type="CARD32" name="count" />
+ <list type="AttachFormat" name="attachments" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD32" name="width" />
+ <field type="CARD32" name="height" />
+ <field type="CARD32" name="count" />
+ <pad bytes="12" />
+ <list type="DRI2Buffer" name="buffers">
+ <fieldref>count</fieldref>
+ </list>
+ </reply>
+ </request>
+</xcb>
diff --git a/proto/xcb-proto/src/shape.xml b/proto/xcb-proto/src/shape.xml
index 8d76de887..c128ade32 100644
--- a/proto/xcb-proto/src/shape.xml
+++ b/proto/xcb-proto/src/shape.xml
@@ -146,6 +146,7 @@ authorization from the authors.
<reply>
<field type="BYTE" name="ordering" enum="ClipOrdering" />
<field type="CARD32" name="rectangles_len" />
+ <pad bytes="20" />
<list type="RECTANGLE" name="rectangles">
<fieldref>rectangles_len</fieldref>
</list>
diff --git a/proto/xcb-proto/src/xcb.xsd b/proto/xcb-proto/src/xcb.xsd
index 54a73705e..f3fcb6fe2 100644
--- a/proto/xcb-proto/src/xcb.xsd
+++ b/proto/xcb-proto/src/xcb.xsd
@@ -112,8 +112,6 @@ authorization from the authors.
<xsd:complexType>
<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>
diff --git a/proto/xcb-proto/src/xf86dri.xml b/proto/xcb-proto/src/xf86dri.xml
index 4527c2bff..981c9682f 100644
--- a/proto/xcb-proto/src/xf86dri.xml
+++ b/proto/xcb-proto/src/xf86dri.xml
@@ -62,8 +62,6 @@ authorization from the authors.
<field type="CARD32" name="screen" />
<reply>
<pad bytes="1" />
- <field type="CARD32" name="drm_client_key_low" />
- <field type="CARD32" name="drm_client_key_high" />
<field type="CARD32" name="sarea_handle_low" />
<field type="CARD32" name="sarea_handle_high" />
<field type="CARD32" name="bus_id_len" />
@@ -94,8 +92,8 @@ authorization from the authors.
</request>
<request name="CreateContext" opcode="5">
- <field type="CARD32" name="visual" />
<field type="CARD32" name="screen" />
+ <field type="CARD32" name="visual" />
<field type="CARD32" name="context" />
<reply>
<pad bytes="1" />
diff --git a/proto/xcb-proto/src/xfixes.xml b/proto/xcb-proto/src/xfixes.xml
index f6b062336..9bbeaab1e 100644
--- a/proto/xcb-proto/src/xfixes.xml
+++ b/proto/xcb-proto/src/xfixes.xml
@@ -229,7 +229,10 @@ authorization from the authors.
<field type="RECTANGLE" name="extents" />
<pad bytes="16" />
<list type="RECTANGLE" name="rectangles">
+ <op op='/'>
<fieldref>length</fieldref>
+ <value>2</value>
+ </op>
</list>
</reply>
</request>
diff --git a/proto/xcb-proto/src/xproto.xml b/proto/xcb-proto/src/xproto.xml
index 6295daeb3..b6521c3d7 100644
--- a/proto/xcb-proto/src/xproto.xml
+++ b/proto/xcb-proto/src/xproto.xml
@@ -588,6 +588,75 @@ authorization from the authors.
<enum name="Atom">
<item name="None"> <value>0</value></item>
+ <item name="Any"> <value>0</value></item>
+ <item name="PRIMARY" />
+ <item name="SECONDARY" />
+ <item name="ARC" />
+ <item name="ATOM" />
+ <item name="BITMAP" />
+ <item name="CARDINAL" />
+ <item name="COLORMAP" />
+ <item name="CURSOR" />
+ <item name="CUT_BUFFER0" />
+ <item name="CUT_BUFFER1" />
+ <item name="CUT_BUFFER2" />
+ <item name="CUT_BUFFER3" />
+ <item name="CUT_BUFFER4" />
+ <item name="CUT_BUFFER5" />
+ <item name="CUT_BUFFER6" />
+ <item name="CUT_BUFFER7" />
+ <item name="DRAWABLE" />
+ <item name="FONT" />
+ <item name="INTEGER" />
+ <item name="PIXMAP" />
+ <item name="POINT" />
+ <item name="RECTANGLE" />
+ <item name="RESOURCE_MANAGER" />
+ <item name="RGB_COLOR_MAP" />
+ <item name="RGB_BEST_MAP" />
+ <item name="RGB_BLUE_MAP" />
+ <item name="RGB_DEFAULT_MAP" />
+ <item name="RGB_GRAY_MAP" />
+ <item name="RGB_GREEN_MAP" />
+ <item name="RGB_RED_MAP" />
+ <item name="STRING" />
+ <item name="VISUALID" />
+ <item name="WINDOW" />
+ <item name="WM_COMMAND" />
+ <item name="WM_HINTS" />
+ <item name="WM_CLIENT_MACHINE" />
+ <item name="WM_ICON_NAME" />
+ <item name="WM_ICON_SIZE" />
+ <item name="WM_NAME" />
+ <item name="WM_NORMAL_HINTS" />
+ <item name="WM_SIZE_HINTS" />
+ <item name="WM_ZOOM_HINTS" />
+ <item name="MIN_SPACE" />
+ <item name="NORM_SPACE" />
+ <item name="MAX_SPACE" />
+ <item name="END_SPACE" />
+ <item name="SUPERSCRIPT_X" />
+ <item name="SUPERSCRIPT_Y" />
+ <item name="SUBSCRIPT_X" />
+ <item name="SUBSCRIPT_Y" />
+ <item name="UNDERLINE_POSITION" />
+ <item name="UNDERLINE_THICKNESS" />
+ <item name="STRIKEOUT_ASCENT" />
+ <item name="STRIKEOUT_DESCENT" />
+ <item name="ITALIC_ANGLE" />
+ <item name="X_HEIGHT" />
+ <item name="QUAD_WIDTH" />
+ <item name="WEIGHT" />
+ <item name="POINT_SIZE" />
+ <item name="RESOLUTION" />
+ <item name="COPYRIGHT" />
+ <item name="NOTICE" />
+ <item name="FONT_NAME" />
+ <item name="FAMILY_NAME" />
+ <item name="FULL_NAME" />
+ <item name="CAP_HEIGHT" />
+ <item name="WM_CLASS" />
+ <item name="WM_TRANSIENT_FOR" />
</enum>
<event name="SelectionRequest" number="30">
@@ -866,9 +935,10 @@ authorization from the authors.
<request name="ConfigureWindow" opcode="12">
<pad bytes="1" />
<field type="WINDOW" name="window" />
+ <field type="CARD16" name="value_mask" />
+ <pad bytes="2" />
<valueparam value-mask-type="CARD16"
value-mask-name="value_mask"
- value-mask-pad="2"
value-list-name="value_list" />
</request>
diff --git a/proto/xcb-proto/xcbgen/xtypes.py b/proto/xcb-proto/xcbgen/xtypes.py
index 30617b8f4..01d765e59 100644
--- a/proto/xcb-proto/xcbgen/xtypes.py
+++ b/proto/xcb-proto/xcbgen/xtypes.py
@@ -235,15 +235,15 @@ class ExprType(Type):
def fixed_size(self):
return True
-class SizedPadType(Type):
+class PadType(Type):
'''
- Derived class which represents a padding field of given size.
+ Derived class which represents a padding field.
'''
- def __init__(self, size):
+ def __init__(self, elt):
Type.__init__(self, tcard8.name)
self.is_pad = True
self.size = 1
- self.nmemb = int(size)
+ self.nmemb = 1 if (elt == None) else int(elt.get('bytes'))
def resolve(self, module):
self.resolved = True
@@ -251,13 +251,6 @@ class SizedPadType(Type):
def fixed_size(self):
return True
-class PadType(SizedPadType):
- '''
- Derived class which represents a padding field of given type.
- '''
- def __init__(self, elt):
- self.nmemb = "1" if (elt == None) else elt.get('bytes')
- SizedPadType.__init__(self, self.nmemb)
class ComplexType(Type):
'''
@@ -281,7 +274,6 @@ class ComplexType(Type):
# Resolve all of our field datatypes.
for child in list(self.elt):
- value_mask_pad = None
if child.tag == 'pad':
field_name = 'pad' + str(pads)
fkey = 'CARD8'
@@ -308,7 +300,6 @@ class ComplexType(Type):
fkey = 'CARD32'
type = ListType(child, module.get_type(fkey), self)
visible = True
- value_mask_pad = child.get('value-mask-pad')
else:
# Hit this on Reply
continue
@@ -320,17 +311,6 @@ class ComplexType(Type):
# Recursively resolve the type (could be another structure, list)
type.resolve(module)
- # Add a value-mask-pad if necessary
- if value_mask_pad != None:
- vmp_field_name = 'pad' + str(pads)
- vmp_fkey = 'CARD8'
- vmp_type = SizedPadType(value_mask_pad)
- pads = pads + 1
- vmp_visible = False
- vmp_field_type = module.get_type_name(vmp_fkey)
- vmp_type.make_member_of(module, self, vmp_field_type, vmp_field_name, vmp_visible, True, False)
- vmp_type.resolve(module)
-
self.calc_size() # Figure out how big we are
self.resolved = True