Update to xcb-proto 1.10

This commit is contained in:
matthieu 2014-03-15 17:24:19 +00:00
parent 73bad93705
commit f688780824
35 changed files with 6799 additions and 1387 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.5 2012/03/27 19:12:47 matthieu Exp $
# $OpenBSD: Makefile,v 1.6 2014/03/15 17:24:19 matthieu Exp $
PKGCONFIG= xcb-proto.pc
@ -10,7 +10,10 @@ FILES= \
damage.xml \
dpms.xml \
dri2.xml \
dri3.xml \
ge.xml \
glx.xml \
present.xml \
randr.xml \
record.xml \
render.xml \
@ -23,6 +26,7 @@ FILES= \
xevie.xml \
xkb.xml \
xf86dri.xml \
xf86vidmode.xml \
xfixes.xml \
xinerama.xml \
xinput.xml \

View File

@ -3,4 +3,4 @@ SUBDIRS = src xcbgen
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xcb-proto.pc
EXTRA_DIST=doc xcb-proto.pc.in
EXTRA_DIST=doc xcb-proto.pc.in autogen.sh

View File

@ -1,3 +1,76 @@
Release 1.10 (2013-12-22)
=========================
* xkb: comment out portions that libxcb doesn't handle properly
* Present: Remove reference to nonexistent enum
* sync: Add missing namespace for the INT64 struct
* sync: VALUETYPE and TESTTYPE are enum
* xinput: Add XI2 event enum. for event selection
* Rename ge events to GeGeneric events to avoid clash with libxcb
Release 1.9 (2013-11-07)
========================
* Add Present protocol specification
* Add DRI3
* Add MIT-SHM AttachFd and CreateSegment requests
* Add support for file descriptor request fields
* Define X generic event structure
* Add CARD64/INT64 protocol types
* XKB: Rewrite AXOption
* XKB: Fix values of AXFBOpt enum
* xkb: Fix struct ExtensionDeviceNotify
* xkb: Pad structs CommonDoodad and SALockDeviceBtn
* randr: Fix GetProviderProperty reply
* Enforce a bit or value in enum items
* xkb: Add missing LedClass and BellClass enum values
* xkb: Add missing 'supported' field to GetNamedIndicator reply
* xkb: Unify Overlay1Behavior and Overlay2Behavior
* xkb: Change DfltBtnAbsolute to the value used by the server
* xkb: Fix key type map entry field order
* xkb: Work around alignment problems in GetNames and GetMap replies
* xinput: Use BARRIER from xfixes
* xinput: Unlock uninterpreted lists
* xinput: Add XI v2.3
* xinput: Add XI v2.2
* xinput: Add XI v2.1
* xinput: Add XI v2.0
* xinput: Add XI v1.5
* xinput: Cleanup implementation of XI up to v1.4
* Add support for X Generic Extension events
* sync: Change value list param of CreateAlarm and ChangeAlarm into switch
* res: Add ClientIdMask enum
* res: Fix and rename list in ClientIdValue
* randr: Add provider object support (RandR v1.4)
* xtest: Version bump 2.1..2.2
* glx: Version bump 1.3..1.4
* composite: Version bump 0.3..0.4
* xfixes: Rename enum DirectionMask to BarrierDirec.
* XKB: Correct enum to mask
* screensaver: Use enum and mask attributes
* screensaver: Remove wrong fields from Notify event
* Prototype for XRes v1.2
* XKB: Fix calculation in GetIndicatorMap
* XKB: Fix GetKbdByName
* Allow multiple <enumref> in a <bitcase>
* XKB: Change CARD8 to char where ASCII is expected
* XKB: Fix VirtualMods
* XKB: Fix SymInterpret
* XKB: Fix CountedString16 padding
* xkb: Revert half of d42d791 XKB: Fix broken events
* xfixes: Update to version 5
* autogen.sh: Implement GNOME Build API
Release 1.8 (2012-10-05)
========================
* dri2: Update to DRI2 1.4
* XKB: Fix broken events
* xproto: add doc tags, xcbgen: handle doc tags
Release 1.7.1 (2012-03-23)
==========================
* Add ge and xf86vidmode protocol descriptions
* Remove now unnecessary files as everything is implemented in xcbgen
* Rename the ExprType "parent" attribute to "parents"
Release 1.7 (2012-01-11)
========================
* Add missing padding bytes to ChangeKeyboardMapping request

View File

@ -0,0 +1,14 @@
#! /bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
if test -z "$NOCONFIGURE"; then
$srcdir/configure "$@"
fi

View File

@ -3,7 +3,7 @@
AC_PREREQ(2.57)
AC_INIT([XCB Proto],
1.7,
1.10,
[xcb@lists.freedesktop.org])
AC_CONFIG_SRCDIR([xcb-proto.pc.in])
AM_INIT_AUTOMAKE([foreign dist-bzip2])

View File

@ -128,7 +128,8 @@ Top-Level Elements
requests of the same type may be combined into a single request without
affecting the semantics of the requests.
<event name="identifier" number="integer" [no-sequence-number="true"]>
<event name="identifier" number="integer"
[[no-sequence-number="true"] | [xge="true"]]>
structure contents
</event>
@ -142,6 +143,11 @@ Top-Level Elements
include a sequence number. This is a special-case for the KeymapNotify
event in the core protocol, and should not be used in any other event.
If the optional xge attribute is true, the event is an X Generic Event and
will be treated as such.
The no-sequence-number and xge attribute can not be combined.
<error name="identifier" number="integer">
structure contents
</error>
@ -229,13 +235,18 @@ enum; the value is restricted to one of the constants named in the enum.
<switch> instead for new protocol definitions.
<switch name="identifier"> switch expression
<bitcase> bitcase expression, fields </bitcase> </switch>
<bitcase> bitcase expression(s), fields </bitcase> </switch>
This element represents conditional inclusion of fields. It can be viewed
as sequence of multiple ifs: if ( switch expression & bitcase expression )
is equal to bitcase expression, bitcase fields are included in structure.
It can be used only as the last field of structure. New protocol definitions
should prefer to use this instead of <valueparam>.
is non-zero, bitcase fields are included in structure. It can be used only
as the last field of a structure.
When a bitcase includes multiple <enumref> clauses, the contents of the
bitcase are only present once regardless of the number of bitcase expressions
that match.
New protocol definitions should prefer to use this instead of <valueparam>.
Expressions
-----------
@ -284,3 +295,38 @@ Expressions
This element represents the number of bits set in the expression.
Documentation
-------------
Documentation for each request, reply or event is stored in the appropriate
element using a <doc> element. The <doc> element can contain the following
elements:
<brief>brief description</brief>
A short description of the request, reply or event. For example "makes a
window visible" for MapWindow. This will end up in the manpage NAME section
and in the doxygen @brief description.
<description><![CDATA[longer description]]></description>
The full description. Use `` to highlight words, such as "Draws
`points_len`-1 lines between each pair of points…"
<example><![CDATA[example code]]</description>
Example C code illustrating the usage of the particular request, reply or
event.
<field name="name">field description</field>
The full description for the specified field. Depending on the context, this
is either a request parameter or a reply/event datastructure field.
<error type="type">error description</field>
The full description for an error which can occur due to this request.
<see type="request" name="name" />
A reference to another relevant program, function, request or event.

View File

@ -1,10 +1,9 @@
#!/bin/sh
# py-compile - Compile a Python program
scriptversion=2009-04-28.21; # UTC
scriptversion=2011-06-08.12; # UTC
# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software
# Foundation, Inc.
# Copyright (C) 2000-2013 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
@ -32,28 +31,36 @@ if [ -z "$PYTHON" ]; then
PYTHON=python
fi
me=py-compile
usage_error ()
{
echo "$me: $*" >&2
echo "Try '$me --help' for more information." >&2
exit 1
}
basedir=
destdir=
files=
while test $# -ne 0; do
case "$1" in
--basedir)
basedir=$2
if test -z "$basedir"; then
echo "$0: Missing argument to --basedir." 1>&2
exit 1
if test $# -lt 2; then
usage_error "option '--basedir' requires an argument"
else
basedir=$2
fi
shift
;;
--destdir)
destdir=$2
if test -z "$destdir"; then
echo "$0: Missing argument to --destdir." 1>&2
exit 1
if test $# -lt 2; then
usage_error "option '--destdir' requires an argument"
else
destdir=$2
fi
shift
;;
-h|--h*)
-h|--help)
cat <<\EOF
Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
@ -69,20 +76,27 @@ Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v|--v*)
echo "py-compile $scriptversion"
-v|--version)
echo "$me $scriptversion"
exit $?
;;
--)
shift
break
;;
-*)
usage_error "unrecognized option '$1'"
;;
*)
files="$files $1"
break
;;
esac
shift
done
files=$*
if test -z "$files"; then
echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
exit 1
usage_error "no files given"
fi
# if basedir was given, then it should be prepended to filenames before
@ -102,7 +116,7 @@ else
fi
$PYTHON -c "
import sys, os, py_compile
import sys, os, py_compile, imp
files = '''$files'''
@ -115,12 +129,19 @@ for file in files.split():
continue
sys.stdout.write(file)
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'c', path)
if hasattr(imp, 'get_tag'):
py_compile.compile(filepath, imp.cache_from_source(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
import sys, os, py_compile, imp
# pypy does not use .pyo optimization
if hasattr(sys, 'pypy_translation_info'):
sys.exit(0)
files = '''$files'''
sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
@ -132,7 +153,10 @@ for file in files.split():
continue
sys.stdout.write(file)
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'o', path)
if hasattr(imp, 'get_tag'):
py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
else:
py_compile.compile(filepath, filepath + 'o', path)
sys.stdout.write('\n')" 2>/dev/null || :
# Local Variables:

View File

@ -6,7 +6,10 @@ xcbinclude_HEADERS = \
damage.xml \
dpms.xml \
dri2.xml \
dri3.xml \
ge.xml \
glx.xml \
present.xml \
randr.xml \
record.xml \
render.xml \
@ -18,6 +21,7 @@ xcbinclude_HEADERS = \
xc_misc.xml \
xevie.xml \
xf86dri.xml \
xf86vidmode.xml \
xfixes.xml \
xinerama.xml \
xinput.xml \

View File

@ -26,14 +26,14 @@ authorization from the authors.
-->
<!-- This file describes version 0.3 of COMPOSITE. -->
<xcb header="composite" extension-xname="Composite" extension-name="Composite"
major-version="0" minor-version="3">
major-version="0" minor-version="4">
<import>xproto</import>
<import>xfixes</import>
<enum name="Redirect">
<item name="Automatic" />
<item name="Manual" />
<item name="Automatic"> <value>0</value> </item>
<item name="Manual"> <value>1</value> </item>
</enum>
<request name="QueryVersion" opcode="0">

View File

@ -35,10 +35,10 @@ authorization from the authors.
<xidtype name="DAMAGE" />
<enum name="ReportLevel">
<item name="RawRectangles" />
<item name="DeltaRectangles" />
<item name="BoundingBox" />
<item name="NonEmpty" />
<item name="RawRectangles"> <value>0</value> </item>
<item name="DeltaRectangles"> <value>1</value> </item>
<item name="BoundingBox"> <value>2</value> </item>
<item name="NonEmpty"> <value>3</value> </item>
</enum>
<error name="BadDamage" number="0" />

View File

@ -66,10 +66,10 @@ authorization from the authors.
<request name="Disable" opcode="5" />
<enum name="DPMSMode">
<item name="On" />
<item name="Standby" />
<item name="Suspend" />
<item name="Off" />
<item name="On"> <value>0</value> </item>
<item name="Standby"> <value>1</value> </item>
<item name="Suspend"> <value>2</value> </item>
<item name="Off"> <value>3</value> </item>
</enum>
<request name="ForceLevel" opcode="6">

View File

@ -28,26 +28,26 @@ authorization from the authors.
-->
<xcb header="dri2" extension-xname="DRI2" extension-name="DRI2"
major-version="1" minor-version="3">
major-version="1" minor-version="4">
<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" />
<item name="BufferHiz" />
<item name="BufferFrontLeft"> <value>0</value> </item>
<item name="BufferBackLeft"> <value>1</value> </item>
<item name="BufferFrontRight"> <value>2</value> </item>
<item name="BufferBackRight"> <value>3</value> </item>
<item name="BufferDepth"> <value>4</value> </item>
<item name="BufferStencil"> <value>5</value> </item>
<item name="BufferAccum"> <value>6</value> </item>
<item name="BufferFakeFrontLeft"> <value>7</value> </item>
<item name="BufferFakeFrontRight"> <value>8</value> </item>
<item name="BufferDepthStencil"> <value>9</value> </item>
<item name="BufferHiz"> <value>10</value> </item>
</enum>
<enum name="DriverType">
<item name="DRI" />
<item name="VDPAU" />
<item name="DRI"> <value>0</value> </item>
<item name="VDPAU"> <value>1</value> </item>
</enum>
<enum name="EventType">
@ -241,6 +241,18 @@ authorization from the authors.
<field type="CARD32" name="interval" />
</request>
<!-- Version 1.4 -->
<request name="GetParam" opcode="13">
<field type="DRAWABLE" name="drawable" />
<field type="CARD32" name="param" />
<reply>
<field type="BOOL" name="is_param_recognized" />
<field type="CARD32" name="value_hi" />
<field type="CARD32" name="value_lo" />
</reply>
</request>
<!-- Events -->
<event name="BufferSwapComplete" number="0">

View File

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright © 2013 Keith Packard
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation, and
that the name of the copyright holders not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no representations
about the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS SOFTWARE.
-->
<xcb header="dri3" extension-xname="DRI3" extension-name="DRI3"
major-version="1" minor-version="0">
<import>xproto</import>
<!-- Types -->
<!-- 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="Open" opcode="1">
<field type="DRAWABLE" name="drawable" />
<field type="CARD32" name="provider" />
<reply>
<field type="CARD8" name="nfd"/>
<fd name="device_fd" />
<pad bytes="24" />
</reply>
</request>
<request name="PixmapFromBuffer" opcode="2">
<field type="PIXMAP" name="pixmap" />
<field type="DRAWABLE" name="drawable" />
<field type="CARD32" name="size" />
<field type="CARD16" name="width" />
<field type="CARD16" name="height" />
<field type="CARD16" name="stride" />
<field type="CARD8" name="depth" />
<field type="CARD8" name="bpp" />
<fd name="pixmap_fd" />
</request>
<request name="BufferFromPixmap" opcode="3">
<field type="PIXMAP" name="pixmap" />
<reply>
<field type="CARD8" name="nfd"/>
<field type="CARD32" name="size" />
<field type="CARD16" name="width" />
<field type="CARD16" name="height" />
<field type="CARD16" name="stride" />
<field type="CARD8" name="depth" />
<field type="CARD8" name="bpp" />
<fd name="pixmap_fd" />
<pad bytes="12"/>
</reply>
</request>
<request name="FenceFromFD" opcode="4">
<field type="DRAWABLE" name="drawable" />
<field type="CARD32" name="fence"/>
<field type="BOOL" name="initially_triggered"/>
<pad bytes="3"/>
<fd name="fence_fd"/>
</request>
<request name="FDFromFence" opcode="5">
<field type="DRAWABLE" name="drawable" />
<field type="CARD32" name="fence"/>
<reply>
<field type="CARD8" name="nfd"/>
<fd name="fence_fd" />
<pad bytes="24"/>
</reply>
</request>
</xcb>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2009 Open Text 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="ge" extension-xname="Generic Event Extension" extension-name="GenericEvent"
major-version="1" minor-version="0">
<!-- Version 1 -->
<request name="QueryVersion" opcode="0">
<field type="CARD16" name="client_major_version" />
<field type="CARD16" name="client_minor_version" />
<reply>
<pad bytes="1" />
<field type="CARD16" name="major_version" />
<field type="CARD16" name="minor_version" />
<pad bytes="20" />
</reply>
</request>
</xcb>

View File

@ -45,8 +45,7 @@ The patch that fixed this server bug in X.org CVS is here:
-->
<xcb header="glx" extension-xname="GLX" extension-name="Glx"
major-version="1" minor-version="3">
<!-- target support: 1.3 -->
major-version="1" minor-version="4">
<import>xproto</import>
@ -107,6 +106,18 @@ The patch that fixed this server bug in X.org CVS is here:
<pad bytes="4" />
</event>
<event name="BufferSwapComplete" number="1">
<pad bytes="1" />
<field type="CARD16" name="event_type" />
<pad bytes="2" />
<field type="glx:DRAWABLE" name="drawable" />
<field type="CARD32" name="ust_hi" />
<field type="CARD32" name="ust_lo" />
<field type="CARD32" name="msc_hi" />
<field type="CARD32" name="msc_lo" />
<field type="CARD32" name="sbc" />
</event>
<!-- enums for PbufferClobber event/draw type -->
<enum name="PBCET">
<item name="Damaged">

View File

@ -0,0 +1,205 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright © 2013 Keith Packard
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation, and
that the name of the copyright holders not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no representations
about the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS SOFTWARE.
-->
<xcb header="present" extension-xname="Present" extension-name="Present"
major-version="1" minor-version="0">
<import>xproto</import>
<import>randr</import>
<import>xfixes</import>
<import>sync</import>
<!-- Types -->
<enum name="Event">
<item name="ConfigureNotify"><value>0</value></item>
<item name="CompleteNotify"><value>1</value></item>
<item name="IdleNotify"><value>2</value></item>
<item name="RedirectNotify"><value>3</value></item>
</enum>
<enum name="EventMask">
<item name="NoEvent"><value>0</value></item>
<item name="ConfigureNotify"><bit>0</bit></item>
<item name="CompleteNotify"><bit>1</bit></item>
<item name="IdleNotify"><bit>2</bit></item>
<item name="RedirectNotify"><bit>3</bit></item>
</enum>
<enum name="Option">
<item name="None"><value>0</value></item>
<item name="Async"><bit>0</bit></item>
<item name="Copy"><bit>1</bit></item>
<item name="UST"><bit>2</bit></item>
</enum>
<enum name="Capability">
<item name="None"><value>0</value></item>
<item name="Async"><bit>0</bit></item>
<item name="Fence"><bit>1</bit></item>
<item name="UST"><bit>2</bit></item>
</enum>
<enum name="CompleteKind">
<item name="Pixmap"><value>0</value></item>
<item name="NotifyMSC"><value>1</value></item>
</enum>
<enum name="CompleteMode">
<item name="Copy"><value>0</value></item>
<item name="Flip"><value>1</value></item>
<item name="Skip"><value>2</value></item>
</enum>
<struct name="Notify">
<field type="WINDOW" name="window" />
<field type="CARD32" name="serial" />
</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="Pixmap" opcode="1">
<field type="WINDOW" name="window" />
<field type="PIXMAP" name="pixmap" />
<field type="CARD32" name="serial" />
<field type="REGION" name="valid" />
<field type="REGION" name="update" />
<field type="INT16" name="x_off" />
<field type="INT16" name="y_off" />
<field type="CRTC" name="target_crtc" />
<field type="FENCE" name="wait_fence" />
<field type="FENCE" name="idle_fence" />
<field type="CARD32" name="options" />
<pad bytes="4"/>
<field type="CARD64" name="target_msc" />
<field type="CARD64" name="divisor" />
<field type="CARD64" name="remainder" />
<list type="Notify" name="notifies"/>
</request>
<request name="NotifyMSC" opcode="2">
<field type="WINDOW" name="window" />
<field type="CARD32" name="serial" />
<pad bytes="4"/>
<field type="CARD64" name="target_msc" />
<field type="CARD64" name="divisor" />
<field type="CARD64" name="remainder" />
</request>
<xidtype name="EVENT"/>
<request name="SelectInput" opcode="3">
<field type="EVENT" name="eid"/>
<field type="WINDOW" name="window" />
<field type="CARD32" name="event_mask" mask="EventMask" />
</request>
<request name="QueryCapabilities" opcode="4">
<field type="CARD32" name="target" />
<reply>
<pad bytes="1" />
<field type="CARD32" name="capabilities" />
</reply>
</request>
<!-- Events -->
<event name="Generic" number="0">
<field type="CARD8" name="extension" />
<field type="CARD32" name="length" />
<field type="CARD16" name="evtype" />
<pad bytes="2" />
<field type="EVENT" name="event" />
</event>
<event name="ConfigureNotify" number="0" xge="true">
<pad bytes="2" />
<field type="EVENT" name="event" />
<field type="WINDOW" name="window" />
<field type="INT16" name="x" />
<field type="INT16" name="y" />
<field type="CARD16" name="width" />
<field type="CARD16" name="height" />
<field type="INT16" name="off_x" />
<field type="INT16" name="off_y" />
<field type="CARD16" name="pixmap_width" />
<field type="CARD16" name="pixmap_height" />
<field type="CARD32" name="pixmap_flags" />
</event>
<event name="CompleteNotify" number="1" xge="true">
<field type="CARD8" name="kind" enum="CompleteKind" />
<field type="CARD8" name="mode" enum="CompleteMode" />
<field type="EVENT" name="event" />
<field type="WINDOW" name="window" />
<field type="CARD32" name="serial" />
<field type="CARD64" name="ust" />
<field type="CARD64" name="msc" />
</event>
<event name="IdleNotify" number="2" xge="true">
<pad bytes="2"/>
<field type="EVENT" name="event" />
<field type="WINDOW" name="window" />
<field type="CARD32" name="serial" />
<field type="PIXMAP" name="pixmap" />
<field type="FENCE" name="idle_fence" />
</event>
<event name="RedirectNotify" number="3" xge="true">
<field type="BOOL" name="update_window"/>
<pad bytes="1"/>
<field type="EVENT" name="event" />
<field type="WINDOW" name="event_window" />
<field type="WINDOW" name="window" />
<field type="PIXMAP" name="pixmap" />
<field type="CARD32" name="serial" />
<field type="REGION" name="valid_region" />
<field type="REGION" name="update_region" />
<field type="RECTANGLE" name="valid_rect" />
<field type="RECTANGLE" name="update_rect" />
<field type="INT16" name="x_off" />
<field type="INT16" name="y_off" />
<field type="CRTC" name="target_crtc" />
<field type="FENCE" name="wait_fence" />
<field type="FENCE" name="idle_fence" />
<field type="CARD32" name="options" />
<pad bytes="4"/>
<field type="CARD64" name="target_msc" />
<field type="CARD64" name="divisor" />
<field type="CARD64" name="remainder" />
<list type="Notify" name="notifies"/>
</event>
</xcb>

View File

@ -27,7 +27,7 @@ authorization from the authors.
-->
<xcb header="randr" extension-xname="RANDR" extension-name="RandR"
major-version="1" minor-version="3">
major-version="1" minor-version="4">
<import>xproto</import>
<import>render</import>
@ -36,12 +36,14 @@ authorization from the authors.
<xidtype name="MODE" />
<xidtype name="CRTC" />
<xidtype name="OUTPUT" />
<xidtype name="PROVIDER" />
<!-- Errors -->
<error name="BadOutput" number="0" />
<error name="BadCrtc" number="1" />
<error name="BadMode" number="2" />
<error name="BadOutput" number="0" />
<error name="BadCrtc" number="1" />
<error name="BadMode" number="2" />
<error name="BadProvider" number="3" />
<!-- Requests -->
@ -113,11 +115,15 @@ authorization from the authors.
<!-- opcode 3 is obsolete -->
<enum name="NotifyMask" >
<item name="ScreenChange"> <bit>0</bit></item>
<!-- new in 1.2 -->
<item name="CrtcChange"> <bit>1</bit></item>
<item name="OutputChange"> <bit>2</bit></item>
<item name="OutputProperty"><bit>3</bit></item>
<item name="ScreenChange"> <bit>0</bit></item>
<!-- New in version 1.2 -->
<item name="CrtcChange"> <bit>1</bit></item>
<item name="OutputChange"> <bit>2</bit></item>
<item name="OutputProperty"> <bit>3</bit></item>
<!-- New in version 1.4 -->
<item name="ProviderChange"> <bit>4</bit></item>
<item name="ProviderProperty"><bit>5</bit></item>
<item name="ResourceChange"> <bit>6</bit></item>
</enum>
<request name="SelectInput" opcode="4">
@ -242,9 +248,9 @@ authorization from the authors.
<!-- for GetOutputInfo.connection -->
<enum name="Connection">
<item name="Connected" />
<item name="Disconnected" />
<item name="Unknown" />
<item name="Connected"> <value>0</value> </item>
<item name="Disconnected"> <value>1</value> </item>
<item name="Unknown"> <value>2</value> </item>
</enum>
<request name="GetOutputInfo" opcode="9">
@ -506,6 +512,14 @@ authorization from the authors.
</reply>
</request>
<enum name="Transform">
<!-- Introduced in version 1.3, but not referenced. -->
<item name="Unit"> <bit>0</bit></item>
<item name="ScaleUp"> <bit>1</bit></item>
<item name="ScaleDown"> <bit>2</bit></item>
<item name="Projective"> <bit>3</bit></item>
</enum>
<request name="SetCrtcTransform" opcode="26">
<field type="CRTC" name="crtc" />
<field type="TRANSFORM" name="transform" />
@ -599,6 +613,162 @@ authorization from the authors.
</reply>
</request>
<!-- New in version 1.4 -->
<request name="GetProviders" opcode="32">
<field type="WINDOW" name="window" />
<reply>
<pad bytes="1" />
<field type="TIMESTAMP" name="timestamp" />
<field type="CARD16" name="num_providers" />
<pad bytes="18" />
<list type="PROVIDER" name="providers">
<fieldref>num_providers</fieldref>
</list>
</reply>
</request>
<enum name="ProviderCapability">
<item name="SourceOutput"> <bit>0</bit></item>
<item name="SinkOutput"> <bit>1</bit></item>
<item name="SourceOffload"> <bit>2</bit></item>
<item name="SinkOffload"> <bit>3</bit></item>
</enum>
<request name="GetProviderInfo" opcode="33">
<field type="PROVIDER" name="provider" />
<field type="TIMESTAMP" name="config_timestamp" />
<reply>
<field type="CARD8" name="status" />
<field type="TIMESTAMP" name="timestamp" />
<field type="CARD32" name="capabilities" mask="ProviderCapability" />
<field type="CARD16" name="num_crtcs" />
<field type="CARD16" name="num_outputs" />
<field type="CARD16" name="num_associated_providers" />
<field type="CARD16" name="name_len" />
<pad bytes="8" />
<list type="CRTC" name="crtcs">
<fieldref>num_crtcs</fieldref>
</list>
<list type="OUTPUT" name="outputs">
<fieldref>num_outputs</fieldref>
</list>
<list type="PROVIDER" name="associated_providers">
<fieldref>num_associated_providers</fieldref>
</list>
<list type="CARD32" name="associated_capability">
<fieldref>num_associated_providers</fieldref>
</list>
<list type="char" name="name">
<fieldref>name_len</fieldref>
</list>
<!-- XXX: Prepared for the future. Until xcbgen supports
the align attribute in <pad>, we ignore the
trailing pad bytes here.
<pad align="4" />
-->
</reply>
</request>
<request name="SetProviderOffloadSink" opcode="34">
<field type="PROVIDER" name="provider" />
<field type="PROVIDER" name="sink_provider" />
<field type="TIMESTAMP" name="config_timestamp" />
</request>
<request name="SetProviderOutputSource" opcode="35">
<field type="PROVIDER" name="provider" />
<field type="PROVIDER" name="source_provider" />
<field type="TIMESTAMP" name="config_timestamp" />
</request>
<request name="ListProviderProperties" opcode="36">
<field type="PROVIDER" name="provider" />
<reply>
<pad bytes="1" />
<field type="CARD16" name="num_atoms" />
<pad bytes="22" />
<list type="ATOM" name="atoms">
<fieldref>num_atoms</fieldref>
</list>
</reply>
</request>
<request name="QueryProviderProperty" opcode="37">
<field type="PROVIDER" name="provider" />
<field type="ATOM" name="property" />
<reply>
<pad bytes="1" />
<field type="BOOL" name="pending" />
<field type="BOOL" name="range" />
<field type="BOOL" name="immutable" />
<pad bytes="21" />
<list type="INT32" name="valid_values">
<fieldref>length</fieldref>
</list>
</reply>
</request>
<request name="ConfigureProviderProperty" opcode="38">
<field type="PROVIDER" name="provider" />
<field type="ATOM" name="property" />
<field type="BOOL" name="pending" />
<field type="BOOL" name="range" />
<pad bytes="2" />
<list type="INT32" name="values" />
</request>
<request name="ChangeProviderProperty" opcode="39">
<field type="PROVIDER" name="provider" />
<field type="ATOM" name="property" />
<field type="ATOM" name="type" />
<field type="CARD8" name="format" />
<field type="CARD8" name="mode" />
<pad bytes="2" />
<field type="CARD32" name="num_items" />
<list type="void" name="data">
<op op="*">
<fieldref>num_items</fieldref>
<op op="/">
<fieldref>format</fieldref>
<value>8</value>
</op>
</op>
</list>
</request>
<request name="DeleteProviderProperty" opcode="40">
<field type="PROVIDER" name="provider" />
<field type="ATOM" name="property" />
</request>
<request name="GetProviderProperty" opcode="41">
<field type="PROVIDER" name="provider" />
<field type="ATOM" name="property" />
<field type="ATOM" name="type" /> <!-- AnyProperty -->
<field type="CARD32" name="long_offset" />
<field type="CARD32" name="long_length" />
<field type="BOOL" name="delete" />
<field type="BOOL" name="pending" />
<pad bytes="2" />
<reply>
<field type="CARD8" name="format" />
<field type="ATOM" name="type" /> <!-- None -->
<field type="CARD32" name="bytes_after" />
<field type="CARD32" name="num_items" />
<pad bytes="12" />
<list type="void" name="data">
<op op="*">
<fieldref>num_items</fieldref>
<op op="/">
<fieldref>format</fieldref>
<value>8</value>
</op>
</op>
</list>
</reply>
</request>
<!-- Events -->
<event name="ScreenChangeNotify" number="0">
@ -619,9 +789,12 @@ authorization from the authors.
<!-- subcode -->
<enum name="Notify" >
<item name="CrtcChange"> <value>0</value></item>
<item name="OutputChange"> <value>1</value></item>
<item name="OutputProperty"><value>2</value></item>
<item name="CrtcChange"> <value>0</value></item>
<item name="OutputChange"> <value>1</value></item>
<item name="OutputProperty"> <value>2</value></item>
<item name="ProviderChange"> <value>3</value></item>
<item name="ProviderProperty"><value>4</value></item>
<item name="ResourceChange"> <value>5</value></item>
</enum>
<struct name="CrtcChange">
@ -658,10 +831,37 @@ authorization from the authors.
<pad bytes="11" />
</struct>
<!-- New in version 1.4 -->
<struct name="ProviderChange">
<field type="TIMESTAMP" name="timestamp" />
<field type="WINDOW" name="window" />
<field type="PROVIDER" name="provider" />
<pad bytes="16" />
</struct>
<struct name="ProviderProperty">
<field type="WINDOW" name="window" />
<field type="PROVIDER" name="provider" />
<field type="ATOM" name="atom" />
<field type="TIMESTAMP" name="timestamp" />
<field type="CARD8" name="state" />
<pad bytes="11" />
</struct>
<struct name="ResourceChange">
<field type="TIMESTAMP" name="timestamp" />
<field type="WINDOW" name="window" />
<pad bytes="20" />
</struct>
<union name="NotifyData">
<field type="CrtcChange" name="cc" />
<field type="OutputChange" name="oc" />
<field type="OutputProperty" name="op" />
<field type="CrtcChange" name="cc" />
<field type="OutputChange" name="oc" />
<field type="OutputProperty" name="op" />
<field type="ProviderChange" name="pc" />
<field type="ProviderProperty" name="pp" />
<field type="ResourceChange" name="rc" />
</union>
<event name="Notify" number="1">

View File

@ -11,84 +11,84 @@ for licensing information.
<import>xproto</import>
<enum name="PictType">
<item name="Indexed" />
<item name="Direct" />
<item name="Indexed"> <value>0</value> </item>
<item name="Direct"> <value>1</value> </item>
</enum>
<enum name="Picture">
<item name="None" />
<item name="None"> <value>0</value> </item>
</enum>
<!-- Disjoint* and Conjoint* are new in version 0.2 -->
<!-- PDF blend modes are new in version 0.11 -->
<enum name="PictOp">
<item name="Clear" />
<item name="Src" />
<item name="Dst" />
<item name="Over" />
<item name="OverReverse" />
<item name="In" />
<item name="InReverse" />
<item name="Out" />
<item name="OutReverse" />
<item name="Atop" />
<item name="AtopReverse" />
<item name="Xor" />
<item name="Add" />
<item name="Saturate" />
<item name="Clear"> <value>0</value> </item>
<item name="Src"> <value>1</value> </item>
<item name="Dst"> <value>2</value> </item>
<item name="Over"> <value>3</value> </item>
<item name="OverReverse"> <value>4</value> </item>
<item name="In"> <value>5</value> </item>
<item name="InReverse"> <value>6</value> </item>
<item name="Out"> <value>7</value> </item>
<item name="OutReverse"> <value>8</value> </item>
<item name="Atop"> <value>9</value> </item>
<item name="AtopReverse"> <value>10</value> </item>
<item name="Xor"> <value>11</value> </item>
<item name="Add"> <value>12</value> </item>
<item name="Saturate"> <value>13</value> </item>
<item name="DisjointClear"><value>16</value></item>
<item name="DisjointSrc" />
<item name="DisjointDst" />
<item name="DisjointOver" />
<item name="DisjointOverReverse" />
<item name="DisjointIn" />
<item name="DisjointInReverse" />
<item name="DisjointOut" />
<item name="DisjointOutReverse" />
<item name="DisjointAtop" />
<item name="DisjointAtopReverse" />
<item name="DisjointXor" />
<item name="DisjointClear"> <value>16</value></item>
<item name="DisjointSrc"> <value>17</value> </item>
<item name="DisjointDst"> <value>18</value> </item>
<item name="DisjointOver"> <value>19</value> </item>
<item name="DisjointOverReverse"> <value>20</value> </item>
<item name="DisjointIn"> <value>21</value> </item>
<item name="DisjointInReverse"> <value>22</value> </item>
<item name="DisjointOut"> <value>23</value> </item>
<item name="DisjointOutReverse"> <value>24</value> </item>
<item name="DisjointAtop"> <value>25</value> </item>
<item name="DisjointAtopReverse"> <value>26</value> </item>
<item name="DisjointXor"> <value>27</value> </item>
<item name="ConjointClear"><value>32</value></item>
<item name="ConjointSrc" />
<item name="ConjointDst" />
<item name="ConjointOver" />
<item name="ConjointOverReverse" />
<item name="ConjointIn" />
<item name="ConjointInReverse" />
<item name="ConjointOut" />
<item name="ConjointOutReverse" />
<item name="ConjointAtop" />
<item name="ConjointAtopReverse" />
<item name="ConjointXor" />
<item name="ConjointClear"> <value>32</value></item>
<item name="ConjointSrc"> <value>33</value> </item>
<item name="ConjointDst"> <value>34</value> </item>
<item name="ConjointOver"> <value>35</value> </item>
<item name="ConjointOverReverse"> <value>36</value> </item>
<item name="ConjointIn"> <value>37</value> </item>
<item name="ConjointInReverse"> <value>38</value> </item>
<item name="ConjointOut"> <value>39</value> </item>
<item name="ConjointOutReverse"> <value>40</value> </item>
<item name="ConjointAtop"> <value>41</value> </item>
<item name="ConjointAtopReverse"> <value>42</value> </item>
<item name="ConjointXor"> <value>43</value> </item>
<!-- PDF blend modes are new in version 0.11 -->
<item name="Multiply"><value>48</value></item>
<item name="Screen" />
<item name="Overlay" />
<item name="Darken" />
<item name="Lighten" />
<item name="ColorDodge" />
<item name="ColorBurn" />
<item name="HardLight" />
<item name="SoftLight" />
<item name="Difference" />
<item name="Exclusion" />
<item name="HSLHue" />
<item name="HSLSaturation" />
<item name="HSLColor" />
<item name="HSLLuminosity" />
<item name="Multiply"> <value>48</value></item>
<item name="Screen"> <value>49</value> </item>
<item name="Overlay"> <value>50</value> </item>
<item name="Darken"> <value>51</value> </item>
<item name="Lighten"> <value>52</value> </item>
<item name="ColorDodge"> <value>53</value> </item>
<item name="ColorBurn"> <value>54</value> </item>
<item name="HardLight"> <value>55</value> </item>
<item name="SoftLight"> <value>56</value> </item>
<item name="Difference"> <value>57</value> </item>
<item name="Exclusion"> <value>58</value> </item>
<item name="HSLHue"> <value>59</value> </item>
<item name="HSLSaturation"> <value>60</value> </item>
<item name="HSLColor"> <value>61</value> </item>
<item name="HSLLuminosity"> <value>62</value> </item>
</enum>
<enum name="PolyEdge">
<item name="Sharp" />
<item name="Smooth" />
<item name="Sharp"> <value>0</value> </item>
<item name="Smooth"> <value>1</value> </item>
</enum>
<enum name="PolyMode">
<item name="Precise" />
<item name="Imprecise" />
<item name="Precise"> <value>0</value> </item>
<item name="Imprecise"> <value>1</value> </item>
</enum>
<enum name="CP">
@ -108,20 +108,20 @@ for licensing information.
</enum>
<enum name="SubPixel">
<item name="Unknown" />
<item name="HorizontalRGB" />
<item name="HorizontalBGR" />
<item name="VerticalRGB" />
<item name="VerticalBGR" />
<item name="None" />
<item name="Unknown"> <value>0</value> </item>
<item name="HorizontalRGB"> <value>1</value> </item>
<item name="HorizontalBGR"> <value>2</value> </item>
<item name="VerticalRGB"> <value>3</value> </item>
<item name="VerticalBGR"> <value>4</value> </item>
<item name="None"> <value>5</value> </item>
</enum>
<!-- Extended repeat attributes introduced in 0.10 -->
<enum name="Repeat">
<item name="None" />
<item name="Normal" />
<item name="Pad" />
<item name="Reflect" />
<item name="None"> <value>0</value> </item>
<item name="Normal"> <value>1</value> </item>
<item name="Pad"> <value>2</value> </item>
<item name="Reflect"> <value>3</value> </item>
</enum>
<typedef oldname="CARD32" newname="GLYPH" />

View File

@ -26,9 +26,10 @@ sale, use or other dealings in this Software without prior written
authorization from the authors.
-->
<xcb header="res" extension-xname="X-Resource" extension-name="Res"
major-version="1" minor-version="0">
major-version="1" minor-version="2">
<import>xproto</import>
<!-- v1.0 -->
<struct name="Client">
<field type="CARD32" name="resource_base" />
<field type="CARD32" name="resource_mask" />
@ -39,6 +40,46 @@ authorization from the authors.
<field type="CARD32" name="count" />
</struct>
<!-- v1.2 -->
<enum name="ClientIdMask">
<item name="ClientXID"> <bit>0</bit> </item>
<item name="LocalClientPID"> <bit>1</bit> </item>
</enum>
<struct name="ClientIdSpec">
<field type="CARD32" name="client" />
<field type="CARD32" name="mask" mask="ClientIdMask" />
</struct>
<struct name="ClientIdValue">
<field type="ClientIdSpec" name="spec" />
<field type="CARD32" name="length" />
<list type="CARD32" name="value">
<fieldref>length</fieldref>
</list>
</struct>
<struct name="ResourceIdSpec">
<field type="CARD32" name="resource" />
<field type="CARD32" name="type" />
</struct>
<struct name="ResourceSizeSpec">
<field type="ResourceIdSpec" name="spec" />
<field type="CARD32" name="bytes" />
<field type="CARD32" name="ref_count" />
<field type="CARD32" name="use_count" />
</struct>
<struct name="ResourceSizeValue">
<field type="ResourceSizeSpec" name="size" />
<field type="CARD32" name="num_cross_references" />
<list type="ResourceSizeSpec" name="cross_references">
<fieldref>num_cross_references</fieldref>
</list>
</struct>
<!-- v1.0 -->
<request name="QueryVersion" opcode="0">
<field type="CARD8" name="client_major" />
<field type="CARD8" name="client_minor" />
@ -80,4 +121,36 @@ authorization from the authors.
<field type="CARD32" name="bytes_overflow" />
</reply>
</request>
<!-- v1.2 -->
<request name="QueryClientIds" opcode="4">
<field type="CARD32" name="num_specs" />
<list type="ClientIdSpec" name="specs">
<fieldref>num_specs</fieldref>
</list>
<reply>
<pad bytes="1" />
<field type="CARD32" name="num_ids" />
<pad bytes="20" />
<list type="ClientIdValue" name="ids">
<fieldref>num_ids</fieldref>
</list>
</reply>
</request>
<request name="QueryResourceBytes" opcode="5">
<field type="CARD32" name="client" />
<field type="CARD32" name="num_specs" />
<list type="ResourceIdSpec" name="specs">
<fieldref>num_specs</fieldref>
</list>
<reply>
<pad bytes="1" />
<field type="CARD32" name="num_sizes" />
<pad bytes="20" />
<list type="ResourceSizeValue" name="sizes">
<fieldref>num_sizes</fieldref>
</list>
</reply>
</request>
</xcb>

View File

@ -36,9 +36,9 @@ Draft Standard Version 1.1
<import>xproto</import>
<enum name="Kind">
<item name="Blanked" />
<item name="Internal" />
<item name="External" />
<item name="Blanked"> <value>0</value> </item>
<item name="Internal"> <value>1</value> </item>
<item name="External"> <value>2</value> </item>
</enum>
<enum name="Event">
@ -47,10 +47,10 @@ Draft Standard Version 1.1
</enum>
<enum name="State">
<item name="Off" />
<item name="On" />
<item name="Cycle" />
<item name="Disabled" />
<item name="Off"> <value>0</value> </item>
<item name="On"> <value>1</value> </item>
<item name="Cycle"> <value>2</value> </item>
<item name="Disabled"> <value>3</value> </item>
</enum>
<!-- Errors -->
@ -75,14 +75,14 @@ Draft Standard Version 1.1
<field type="CARD32" name="ms_until_server"/>
<field type="CARD32" name="ms_since_user_input"/>
<field type="CARD32" name="event_mask" />
<field type="BYTE" name="kind"/> <!-- enum Kind -->
<field type="BYTE" name="kind" enum="Kind"/>
<pad bytes="7"/>
</reply>
</request>
<request name="SelectInput" opcode="2">
<field type="DRAWABLE" name="drawable"/>
<field type="CARD32" name="event_mask" /> <!-- enum Event -->
<field type="CARD32" name="event_mask" mask="Event"/>
</request>
<request name="SetAttributes" opcode="3">
@ -92,7 +92,7 @@ Draft Standard Version 1.1
<field type="CARD16" name="width"/>
<field type="CARD16" name="height"/>
<field type="CARD16" name="border_width"/>
<field type="BYTE" name="class"/> <!-- enum XCBWindowClass -->
<field type="BYTE" name="class" enum="WindowClass"/>
<field type="CARD8" name="depth"/>
<field type="VISUALID" name="visual"/>
<valueparam value-mask-type="CARD32"
@ -113,14 +113,11 @@ Draft Standard Version 1.1
<!-- Events -->
<event name="Notify" number="0">
<field type="CARD8" name="code"/>
<field type="BYTE" name="state"/> <!-- enum State -->
<pad bytes="1" />
<field type="CARD16" name="sequence_number"/>
<field type="BYTE" name="state" enum="State"/>
<field type="TIMESTAMP" name="time"/>
<field type="WINDOW" name="root"/>
<field type="WINDOW" name="window"/>
<field type="BYTE" name="kind"/> <!-- enum Kind -->
<field type="BYTE" name="kind" enum="Kind"/>
<field type="BOOL" name="forced"/>
<pad bytes="14"/>
</event>

View File

@ -34,18 +34,18 @@ authorization from the authors.
<!-- Shape attributes of type OP. -->
<enum name="SO">
<item name="Set" />
<item name="Union" />
<item name="Intersect" />
<item name="Subtract" />
<item name="Invert" />
<item name="Set"> <value>0</value> </item>
<item name="Union"> <value>1</value> </item>
<item name="Intersect"> <value>2</value> </item>
<item name="Subtract"> <value>3</value> </item>
<item name="Invert"> <value>4</value> </item>
</enum>
<!-- Shape attributes of type KIND. -->
<enum name="SK">
<item name="Bounding" />
<item name="Clip" />
<item name="Input" /> <!-- added in version 1.1 -->
<item name="Bounding"> <value>0</value> </item>
<item name="Clip"> <value>1</value> </item>
<item name="Input"> <value>2</value> </item> <!-- added in version 1.1 -->
</enum>
<event name="Notify" number="0">

View 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>

View File

@ -11,9 +11,9 @@ for licensing information.
<xidtype name="ALARM" />
<enum name="ALARMSTATE">
<item name="Active" />
<item name="Inactive" />
<item name="Destroyed" />
<item name="Active"> <value>0</value> </item>
<item name="Inactive"> <value>1</value> </item>
<item name="Destroyed"> <value>2</value> </item>
</enum>
<xidtype name="COUNTER" />
@ -21,15 +21,15 @@ for licensing information.
<xidtype name="FENCE" />
<enum name="TESTTYPE">
<item name="PositiveTransition" />
<item name="NegativeTransition" />
<item name="PositiveComparison" />
<item name="NegativeComparison" />
<item name="PositiveTransition"> <value>0</value> </item>
<item name="NegativeTransition"> <value>1</value> </item>
<item name="PositiveComparison"> <value>2</value> </item>
<item name="NegativeComparison"> <value>3</value> </item>
</enum>
<enum name="VALUETYPE">
<item name="Absolute" />
<item name="Relative" />
<item name="Absolute"> <value>0</value> </item>
<item name="Relative"> <value>1</value> </item>
</enum>
<enum name="CA">
@ -48,7 +48,7 @@ for licensing information.
<struct name="SYSTEMCOUNTER">
<field type="COUNTER" name="counter" />
<field type="INT64" name="resolution" />
<field type="sync:INT64" name="resolution" />
<field type="CARD16" name="name_len" />
<list type="char" name="name">
<fieldref>name_len</fieldref>
@ -58,13 +58,13 @@ for licensing information.
<struct name="TRIGGER">
<field type="COUNTER" name="counter" />
<field type="CARD32" name="wait_type" enum="VALUETYPE" />
<field type="INT64" name="wait_value" />
<field type="sync:INT64" name="wait_value" />
<field type="CARD32" name="test_type" enum="TESTTYPE" />
</struct>
<struct name="WAITCONDITION">
<field type="TRIGGER" name="trigger" />
<field type="INT64" name="event_threshold" />
<field type="sync:INT64" name="event_threshold" />
</struct>
<error name="Counter" number="0">
@ -103,7 +103,7 @@ for licensing information.
<request name="CreateCounter" opcode="2">
<field type="COUNTER" name="id" />
<field type="INT64" name="initial_value" />
<field type="sync:INT64" name="initial_value" />
</request>
<request name="DestroyCounter" opcode="6">
@ -114,7 +114,7 @@ for licensing information.
<field type="COUNTER" name="counter" />
<reply>
<pad bytes="1" />
<field type="INT64" name="counter_value" />
<field type="sync:INT64" name="counter_value" />
</reply>
</request>
@ -124,26 +124,76 @@ for licensing information.
<request name="ChangeCounter" opcode="4">
<field type="COUNTER" name="counter" />
<field type="INT64" name="amount" />
<field type="sync:INT64" name="amount" />
</request>
<request name="SetCounter" opcode="3">
<field type="COUNTER" name="counter" />
<field type="INT64" name="value" />
<field type="sync:INT64" name="value" />
</request>
<request name="CreateAlarm" opcode="8">
<field type="ALARM" name="id" />
<valueparam value-mask-type="CARD32"
value-mask-name="value_mask"
value-list-name="value_list" />
<field type="CARD32" name="value_mask" mask="CA" />
<switch name="value_list">
<fieldref>value_mask</fieldref>
<bitcase>
<enumref ref="CA">Counter</enumref>
<field type="COUNTER" name="counter" />
</bitcase>
<bitcase>
<enumref ref="CA">ValueType</enumref>
<field type="CARD32" name="valueType" enum="VALUETYPE" />
</bitcase>
<bitcase>
<enumref ref="CA">Value</enumref>
<field type="sync:INT64" name="value" />
</bitcase>
<bitcase>
<enumref ref="CA">TestType</enumref>
<field type="CARD32" name="testType" enum="TESTTYPE" />
</bitcase>
<bitcase>
<enumref ref="CA">Delta</enumref>
<field type="sync:INT64" name="delta" />
</bitcase>
<bitcase>
<enumref ref="CA">Events</enumref>
<field type="CARD32" name="events" />
</bitcase>
</switch>
</request>
<request name="ChangeAlarm" opcode="9">
<field type="ALARM" name="id" />
<valueparam value-mask-type="CARD32"
value-mask-name="value_mask"
value-list-name="value_list" />
<field type="CARD32" name="value_mask" mask="CA" />
<switch name="value_list">
<fieldref>value_mask</fieldref>
<bitcase>
<enumref ref="CA">Counter</enumref>
<field type="COUNTER" name="counter" />
</bitcase>
<bitcase>
<enumref ref="CA">ValueType</enumref>
<field type="CARD32" name="valueType" enum="VALUETYPE" />
</bitcase>
<bitcase>
<enumref ref="CA">Value</enumref>
<field type="sync:INT64" name="value" />
</bitcase>
<bitcase>
<enumref ref="CA">TestType</enumref>
<field type="CARD32" name="testType" enum="TESTTYPE" />
</bitcase>
<bitcase>
<enumref ref="CA">Delta</enumref>
<field type="sync:INT64" name="delta" />
</bitcase>
<bitcase>
<enumref ref="CA">Events</enumref>
<field type="CARD32" name="events" />
</bitcase>
</switch>
</request>
<request name="DestroyAlarm" opcode="11">
@ -155,7 +205,7 @@ for licensing information.
<reply>
<pad bytes="1" />
<field type="TRIGGER" name="trigger" />
<field type="INT64" name="delta" />
<field type="sync:INT64" name="delta" />
<field type="BOOL" name="events" />
<field type="CARD8" name="state" enum="ALARMSTATE" />
<pad bytes="2" />
@ -209,8 +259,8 @@ for licensing information.
<event name="CounterNotify" number="0">
<field type="CARD8" name="kind" />
<field type="COUNTER" name="counter" />
<field type="INT64" name="wait_value" />
<field type="INT64" name="counter_value" />
<field type="sync:INT64" name="wait_value" />
<field type="sync:INT64" name="counter_value" />
<field type="TIMESTAMP" name="timestamp" />
<field type="CARD16" name="count" />
<field type="BOOL" name="destroyed" />
@ -220,8 +270,8 @@ for licensing information.
<event name="AlarmNotify" number="1">
<field type="CARD8" name="kind" />
<field type="ALARM" name="alarm" />
<field type="INT64" name="counter_value" />
<field type="INT64" name="alarm_value" />
<field type="sync:INT64" name="counter_value" />
<field type="sync:INT64" name="alarm_value" />
<field type="TIMESTAMP" name="timestamp" />
<field type="CARD8" name="state" enum="ALARMSTATE" />
<pad bytes="3" />

View File

@ -59,7 +59,7 @@ authorization from the authors.
<xsd:complexType name="caseexpr">
<xsd:sequence>
<!-- case expression: -->
<xsd:group ref="expression" minOccurs="1" maxOccurs="1" />
<xsd:group ref="expression" minOccurs="1" maxOccurs="unbounded" />
<!-- match -->
<xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" />
<xsd:choice>
@ -89,6 +89,9 @@ authorization from the authors.
<!-- field replaces FIELD, PARAM, and REPLY. -->
<xsd:element name="field" type="var" />
<!-- fd passing parameter -->
<xsd:element name="fd" />
<!-- list replaces ARRAYFIELD, LISTPARAM, and ARRAYREPLY. The name and type
are specified as attributes. The content is an expression giving the
length. -->
@ -185,6 +188,7 @@ authorization from the authors.
<xsd:element ref="pad" />
<xsd:element ref="field" />
<xsd:element ref="list" />
<xsd:element ref="fd" />
</xsd:choice>
</xsd:group>
@ -201,7 +205,9 @@ authorization from the authors.
<!-- Type for a packet structure -->
<xsd:complexType name="packet-struct">
<xsd:group ref="fields" minOccurs="0" maxOccurs="unbounded" />
<xsd:sequence>
<xsd:group ref="fields" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="number" type="xsd:integer" use="required" />
</xsd:complexType>
@ -225,6 +231,59 @@ authorization from the authors.
<xsd:union memberTypes="xsd:integer hex-integer" />
</xsd:simpleType>
<!-- Type for documentation -->
<xsd:group name="doc-fields">
<xsd:sequence>
<xsd:element name="field">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="name" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:group name="error-fields">
<xsd:sequence>
<xsd:element name="error">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:group name="see-fields">
<xsd:sequence>
<xsd:element name="see">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:element name="doc">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element name="brief" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="example" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:group ref="doc-fields" minOccurs="0" maxOccurs="unbounded" />
<xsd:group ref="error-fields" minOccurs="0" maxOccurs="unbounded" />
<xsd:group ref="see-fields" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:group name="macro">
<xsd:choice>
<xsd:element name="request">
@ -248,9 +307,11 @@ authorization from the authors.
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element ref="switch" />
</xsd:choice>
<xsd:element ref="doc" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element ref="doc" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="opcode" type="xsd:integer" use="required" />
@ -262,8 +323,12 @@ authorization from the authors.
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="packet-struct">
<xsd:sequence>
<xsd:element ref="doc" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="no-sequence-number" type="xsd:boolean"
use="optional" />
<xsd:attribute name="xge" type="xsd:boolean" use="optional" />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
@ -292,10 +357,14 @@ authorization from the authors.
<xsd:sequence minOccurs="1" maxOccurs="unbounded">
<xsd:element name="item">
<xsd:complexType>
<xsd:group ref="expression" minOccurs="0" maxOccurs="1" />
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="value" type="dec-or-hex-integer" />
<xsd:element name="bit" type="xsd:integer" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
<xsd:element ref="doc" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>

View File

@ -55,8 +55,8 @@ authorization from the authors.
</request>
<enum name="Datatype">
<item name="Unmodified" />
<item name="Modified" />
<item name="Unmodified"> <value>0</value> </item>
<item name="Modified"> <value>1</value> </item>
</enum>
<!-- The Send request needs to send an arbitrary Event; this type is used

View File

@ -0,0 +1,478 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2009 Open Text 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="xf86vidmode" extension-xname="XFree86-VidModeExtension" extension-name="XF86VidMode"
major-version="2" minor-version="2">
<!-- In places where there are multiple versions of the protocol, this
describes version 2.2. If you do not call xcb_xf86vidmode_set_client_version()
then some requests may fail and some replies may not be what you expect. -->
<typedef oldname="CARD32" newname="SYNCRANGE" /> <!-- Min and Max fixed-decimal-point values -->
<typedef oldname="CARD32" newname="DOTCLOCK" /> <!-- A single fixed-decimal-point value -->
<enum name="ModeFlag">
<item name="Positive_HSync"> <bit>0</bit></item>
<item name="Negative_HSync"> <bit>1</bit></item>
<item name="Positive_VSync"> <bit>2</bit></item>
<item name="Negative_VSync"> <bit>3</bit></item>
<item name="Interlace"> <bit>4</bit></item>
<item name="Composite_Sync"> <bit>5</bit></item>
<item name="Positive_CSync"> <bit>6</bit></item>
<item name="Negative_CSync"> <bit>7</bit></item>
<item name="HSkew"> <bit>8</bit></item>
<item name="Broadcast"> <bit>9</bit></item>
<item name="Pixmux"> <bit>10</bit></item>
<item name="Double_Clock"> <bit>11</bit></item>
<item name="Half_Clock"> <bit>12</bit></item>
</enum>
<enum name="ClockFlag">
<item name="Programable"> <bit>0</bit></item>
</enum>
<enum name="Permission">
<item name="Read"> <bit>0</bit></item>
<item name="Write"> <bit>1</bit></item>
</enum>
<struct name="ModeInfo">
<field type="DOTCLOCK" name="dotclock" />
<field type="CARD16" name= "hdisplay" />
<field type="CARD16" name= "hsyncstart" />
<field type="CARD16" name= "hsyncend" />
<field type="CARD16" name= "htotal" />
<field type="CARD32" name= "hskew" />
<field type="CARD16" name= "vdisplay" />
<field type="CARD16" name= "vsyncstart" />
<field type="CARD16" name= "vsyncend" />
<field type="CARD16" name= "vtotal" />
<pad bytes="4" />
<field type="CARD32" name="flags" mask="ModeFlag" />
<pad bytes="12" />
<field type="CARD32" name="privsize" />
</struct>
<request name="QueryVersion" opcode="0">
<reply>
<pad bytes="1" />
<field type="CARD16" name="major_version" />
<field type="CARD16" name="minor_version" />
</reply>
</request>
<request name="GetModeLine" opcode="1">
<field type="CARD16" name="screen" />
<pad bytes="2" />
<reply>
<pad bytes="1" />
<field type="DOTCLOCK" name="dotclock" />
<field type="CARD16" name= "hdisplay" />
<field type="CARD16" name= "hsyncstart" />
<field type="CARD16" name= "hsyncend" />
<field type="CARD16" name= "htotal" />
<field type="CARD16" name= "hskew" />
<field type="CARD16" name= "vdisplay" />
<field type="CARD16" name= "vsyncstart" />
<field type="CARD16" name= "vsyncend" />
<field type="CARD16" name= "vtotal" />
<pad bytes="2" />
<field type="CARD32" name="flags" mask="ModeFlag" />
<pad bytes="12" />
<field type="CARD32" name="privsize" />
<list type="CARD8" name="private">
<fieldref>privsize</fieldref>
</list>
</reply>
</request>
<request name="ModModeLine" opcode="2">
<field type="CARD32" name="screen" />
<field type="CARD16" name= "hdisplay" />
<field type="CARD16" name= "hsyncstart" />
<field type="CARD16" name= "hsyncend" />
<field type="CARD16" name= "htotal" />
<field type="CARD16" name= "hskew" />
<field type="CARD16" name= "vdisplay" />
<field type="CARD16" name= "vsyncstart" />
<field type="CARD16" name= "vsyncend" />
<field type="CARD16" name= "vtotal" />
<pad bytes="2" />
<field type="CARD32" name="flags" mask="ModeFlag" />
<pad bytes="12" />
<field type="CARD32" name="privsize" />
<list type="CARD8" name="private">
<fieldref>privsize</fieldref>
</list>
</request>
<request name="SwitchMode" opcode="3">
<field type="CARD16" name="screen" />
<field type="CARD16" name="zoom" />
</request>
<request name="GetMonitor" opcode="4">
<field type="CARD16" name="screen" />
<pad bytes="2" />
<reply>
<pad bytes="1" />
<field type="CARD8" name="vendor_length" />
<field type="CARD8" name="model_length" />
<field type="CARD8" name="num_hsync" />
<field type="CARD8" name="num_vsync" />
<pad bytes="20" />
<list type="SYNCRANGE" name="hsync">
<fieldref>num_hsync</fieldref>
</list>
<list type="SYNCRANGE" name="vsync">
<fieldref>num_vsync</fieldref>
</list>
<list type="char" name="vendor">
<fieldref>vendor_length</fieldref>
</list>
<list type="void" name="alignment_pad">
<op op="-">
<op op="&amp;">
<op op="+">
<fieldref>vendor_length</fieldref>
<value> 3 </value>
</op>
<unop op="~">
<value>3</value>
</unop>
</op>
<fieldref>vendor_length</fieldref>
</op>
</list>
<list type="char" name="model">
<fieldref>model_length</fieldref>
</list>
</reply>
</request>
<request name="LockModeSwitch" opcode="5">
<field type="CARD16" name="screen" />
<field type="CARD16" name="lock" />
</request>
<request name="GetAllModeLines" opcode="6">
<field type="CARD16" name="screen" />
<pad bytes="2" />
<reply>
<pad bytes="1" />
<field type="CARD32" name="modecount" />
<pad bytes="20" />
<list type="ModeInfo" name="modeinfo">
<fieldref>modecount</fieldref>
</list>
</reply>
</request>
<request name="AddModeLine" opcode="7">
<field type="CARD32" name="screen" />
<field type="DOTCLOCK" name="dotclock" />
<field type="CARD16" name= "hdisplay" />
<field type="CARD16" name= "hsyncstart" />
<field type="CARD16" name= "hsyncend" />
<field type="CARD16" name= "htotal" />
<field type="CARD16" name= "hskew" />
<field type="CARD16" name= "vdisplay" />
<field type="CARD16" name= "vsyncstart" />
<field type="CARD16" name= "vsyncend" />
<field type="CARD16" name= "vtotal" />
<pad bytes="2" />
<field type="CARD32" name="flags" mask="ModeFlag" />
<pad bytes="12" />
<field type="CARD32" name="privsize" />
<field type="DOTCLOCK" name="after_dotclock" />
<field type="CARD16" name= "after_hdisplay" />
<field type="CARD16" name= "after_hsyncstart" />
<field type="CARD16" name= "after_hsyncend" />
<field type="CARD16" name= "after_htotal" />
<field type="CARD16" name= "after_hskew" />
<field type="CARD16" name= "after_vdisplay" />
<field type="CARD16" name= "after_vsyncstart" />
<field type="CARD16" name= "after_vsyncend" />
<field type="CARD16" name= "after_vtotal" />
<pad bytes="2" />
<field type="CARD32" name="after_flags" mask="ModeFlag" />
<pad bytes="12" />
<list type="CARD8" name="private">
<fieldref>privsize</fieldref>
</list>
</request>
<request name="DeleteModeLine" opcode="8">
<field type="CARD32" name="screen" />
<field type="DOTCLOCK" name="dotclock" />
<field type="CARD16" name= "hdisplay" />
<field type="CARD16" name= "hsyncstart" />
<field type="CARD16" name= "hsyncend" />
<field type="CARD16" name= "htotal" />
<field type="CARD16" name= "hskew" />
<field type="CARD16" name= "vdisplay" />
<field type="CARD16" name= "vsyncstart" />
<field type="CARD16" name= "vsyncend" />
<field type="CARD16" name= "vtotal" />
<pad bytes="2" />
<field type="CARD32" name="flags" mask="ModeFlag" />
<pad bytes="12" />
<field type="CARD32" name="privsize" />
<list type="CARD8" name="private">
<fieldref>privsize</fieldref>
</list>
</request>
<request name="ValidateModeLine" opcode="9">
<field type="CARD32" name="screen" />
<field type="DOTCLOCK" name="dotclock" />
<field type="CARD16" name= "hdisplay" />
<field type="CARD16" name= "hsyncstart" />
<field type="CARD16" name= "hsyncend" />
<field type="CARD16" name= "htotal" />
<field type="CARD16" name= "hskew" />
<field type="CARD16" name= "vdisplay" />
<field type="CARD16" name= "vsyncstart" />
<field type="CARD16" name= "vsyncend" />
<field type="CARD16" name= "vtotal" />
<pad bytes="2" />
<field type="CARD32" name="flags" mask="ModeFlag" />
<pad bytes="12" />
<field type="CARD32" name="privsize" />
<list type="CARD8" name="private">
<fieldref>privsize</fieldref>
</list>
<reply>
<pad bytes="1" />
<field type="CARD32" name="status" />
<pad bytes="20" />
</reply>
</request>
<request name="SwitchToMode" opcode="10">
<field type="CARD32" name="screen" />
<field type="DOTCLOCK" name="dotclock" />
<field type="CARD16" name= "hdisplay" />
<field type="CARD16" name= "hsyncstart" />
<field type="CARD16" name= "hsyncend" />
<field type="CARD16" name= "htotal" />
<field type="CARD16" name= "hskew" />
<field type="CARD16" name= "vdisplay" />
<field type="CARD16" name= "vsyncstart" />
<field type="CARD16" name= "vsyncend" />
<field type="CARD16" name= "vtotal" />
<pad bytes="2" />
<field type="CARD32" name="flags" mask="ModeFlag" />
<pad bytes="12" />
<field type="CARD32" name="privsize" />
<list type="CARD8" name="private">
<fieldref>privsize</fieldref>
</list>
</request>
<request name="GetViewPort" opcode="11">
<field type="CARD16" name="screen" />
<pad bytes="2" />
<reply>
<pad bytes="1" />
<field type="CARD32" name="x" />
<field type="CARD32" name="y" />
<pad bytes="16" />
</reply>
</request>
<request name="SetViewPort" opcode="12">
<field type="CARD16" name="screen" />
<pad bytes="2" />
<field type="CARD32" name="x" />
<field type="CARD32" name="y" />
</request>
<!-- new for version 2.x -->
<request name="GetDotClocks" opcode="13">
<field type="CARD16" name="screen" />
<pad bytes="2" />
<reply>
<pad bytes="1" />
<field type="CARD32" name="flags" mask="ClockFlag" />
<field type="CARD32" name="clocks" />
<field type="CARD32" name="maxclocks" />
<pad bytes="12" />
<list type="CARD32" name="clock">
<!-- Only if flags does not include Programable:
(1 - (flags & 1)) * clocks
-->
<op op="*">
<op op = "-">
<value>1</value>
<op op="&amp;">
<fieldref>flags</fieldref>
<value>1</value>
</op>
</op>
<fieldref>clocks</fieldref>
</op>
</list>
</reply>
</request>
<request name="SetClientVersion" opcode="14">
<field type="CARD16" name="major" />
<field type="CARD16" name="minor" />
</request>
<request name="SetGamma" opcode="15">
<field type="CARD16" name="screen" />
<pad bytes="2" />
<field type="CARD32" name="red" />
<field type="CARD32" name="green" />
<field type="CARD32" name="blue" />
<pad bytes="12" />
</request>
<request name="GetGamma" opcode="16">
<field type="CARD16" name="screen" />
<pad bytes="26" />
<reply>
<pad bytes="1" />
<field type="CARD32" name="red" />
<field type="CARD32" name="green" />
<field type="CARD32" name="blue" />
<pad bytes="12" />
</reply>
</request>
<request name="GetGammaRamp" opcode="17">
<field type="CARD16" name="screen" />
<field type="CARD16" name="size" />
<reply>
<pad bytes="1" />
<field type="CARD16" name="size" />
<pad bytes="22" />
<list type="CARD16" name="red">
<op op="&amp;">
<op op = "+">
<fieldref>size</fieldref>
<value>1</value>
</op>
<unop op="~">
<value>1</value>
</unop>
</op>
</list>
<list type="CARD16" name="green">
<op op="&amp;">
<op op = "+">
<fieldref>size</fieldref>
<value>1</value>
</op>
<unop op="~">
<value>1</value>
</unop>
</op>
</list>
<list type="CARD16" name="blue">
<op op="&amp;">
<op op = "+">
<fieldref>size</fieldref>
<value>1</value>
</op>
<unop op="~">
<value>1</value>
</unop>
</op>
</list>
</reply>
</request>
<request name="SetGammaRamp" opcode="18">
<field type="CARD16" name="screen" />
<field type="CARD16" name="size" />
<list type="CARD16" name="red">
<op op="&amp;">
<op op = "+">
<fieldref>size</fieldref>
<value>1</value>
</op>
<unop op="~">
<value>1</value>
</unop>
</op>
</list>
<list type="CARD16" name="green">
<op op="&amp;">
<op op = "+">
<fieldref>size</fieldref>
<value>1</value>
</op>
<unop op="~">
<value>1</value>
</unop>
</op>
</list>
<list type="CARD16" name="blue">
<op op="&amp;">
<op op = "+">
<fieldref>size</fieldref>
<value>1</value>
</op>
<unop op="~">
<value>1</value>
</unop>
</op>
</list>
</request>
<request name="GetGammaRampSize" opcode="19">
<field type="CARD16" name="screen" />
<pad bytes="2" />
<reply>
<pad bytes="1" />
<field type="CARD16" name="size" />
<pad bytes="22" />
</reply>
</request>
<request name="GetPermissions" opcode="20">
<field type="CARD16" name="screen" />
<pad bytes="2" />
<reply>
<pad bytes="1" />
<field type="CARD32" name="permissions" mask="Permission" />
<pad bytes="20" />
</reply>
</request>
<error name="BadClock" number="0" />
<error name="BadHTimings" number="1" />
<error name="BadVTimings" number="2" />
<error name="ModeUnsuitable" number="3" />
<error name="ExtensionDisabled" number="4" />
<error name="ClientNotLocal" number="5" />
<error name="ZoomLocked" number="6" />
</xcb>

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="4" minor-version="0">
major-version="5" minor-version="0">
<import>xproto</import>
<import>render</import>
<import>shape</import>
@ -44,18 +44,18 @@ authorization from the authors.
</request>
<enum name="SaveSetMode">
<item name="Insert" />
<item name="Delete" />
<item name="Insert"> <value>0</value> </item>
<item name="Delete"> <value>1</value> </item>
</enum>
<enum name="SaveSetTarget">
<item name="Nearest" />
<item name="Root" />
<item name="Nearest"> <value>0</value> </item>
<item name="Root"> <value>1</value> </item>
</enum>
<enum name="SaveSetMapping">
<item name="Map" />
<item name="Unmap" />
<item name="Map"> <value>0</value> </item>
<item name="Unmap"> <value>1</value> </item>
</enum>
<request name="ChangeSaveSet" opcode="1">
@ -67,9 +67,9 @@ authorization from the authors.
</request>
<enum name="SelectionEvent">
<item name="SetSelectionOwner" />
<item name="SelectionWindowDestroy" />
<item name="SelectionClientClose" />
<item name="SetSelectionOwner"> <value>0</value> </item>
<item name="SelectionWindowDestroy"> <value>1</value> </item>
<item name="SelectionClientClose"> <value>2</value> </item>
</enum>
<enum name="SelectionEventMask">
@ -95,7 +95,7 @@ authorization from the authors.
</request>
<enum name="CursorNotify">
<item name="DisplayCursor" />
<item name="DisplayCursor"> <value>0</value> </item>
</enum>
<enum name="CursorNotifyMask">
@ -143,7 +143,7 @@ authorization from the authors.
<error name="BadRegion" number="0" />
<enum name="Region">
<item name="None" />
<item name="None"> <value>0</value> </item>
</enum>
<request name="CreateRegion" opcode="5">
@ -331,4 +331,32 @@ authorization from the authors.
<request name="ShowCursor" opcode="30">
<field type="WINDOW" name="window" />
</request>
<!-- Version 5 -->
<xidtype name="BARRIER" />
<enum name="BarrierDirections">
<item name="PositiveX"><bit>0</bit></item>
<item name="PositiveY"><bit>1</bit></item>
<item name="NegativeX"><bit>2</bit></item>
<item name="NegativeY"><bit>3</bit></item>
</enum>
<request name="CreatePointerBarrier" opcode="31">
<field type="BARRIER" name="barrier" />
<field type="WINDOW" name="window" />
<field type="CARD16" name="x1" />
<field type="CARD16" name="y1" />
<field type="CARD16" name="x2" />
<field type="CARD16" name="y2" />
<field type="CARD32" name="directions" mask="BarrierDirections" />
<pad bytes="2" />
<field type="CARD16" name="num_devices" />
<list type="CARD16" name="devices"><fieldref>num_devices</fieldref></list>
</request>
<request name="DeletePointerBarrier" opcode="32">
<field type="BARRIER" name="barrier" />
</request>
</xcb>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -27,8 +27,7 @@ authorization from the authors.
-->
<xcb header="xtest" extension-xname="XTEST" extension-name="Test"
major-version="2" minor-version="1">
<!-- Conforms to XTEST 2.1 -->
major-version="2" minor-version="2">
<import>xproto</import>

View File

@ -44,13 +44,13 @@ authorization from the authors.
</enum>
<enum name="ImageFormatInfoType">
<item name="RGB" />
<item name="YUV" />
<item name="RGB"> <value>0</value> </item>
<item name="YUV"> <value>1</value> </item>
</enum>
<enum name="ImageFormatInfoFormat">
<item name="Packed" />
<item name="Planar" />
<item name="Packed"> <value>0</value> </item>
<item name="Planar"> <value>1</value> </item>
</enum>
<enum name="AttributeFlag">
@ -59,25 +59,25 @@ authorization from the authors.
</enum>
<enum name="VideoNotifyReason">
<item name="Started" />
<item name="Stopped" />
<item name="Busy" />
<item name="Preempted" />
<item name="HardError" />
<item name="Started"> <value>0</value> </item>
<item name="Stopped"> <value>1</value> </item>
<item name="Busy"> <value>2</value> </item>
<item name="Preempted"> <value>3</value> </item>
<item name="HardError"> <value>4</value> </item>
</enum>
<enum name="ScanlineOrder">
<item name="TopToBottom" />
<item name="BottomToTop" />
<item name="TopToBottom"> <value>0</value> </item>
<item name="BottomToTop"> <value>1</value> </item>
</enum>
<enum name="GrabPortStatus">
<item name="Success" />
<item name="BadExtension" />
<item name="AlreadyGrabbed" />
<item name="InvalidTime" />
<item name="BadReply" />
<item name="BadAlloc" />
<item name="Success"> <value>0</value> </item>
<item name="BadExtension"> <value>1</value> </item>
<item name="AlreadyGrabbed"> <value>2</value> </item>
<item name="InvalidTime"> <value>3</value> </item>
<item name="BadReply"> <value>4</value> </item>
<item name="BadAlloc"> <value>5</value> </item>
</enum>
<struct name="Rational">
@ -112,10 +112,6 @@ authorization from the authors.
<field type="CARD16" name="name_size" />
<field type="CARD16" name="width" />
<field type="CARD16" name="height" />
<!--
Some versions of Xvproto.h incorrectly have
this padding after "rate".
-->
<pad bytes="2" />
<field type="Rational" name="rate" />
<list type="char" name="name">
@ -234,10 +230,6 @@ authorization from the authors.
<reply>
<pad bytes="1" />
<field type="CARD16" name="num_encodings" />
<!--
In Xvproto.h this padding is 24 bytes
in actuality it is 22 bytes
-->
<pad bytes="22" />
<list type="EncodingInfo" name="info">
<fieldref>num_encodings</fieldref>

View File

@ -11,14 +11,17 @@ class Field(object):
visible is true iff the field should be in the request API.
wire is true iff the field should be in the request structure.
auto is true iff the field is on the wire but not in the request API (e.g. opcode)
enum is the enum name this field refers to, if any.
'''
def __init__(self, type, field_type, field_name, visible, wire, auto):
def __init__(self, type, field_type, field_name, visible, wire, auto, enum=None, isfd=False):
self.type = type
self.field_type = field_type
self.field_name = field_name
self.enum = enum
self.visible = visible
self.wire = wire
self.auto = auto
self.isfd = isfd
class Expression(object):

View File

@ -74,9 +74,11 @@ class Module(object):
self.add_type('CARD8', '', ('uint8_t',), tcard8)
self.add_type('CARD16', '', ('uint16_t',), tcard16)
self.add_type('CARD32', '', ('uint32_t',), tcard32)
self.add_type('CARD64', '', ('uint64_t',), tcard64)
self.add_type('INT8', '', ('int8_t',), tint8)
self.add_type('INT16', '', ('int16_t',), tint16)
self.add_type('INT32', '', ('int32_t',), tint32)
self.add_type('INT64', '', ('int64_t',), tint64)
self.add_type('BYTE', '', ('uint8_t',), tcard8)
self.add_type('BOOL', '', ('uint8_t',), tcard8)
self.add_type('char', '', ('char',), tchar)

View File

@ -56,7 +56,7 @@ class Type(object):
'''
raise Exception('abstract fixed_size method not overridden!')
def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto):
def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto, enum=None):
'''
Default method for making a data type a member of a structure.
Extend this if the data type needs to add an additional length field or something.
@ -65,7 +65,7 @@ class Type(object):
complex_type is the structure object.
see Field for the meaning of the other parameters.
'''
new_field = Field(self, field_type, field_name, visible, wire, auto)
new_field = Field(self, field_type, field_name, visible, wire, auto, enum)
# We dump the _placeholder_byte if any fields are added.
for (idx, field) in enumerate(complex_type.fields):
@ -75,6 +75,18 @@ class Type(object):
complex_type.fields.append(new_field)
def make_fd_of(self, module, complex_type, fd_name):
'''
Method for making a fd member of a structure.
'''
new_fd = Field(self, module.get_type_name('INT32'), fd_name, True, False, False, None, True)
# We dump the _placeholder_byte if any fields are added.
for (idx, field) in enumerate(complex_type.fields):
if field == _placeholder_byte:
complex_type.fields[idx] = new_fd
return
complex_type.fields.append(new_fd)
class SimpleType(Type):
'''
@ -103,9 +115,11 @@ class SimpleType(Type):
tcard8 = SimpleType(('uint8_t',), 1)
tcard16 = SimpleType(('uint16_t',), 2)
tcard32 = SimpleType(('uint32_t',), 4)
tcard64 = SimpleType(('uint64_t',), 8)
tint8 = SimpleType(('int8_t',), 1)
tint16 = SimpleType(('int16_t',), 2)
tint32 = SimpleType(('int32_t',), 4)
tint64 = SimpleType(('int64_t',), 8)
tchar = SimpleType(('char',), 1)
tfloat = SimpleType(('float',), 4)
tdouble = SimpleType(('double',), 8)
@ -123,7 +137,11 @@ class Enum(SimpleType):
SimpleType.__init__(self, name, 4)
self.values = []
self.bits = []
self.doc = None
for item in list(elt):
if item.tag == 'doc':
self.doc = Doc(name, item)
# First check if we're using a default value
if len(list(item)) == 0:
self.values.append((item.get('name'), ''))
@ -170,7 +188,7 @@ class ListType(Type):
self.size = member.size if member.fixed_size() else None
self.nmemb = self.expr.nmemb if self.expr.fixed_size() else None
def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto):
def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto, enum=None):
if not self.fixed_size():
# We need a length field.
# Ask our Expression object for it's name, type, and whether it's on the wire.
@ -189,10 +207,10 @@ class ListType(Type):
if needlen:
type = module.get_type(lenfid)
lenfield_type = module.get_type_name(lenfid)
type.make_member_of(module, complex_type, lenfield_type, lenfield_name, True, lenwire, False)
type.make_member_of(module, complex_type, lenfield_type, lenfield_name, True, lenwire, False, enum)
# Add ourself to the structure by calling our original method.
Type.make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto)
Type.make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto, enum)
def resolve(self, module):
if self.resolved:
@ -221,11 +239,11 @@ class ExprType(Type):
Public fields added:
expr is an Expression object containing the value of the field.
'''
def __init__(self, elt, member, *parent):
def __init__(self, elt, member, *parents):
Type.__init__(self, member.name)
self.is_expr = True
self.member = member
self.parent = parent
self.parents = parents
self.expr = Expression(list(elt)[0], self)
@ -273,11 +291,13 @@ class ComplexType(Type):
self.nmemb = 1
self.size = 0
self.lenfield_parent = [self]
self.fds = []
def resolve(self, module):
if self.resolved:
return
pads = 0
enum = None
# Resolve all of our field datatypes.
for child in list(self.elt):
@ -289,6 +309,7 @@ class ComplexType(Type):
visible = False
elif child.tag == 'field':
field_name = child.get('name')
enum = child.get('enum')
fkey = child.get('type')
type = module.get_type(fkey)
visible = True
@ -316,14 +337,19 @@ class ComplexType(Type):
type.make_member_of(module, self, field_type, field_name, visible, True, False)
type.resolve(module)
continue
elif child.tag == 'fd':
fd_name = child.get('name')
type = module.get_type('INT32')
type.make_fd_of(module, self, fd_name)
continue
else:
# Hit this on Reply
continue
continue
# Get the full type name for the field
field_type = module.get_type_name(fkey)
# Add the field to ourself
type.make_member_of(module, self, field_type, field_name, visible, True, False)
type.make_member_of(module, self, field_type, field_name, visible, True, False, enum)
# Recursively resolve the type (could be another structure, list)
type.resolve(module)
@ -413,7 +439,7 @@ class SwitchType(ComplexType):
self.calc_size() # Figure out how big we are
self.resolved = True
def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto):
def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto, enum=None):
if not self.fixed_size():
# We need a length field.
# Ask our Expression object for it's name, type, and whether it's on the wire.
@ -432,10 +458,10 @@ class SwitchType(ComplexType):
if needlen:
type = module.get_type(lenfid)
lenfield_type = module.get_type_name(lenfid)
type.make_member_of(module, complex_type, lenfield_type, lenfield_name, True, lenwire, False)
type.make_member_of(module, complex_type, lenfield_type, lenfield_name, True, lenwire, False, enum)
# Add ourself to the structure by calling our original method.
Type.make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto)
Type.make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto, enum)
# size for switch can only be calculated at runtime
def calc_size(self):
@ -475,15 +501,21 @@ class BitcaseType(ComplexType):
'''
def __init__(self, index, name, elt, *parent):
elts = list(elt)
self.expr = Expression(elts[0] if len(elts) else elt, self)
ComplexType.__init__(self, name, elts[1:])
self.expr = []
fields = []
for elt in elts:
if elt.tag == 'enumref':
self.expr.append(Expression(elt, self))
else:
fields.append(elt)
ComplexType.__init__(self, name, fields)
self.has_name = True
self.index = 1
self.lenfield_parent = list(parent) + [self]
self.parents = list(parent)
self.is_bitcase = True
def make_member_of(self, module, switch_type, field_type, field_name, visible, wire, auto):
def make_member_of(self, module, switch_type, field_type, field_name, visible, wire, auto, enum=None):
'''
register BitcaseType with the corresponding SwitchType
@ -491,7 +523,7 @@ class BitcaseType(ComplexType):
complex_type is the structure object.
see Field for the meaning of the other parameters.
'''
new_field = Field(self, field_type, field_name, visible, wire, auto)
new_field = Field(self, field_type, field_name, visible, wire, auto, enum)
# We dump the _placeholder_byte if any bitcases are added.
for (idx, field) in enumerate(switch_type.bitcases):
@ -504,8 +536,9 @@ class BitcaseType(ComplexType):
def resolve(self, module):
if self.resolved:
return
self.expr.resolve(module, self.parents+[self])
for e in self.expr:
e.resolve(module, self.parents+[self])
# Resolve the bitcase expression
ComplexType.resolve(self, module)
@ -518,6 +551,11 @@ class Reply(ComplexType):
def __init__(self, name, elt):
ComplexType.__init__(self, name, elt)
self.is_reply = True
self.doc = None
for child in list(elt):
if child.tag == 'doc':
self.doc = Doc(name, child)
def resolve(self, module):
if self.resolved:
@ -541,11 +579,14 @@ class Request(ComplexType):
def __init__(self, name, elt):
ComplexType.__init__(self, name, elt)
self.reply = None
self.doc = None
self.opcode = elt.get('opcode')
for child in list(elt):
if child.tag == 'reply':
self.reply = Reply(name, child)
if child.tag == 'doc':
self.doc = Doc(name, child)
def resolve(self, module):
if self.resolved:
@ -579,23 +620,43 @@ class Event(ComplexType):
ComplexType.__init__(self, name, elt)
self.opcodes = {}
tmp = elt.get('no-sequence-number')
self.has_seq = (tmp == None or tmp.lower() == 'false' or tmp == '0')
self.has_seq = not bool(elt.get('no-sequence-number'))
self.is_ge_event = bool(elt.get('xge'))
self.doc = None
for item in list(elt):
if item.tag == 'doc':
self.doc = Doc(name, item)
def add_opcode(self, opcode, name, main):
self.opcodes[name] = opcode
if main:
self.name = name
def resolve(self, module):
def add_event_header():
self.fields.append(Field(tcard8, tcard8.name, 'response_type', False, True, True))
if self.has_seq:
self.fields.append(_placeholder_byte)
self.fields.append(Field(tcard16, tcard16.name, 'sequence', False, True, True))
def add_ge_event_header():
self.fields.append(Field(tcard8, tcard8.name, 'response_type', False, True, True))
self.fields.append(Field(tcard8, tcard8.name, 'extension', False, True, True))
self.fields.append(Field(tcard16, tcard16.name, 'sequence', False, True, True))
self.fields.append(Field(tcard32, tcard32.name, 'length', False, True, True))
self.fields.append(Field(tcard16, tcard16.name, 'event_type', False, True, True))
if self.resolved:
return
# Add the automatic protocol fields
self.fields.append(Field(tcard8, tcard8.name, 'response_type', False, True, True))
if self.has_seq:
self.fields.append(_placeholder_byte)
self.fields.append(Field(tcard16, tcard16.name, 'sequence', False, True, True))
if self.is_ge_event:
add_ge_event_header()
else:
add_event_header()
ComplexType.resolve(self, module)
out = __main__.output['event']
@ -629,4 +690,35 @@ class Error(ComplexType):
out = __main__.output['error']
class Doc(object):
'''
Class representing a <doc> tag.
'''
def __init__(self, name, elt):
self.name = name
self.description = None
self.brief = 'BRIEF DESCRIPTION MISSING'
self.fields = {}
self.errors = {}
self.see = {}
self.example = None
for child in list(elt):
text = child.text if child.text else ''
if child.tag == 'description':
self.description = text.strip()
if child.tag == 'brief':
self.brief = text.strip()
if child.tag == 'field':
self.fields[child.get('name')] = text.strip()
if child.tag == 'error':
self.errors[child.get('type')] = text.strip()
if child.tag == 'see':
self.see[child.get('name')] = child.get('type')
if child.tag == 'example':
self.example = text.strip()
_placeholder_byte = Field(PadType(None), tcard8.name, 'pad0', False, True, False)