Update xcb-protos to 1.15.2

This commit is contained in:
matthieu
2022-07-17 08:19:03 +00:00
parent e092382511
commit e27a267170
15 changed files with 398 additions and 43 deletions

View File

@@ -1,6 +1,6 @@
SUBDIRS = src xcbgen
pkgconfigdir = $(libdir)/pkgconfig
pkgconfigdir = $(datarootdir)/pkgconfig
pkgconfig_DATA = xcb-proto.pc
EXTRA_DIST=doc xcb-proto.pc.in autogen.sh README.md

View File

@@ -3,7 +3,7 @@
AC_PREREQ(2.57)
AC_INIT([XCB Proto],
1.14.1,
1.15.2,
[xcb@lists.freedesktop.org])
AC_CONFIG_SRCDIR([xcb-proto.pc.in])
AM_INIT_AUTOMAKE([foreign dist-xz])
@@ -19,4 +19,5 @@ AM_PATH_PYTHON([2.5])
xcbincludedir='${datadir}/xcb'
AC_SUBST(xcbincludedir)
AC_OUTPUT([Makefile src/Makefile xcbgen/Makefile xcb-proto.pc])
AC_CONFIG_FILES([Makefile src/Makefile xcbgen/Makefile xcb-proto.pc])
AC_OUTPUT

View File

@@ -65,8 +65,8 @@ Top-Level Elements
This element represents a data structure. The name attribute gives the name
of the structure. The content represents the fields of the structure, and
consists of one or more of the field, pad, and list elements described in
the section "Structure Contents" below.
consists of one or more of the length, field, pad, and list elements described
in the section "Structure Contents" below.
<union name="identifier">structure contents</union>
@@ -215,6 +215,23 @@ 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.
<length>expression</length>
This element overrides the length of the data structure by specifying it
explicitly instead of it being defined by the layout of the structure.
This makes it possible to handle structures with conditional fields
(see the <switch> element) where the future revisions of protocols may
introduce new variants and old code must still properly ignore them.
The content is an expression giving the length of the data structure in terms
of other fields in the structure. See the section "Expressions" for details
on the expression representation.
The expression must not depend on conditional fields.
Additionally, the length of the data structure must be at least such that it
includes the fields that the expression depends on. Smaller length is
considered a violation of the protocol.
<fd name="identifier" />
This element represents a file descriptor field passed with the request. The

View File

@@ -1,9 +1,9 @@
#!/bin/sh
# py-compile - Compile a Python program
scriptversion=2018-03-07.03; # UTC
scriptversion=2021-02-27.01; # UTC
# Copyright (C) 2000-2018 Free Software Foundation, Inc.
# Copyright (C) 2000-2021 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
@@ -27,7 +27,7 @@ scriptversion=2018-03-07.03; # UTC
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
if [ -z "$PYTHON" ]; then
if test -z "$PYTHON"; then
PYTHON=python
fi
@@ -96,27 +96,44 @@ done
files=$*
if test -z "$files"; then
usage_error "no files given"
usage_error "no files given"
fi
# if basedir was given, then it should be prepended to filenames before
# byte compilation.
if [ -z "$basedir" ]; then
pathtrans="path = file"
if test -z "$basedir"; then
pathtrans="path = file"
else
pathtrans="path = os.path.join('$basedir', file)"
pathtrans="path = os.path.join('$basedir', file)"
fi
# if destdir was given, then it needs to be prepended to the filename to
# byte compile but not go into the compiled file.
if [ -z "$destdir" ]; then
filetrans="filepath = path"
if test -z "$destdir"; then
filetrans="filepath = path"
else
filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
fi
python_major=`$PYTHON -V 2>&1 | sed -e 's/.* //;s/\..*$//;1q'`
if test -z "$python_major"; then
echo "$me: could not determine $PYTHON major version, guessing 3" >&2
python_major=3
fi
# The old way to import libraries was deprecated.
if test "$python_major" -le 2; then
import_lib=imp
import_test="hasattr(imp, 'get_tag')"
import_call=imp.cache_from_source
else
import_lib=importlib
import_test="hasattr(sys.implementation, 'cache_tag')"
import_call=importlib.util.cache_from_source
fi
$PYTHON -c "
import sys, os, py_compile, imp
import sys, os, py_compile, $import_lib
files = '''$files'''
@@ -129,18 +146,18 @@ for file in files.split():
continue
sys.stdout.write(file)
sys.stdout.flush()
if hasattr(imp, 'get_tag'):
py_compile.compile(filepath, imp.cache_from_source(filepath), path)
if $import_test:
py_compile.compile(filepath, $import_call(filepath), path)
else:
py_compile.compile(filepath, filepath + 'c', path)
sys.stdout.write('\n')" || exit $?
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
import sys, os, py_compile, imp
import sys, os, py_compile, $import_lib
# pypy does not use .pyo optimization
if hasattr(sys, 'pypy_translation_info'):
if hasattr(sys, 'pypy_translation_info') and sys.hexversion < 0x03050000:
sys.exit(0)
files = '''$files'''
@@ -153,12 +170,35 @@ for file in files.split():
continue
sys.stdout.write(file)
sys.stdout.flush()
if hasattr(imp, 'get_tag'):
py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
if $import_test:
py_compile.compile(filepath, $import_call(filepath), path)
else:
py_compile.compile(filepath, filepath + 'o', path)
sys.stdout.write('\n')" 2>/dev/null || :
$PYTHON -OO -c "
import sys, os, py_compile, $import_lib
# python<3.5 does not have split files for -O and -OO
if sys.hexversion < 0x03050000:
sys.exit(0)
files = '''$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
sys.stdout.write(file)
sys.stdout.flush()
if $import_test:
py_compile.compile(filepath, $import_call(filepath), path)
else:
py_compile.compile(filepath, filepath + 'o', path)
sys.stdout.write('\n')" 2>/dev/null || exit $?
# Local Variables:
# mode: shell-script
# sh-indentation: 2

View File

@@ -4,6 +4,7 @@ xcbinclude_HEADERS = \
bigreq.xml \
composite.xml \
damage.xml \
dbe.xml \
dpms.xml \
dri2.xml \
dri3.xml \

152
proto/xcb-proto/src/dbe.xml Normal file
View File

@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2022 Mike Sharov <msharov@users.sourceforge.net>
This file is free software, distributed under the license in ../COPYING
-->
<xcb header="dbe" extension-xname="DOUBLE-BUFFER" extension-name="Dbe"
major-version="1" minor-version="0">
<import>xproto</import>
<!-- Types -->
<typedef oldname="DRAWABLE" newname="BackBuffer" />
<enum name="SwapAction">
<item name="Undefined"> <value>0</value></item>
<item name="Background"><value>1</value></item>
<item name="Untouched"> <value>2</value></item>
<item name="Copied"> <value>3</value></item>
<doc>
<description><![CDATA[Specifies what to do with the front buffer after it is swapped with the back buffer.]]></description>
<field name="Undefined"><![CDATA[Discard the buffer. The buffer may be reallocated and end up with random VRAM content.]]></field>
<field name="Background"><![CDATA[Erase with window background.]]></field>
<field name="Untouched"><![CDATA[Leave untouched.]]></field>
<field name="Copied"><![CDATA[Copy the newly displayed front buffer.]]></field>
</doc>
</enum>
<struct name="SwapInfo">
<field type="WINDOW" name="window" />
<field type="CARD8" name="swap_action" enum="SwapAction" />
<pad bytes="3"/>
</struct>
<struct name="BufferAttributes">
<field type="WINDOW" name="window" />
</struct>
<struct name="VisualInfo">
<field type="VISUALID" name="visual_id" />
<field type="CARD8" name="depth" />
<field type="CARD8" name="perf_level" />
<pad bytes="2"/>
</struct>
<struct name="VisualInfos">
<field type="CARD32" name="n_infos" />
<list type="VisualInfo" name="infos">
<fieldref>n_infos</fieldref>
</list>
</struct>
<!-- Errors -->
<error name="BadBuffer" number="0">
<field type="BackBuffer" name="bad_buffer" />
</error>
<!-- Requests -->
<request name="QueryVersion" opcode="0">
<field type="CARD8" name="major_version" />
<field type="CARD8" name="minor_version" />
<pad bytes="2"/>
<reply>
<pad bytes="1"/>
<field type="CARD8" name="major_version" />
<field type="CARD8" name="minor_version" />
<pad bytes="22"/>
</reply>
<doc>
<brief>Queries the version of this extension</brief>
<description><![CDATA[Queries the version of this extension. You must do this before using any functionality it provides.]]></description>
<field name="major_version"><![CDATA[The major version of the extension. Check that it is compatible with the XCB_DBE_MAJOR_VERSION that your code is compiled with.]]></field>
<field name="minor_version"><![CDATA[The minor version of the extension. Check that it is compatible with the XCB_DBE_MINOR_VERSION that your code is compiled with.]]></field>
</doc>
</request>
<request name="AllocateBackBuffer" opcode="1">
<field type="WINDOW" name="window" />
<field type="BackBuffer" name="buffer" />
<field type="CARD8" name="swap_action" />
<pad bytes="3"/>
<doc>
<brief>Allocates a back buffer</brief>
<description><![CDATA[Associates `buffer` with the back buffer of `window`. Multiple ids may be associated with the back buffer, which is created by the first allocate call and destroyed by the last deallocate.]]></description>
<field name="window"><![CDATA[The window to which to add the back buffer.]]></field>
<field name="buffer"><![CDATA[The buffer id to associate with the back buffer.]]></field>
<field name="swap_action"><![CDATA[The swap action most likely to be used to present this back buffer. This is only a hint, and does not preclude the use of other swap actions.]]></field>
</doc>
</request>
<request name="DeallocateBackBuffer" opcode="2">
<field type="BackBuffer" name="buffer" />
<doc>
<brief>Deallocates a back buffer</brief>
<description><![CDATA[Deallocates the given `buffer`. If `buffer` is an invalid id, a `BadBuffer` error is returned. Because a window may have allocated multiple back buffer ids, the back buffer itself is not deleted until all these ids are deallocated by this call.]]></description>
<field name="buffer"><![CDATA[The back buffer to deallocate.]]></field>
</doc>
</request>
<request name="SwapBuffers" opcode="3">
<field type="CARD32" name="n_actions" />
<list type="SwapInfo" name="actions">
<fieldref>n_actions</fieldref>
</list>
<doc>
<brief>Swaps front and back buffers</brief>
<description><![CDATA[ Swaps the front and back buffers on the specified windows. The front and back buffers retain their ids, so that the window id continues to refer to the front buffer, while the back buffer id created by this extension continues to refer to the back buffer. Back buffer contents is moved to the front buffer. Back buffer contents after the operation depends on the given swap action. The optimal swap action depends on how each frame is rendered. For example, if the buffer is cleared and fully overwritten on every frame, the "untouched" action, which throws away the buffer contents, would provide the best performance. To eliminate visual artifacts, the swap will occure during the monitor VSync, if the X server supports detecting it.]]></description>
<field name="n_actions"><![CDATA[Number of swap actions in `actions`.]]></field>
<field name="actions"><![CDATA[List of windows on which to swap buffers.]]></field>
</doc>
</request>
<request name="BeginIdiom" opcode="4">
<doc>
<brief>Begins a logical swap block</brief>
<description><![CDATA[ Creates a block of operations intended to occur together. This may be needed if window presentation requires changing buffers unknown to this extension, such as depth or stencil buffers.]]></description>
</doc>
</request>
<request name="EndIdiom" opcode="5">
<doc><brief>Ends a logical swap block</brief></doc>
</request>
<request name="GetVisualInfo" opcode="6">
<field type="CARD32" name="n_drawables" />
<list type="DRAWABLE" name="drawables">
<fieldref>n_drawables</fieldref>
</list>
<reply>
<pad bytes="1"/>
<field type="CARD32" name="n_supported_visuals" />
<pad bytes="20"/>
<list type="VisualInfos" name="supported_visuals">
<fieldref>n_supported_visuals</fieldref>
</list>
</reply>
<doc><brief>Requests visuals that support double buffering</brief></doc>
</request>
<request name="GetBackBufferAttributes" opcode="7">
<field type="BackBuffer" name="buffer" />
<reply>
<pad bytes="1"/>
<field type="BufferAttributes" name="attributes" />
<pad bytes="20"/>
</reply>
<doc>
<brief>Gets back buffer attributes</brief>
<description><![CDATA[Returns the attributes of the specified `buffer`.]]></description>
<field name="buffer"><![CDATA[The back buffer to query.]]></field>
<field name="attributes"><![CDATA[The attributes of `buffer`.]]></field>
</doc>
</request>
</xcb>

View File

@@ -23,7 +23,7 @@ OF THIS SOFTWARE.
-->
<xcb header="dri3" extension-xname="DRI3" extension-name="DRI3"
major-version="1" minor-version="2">
major-version="1" minor-version="3">
<import>xproto</import>
<!-- Types -->
@@ -163,4 +163,11 @@ OF THIS SOFTWARE.
</list>
</reply>
</request>
<!-- v1.3 -->
<request name="SetDRMDeviceInUse" opcode="9">
<field type="WINDOW" name="window" />
<field type="CARD32" name="drmMajor" />
<field type="CARD32" name="drmMinor" />
</request>
</xcb>

View File

@@ -491,6 +491,7 @@ The patch that fixed this server bug in X.org CVS is here:
<list type="char" name="gl_extension_string">
<fieldref>gl_str_len</fieldref>
</list>
<pad align="4" />
<list type="char" name="glx_extension_string">
<fieldref>glx_str_len</fieldref>
</list>
@@ -527,6 +528,7 @@ The patch that fixed this server bug in X.org CVS is here:
<list type="char" name="gl_extension_string">
<fieldref>gl_str_len</fieldref>
</list>
<pad align="4" />
<list type="char" name="glx_extension_string">
<fieldref>glx_str_len</fieldref>
</list>

View File

@@ -101,6 +101,13 @@ authorization from the authors.
<!-- field replaces FIELD, PARAM, and REPLY. -->
<xsd:element name="field" type="var" />
<!-- Length of data structures -->
<xsd:element name="length">
<xsd:complexType>
<xsd:group ref="expression" />
</xsd:complexType>
</xsd:element>
<!-- fd passing parameter -->
<xsd:element name="fd">
<xsd:complexType>
@@ -210,6 +217,7 @@ authorization from the authors.
<xsd:element ref="list" />
<xsd:element ref="fd" />
<xsd:element ref="required_start_align" />
<xsd:element ref="length" />
</xsd:choice>
</xsd:group>

View File

@@ -26,7 +26,7 @@ authorization from the authors.
-->
<!-- This file describes version 4 of XFixes. -->
<xcb header="xfixes" extension-xname="XFIXES" extension-name="XFixes"
major-version="5" minor-version="0">
major-version="6" minor-version="0">
<import>xproto</import>
<import>render</import>
<import>shape</import>
@@ -359,4 +359,24 @@ authorization from the authors.
<request name="DeletePointerBarrier" opcode="32">
<field type="BARRIER" name="barrier" />
</request>
<!-- Version 6 -->
<enum name="ClientDisconnectFlags">
<item name="Default"><value>0</value></item>
<item name="Terminate"><bit>0</bit></item>
</enum>
<request name="SetClientDisconnectMode" opcode="33">
<field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
</request>
<request name="GetClientDisconnectMode" opcode="34">
<reply>
<pad bytes="1" />
<field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
<pad bytes="20" />
</reply>
</request>
</xcb>

View File

@@ -33,7 +33,7 @@ authorization from the authors.
-->
<xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
major-version="2" minor-version="3">
major-version="2" minor-version="4">
<import>xfixes</import>
<import>xproto</import>
@@ -1601,6 +1601,7 @@ authorization from the authors.
<item name="Valuator"> <value>2</value> </item>
<item name="Scroll"> <value>3</value> </item>
<item name="Touch"> <value>8</value> </item>
<item name="Gesture"> <value>9</value> </item>
</enum>
<enum name="DeviceType">
@@ -1674,6 +1675,14 @@ authorization from the authors.
<field type="CARD8" name="num_touches" />
</struct>
<struct name="GestureClass">
<field type="CARD16" name="type" enum="DeviceClassType" />
<field type="CARD16" name="len" />
<field type="DeviceId" name="sourceid" />
<field type="CARD8" name="num_touches" />
<pad bytes="1" />
</struct>
<struct name="ValuatorClass">
<field type="CARD16" name="type" enum="DeviceClassType" />
<field type="CARD16" name="len" />
@@ -1689,6 +1698,12 @@ authorization from the authors.
</struct>
<struct name="DeviceClass">
<length>
<op op="*">
<fieldref>len</fieldref>
<value>4</value>
</op>
</length>
<field type="CARD16" name="type" enum="DeviceClassType" />
<field type="CARD16" name="len" />
<field type="DeviceId" name="sourceid" />
@@ -1746,6 +1761,11 @@ authorization from the authors.
<field type="CARD8" name="mode" enum="TouchMode" />
<field type="CARD8" name="num_touches" />
</case>
<case name="gesture">
<enumref ref="DeviceClassType">Gesture</enumref>
<field type="CARD8" name="num_touches" />
<pad bytes="1" />
</case>
</switch>
</struct>
@@ -1866,11 +1886,13 @@ authorization from the authors.
</enum>
<enum name="GrabType">
<item name="Button"> <value>0</value> </item>
<item name="Keycode"> <value>1</value> </item>
<item name="Enter"> <value>2</value> </item>
<item name="FocusIn"> <value>3</value> </item>
<item name="TouchBegin"> <value>4</value> </item>
<item name="Button"> <value>0</value> </item>
<item name="Keycode"> <value>1</value> </item>
<item name="Enter"> <value>2</value> </item>
<item name="FocusIn"> <value>3</value> </item>
<item name="TouchBegin"> <value>4</value> </item>
<item name="GesturePinchBegin"> <value>5</value> </item>
<item name="GestureSwipeBegin"> <value>6</value> </item>
</enum>
<enum name="ModifierMask">
@@ -2604,6 +2626,72 @@ authorization from the authors.
<eventcopy name="BarrierLeave" number="26" ref="BarrierHit" />
<!-- ⋅⋅⋅ Events (v2.4) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
<enum name="GesturePinchEventFlags">
<item name="GesturePinchCancelled"> <bit>0</bit> </item>
</enum>
<event name="GesturePinchBegin" number="27" xge="true">
<field type="DeviceId" name="deviceid" altenum="Device" />
<field type="TIMESTAMP" name="time" altenum="Time" />
<!-- event specific fields -->
<field type="CARD32" name="detail" />
<field type="WINDOW" name="root" />
<field type="WINDOW" name="event" />
<field type="WINDOW" name="child" />
<!-- 32 byte boundary -->
<field type="FP1616" name="root_x" />
<field type="FP1616" name="root_y" />
<field type="FP1616" name="event_x" />
<field type="FP1616" name="event_y" />
<field type="FP1616" name="delta_x" />
<field type="FP1616" name="delta_y" />
<field type="FP1616" name="delta_unaccel_x" />
<field type="FP1616" name="delta_unaccel_y" />
<field type="FP1616" name="scale" />
<field type="FP1616" name="delta_angle" />
<field type="DeviceId" name="sourceid" altenum="Device" />
<pad bytes="2" />
<field type="ModifierInfo" name="mods" />
<field type="GroupInfo" name="group" />
<field type="CARD32" name="flags" mask="GesturePinchEventFlags" />
</event>
<eventcopy name="GesturePinchUpdate" number="28" ref="GesturePinchBegin" />
<eventcopy name="GesturePinchEnd" number="29" ref="GesturePinchBegin" />
<enum name="GestureSwipeEventFlags">
<item name="GestureSwipeCancelled"> <bit>0</bit> </item>
</enum>
<event name="GestureSwipeBegin" number="30" xge="true">
<field type="DeviceId" name="deviceid" altenum="Device" />
<field type="TIMESTAMP" name="time" altenum="Time" />
<!-- event specific fields -->
<field type="CARD32" name="detail" />
<field type="WINDOW" name="root" />
<field type="WINDOW" name="event" />
<field type="WINDOW" name="child" />
<!-- 32 byte boundary -->
<field type="FP1616" name="root_x" />
<field type="FP1616" name="root_y" />
<field type="FP1616" name="event_x" />
<field type="FP1616" name="event_y" />
<field type="FP1616" name="delta_x" />
<field type="FP1616" name="delta_y" />
<field type="FP1616" name="delta_unaccel_x" />
<field type="FP1616" name="delta_unaccel_y" />
<field type="DeviceId" name="sourceid" altenum="Device" />
<pad bytes="2" />
<field type="ModifierInfo" name="mods" />
<field type="GroupInfo" name="group" />
<field type="CARD32" name="flags" mask="GestureSwipeEventFlags" />
</event>
<eventcopy name="GestureSwipeUpdate" number="31" ref="GestureSwipeBegin" />
<eventcopy name="GestureSwipeEnd" number="32" ref="GestureSwipeBegin" />
<!-- ⋅⋅⋅ Requests that depend on events ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
<!-- SendExtensionEvent -->

View File

@@ -102,7 +102,7 @@ authorization from the authors.
<list type="STRING8" name="printer_name">
<fieldref>printerNameLen</fieldref>
</list>
<!-- There's some padding in here... -->
<pad align="4" />
<list type="STRING8" name="locale">
<fieldref>localeLen</fieldref>
</list>
@@ -125,7 +125,7 @@ authorization from the authors.
<list type="STRING8" name="printerName">
<fieldref>printerNameLen</fieldref>
</list>
<!-- padding -->
<pad align="4" />
<list type="STRING8" name="locale">
<fieldref>localeLen</fieldref>
</list>
@@ -177,11 +177,11 @@ authorization from the authors.
<list type="BYTE" name="data">
<fieldref>len_data</fieldref>
</list>
<!-- padding -->
<pad align="4" />
<list type="STRING8" name="doc_format">
<fieldref>len_fmt</fieldref>
</list>
<!-- padding -->
<pad align="4" />
<list type="STRING8" name="options">
<fieldref>len_options</fieldref>
</list>

View File

@@ -2981,25 +2981,21 @@ results (no grabs are established) if there is a conflicting grab for any combin
]]></description>
<field name="owner_events"><![CDATA[
If 1, the `grab_window` will still get the pointer events. If 0, events are not
If 1, the `grab_window` will still get the key events. If 0, events are not
reported to the `grab_window`.
]]></field>
<field name="grab_window"><![CDATA[
Specifies the window on which the pointer should be grabbed.
Specifies the window on which the key should be grabbed.
]]></field>
<field name="key"><![CDATA[
The keycode of the key to grab.
The special value `XCB_GRAB_ANY` means grab any key.
]]></field>
<field name="cursor"><![CDATA[
Specifies the cursor that should be displayed or `XCB_NONE` to not change the
cursor.
]]></field>
<field name="modifiers"><![CDATA[
The modifiers to grab.
Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all
Using the special value `XCB_MOD_MASK_ANY` means grab the key with all
possible modifier combinations.
]]></field>
<!-- the enum doc is sufficient. -->
@@ -3010,7 +3006,8 @@ Another client has already issued a GrabKey with the same button/key
combination on the same window.
]]></error>
<error type="Value"><![CDATA[
TODO: reasons?
The key is not `XCB_GRAB_ANY` and not in the range specified by `min_keycode`
and `max_keycode` in the connection setup.
]]></error>
<error type="Window"><![CDATA[
The specified `window` does not exist.

View File

@@ -2,8 +2,8 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
datadir=@datadir@
libdir=@libdir@
xcbincludedir=${pc_sysrootdir}@xcbincludedir@
PYTHON_PREFIX=@PYTHON_PREFIX@
pythondir=${pc_sysrootdir}@pythondir@
Name: XCB Proto

View File

@@ -1,8 +1,15 @@
'''
This module contains the classes which represent XCB data types.
'''
import sys
from xcbgen.expr import Field, Expression
from xcbgen.align import Alignment, AlignmentLog
if sys.version_info[:2] >= (3, 3):
from xml.etree.ElementTree import SubElement
else:
from xml.etree.cElementTree import SubElement
import __main__
verbose_align_log = False
@@ -503,6 +510,8 @@ class ComplexType(Type):
Public fields added:
fields is an array of Field objects describing the structure fields.
length_expr is an expression that defines the length of the structure.
'''
def __init__(self, name, elt):
Type.__init__(self, name)
@@ -512,6 +521,7 @@ class ComplexType(Type):
self.nmemb = 1
self.size = 0
self.lenfield_parent = [self]
self.length_expr = None
# get required_start_alignment
required_start_align_element = elt.find("required_start_align")
@@ -573,6 +583,9 @@ class ComplexType(Type):
type = module.get_type('INT32')
type.make_fd_of(module, self, fd_name)
continue
elif child.tag == 'length':
self.length_expr = Expression(list(child)[0], self)
continue
else:
# Hit this on Reply
continue
@@ -1346,6 +1359,15 @@ class Error(ComplexType):
if self.required_start_align is None:
self.required_start_align = Alignment(4,0)
# All errors are basically the same, but they still got different XML
# for historic reasons. This 'invents' the missing parts.
if len(self.elt) < 1:
SubElement(self.elt, "field", type="CARD32", name="bad_value")
if len(self.elt) < 2:
SubElement(self.elt, "field", type="CARD16", name="minor_opcode")
if len(self.elt) < 3:
SubElement(self.elt, "field", type="CARD8", name="major_opcode")
def add_opcode(self, opcode, name, main):
self.opcodes[name] = opcode
if main: