Find a file
Uli Schlachter e79f6b01e0 Allow access to the original type in the XML
xcbgen 'helpfully' transforms things to C types already so that libxcb
does not have to do so. Thus, even though the XML says that a field has
type CARD8, xcbgen will claim uint8_t. This might be a bit weird, but is
so far totally fine.

However, the type mapping that xcbgen uses is not injective. All of
CARD8, BYTE and BOOL get turned into uint8_t and the original type is
lost.

This is totally fine for libxcb, but programming languages other than C
do have built in boolean types. My personal problem is with Rust, where
providing a boolean for an integer argument causes a compiler error.
This results in (relatively) ugly "0 / 1" instead of "false / true".

This commit adds a new xml_type member to SimpleType. This type contains
the original string that appeared in the XML file.

Since libxcb creates instances of SimpleType itself and to avoid
breaking the API, the new argument to SimpleType.__init__ defaults to
None.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-12-28 08:32:05 +00:00
doc add support for eventstruct 2017-03-11 10:49:27 +01:00
src screensaver: Use CARD32 encoding for ScreenSaverSuspend 'suspend' 2018-03-14 10:18:29 -07:00
xcbgen Allow access to the original type in the XML 2019-12-28 08:32:05 +00:00
.gitignore Add py-compile to .gitignore 2009-09-22 16:08:11 -04:00
autogen.sh autogen.sh: Implement GNOME Build API 2013-01-16 13:20:49 -05:00
configure.ac Release xcb-proto 1.13 2018-02-28 17:18:23 +00:00
COPYING Fix the year in the other COPYING. 2006-04-27 17:58:37 -07:00
HACKING Add note on pretty patches and src/.gitattributes 2013-11-14 20:23:24 +09:00
INSTALL Remove xcl and CVSROOT. 2006-02-18 16:49:41 -08:00
Makefile.am Update README for gitlab migration 2019-02-17 10:54:09 -08:00
NEWS Release xcb-proto 1.13 2018-02-28 17:18:23 +00:00
README.md Update README for gitlab migration 2019-02-17 10:54:09 -08:00
TODO Add test program for XFree86-DRI extension to xcb-demo. Mark XFree86-DRI extension as tested and working. 2006-04-27 14:14:54 -07:00
xcb-proto.pc.in pkg-config: Add sysroot prefix 2019-04-27 22:12:10 +01:00

About xcb-proto

xcb-proto provides the XML-XCB protocol descriptions that libxcb uses to generate the majority of its code and API. We provide them separately from libxcb to allow reuse by other projects, such as additional language bindings, protocol dissectors, or documentation generators.

This separation between the XCB transport layer and the automatically-generated protocol layer also makes it far easier to write new extensions. With the Xlib infrastructure, client-side support for new extensions requires significant duplication of effort. With XCB and the XML-XCB protocol descriptions, client-side support for a new extension requires only an XML description of the extension, and not a single line of code.

Python libraries: xcb-proto also contains language-independent Python libraries that are used to parse an XML description and create objects used by Python code generators in individual language bindings. These libraries are installed into $(prefix)/lib/pythonX.X/site-packages. If this location is not on your system's Python path, scripts that import them will fail with import errors. In this case you must add the install location to your Python path by creating a file with a `.pth' extension in a directory that is on the Python path, and put the path to the install location in that file. For example, on my system there is a file named 'local.pth' in /usr/lib/python2.5/site-packages, which contains '/usr/local/lib/python2.5/site-packages'. Note that this is only necessary on machines where XCB is being built.

Please report any issues you find to the freedesktop.org bug tracker at:

https://gitlab.freedesktop.org/xorg/proto/xcbproto/issues

Discussion about XCB occurs on the XCB mailing list:

https://lists.freedesktop.org/mailman/listinfo/xcb

You can obtain the latest development versions of xcb-proto using GIT from the xcbproto code repository at:

https://gitlab.freedesktop.org/xorg/proto/xcbproto

For anonymous checkouts, use:

git clone https://gitlab.freedesktop.org/xorg/proto/xcbproto.git

For developers, use:

git clone git@gitlab.freedesktop.org:xorg/proto/xcbproto.git