diff options
author | marha <marha@users.sourceforge.net> | 2012-01-13 16:54:57 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-13 16:54:57 +0100 |
commit | 5cfbe97cd797d8f78ece208bb5114704b83d8aab (patch) | |
tree | 5c88c73ee39367742bb5547ef6fb5a3d25d656e0 /libxcb | |
parent | 39324211d7a79ef8115fd1e39771a2e400b31993 (diff) | |
download | vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.tar.gz vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.tar.bz2 vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.zip |
libxtrans libXdmcp libxcb mesa xserver git update 13 jan 2012
Diffstat (limited to 'libxcb')
-rw-r--r-- | libxcb/NEWS | 891 | ||||
-rw-r--r-- | libxcb/configure.ac | 4 | ||||
-rw-r--r-- | libxcb/src/xcb.h | 24 | ||||
-rw-r--r-- | libxcb/src/xcb_auth.c | 9 | ||||
-rw-r--r-- | libxcb/src/xcb_conn.c | 851 | ||||
-rw-r--r-- | libxcb/src/xcb_in.c | 14 | ||||
-rw-r--r-- | libxcb/src/xcb_out.c | 750 | ||||
-rw-r--r-- | libxcb/src/xcb_util.c | 19 | ||||
-rw-r--r-- | libxcb/src/xcbint.h | 7 | ||||
-rw-r--r-- | libxcb/xcb-proto/NEWS | 34 | ||||
-rw-r--r-- | libxcb/xcb-proto/configure.ac | 2 | ||||
-rw-r--r-- | libxcb/xcb-proto/src/xkb.xml | 5549 | ||||
-rw-r--r-- | libxcb/xcb-proto/src/xproto.xml | 7 |
13 files changed, 4155 insertions, 4006 deletions
diff --git a/libxcb/NEWS b/libxcb/NEWS index eaa31e885..bb4b47d68 100644 --- a/libxcb/NEWS +++ b/libxcb/NEWS @@ -1,423 +1,468 @@ -Release 1.7 (2010-08-13)
-========================
-- Always wake up readers after writing
-- Get rid of PATH_MAX and MAXPATHLEN
-- Add ~ operator support in code generator
-- xcb_open: Improve protocol/host parsing
-- xcb_connect_to_display_with_auth_info: Fix memory leak
-- Report which extensions are being built
-
-Release 1.6 (2010-04-09)
-========================
-- darwin: xnu doesn't support poll on ttys on the master side
-- Fix descriptor leak on memory error path
-- Support xcb_discard_reply
-- Open the X11 socket with close-on-exec flag
-- Fix authentication on hpux and Hurd
-
-Release 1.5 (2009-12-03)
-========================
-- setsockopt(SO_KEEPALIVE) on TCP display connections
-- Add DRI2 support
-- Fix check dependency
-- Cygwin build fix: Add -no-undefined to libtool flags
-
-Release 1.4 (2009-07-15)
-========================
-* Add majorCode, minorCode and resourceID fields to X generic error
-* Fix precedence bug: wrong length for big-requests preceded by sync
-* Fix libxcb-randr version info
-
-Release 1.3 (2009-05-29)
-========================
-* Copy full IPv4 mapping (Bug #20665)
-* Fix XID allocation
-* Use poll() instead of select() when available
-* Fix local socket connection on Hurd
-* Fix XDM-AUTHORIZATION-1
-* Disable Nagle on TCP socket
-
-Release 1.2 (2009-02-17)
-========================
-* Stop packaging auto-generated C files into tarball.
-
-Release 1.1.93 (2008-12-11)
-===========================
-Enhancements:
-* Apple: Enable support for launchd DISPLAY socket
-* Treat XIDs the same as other cardinal values.
-
-Release 1.1.92 (2008-11-01)
-===========================
-Enhancements:
-* Added small fix to support trailing fixed fields; also warning for non-pad fixed fields
-* Fixed overly aggressive warning about fixed field following variable
-* Added generation of extern "C" for compatibility with C++
-* Remove libxcb-xlib and xcbxlib.h.
-* Inline _xcb_lock_io, _xcb_unlock_io, and _xcb_wait_io.
-* Track 64-bit sequence numbers internally.
-* Use sequence number ranges in pending replies
-* Remove duplicate XCB_EXTENSION calls for Composite extension
-* Factorize m4 macros and add one to set X extensions
-* Allow compile-time setting for XCB queue buffer size
-* Support handing off socket write permission to external code.
-* Add support for the abstract socket namespace under Linux
-
-Bug fixes:
-* Fix tiny memory leak in read_packet
-* Fix some fd leaks in _xcb_open_*()
-
-Release 1.1 (2007-11-04)
-========================
-
-This release requires xcb-proto 1.1, due to the addition of the
-extension-multiword attribute to the XML schema.
-
-This release contains several important bug fixes, summarized below. It
-also contains a patch much like Novell's libxcb-sloppy-lock.diff.
-Rationale from the commit message follows. The patch and this rationale
-were authored by Jamey Sharp <jamey@minilop.net>, with agreement from
-Josh Triplett <josh@freedesktop.org>.
-
- I strongly opposed proposals like this one for a long time.
- Originally I had a very good reason: libX11, when compiled to use
- XCB, would crash soon after a locking correctness violation, so it
- was better to have an informative assert failure than a mystifying
- crash soon after.
-
- It took some time for me to realize that I'd changed the libX11
- implementation (for unrelated reasons) so that it could survive most
- invalid locking situations, as long as it wasn't actually being used
- from multiple threads concurrently.
-
- The other thing that has changed is that most of the code with
- incorrect locking has now been fixed. The value of the assert is
- accordingly lower.
-
- However, remaining broken callers do need to be fixed. That's why
- libXCB will still noisily print a stacktrace (if possible) on each
- assertion failure, even when assert isn't actually invoked to
- abort() the program; and that's why aborting is still default. This
- environment variable is provided only for use as a temporary
- workaround for broken applications.
-
-Enhancements:
-* Print a backtrace, if possible, on locking assertion failures.
-* Skip abort() on locking assertions if LIBXCB_ALLOW_SLOPPY_LOCK is set.
-* xcb_poll_for_event: Return already-read events before reading again.
-* Output a configuration summary at the end of ./configure.
-
-Bug fixes:
-* Don't hold the xlib-xcb lock while sleeping: that allows deadlock.
-* Allow unix:<screen> style display names again.
-* Bug #9119: test xcb_popcount
-* Fix unit tests for FreeBSD
-* NetBSD doesn't have AI_ADDRCONFIG: use it only if it's available.
-* Require libXau >= 0.99.2; earlier versions have a broken .pc file
-* Use substitition variables in xcb-xinerama.pc.in
-* Update autogen.sh to one that does objdir != srcdir
-* Add tools/* and autogen.sh to EXTRA_DIST.
-* Doxygen can now be fully disabled if desired.
-
-Documentation improvements:
-* Many fixes and updates to the tutorial.
-* Iterators, requests, and replies get partial Doxygen documentation.
-
-
-Release 1.0 (2006-11-23)
-========================
-
-The "Thanksgiving" release: We feel thankful to have it released. Five years
-have passed since XCB's initial commit on September 3rd, 2001:
- <http://gitweb.freedesktop.org/?p=xcb.git;a=commit;h=09e54c4a3c>
-
-* Support IPv6. XCB now supports displays with IPv6 addresses, with or without
- enclosing square brackets, or with hosts which resolve to IPv6 addresses, by
- using getaddrinfo instead of gethostbyname, and by including support for
- authentication for such connections. This allows such displays as "::1:1.1".
-
-* XCB now uses the libpthread-stubs, to properly support optional use of
- pthreads even on platforms which do not have all the necessary pthread stubs
- in libc or otherwise available by default.
-
-* Switch from the old AM_PATH_CHECK macro to pkg-config. check 0.9.4 is now
- required to build XCB's unit tests. The version that we were requiring was
- not actually new enough to let our unit tests compile, and the AM_PATH_CHECK
- macro is now considered deprecated. We know that versions of check using
- pkg-config are new enough to work, and the check dependency was optional
- anyway, so we've dropped support for older versions.
-
-* Provide a xcb_prefetch_maximum_request_length counterpart to
- xcb_get_maximum_request_length.
-
-* Fix Bug #5958: zero out padding bytes in requests.
-
-* Change xcb_connect to pass the display number to _xcb_get_auth_info, which
- passes it to get_authptr. This allows get_authptr to stop hacking the
- display number out of the sockaddrs of various address families, such as
- port - X_TCP_PORT, or the number after the last X in the UNIX socket path.
-
-* Remove --with-opt and --with-debug options from configure.ac; configure
- supports the use of custom CFLAGS, so please use that instead.
-
-* Reove support for the <localfield> tag in protocol descriptions, since they
- no longer use it, and since new protocol descriptions should not need it
- either.
-
-* xcb-proto has no libraries or headers, so don't use XCBPROTO_CFLAGS or
- XCBPROTO_LIBS.
-
-* XCB builds which use xdmcp now include it in Requires.private, to support
- static linking.
-
-* Replace "long" with uint32_t when used for a 32-bit quantity
-
-* Various enhancements to the generation of documentation with Doxygen:
- * Check for doxygen in configure.ac
- * Fix some Doxygen warnings.
- * Install documentation.
- * Handle out-of-tree builds, with srcdir != builddir. xcb.doxygen now gets
- generated from xcb.doxygen.in, so that it can use top_builddir and
- top_srcdir to find source and to output documentation.
- * Fill in PROJECT_NUMBER from @VERSION@, now that we have it readily
- available via autoconf.
-
-
-Release 1.0 RC3 (2006-11-02)
-============================
-
-Note: Version 0.9.4 of the test suite tool "check" provides a broken
-version of the AM_PATH_CHECK macro, which causes autoconf to fail due to
-insufficient quoting on the macro names it prints in its deprecation
-message. We have written a patch to fix this problem, available at:
-<http://bugs.debian.org/cgi-bin/bugreport.cgi/check-m4-am-path-check-use-quadrigraphs-in-macro-names-to-unbreak-autoconf.patch?bug=395466;msg=20;att=1>
-Version 0.9.4-2 of the Debian package for check includes this patch.
-Users of other distributions who want to re-autotool libxcb will need to
-apply this patch, use an older version of check, or wait for a fixed
-upstream version. This bug does not affect users who use the distributed
-tarballs and do not re-autotool.
-
-* Add library support for xcb-xinerama, using new protocol description
- from xcb-proto.
-* In the generated protocol code, define and use constants for opcode
- numbers rather than hard-coding them.
-* In the API conversion script, match only XCB-namespaced XID generators
- when converting to xcb_generate_id.
-* Quit treating xproto specially in Makefile.am: handle it like all the
- extensions.
-* Generate Doxygen documentation comments in the protocol stubs, and
- provide a Doxygen config file for building HTML documentation for XCB.
-* Add note to xcbxlib.h that nothing except Xlib/XCB should use it.
-* Extend test suite to test xcb_parse_display with NULL argument and
- display in $DISPLAY.
-
-
-Release 1.0 RC2 (2006-10-07)
-============================
-
-API changes
------------
-
-In our announcement of XCB 1.0 RC1, we proposed two API changes for
-community feedback:
-
- We would greatly appreciate API review in this final release
- candidate period. We've had some limited feedback that our attempts
- to impose static type safety on XIDs in C pose more a hindrance than
- a help, so we would appreciate discussion over whether this
- constitutes a "serious issue with the API". Some question also
- remains of whether xcb_poll_for_event should have the out-parameter
- 'error', now that XCB has a more uniform mechanism for reporting
- connection errors. Speak now on these points or leave us alone. ;-)
-
-Since we've received feedback agreeing with our proposed changes, and no
-objections or requests to keep the existing API, we made both changes
-and bumped the soname to libxcb.so.1.0.0 in preparation for the release
-of XCB 1.0.
-
-* Remove XID wrapper structures and replace them with uint32_t typedefs.
- XID union types like xcb_drawable_t and xcb_fontable_t also become
- uint32_t typedefs. The API conversion script now replaces xcb_*_new
- with calls directly to xcb_generate_id. This change makes
- xcb_generate_id part of the client API rather than the extension API,
- so move xcb_generate_id from xcbext.h to xcb.h.
-
-* Remove the 'int *error' out-parameter for xcb_poll_for_event.
- xcb_poll_for_event now shuts down the xcb_connection_t on fatal
- errors; use xcb_connection_has_error to check.
-
-The Xlib-specific API in libxcb-xlib also changed:
-
-* Stop exposing the XCB IO lock for Xlib's benefit, by removing
- xcb_get_io_lock from the Xlib-specific XCB API; instead, libxcb-xlib
- now provides xcb_xlib_lock and xcb_xlib_unlock.
-
-Code generation changes
------------------------
-
-* The code generator no longer implicitly imports xproto for extensions.
- xcb-proto 1.0 RC2 includes the corresponding change to explicitly
- import xproto in extensions that need it
-
-* The generated protocol headers now declare "struct foo", "union foo"
- or "enum foo", not just the typedef "foo" of an unnamed
- struct/union/enum type.
-
-Bug Fixes
----------
-
-* Make Plan 7 'checked' requests work correctly.
-
-Documentation improvements
---------------------------
-
-* Document xcb_generate_id.
-
-* Tutorial enhancements.
-
-
-Release 1.0 RC1 (2006-09-25)
-============================
-
-The Great XCB Renaming
-----------------------
-
-Rename API to follow a new naming convention:
-
-* XCB_CONSTANTS_UPPERCASE_WITH_UNDERSCORES
-* xcb_functions_lowercase_with_underscores
-* xcb_types_lowercase_with_underscores_and_suffix_t
-* expand all abbreviations like "req", "rep", and "iter"
-
-Word boundaries for the names in the protocol descriptions fall:
-
-* Wherever the protocol descriptions already have an underscore
-* Between a lowercase letter and a subsequent uppercase letter
-* Before the last uppercase letter in a string of uppercase letters
- followed by a lowercase letter (such as in LSBFirst between LSB and
- First)
-* Before and after a string of digits (with exceptions for sized types
- like xcb_char2b_t and xcb_glx_float32_t to match the stdint.h
- convention)
-
-Also fix up some particular naming issues:
-
-* Rename shape_op and shape_kind to drop the "shape_" prefix, since
- otherwise these types end up as xcb_shape_shape_{op,kind}_t.
-* Remove leading underscores from enums in the GLX protocol description,
- previously needed to ensure a word separator, but now redundant.
-
-This renaming breaks code written for the previous API naming
-convention. The scripts in XCB's tools directory will convert code
-written for the old API to use the new API; they work well enough that
-we used them to convert the non-program-generated code in XCB, and when
-run on the old program-generated code, they almost exactly reproduce the
-new program-generated code (modulo whitespace and bugs in the old code
-generator).
-
-Authors: Vincent Torri, Thomas Hunger, Josh Triplett
-
-In addition to the API renaming, the library SONAMEs have changed to
-libxcb.so and libxcb-extname.so. The library major version remains at 0,
-to become version 1 before 1.0 is released; the SONAME lowercasing means
-that this will not conflict with XCB 0.9 libraries.
-
-The header files have moved from /usr/include/X11/XCB/ to
-/usr/include/xcb/. The XML-XCB protocol descriptions have moved to
-/usr/share/xcb, with extension descriptions no longer relegated to an
-extensions/ subdirectory. The API conversion script api_conv.pl will fix
-references to the header files, and packages using pkg-config will
-automatically use the new library names.
-
-Error handling Plan 7
----------------------
-
-All request functions now come in an "unchecked" and "checked" variant.
-The checked variant allows callers to handle errors inline where they
-obtain the reply, or by calling xcb_request_check for requests with no
-reply. The unchecked variant uses the event queue for errors. Requests
-with replies default to checked, because the caller must already make a
-function call to retrieve the reply and can see the error at that time;
-the unchecked variant uses the suffix _unchecked. Requests without
-replies default to unchecked, because the caller will not necessarily
-expect to handle a response, and the checked variant uses the suffix
-_checked.
-
-Connection error handling
--------------------------
-
-Fatal connection errors now put the xcb_connection_t object into an
-error state, at which point all further operations on that connection
-will fail. Callers can use the new xcb_connection_has_error function to
-check for this state in a connection. Functions that return a
-connection, such as the xcb_connect function, may instead return an
-xcb_connection_t already in an error state.
-
-In the future we expect to add additional API for getting more
-information about the error condition that caused the connection to get
-into an error state.
-
-Smaller API changes
--------------------
-
-All functions that have been marked 'deprecated' up to now have been
-removed for this release. After XCB 1.0 is released, functions marked
-'deprecated' will be preserved until the end of time to maintain
-compatibility.
-
-XCB no longer provides a sync function. Most callers of this function
-should use xcb_flush instead, which usually provides the intended
-functionality and does not require a round-trip to the server. If you
-really need this functionality, either use xcb_get_input_focus like sync
-used to do, or use the xcb_aux_sync function from the xcb-aux library in
-xcb-util. However, note that we do not consider the libraries in
-xcb-util remotely stable yet.
-
-XCB no longer provides xcb_[extension_name]_init functions for each
-extension. These functions previously caused XCB to issue and process a
-QueryExtension request. Callers should now directly call
-xcb_get_extension_data on the xcb_[extension_name]_id, or use
-xcb_prefetch_extension_data if they do not need to force a round-trip
-immediately.
-
-The compatibility functions in xcbxlib.h, provided solely for use by
-Xlib/XCB, now exist in a separate library libxcb-xlib. We don't want to
-have to change the libxcb soname if we later change or remove the Xlib
-compatibility functions, and nothing except Xlib/XCB should ever use
-them. (Applications which use Xlib/XCB do not need this library either;
-Xlib/XCB only uses it internally.)
-
-The descriptions of several extensions have been updated to match the
-latest versions implemented in the X.org X server.
-
-GIT Repository split
---------------------
-
-Previously, several XCB-related projects all existed under the umbrella
-of a single monolithic GIT repository with per-project subdirectories.
-We have split this repository into individual per-project repositories.
-
-Josh Triplett and Jamey Sharp wrote a tool called git-split to
-accomplish this repository split. git-split reconstructs the history of
-a sub-project previously stored in a subdirectory of a larger
-repository. It constructs new commit objects based on the existing tree
-objects for the subtree in each commit, and discards commits which do
-not affect the history of the sub-project, as well as merges made
-unnecessary due to these discarded commits.
-
-We would like to acknowledge the work of the gobby team in creating a
-collaborative editor which greatly aided the development of git-split
-(as well as these release notes).
-
-Build and implementation fixes
-------------------------------
-
-XCB no longer needs proto/x11 from X.org; the XCB header xproto.h
-provides the definitions from X.h, named according to XCB conventions.
-
-XCB should now build with non-GNU implementations of Make.
-
-XCB properly handles 32-bit wrap of sequence numbers, and thus now
-supports issuing more than 2**32 requests in one connection.
-
-Fixed bugs #7001, #7261.
+Release 1.8 (2012-01-11) +======================== +- xcb_disconnect: call shutdown() to force a disconnect +- Use special path to sockets when running under Solaris Trusted Extensions +- Remove unused DECnet code +- Add #include <sys/socket.h> to xcb_conn.c +- Make launchd code in xcb_util.c match surrounding code indent levels +- If protocol is "unix", use a Unix domain socket, not TCP +- Added more error states and removed global error_connection +- Handle XGE events with the "send event" flag +- added xcb_sumof() with restriction to uint8_t +- xkb: updated configure.ac/Makefile.am +- xkb: added pkg config file +- special case 'intermixed variable and fixed size fields': fixed reply side, needs testing +- added accessors for special cases +- Add support for building with Python 3 +- Insert, not append explicit xcbgen dir python path +- xcb_request_check: Sync even if an event was read for this sequence. +- _xcb_conn_wait: Shut down the connection on unexpected poll() events. +- xcb_send_request: Send all requests using a common internal send_request. +- xcb_request_check: Hold the I/O lock while deciding to sync. +- xcb_discard_reply: Simplify by re-using poll_for_reply helper. +- xcb_in: Use 64-bit sequence numbers internally everywhere. +- Enable AM_SILENT_RULES on automake 1.11 or newer. +- Factor reader_list management out of wait_for_reply. +- Dequeue readers that can't receive any new responses. +- Delete the old c-client.xsl. +- Keep ALIGNOF definition out of the public namespace. +- darwin: Don't use poll() when expected to run on darwin10 and prior +- Add Win32 +- Allow disconnecting connections that are in error state. +- Make xcb_take_socket keep flushing until idle +- Support pre-IPv6 systems (without getaddrinfo) +- Drop AI_ADDRCONFIG when resolving TCP addresses +- xcb_auth: Fix memory leak in _xcb_get_auth_info. +- Don't emit out-of-module sizeof definitions +- Clean up a couple of warnings in xprint +- Prevent reply waiters from being blocked. +- Prevent theoretical double free and leak on get_peer_sock_name. +- Introduce a variant of xcb_poll_for_event for examining event queue. +- xcb_take_socket: Document sequence wrap requirements +- Compute alignment correctly +- Fix a dead-lock due to xcb_poll_for_reply + + +Release 1.7 (2010-08-13) +======================== +- Always wake up readers after writing +- Get rid of PATH_MAX and MAXPATHLEN +- Add ~ operator support in code generator +- xcb_open: Improve protocol/host parsing +- xcb_connect_to_display_with_auth_info: Fix memory leak +- Report which extensions are being built + +Release 1.6 (2010-04-09) +======================== +- darwin: xnu doesn't support poll on ttys on the master side +- Fix descriptor leak on memory error path +- Support xcb_discard_reply +- Open the X11 socket with close-on-exec flag +- Fix authentication on hpux and Hurd + +Release 1.5 (2009-12-03) +======================== +- setsockopt(SO_KEEPALIVE) on TCP display connections +- Add DRI2 support +- Fix check dependency +- Cygwin build fix: Add -no-undefined to libtool flags + +Release 1.4 (2009-07-15) +======================== +* Add majorCode, minorCode and resourceID fields to X generic error +* Fix precedence bug: wrong length for big-requests preceded by sync +* Fix libxcb-randr version info + +Release 1.3 (2009-05-29) +======================== +* Copy full IPv4 mapping (Bug #20665) +* Fix XID allocation +* Use poll() instead of select() when available +* Fix local socket connection on Hurd +* Fix XDM-AUTHORIZATION-1 +* Disable Nagle on TCP socket + +Release 1.2 (2009-02-17) +======================== +* Stop packaging auto-generated C files into tarball. + +Release 1.1.93 (2008-12-11) +=========================== +Enhancements: +* Apple: Enable support for launchd DISPLAY socket +* Treat XIDs the same as other cardinal values. + +Release 1.1.92 (2008-11-01) +=========================== +Enhancements: +* Added small fix to support trailing fixed fields; also warning for non-pad fixed fields +* Fixed overly aggressive warning about fixed field following variable +* Added generation of extern "C" for compatibility with C++ +* Remove libxcb-xlib and xcbxlib.h. +* Inline _xcb_lock_io, _xcb_unlock_io, and _xcb_wait_io. +* Track 64-bit sequence numbers internally. +* Use sequence number ranges in pending replies +* Remove duplicate XCB_EXTENSION calls for Composite extension +* Factorize m4 macros and add one to set X extensions +* Allow compile-time setting for XCB queue buffer size +* Support handing off socket write permission to external code. +* Add support for the abstract socket namespace under Linux + +Bug fixes: +* Fix tiny memory leak in read_packet +* Fix some fd leaks in _xcb_open_*() + +Release 1.1 (2007-11-04) +======================== + +This release requires xcb-proto 1.1, due to the addition of the +extension-multiword attribute to the XML schema. + +This release contains several important bug fixes, summarized below. It +also contains a patch much like Novell's libxcb-sloppy-lock.diff. +Rationale from the commit message follows. The patch and this rationale +were authored by Jamey Sharp <jamey@minilop.net>, with agreement from +Josh Triplett <josh@freedesktop.org>. + + I strongly opposed proposals like this one for a long time. + Originally I had a very good reason: libX11, when compiled to use + XCB, would crash soon after a locking correctness violation, so it + was better to have an informative assert failure than a mystifying + crash soon after. + + It took some time for me to realize that I'd changed the libX11 + implementation (for unrelated reasons) so that it could survive most + invalid locking situations, as long as it wasn't actually being used + from multiple threads concurrently. + + The other thing that has changed is that most of the code with + incorrect locking has now been fixed. The value of the assert is + accordingly lower. + + However, remaining broken callers do need to be fixed. That's why + libXCB will still noisily print a stacktrace (if possible) on each + assertion failure, even when assert isn't actually invoked to + abort() the program; and that's why aborting is still default. This + environment variable is provided only for use as a temporary + workaround for broken applications. + +Enhancements: +* Print a backtrace, if possible, on locking assertion failures. +* Skip abort() on locking assertions if LIBXCB_ALLOW_SLOPPY_LOCK is set. +* xcb_poll_for_event: Return already-read events before reading again. +* Output a configuration summary at the end of ./configure. + +Bug fixes: +* Don't hold the xlib-xcb lock while sleeping: that allows deadlock. +* Allow unix:<screen> style display names again. +* Bug #9119: test xcb_popcount +* Fix unit tests for FreeBSD +* NetBSD doesn't have AI_ADDRCONFIG: use it only if it's available. +* Require libXau >= 0.99.2; earlier versions have a broken .pc file +* Use substitition variables in xcb-xinerama.pc.in +* Update autogen.sh to one that does objdir != srcdir +* Add tools/* and autogen.sh to EXTRA_DIST. +* Doxygen can now be fully disabled if desired. + +Documentation improvements: +* Many fixes and updates to the tutorial. +* Iterators, requests, and replies get partial Doxygen documentation. + + +Release 1.0 (2006-11-23) +======================== + +The "Thanksgiving" release: We feel thankful to have it released. Five years +have passed since XCB's initial commit on September 3rd, 2001: + <http://gitweb.freedesktop.org/?p=xcb.git;a=commit;h=09e54c4a3c> + +* Support IPv6. XCB now supports displays with IPv6 addresses, with or without + enclosing square brackets, or with hosts which resolve to IPv6 addresses, by + using getaddrinfo instead of gethostbyname, and by including support for + authentication for such connections. This allows such displays as "::1:1.1". + +* XCB now uses the libpthread-stubs, to properly support optional use of + pthreads even on platforms which do not have all the necessary pthread stubs + in libc or otherwise available by default. + +* Switch from the old AM_PATH_CHECK macro to pkg-config. check 0.9.4 is now + required to build XCB's unit tests. The version that we were requiring was + not actually new enough to let our unit tests compile, and the AM_PATH_CHECK + macro is now considered deprecated. We know that versions of check using + pkg-config are new enough to work, and the check dependency was optional + anyway, so we've dropped support for older versions. + +* Provide a xcb_prefetch_maximum_request_length counterpart to + xcb_get_maximum_request_length. + +* Fix Bug #5958: zero out padding bytes in requests. + +* Change xcb_connect to pass the display number to _xcb_get_auth_info, which + passes it to get_authptr. This allows get_authptr to stop hacking the + display number out of the sockaddrs of various address families, such as + port - X_TCP_PORT, or the number after the last X in the UNIX socket path. + +* Remove --with-opt and --with-debug options from configure.ac; configure + supports the use of custom CFLAGS, so please use that instead. + +* Reove support for the <localfield> tag in protocol descriptions, since they + no longer use it, and since new protocol descriptions should not need it + either. + +* xcb-proto has no libraries or headers, so don't use XCBPROTO_CFLAGS or + XCBPROTO_LIBS. + +* XCB builds which use xdmcp now include it in Requires.private, to support + static linking. + +* Replace "long" with uint32_t when used for a 32-bit quantity + +* Various enhancements to the generation of documentation with Doxygen: + * Check for doxygen in configure.ac + * Fix some Doxygen warnings. + * Install documentation. + * Handle out-of-tree builds, with srcdir != builddir. xcb.doxygen now gets + generated from xcb.doxygen.in, so that it can use top_builddir and + top_srcdir to find source and to output documentation. + * Fill in PROJECT_NUMBER from @VERSION@, now that we have it readily + available via autoconf. + + +Release 1.0 RC3 (2006-11-02) +============================ + +Note: Version 0.9.4 of the test suite tool "check" provides a broken +version of the AM_PATH_CHECK macro, which causes autoconf to fail due to +insufficient quoting on the macro names it prints in its deprecation +message. We have written a patch to fix this problem, available at: +<http://bugs.debian.org/cgi-bin/bugreport.cgi/check-m4-am-path-check-use-quadrigraphs-in-macro-names-to-unbreak-autoconf.patch?bug=395466;msg=20;att=1> +Version 0.9.4-2 of the Debian package for check includes this patch. +Users of other distributions who want to re-autotool libxcb will need to +apply this patch, use an older version of check, or wait for a fixed +upstream version. This bug does not affect users who use the distributed +tarballs and do not re-autotool. + +* Add library support for xcb-xinerama, using new protocol description + from xcb-proto. +* In the generated protocol code, define and use constants for opcode + numbers rather than hard-coding them. +* In the API conversion script, match only XCB-namespaced XID generators + when converting to xcb_generate_id. +* Quit treating xproto specially in Makefile.am: handle it like all the + extensions. +* Generate Doxygen documentation comments in the protocol stubs, and + provide a Doxygen config file for building HTML documentation for XCB. +* Add note to xcbxlib.h that nothing except Xlib/XCB should use it. +* Extend test suite to test xcb_parse_display with NULL argument and + display in $DISPLAY. + + +Release 1.0 RC2 (2006-10-07) +============================ + +API changes +----------- + +In our announcement of XCB 1.0 RC1, we proposed two API changes for +community feedback: + + We would greatly appreciate API review in this final release + candidate period. We've had some limited feedback that our attempts + to impose static type safety on XIDs in C pose more a hindrance than + a help, so we would appreciate discussion over whether this + constitutes a "serious issue with the API". Some question also + remains of whether xcb_poll_for_event should have the out-parameter + 'error', now that XCB has a more uniform mechanism for reporting + connection errors. Speak now on these points or leave us alone. ;-) + +Since we've received feedback agreeing with our proposed changes, and no +objections or requests to keep the existing API, we made both changes +and bumped the soname to libxcb.so.1.0.0 in preparation for the release +of XCB 1.0. + +* Remove XID wrapper structures and replace them with uint32_t typedefs. + XID union types like xcb_drawable_t and xcb_fontable_t also become + uint32_t typedefs. The API conversion script now replaces xcb_*_new + with calls directly to xcb_generate_id. This change makes + xcb_generate_id part of the client API rather than the extension API, + so move xcb_generate_id from xcbext.h to xcb.h. + +* Remove the 'int *error' out-parameter for xcb_poll_for_event. + xcb_poll_for_event now shuts down the xcb_connection_t on fatal + errors; use xcb_connection_has_error to check. + +The Xlib-specific API in libxcb-xlib also changed: + +* Stop exposing the XCB IO lock for Xlib's benefit, by removing + xcb_get_io_lock from the Xlib-specific XCB API; instead, libxcb-xlib + now provides xcb_xlib_lock and xcb_xlib_unlock. + +Code generation changes +----------------------- + +* The code generator no longer implicitly imports xproto for extensions. + xcb-proto 1.0 RC2 includes the corresponding change to explicitly + import xproto in extensions that need it + +* The generated protocol headers now declare "struct foo", "union foo" + or "enum foo", not just the typedef "foo" of an unnamed + struct/union/enum type. + +Bug Fixes +--------- + +* Make Plan 7 'checked' requests work correctly. + +Documentation improvements +-------------------------- + +* Document xcb_generate_id. + +* Tutorial enhancements. + + +Release 1.0 RC1 (2006-09-25) +============================ + +The Great XCB Renaming +---------------------- + +Rename API to follow a new naming convention: + +* XCB_CONSTANTS_UPPERCASE_WITH_UNDERSCORES +* xcb_functions_lowercase_with_underscores +* xcb_types_lowercase_with_underscores_and_suffix_t +* expand all abbreviations like "req", "rep", and "iter" + +Word boundaries for the names in the protocol descriptions fall: + +* Wherever the protocol descriptions already have an underscore +* Between a lowercase letter and a subsequent uppercase letter +* Before the last uppercase letter in a string of uppercase letters + followed by a lowercase letter (such as in LSBFirst between LSB and + First) +* Before and after a string of digits (with exceptions for sized types + like xcb_char2b_t and xcb_glx_float32_t to match the stdint.h + convention) + +Also fix up some particular naming issues: + +* Rename shape_op and shape_kind to drop the "shape_" prefix, since + otherwise these types end up as xcb_shape_shape_{op,kind}_t. +* Remove leading underscores from enums in the GLX protocol description, + previously needed to ensure a word separator, but now redundant. + +This renaming breaks code written for the previous API naming +convention. The scripts in XCB's tools directory will convert code +written for the old API to use the new API; they work well enough that +we used them to convert the non-program-generated code in XCB, and when +run on the old program-generated code, they almost exactly reproduce the +new program-generated code (modulo whitespace and bugs in the old code +generator). + +Authors: Vincent Torri, Thomas Hunger, Josh Triplett + +In addition to the API renaming, the library SONAMEs have changed to +libxcb.so and libxcb-extname.so. The library major version remains at 0, +to become version 1 before 1.0 is released; the SONAME lowercasing means +that this will not conflict with XCB 0.9 libraries. + +The header files have moved from /usr/include/X11/XCB/ to +/usr/include/xcb/. The XML-XCB protocol descriptions have moved to +/usr/share/xcb, with extension descriptions no longer relegated to an +extensions/ subdirectory. The API conversion script api_conv.pl will fix +references to the header files, and packages using pkg-config will +automatically use the new library names. + +Error handling Plan 7 +--------------------- + +All request functions now come in an "unchecked" and "checked" variant. +The checked variant allows callers to handle errors inline where they +obtain the reply, or by calling xcb_request_check for requests with no +reply. The unchecked variant uses the event queue for errors. Requests +with replies default to checked, because the caller must already make a +function call to retrieve the reply and can see the error at that time; +the unchecked variant uses the suffix _unchecked. Requests without +replies default to unchecked, because the caller will not necessarily +expect to handle a response, and the checked variant uses the suffix +_checked. + +Connection error handling +------------------------- + +Fatal connection errors now put the xcb_connection_t object into an +error state, at which point all further operations on that connection +will fail. Callers can use the new xcb_connection_has_error function to +check for this state in a connection. Functions that return a +connection, such as the xcb_connect function, may instead return an +xcb_connection_t already in an error state. + +In the future we expect to add additional API for getting more +information about the error condition that caused the connection to get +into an error state. + +Smaller API changes +------------------- + +All functions that have been marked 'deprecated' up to now have been +removed for this release. After XCB 1.0 is released, functions marked +'deprecated' will be preserved until the end of time to maintain +compatibility. + +XCB no longer provides a sync function. Most callers of this function +should use xcb_flush instead, which usually provides the intended +functionality and does not require a round-trip to the server. If you +really need this functionality, either use xcb_get_input_focus like sync +used to do, or use the xcb_aux_sync function from the xcb-aux library in +xcb-util. However, note that we do not consider the libraries in +xcb-util remotely stable yet. + +XCB no longer provides xcb_[extension_name]_init functions for each +extension. These functions previously caused XCB to issue and process a +QueryExtension request. Callers should now directly call +xcb_get_extension_data on the xcb_[extension_name]_id, or use +xcb_prefetch_extension_data if they do not need to force a round-trip +immediately. + +The compatibility functions in xcbxlib.h, provided solely for use by +Xlib/XCB, now exist in a separate library libxcb-xlib. We don't want to +have to change the libxcb soname if we later change or remove the Xlib +compatibility functions, and nothing except Xlib/XCB should ever use +them. (Applications which use Xlib/XCB do not need this library either; +Xlib/XCB only uses it internally.) + +The descriptions of several extensions have been updated to match the +latest versions implemented in the X.org X server. + +GIT Repository split +-------------------- + +Previously, several XCB-related projects all existed under the umbrella +of a single monolithic GIT repository with per-project subdirectories. +We have split this repository into individual per-project repositories. + +Josh Triplett and Jamey Sharp wrote a tool called git-split to +accomplish this repository split. git-split reconstructs the history of +a sub-project previously stored in a subdirectory of a larger +repository. It constructs new commit objects based on the existing tree +objects for the subtree in each commit, and discards commits which do +not affect the history of the sub-project, as well as merges made +unnecessary due to these discarded commits. + +We would like to acknowledge the work of the gobby team in creating a +collaborative editor which greatly aided the development of git-split +(as well as these release notes). + +Build and implementation fixes +------------------------------ + +XCB no longer needs proto/x11 from X.org; the XCB header xproto.h +provides the definitions from X.h, named according to XCB conventions. + +XCB should now build with non-GNU implementations of Make. + +XCB properly handles 32-bit wrap of sequence numbers, and thus now +supports issuing more than 2**32 requests in one connection. + +Fixed bugs #7001, #7261. diff --git a/libxcb/configure.ac b/libxcb/configure.ac index cba9dbdad..9abaffced 100644 --- a/libxcb/configure.ac +++ b/libxcb/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.57) AC_INIT([libxcb], - 1.7, + 1.8, [xcb@lists.freedesktop.org]) AC_CONFIG_SRCDIR([xcb.pc.in]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) @@ -34,7 +34,7 @@ fi AC_SUBST(HTML_CHECK_RESULT) # Checks for pkg-config packages -PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.6) +PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.7) NEEDED="pthread-stubs xau >= 0.99.2" PKG_CHECK_MODULES(NEEDED, $NEEDED) diff --git a/libxcb/src/xcb.h b/libxcb/src/xcb.h index 3ee7965d2..44f650ad7 100644 --- a/libxcb/src/xcb.h +++ b/libxcb/src/xcb.h @@ -69,6 +69,21 @@ extern "C" { /** X_TCP_PORT + display number = server port for TCP transport */ #define X_TCP_PORT 6000 +/** xcb connection errors because of socket, pipe and other stream errors. */ +#define XCB_CONN_ERROR 1 + +/** xcb connection shutdown because of extension not sppported */ +#define XCB_CONN_CLOSED_EXT_NOTSUPPORTED 2 + +/** malloc(), calloc() and realloc() error upon failure, for eg ENOMEM */ +#define XCB_CONN_CLOSED_MEM_INSUFFICIENT 3 + +/** Connection closed, exceeding request length that server accepts. */ +#define XCB_CONN_CLOSED_REQ_LEN_EXCEED 4 + +/** Connection closed, error during parsing display string. */ +#define XCB_CONN_CLOSED_PARSE_ERR 5 + #define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1)) /* Opaque structures */ @@ -396,15 +411,18 @@ int xcb_get_file_descriptor(xcb_connection_t *c); /** * @brief Test whether the connection has shut down due to a fatal error. * @param c: The connection. - * @return 1 if the connection is in an error state; 0 otherwise. + * @return > 0 if the connection is in an error state; 0 otherwise. * * Some errors that occur in the context of an xcb_connection_t * are unrecoverable. When such an error occurs, the * connection is shut down and further operations on the * xcb_connection_t have no effect. * - * @todo Other functions should document the conditions in - * which they shut down the connection. + * @return XCB_CONN_ERROR, because of socket errors, pipe errors or other stream errors. + * @return XCB_CONN_CLOSED_EXT_NOTSUPPORTED, when extension not supported. + * @return XCB_CONN_CLOSED_MEM_INSUFFICIENT, when memory not available. + * @return XCB_CONN_CLOSED_REQ_LEN_EXCEED, exceeding request length that server accepts. + * @return XCB_CONN_CLOSED_PARSE_ERR, error during parsing display string. */ int xcb_connection_has_error(xcb_connection_t *c); diff --git a/libxcb/src/xcb_auth.c b/libxcb/src/xcb_auth.c index 859ab8a76..ea4ad8f6a 100644 --- a/libxcb/src/xcb_auth.c +++ b/libxcb/src/xcb_auth.c @@ -30,16 +30,20 @@ #include <sys/param.h> #include <unistd.h> #include <stdlib.h> -#include <arpa/inet.h> #ifdef __INTERIX /* _don't_ ask. interix has INADDR_LOOPBACK in here. */ #include <rpc/types.h> #endif +#ifdef HASXDMAUTH +#include <X11/Xdmcp.h> +#endif + #ifdef _WIN32 #include "xcb_windefs.h" #else +#include <arpa/inet.h> #include <sys/socket.h> #include <netinet/in.h> #include <sys/un.h> @@ -48,9 +52,6 @@ #include "xcb.h" #include "xcbint.h" -#ifdef HASXDMAUTH -#include <X11/Xdmcp.h> -#endif enum auth_protos { #ifdef HASXDMAUTH diff --git a/libxcb/src/xcb_conn.c b/libxcb/src/xcb_conn.c index 84a9917d6..725502af6 100644 --- a/libxcb/src/xcb_conn.c +++ b/libxcb/src/xcb_conn.c @@ -1,410 +1,441 @@ -/* Copyright (C) 2001-2004 Bart Massey and Jamey Sharp.
- *
- * 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.
- */
-
-/* Connection management: the core of XCB. */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "xcb.h"
-#include "xcbint.h"
-#if USE_POLL
-#include <poll.h>
-#elif !defined _WIN32
-#include <sys/select.h>
-#endif
-
-#ifdef _WIN32
-#include "xcb_windefs.h"
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#endif /* _WIN32 */
-
-/* SHUT_RDWR is fairly recent and is not available on all platforms */
-#if !defined(SHUT_RDWR)
-#define SHUT_RDWR 2
-#endif
-
-typedef struct {
- uint8_t status;
- uint8_t pad0[5];
- uint16_t length;
-} xcb_setup_generic_t;
-
-const int error_connection = 1;
-
-static int set_fd_flags(const int fd)
-{
-/* Win32 doesn't have file descriptors and the fcntl function. This block sets the socket in non-blocking mode */
-
-#ifdef _WIN32
- u_long iMode = 1; /* non-zero puts it in non-blocking mode, 0 in blocking mode */
- int ret = 0;
-
- ret = ioctlsocket(fd, FIONBIO, &iMode);
- if(ret != 0)
- return 0;
- return 1;
-#else
- int flags = fcntl(fd, F_GETFL, 0);
- if(flags == -1)
- return 0;
- flags |= O_NONBLOCK;
- if(fcntl(fd, F_SETFL, flags) == -1)
- return 0;
- if(fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
- return 0;
- return 1;
-#endif /* _WIN32 */
-}
-
-static int write_setup(xcb_connection_t *c, xcb_auth_info_t *auth_info)
-{
- static const char pad[3];
- xcb_setup_request_t out;
- struct iovec parts[6];
- int count = 0;
- static const uint32_t endian = 0x01020304;
- int ret;
-
- memset(&out, 0, sizeof(out));
-
- /* B = 0x42 = MSB first, l = 0x6c = LSB first */
- if(htonl(endian) == endian)
- out.byte_order = 0x42;
- else
- out.byte_order = 0x6c;
- out.protocol_major_version = X_PROTOCOL;
- out.protocol_minor_version = X_PROTOCOL_REVISION;
- out.authorization_protocol_name_len = 0;
- out.authorization_protocol_data_len = 0;
- parts[count].iov_len = sizeof(xcb_setup_request_t);
- parts[count++].iov_base = &out;
- parts[count].iov_len = XCB_PAD(sizeof(xcb_setup_request_t));
- parts[count++].iov_base = (char *) pad;
-
- if(auth_info)
- {
- parts[count].iov_len = out.authorization_protocol_name_len = auth_info->namelen;
- parts[count++].iov_base = auth_info->name;
- parts[count].iov_len = XCB_PAD(out.authorization_protocol_name_len);
- parts[count++].iov_base = (char *) pad;
- parts[count].iov_len = out.authorization_protocol_data_len = auth_info->datalen;
- parts[count++].iov_base = auth_info->data;
- parts[count].iov_len = XCB_PAD(out.authorization_protocol_data_len);
- parts[count++].iov_base = (char *) pad;
- }
- assert(count <= (int) (sizeof(parts) / sizeof(*parts)));
-
- pthread_mutex_lock(&c->iolock);
- ret = _xcb_out_send(c, parts, count);
- pthread_mutex_unlock(&c->iolock);
- return ret;
-}
-
-static int read_setup(xcb_connection_t *c)
-{
- /* Read the server response */
- c->setup = malloc(sizeof(xcb_setup_generic_t));
- if(!c->setup)
- return 0;
-
- if(_xcb_in_read_block(c, c->setup, sizeof(xcb_setup_generic_t)) != sizeof(xcb_setup_generic_t))
- return 0;
-
- {
- void *tmp = realloc(c->setup, c->setup->length * 4 + sizeof(xcb_setup_generic_t));
- if(!tmp)
- return 0;
- c->setup = tmp;
- }
-
- if(_xcb_in_read_block(c, (char *) c->setup + sizeof(xcb_setup_generic_t), c->setup->length * 4) <= 0)
- return 0;
-
- /* 0 = failed, 2 = authenticate, 1 = success */
- switch(c->setup->status)
- {
- case 0: /* failed */
- {
- xcb_setup_failed_t *setup = (xcb_setup_failed_t *) c->setup;
- write(STDERR_FILENO, xcb_setup_failed_reason(setup), xcb_setup_failed_reason_length(setup));
- return 0;
- }
-
- case 2: /* authenticate */
- {
- xcb_setup_authenticate_t *setup = (xcb_setup_authenticate_t *) c->setup;
- write(STDERR_FILENO, xcb_setup_authenticate_reason(setup), xcb_setup_authenticate_reason_length(setup));
- return 0;
- }
- }
-
- return 1;
-}
-
-/* precondition: there must be something for us to write. */
-static int write_vec(xcb_connection_t *c, struct iovec **vector, int *count)
-{
- int n;
- assert(!c->out.queue_len);
-
-#ifdef _WIN32
- int i = 0;
- int ret = 0,err = 0;
- struct iovec *vec;
- n = 0;
-
- /* Could use the WSASend win32 function for scatter/gather i/o but setting up the WSABUF struct from
- an iovec would require more work and I'm not sure of the benefit....works for now */
- vec = *vector;
- while(i < *count)
- {
- ret = send(c->fd,vec->iov_base,vec->iov_len,0);
- if(ret == SOCKET_ERROR)
- {
- err = WSAGetLastError();
- if(err == WSAEWOULDBLOCK)
- {
- return 1;
- }
- }
- n += ret;
- *vec++;
- i++;
- }
-#else
- n = writev(c->fd, *vector, *count);
- if(n < 0 && errno == EAGAIN)
- return 1;
-#endif /* _WIN32 */
-
- if(n <= 0)
- {
- _xcb_conn_shutdown(c);
- return 0;
- }
-
- for(; *count; --*count, ++*vector)
- {
- int cur = (*vector)->iov_len;
- if(cur > n)
- cur = n;
- (*vector)->iov_len -= cur;
- (*vector)->iov_base = (char *) (*vector)->iov_base + cur;
- n -= cur;
- if((*vector)->iov_len)
- break;
- }
- if(!*count)
- *vector = 0;
- assert(n == 0);
- return 1;
-}
-
-/* Public interface */
-
-const xcb_setup_t *xcb_get_setup(xcb_connection_t *c)
-{
- if(c->has_error)
- return 0;
- /* doesn't need locking because it's never written to. */
- return c->setup;
-}
-
-int xcb_get_file_descriptor(xcb_connection_t *c)
-{
- if(c->has_error)
- return -1;
- /* doesn't need locking because it's never written to. */
- return c->fd;
-}
-
-int xcb_connection_has_error(xcb_connection_t *c)
-{
- /* doesn't need locking because it's read and written atomically. */
- return c->has_error;
-}
-
-xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info)
-{
- xcb_connection_t* c;
-
-#ifndef _WIN32
-#ifndef USE_POLL
- if(fd >= FD_SETSIZE) /* would overflow in FD_SET */
- {
- close(fd);
- return (xcb_connection_t *) &error_connection;
- }
-#endif
-#endif /* !_WIN32*/
-
- c = calloc(1, sizeof(xcb_connection_t));
- if(!c) {
- close(fd);
- return (xcb_connection_t *) &error_connection;
- }
-
- c->fd = fd;
-
- if(!(
- set_fd_flags(fd) &&
- pthread_mutex_init(&c->iolock, 0) == 0 &&
- _xcb_in_init(&c->in) &&
- _xcb_out_init(&c->out) &&
- write_setup(c, auth_info) &&
- read_setup(c) &&
- _xcb_ext_init(c) &&
- _xcb_xid_init(c)
- ))
- {
- xcb_disconnect(c);
- return (xcb_connection_t *) &error_connection;
- }
-
- return c;
-}
-
-void xcb_disconnect(xcb_connection_t *c)
-{
- if(c == (xcb_connection_t *) &error_connection)
- return;
-
- free(c->setup);
-
- /* disallow further sends and receives */
- shutdown(c->fd, SHUT_RDWR);
- close(c->fd);
-
- pthread_mutex_destroy(&c->iolock);
- _xcb_in_destroy(&c->in);
- _xcb_out_destroy(&c->out);
-
- _xcb_ext_destroy(c);
- _xcb_xid_destroy(c);
-
- free(c);
-}
-
-/* Private interface */
-
-void _xcb_conn_shutdown(xcb_connection_t *c)
-{
- c->has_error = 1;
-}
-
-int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vector, int *count)
-{
- int ret;
-#if USE_POLL
- struct pollfd fd;
-#else
- fd_set rfds, wfds;
-#endif
-
- /* If the thing I should be doing is already being done, wait for it. */
- if(count ? c->out.writing : c->in.reading)
- {
- pthread_cond_wait(cond, &c->iolock);
- return 1;
- }
-
-#if USE_POLL
- memset(&fd, 0, sizeof(fd));
- fd.fd = c->fd;
- fd.events = POLLIN;
-#else
- FD_ZERO(&rfds);
- FD_SET(c->fd, &rfds);
-#endif
- ++c->in.reading;
-
-#if USE_POLL
- if(count)
- {
- fd.events |= POLLOUT;
- ++c->out.writing;
- }
-#else
- FD_ZERO(&wfds);
- if(count)
- {
- FD_SET(c->fd, &wfds);
- ++c->out.writing;
- }
-#endif
-
- pthread_mutex_unlock(&c->iolock);
- do {
-#if USE_POLL
- ret = poll(&fd, 1, -1);
- /* If poll() returns an event we didn't expect, such as POLLNVAL, treat
- * it as if it failed. */
- if(ret >= 0 && (fd.revents & ~fd.events))
- {
- ret = -1;
- break;
- }
-#else
- ret = select(c->fd + 1, &rfds, &wfds, 0, 0);
-#endif
- } while (ret == -1 && errno == EINTR);
- if(ret < 0)
- {
- _xcb_conn_shutdown(c);
- ret = 0;
- }
- pthread_mutex_lock(&c->iolock);
-
- if(ret)
- {
-#if USE_POLL
- if((fd.revents & POLLIN) == POLLIN)
-#else
- if(FD_ISSET(c->fd, &rfds))
-#endif
- ret = ret && _xcb_in_read(c);
-
-#if USE_POLL
- if((fd.revents & POLLOUT) == POLLOUT)
-#else
- if(FD_ISSET(c->fd, &wfds))
-#endif
- ret = ret && write_vec(c, vector, count);
- }
-
- if(count)
- --c->out.writing;
- --c->in.reading;
-
- return ret;
-}
+/* Copyright (C) 2001-2004 Bart Massey and Jamey Sharp. + * + * 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. + */ + +/* Connection management: the core of XCB. */ + +#include <assert.h> +#include <string.h> +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> +#include <fcntl.h> +#include <errno.h> + +#include "xcb.h" +#include "xcbint.h" +#if USE_POLL +#include <poll.h> +#elif !defined _WIN32 +#include <sys/select.h> +#endif + +#ifdef _WIN32 +#include "xcb_windefs.h" +#else +#include <sys/socket.h> +#include <netinet/in.h> +#endif /* _WIN32 */ + +/* SHUT_RDWR is fairly recent and is not available on all platforms */ +#if !defined(SHUT_RDWR) +#define SHUT_RDWR 2 +#endif + +typedef struct { + uint8_t status; + uint8_t pad0[5]; + uint16_t length; +} xcb_setup_generic_t; + +static const int xcb_con_error = XCB_CONN_ERROR; +static const int xcb_con_closed_mem_er = XCB_CONN_CLOSED_MEM_INSUFFICIENT; +static const int xcb_con_closed_parse_er = XCB_CONN_CLOSED_PARSE_ERR; + +static int set_fd_flags(const int fd) +{ +/* Win32 doesn't have file descriptors and the fcntl function. This block sets the socket in non-blocking mode */ + +#ifdef _WIN32 + u_long iMode = 1; /* non-zero puts it in non-blocking mode, 0 in blocking mode */ + int ret = 0; + + ret = ioctlsocket(fd, FIONBIO, &iMode); + if(ret != 0) + return 0; + return 1; +#else + int flags = fcntl(fd, F_GETFL, 0); + if(flags == -1) + return 0; + flags |= O_NONBLOCK; + if(fcntl(fd, F_SETFL, flags) == -1) + return 0; + if(fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + return 0; + return 1; +#endif /* _WIN32 */ +} + +static int write_setup(xcb_connection_t *c, xcb_auth_info_t *auth_info) +{ + static const char pad[3]; + xcb_setup_request_t out; + struct iovec parts[6]; + int count = 0; + static const uint32_t endian = 0x01020304; + int ret; + + memset(&out, 0, sizeof(out)); + + /* B = 0x42 = MSB first, l = 0x6c = LSB first */ + if(htonl(endian) == endian) + out.byte_order = 0x42; + else + out.byte_order = 0x6c; + out.protocol_major_version = X_PROTOCOL; + out.protocol_minor_version = X_PROTOCOL_REVISION; + out.authorization_protocol_name_len = 0; + out.authorization_protocol_data_len = 0; + parts[count].iov_len = sizeof(xcb_setup_request_t); + parts[count++].iov_base = &out; + parts[count].iov_len = XCB_PAD(sizeof(xcb_setup_request_t)); + parts[count++].iov_base = (char *) pad; + + if(auth_info) + { + parts[count].iov_len = out.authorization_protocol_name_len = auth_info->namelen; + parts[count++].iov_base = auth_info->name; + parts[count].iov_len = XCB_PAD(out.authorization_protocol_name_len); + parts[count++].iov_base = (char *) pad; + parts[count].iov_len = out.authorization_protocol_data_len = auth_info->datalen; + parts[count++].iov_base = auth_info->data; + parts[count].iov_len = XCB_PAD(out.authorization_protocol_data_len); + parts[count++].iov_base = (char *) pad; + } + assert(count <= (int) (sizeof(parts) / sizeof(*parts))); + + pthread_mutex_lock(&c->iolock); + ret = _xcb_out_send(c, parts, count); + pthread_mutex_unlock(&c->iolock); + return ret; +} + +static int read_setup(xcb_connection_t *c) +{ + /* Read the server response */ + c->setup = malloc(sizeof(xcb_setup_generic_t)); + if(!c->setup) + return 0; + + if(_xcb_in_read_block(c, c->setup, sizeof(xcb_setup_generic_t)) != sizeof(xcb_setup_generic_t)) + return 0; + + { + void *tmp = realloc(c->setup, c->setup->length * 4 + sizeof(xcb_setup_generic_t)); + if(!tmp) + return 0; + c->setup = tmp; + } + + if(_xcb_in_read_block(c, (char *) c->setup + sizeof(xcb_setup_generic_t), c->setup->length * 4) <= 0) + return 0; + + /* 0 = failed, 2 = authenticate, 1 = success */ + switch(c->setup->status) + { + case 0: /* failed */ + { + xcb_setup_failed_t *setup = (xcb_setup_failed_t *) c->setup; + write(STDERR_FILENO, xcb_setup_failed_reason(setup), xcb_setup_failed_reason_length(setup)); + return 0; + } + + case 2: /* authenticate */ + { + xcb_setup_authenticate_t *setup = (xcb_setup_authenticate_t *) c->setup; + write(STDERR_FILENO, xcb_setup_authenticate_reason(setup), xcb_setup_authenticate_reason_length(setup)); + return 0; + } + } + + return 1; +} + +/* precondition: there must be something for us to write. */ +static int write_vec(xcb_connection_t *c, struct iovec **vector, int *count) +{ + int n; + assert(!c->out.queue_len); + +#ifdef _WIN32 + int i = 0; + int ret = 0,err = 0; + struct iovec *vec; + n = 0; + + /* Could use the WSASend win32 function for scatter/gather i/o but setting up the WSABUF struct from + an iovec would require more work and I'm not sure of the benefit....works for now */ + vec = *vector; + while(i < *count) + { + ret = send(c->fd,vec->iov_base,vec->iov_len,0); + if(ret == SOCKET_ERROR) + { + err = WSAGetLastError(); + if(err == WSAEWOULDBLOCK) + { + return 1; + } + } + n += ret; + *vec++; + i++; + } +#else + n = writev(c->fd, *vector, *count); + if(n < 0 && errno == EAGAIN) + return 1; +#endif /* _WIN32 */ + + if(n <= 0) + { + _xcb_conn_shutdown(c, XCB_CONN_ERROR); + return 0; + } + + for(; *count; --*count, ++*vector) + { + int cur = (*vector)->iov_len; + if(cur > n) + cur = n; + (*vector)->iov_len -= cur; + (*vector)->iov_base = (char *) (*vector)->iov_base + cur; + n -= cur; + if((*vector)->iov_len) + break; + } + if(!*count) + *vector = 0; + assert(n == 0); + return 1; +} + +/* Public interface */ + +const xcb_setup_t *xcb_get_setup(xcb_connection_t *c) +{ + if(c->has_error) + return 0; + /* doesn't need locking because it's never written to. */ + return c->setup; +} + +int xcb_get_file_descriptor(xcb_connection_t *c) +{ + if(c->has_error) + return -1; + /* doesn't need locking because it's never written to. */ + return c->fd; +} + +int xcb_connection_has_error(xcb_connection_t *c) +{ + /* doesn't need locking because it's read and written atomically. */ + return c->has_error; +} + +xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info) +{ + xcb_connection_t* c; + +#ifndef _WIN32 +#ifndef USE_POLL + if(fd >= FD_SETSIZE) /* would overflow in FD_SET */ + { + close(fd); + return _xcb_conn_ret_error(XCB_CONN_ERROR); + } +#endif +#endif /* !_WIN32*/ + + c = calloc(1, sizeof(xcb_connection_t)); + if(!c) { + close(fd); + return _xcb_conn_ret_error(XCB_CONN_CLOSED_MEM_INSUFFICIENT) ; + } + + c->fd = fd; + + if(!( + set_fd_flags(fd) && + pthread_mutex_init(&c->iolock, 0) == 0 && + _xcb_in_init(&c->in) && + _xcb_out_init(&c->out) && + write_setup(c, auth_info) && + read_setup(c) && + _xcb_ext_init(c) && + _xcb_xid_init(c) + )) + { + xcb_disconnect(c); + return _xcb_conn_ret_error(XCB_CONN_ERROR); + } + + return c; +} + +void xcb_disconnect(xcb_connection_t *c) +{ + if(c->has_error) + return; + + free(c->setup); + + /* disallow further sends and receives */ + shutdown(c->fd, SHUT_RDWR); + close(c->fd); + + pthread_mutex_destroy(&c->iolock); + _xcb_in_destroy(&c->in); + _xcb_out_destroy(&c->out); + + _xcb_ext_destroy(c); + _xcb_xid_destroy(c); + + free(c); + +#ifdef _WIN32 + WSACleanup(); +#endif +} + +/* Private interface */ + +void _xcb_conn_shutdown(xcb_connection_t *c, int err) +{ + c->has_error = err; +} + +/* Return connection error state. + * To make thread-safe, I need a seperate static + * variable for every possible error. + */ +xcb_connection_t *_xcb_conn_ret_error(int err) +{ + + switch(err) + { + case XCB_CONN_CLOSED_MEM_INSUFFICIENT: + { + return (xcb_connection_t *) &xcb_con_closed_mem_er; + } + case XCB_CONN_CLOSED_PARSE_ERR: + { + return (xcb_connection_t *) &xcb_con_closed_parse_er; + } + case XCB_CONN_ERROR: + default: + { + return (xcb_connection_t *) &xcb_con_error; + } + } +} + +int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vector, int *count) +{ + int ret; +#if USE_POLL + struct pollfd fd; +#else + fd_set rfds, wfds; +#endif + + /* If the thing I should be doing is already being done, wait for it. */ + if(count ? c->out.writing : c->in.reading) + { + pthread_cond_wait(cond, &c->iolock); + return 1; + } + +#if USE_POLL + memset(&fd, 0, sizeof(fd)); + fd.fd = c->fd; + fd.events = POLLIN; +#else + FD_ZERO(&rfds); + FD_SET(c->fd, &rfds); +#endif + ++c->in.reading; + +#if USE_POLL + if(count) + { + fd.events |= POLLOUT; + ++c->out.writing; + } +#else + FD_ZERO(&wfds); + if(count) + { + FD_SET(c->fd, &wfds); + ++c->out.writing; + } +#endif + + pthread_mutex_unlock(&c->iolock); + do { +#if USE_POLL + ret = poll(&fd, 1, -1); + /* If poll() returns an event we didn't expect, such as POLLNVAL, treat + * it as if it failed. */ + if(ret >= 0 && (fd.revents & ~fd.events)) + { + ret = -1; + break; + } +#else + ret = select(c->fd + 1, &rfds, &wfds, 0, 0); +#endif + } while (ret == -1 && errno == EINTR); + if(ret < 0) + { + _xcb_conn_shutdown(c, XCB_CONN_ERROR); + ret = 0; + } + pthread_mutex_lock(&c->iolock); + + if(ret) + { +#if USE_POLL + if((fd.revents & POLLIN) == POLLIN) +#else + if(FD_ISSET(c->fd, &rfds)) +#endif + ret = ret && _xcb_in_read(c); + +#if USE_POLL + if((fd.revents & POLLOUT) == POLLOUT) +#else + if(FD_ISSET(c->fd, &wfds)) +#endif + ret = ret && write_vec(c, vector, count); + } + + if(count) + --c->out.writing; + --c->in.reading; + + return ret; +} diff --git a/libxcb/src/xcb_in.c b/libxcb/src/xcb_in.c index e075a4047..969cfc08b 100644 --- a/libxcb/src/xcb_in.c +++ b/libxcb/src/xcb_in.c @@ -174,7 +174,7 @@ static int read_packet(xcb_connection_t *c) (genrep.response_type == XCB_REPLY ? 0 : sizeof(uint32_t))); if(!buf) { - _xcb_conn_shutdown(c); + _xcb_conn_shutdown(c, XCB_CONN_CLOSED_MEM_INSUFFICIENT); return 0; } @@ -210,7 +210,7 @@ static int read_packet(xcb_connection_t *c) struct reply_list *cur = malloc(sizeof(struct reply_list)); if(!cur) { - _xcb_conn_shutdown(c); + _xcb_conn_shutdown(c, XCB_CONN_CLOSED_MEM_INSUFFICIENT); free(buf); return 0; } @@ -227,7 +227,7 @@ static int read_packet(xcb_connection_t *c) event = malloc(sizeof(struct event_list)); if(!event) { - _xcb_conn_shutdown(c); + _xcb_conn_shutdown(c, XCB_CONN_CLOSED_MEM_INSUFFICIENT); free(buf); return 0; } @@ -433,7 +433,7 @@ static void insert_pending_discard(xcb_connection_t *c, pending_reply **prev_nex pend = malloc(sizeof(*pend)); if(!pend) { - _xcb_conn_shutdown(c); + _xcb_conn_shutdown(c, XCB_CONN_CLOSED_MEM_INSUFFICIENT); return; } @@ -633,7 +633,7 @@ int _xcb_in_expect_reply(xcb_connection_t *c, uint64_t request, enum workarounds assert(workaround != WORKAROUND_NONE || flags != 0); if(!pend) { - _xcb_conn_shutdown(c); + _xcb_conn_shutdown(c, XCB_CONN_CLOSED_MEM_INSUFFICIENT); return 0; } pend->first_request = pend->last_request = request; @@ -672,7 +672,7 @@ int _xcb_in_read(xcb_connection_t *c) if((n > 0) || (n < 0 && WSAGetLastError() == WSAEWOULDBLOCK)) #endif /* !_WIN32 */ return 1; - _xcb_conn_shutdown(c); + _xcb_conn_shutdown(c, XCB_CONN_ERROR); return 0; } @@ -691,7 +691,7 @@ int _xcb_in_read_block(xcb_connection_t *c, void *buf, int len) int ret = read_block(c->fd, (char *) buf + done, len - done); if(ret <= 0) { - _xcb_conn_shutdown(c); + _xcb_conn_shutdown(c, XCB_CONN_ERROR); return ret; } } diff --git a/libxcb/src/xcb_out.c b/libxcb/src/xcb_out.c index 4f27de116..c0601f270 100644 --- a/libxcb/src/xcb_out.c +++ b/libxcb/src/xcb_out.c @@ -1,372 +1,378 @@ -/* Copyright (C) 2001-2004 Bart Massey and Jamey Sharp.
- *
- * 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.
- */
-
-/* Stuff that sends stuff to the server. */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "xcb.h"
-#include "xcbext.h"
-#include "xcbint.h"
-#include "bigreq.h"
-
-static inline void send_request(xcb_connection_t *c, int isvoid, enum workarounds workaround, int flags, struct iovec *vector, int count)
-{
- if(c->has_error)
- return;
-
- ++c->out.request;
- if(!isvoid)
- c->in.request_expected = c->out.request;
- if(workaround != WORKAROUND_NONE || flags != 0)
- _xcb_in_expect_reply(c, c->out.request, workaround, flags);
-
- while(count && c->out.queue_len + vector[0].iov_len <= sizeof(c->out.queue))
- {
- memcpy(c->out.queue + c->out.queue_len, vector[0].iov_base, vector[0].iov_len);
- c->out.queue_len += vector[0].iov_len;
- vector[0].iov_base = (char *) vector[0].iov_base + vector[0].iov_len;
- vector[0].iov_len = 0;
- ++vector, --count;
- }
- if(!count)
- return;
-
- --vector, ++count;
- vector[0].iov_base = c->out.queue;
- vector[0].iov_len = c->out.queue_len;
- c->out.queue_len = 0;
- _xcb_out_send(c, vector, count);
-}
-
-static void send_sync(xcb_connection_t *c)
-{
- static const union {
- struct {
- uint8_t major;
- uint8_t pad;
- uint16_t len;
- } fields;
- uint32_t packet;
- } sync_req = { { /* GetInputFocus */ 43, 0, 1 } };
- struct iovec vector[2];
- vector[1].iov_base = (char *) &sync_req;
- vector[1].iov_len = sizeof(sync_req);
- send_request(c, 0, WORKAROUND_NONE, XCB_REQUEST_DISCARD_REPLY, vector + 1, 1);
-}
-
-static void get_socket_back(xcb_connection_t *c)
-{
- while(c->out.return_socket && c->out.socket_moving)
- pthread_cond_wait(&c->out.socket_cond, &c->iolock);
- if(!c->out.return_socket)
- return;
-
- c->out.socket_moving = 1;
- pthread_mutex_unlock(&c->iolock);
- c->out.return_socket(c->out.socket_closure);
- pthread_mutex_lock(&c->iolock);
- c->out.socket_moving = 0;
-
- pthread_cond_broadcast(&c->out.socket_cond);
- c->out.return_socket = 0;
- c->out.socket_closure = 0;
- _xcb_in_replies_done(c);
-}
-
-/* Public interface */
-
-void xcb_prefetch_maximum_request_length(xcb_connection_t *c)
-{
- if(c->has_error)
- return;
- pthread_mutex_lock(&c->out.reqlenlock);
- if(c->out.maximum_request_length_tag == LAZY_NONE)
- {
- const xcb_query_extension_reply_t *ext;
- ext = xcb_get_extension_data(c, &xcb_big_requests_id);
- if(ext && ext->present)
- {
- c->out.maximum_request_length_tag = LAZY_COOKIE;
- c->out.maximum_request_length.cookie = xcb_big_requests_enable(c);
- }
- else
- {
- c->out.maximum_request_length_tag = LAZY_FORCED;
- c->out.maximum_request_length.value = c->setup->maximum_request_length;
- }
- }
- pthread_mutex_unlock(&c->out.reqlenlock);
-}
-
-uint32_t xcb_get_maximum_request_length(xcb_connection_t *c)
-{
- if(c->has_error)
- return 0;
- xcb_prefetch_maximum_request_length(c);
- pthread_mutex_lock(&c->out.reqlenlock);
- if(c->out.maximum_request_length_tag == LAZY_COOKIE)
- {
- xcb_big_requests_enable_reply_t *r = xcb_big_requests_enable_reply(c, c->out.maximum_request_length.cookie, 0);
- c->out.maximum_request_length_tag = LAZY_FORCED;
- if(r)
- {
- c->out.maximum_request_length.value = r->maximum_request_length;
- free(r);
- }
- else
- c->out.maximum_request_length.value = c->setup->maximum_request_length;
- }
- pthread_mutex_unlock(&c->out.reqlenlock);
- return c->out.maximum_request_length.value;
-}
-
-unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req)
-{
- uint64_t request;
- uint32_t prefix[2];
- int veclen = req->count;
- enum workarounds workaround = WORKAROUND_NONE;
-
- if(c->has_error)
- return 0;
-
- assert(c != 0);
- assert(vector != 0);
- assert(req->count > 0);
-
- if(!(flags & XCB_REQUEST_RAW))
- {
- static const char pad[3];
- unsigned int i;
- uint16_t shortlen = 0;
- size_t longlen = 0;
- assert(vector[0].iov_len >= 4);
- /* set the major opcode, and the minor opcode for extensions */
- if(req->ext)
- {
- const xcb_query_extension_reply_t *extension = xcb_get_extension_data(c, req->ext);
- if(!(extension && extension->present))
- {
- _xcb_conn_shutdown(c);
- return 0;
- }
- ((uint8_t *) vector[0].iov_base)[0] = extension->major_opcode;
- ((uint8_t *) vector[0].iov_base)[1] = req->opcode;
- }
- else
- ((uint8_t *) vector[0].iov_base)[0] = req->opcode;
-
- /* put together the length field, possibly using BIGREQUESTS */
- for(i = 0; i < req->count; ++i)
- {
- longlen += vector[i].iov_len;
- if(!vector[i].iov_base)
- {
- vector[i].iov_base = (char *) pad;
- assert(vector[i].iov_len <= sizeof(pad));
- }
- }
- assert((longlen & 3) == 0);
- longlen >>= 2;
-
- if(longlen <= c->setup->maximum_request_length)
- {
- /* we don't need BIGREQUESTS. */
- shortlen = longlen;
- longlen = 0;
- }
- else if(longlen > xcb_get_maximum_request_length(c))
- {
- _xcb_conn_shutdown(c);
- return 0; /* server can't take this; maybe need BIGREQUESTS? */
- }
-
- /* set the length field. */
- ((uint16_t *) vector[0].iov_base)[1] = shortlen;
- if(!shortlen)
- {
- prefix[0] = ((uint32_t *) vector[0].iov_base)[0];
- prefix[1] = ++longlen;
- vector[0].iov_base = (uint32_t *) vector[0].iov_base + 1;
- vector[0].iov_len -= sizeof(uint32_t);
- --vector, ++veclen;
- vector[0].iov_base = prefix;
- vector[0].iov_len = sizeof(prefix);
- }
- }
- flags &= ~XCB_REQUEST_RAW;
-
- /* do we need to work around the X server bug described in glx.xml? */
- /* XXX: GetFBConfigs won't use BIG-REQUESTS in any sane
- * configuration, but that should be handled here anyway. */
- if(req->ext && !req->isvoid && !strcmp(req->ext->name, "GLX") &&
- ((req->opcode == 17 && ((uint32_t *) vector[0].iov_base)[1] == 0x10004) ||
- req->opcode == 21))
- workaround = WORKAROUND_GLX_GET_FB_CONFIGS_BUG;
-
- /* get a sequence number and arrange for delivery. */
- pthread_mutex_lock(&c->iolock);
- /* wait for other writing threads to get out of my way. */
- while(c->out.writing)
- pthread_cond_wait(&c->out.cond, &c->iolock);
- get_socket_back(c);
-
- /* send GetInputFocus (sync_req) when 64k-2 requests have been sent without
- * a reply. */
- if(req->isvoid && c->out.request == c->in.request_expected + (1 << 16) - 2)
- send_sync(c);
- /* Also send sync_req (could use NoOp) at 32-bit wrap to avoid having
- * applications see sequence 0 as that is used to indicate
- * an error in sending the request */
- if((unsigned int) (c->out.request + 1) == 0)
- send_sync(c);
-
- /* The above send_sync calls could drop the I/O lock, but this
- * thread will still exclude any other thread that tries to write,
- * so the sequence number postconditions still hold. */
- send_request(c, req->isvoid, workaround, flags, vector, veclen);
- request = c->has_error ? 0 : c->out.request;
- pthread_mutex_unlock(&c->iolock);
- return request;
-}
-
-int xcb_take_socket(xcb_connection_t *c, void (*return_socket)(void *closure), void *closure, int flags, uint64_t *sent)
-{
- int ret;
- if(c->has_error)
- return 0;
- pthread_mutex_lock(&c->iolock);
- get_socket_back(c);
- ret = _xcb_out_flush_to(c, c->out.request);
- if(ret)
- {
- c->out.return_socket = return_socket;
- c->out.socket_closure = closure;
- if(flags)
- _xcb_in_expect_reply(c, c->out.request, WORKAROUND_EXTERNAL_SOCKET_OWNER, flags);
- assert(c->out.request == c->out.request_written);
- *sent = c->out.request;
- }
- pthread_mutex_unlock(&c->iolock);
- return ret;
-}
-
-int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t requests)
-{
- int ret;
- if(c->has_error)
- return 0;
- pthread_mutex_lock(&c->iolock);
- c->out.request += requests;
- ret = _xcb_out_send(c, vector, count);
- pthread_mutex_unlock(&c->iolock);
- return ret;
-}
-
-int xcb_flush(xcb_connection_t *c)
-{
- int ret;
- if(c->has_error)
- return 0;
- pthread_mutex_lock(&c->iolock);
- ret = _xcb_out_flush_to(c, c->out.request);
- pthread_mutex_unlock(&c->iolock);
- return ret;
-}
-
-/* Private interface */
-
-int _xcb_out_init(_xcb_out *out)
-{
- if(pthread_cond_init(&out->socket_cond, 0))
- return 0;
- out->return_socket = 0;
- out->socket_closure = 0;
- out->socket_moving = 0;
-
- if(pthread_cond_init(&out->cond, 0))
- return 0;
- out->writing = 0;
-
- out->queue_len = 0;
-
- out->request = 0;
- out->request_written = 0;
-
- if(pthread_mutex_init(&out->reqlenlock, 0))
- return 0;
- out->maximum_request_length_tag = LAZY_NONE;
-
- return 1;
-}
-
-void _xcb_out_destroy(_xcb_out *out)
-{
- pthread_cond_destroy(&out->cond);
- pthread_mutex_destroy(&out->reqlenlock);
-}
-
-int _xcb_out_send(xcb_connection_t *c, struct iovec *vector, int count)
-{
- int ret = 1;
- while(ret && count)
- ret = _xcb_conn_wait(c, &c->out.cond, &vector, &count);
- c->out.request_written = c->out.request;
- pthread_cond_broadcast(&c->out.cond);
- _xcb_in_wake_up_next_reader(c);
- return ret;
-}
-
-void _xcb_out_send_sync(xcb_connection_t *c)
-{
- /* wait for other writing threads to get out of my way. */
- while(c->out.writing)
- pthread_cond_wait(&c->out.cond, &c->iolock);
- get_socket_back(c);
- send_sync(c);
-}
-
-int _xcb_out_flush_to(xcb_connection_t *c, uint64_t request)
-{
- assert(XCB_SEQUENCE_COMPARE(request, <=, c->out.request));
- if(XCB_SEQUENCE_COMPARE(c->out.request_written, >=, request))
- return 1;
- if(c->out.queue_len)
- {
- struct iovec vec;
- vec.iov_base = c->out.queue;
- vec.iov_len = c->out.queue_len;
- c->out.queue_len = 0;
- return _xcb_out_send(c, &vec, 1);
- }
- while(c->out.writing)
- pthread_cond_wait(&c->out.cond, &c->iolock);
- assert(XCB_SEQUENCE_COMPARE(c->out.request_written, >=, request));
- return 1;
-}
+/* Copyright (C) 2001-2004 Bart Massey and Jamey Sharp. + * + * 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. + */ + +/* Stuff that sends stuff to the server. */ + +#include <assert.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> + +#include "xcb.h" +#include "xcbext.h" +#include "xcbint.h" +#include "bigreq.h" + +static inline void send_request(xcb_connection_t *c, int isvoid, enum workarounds workaround, int flags, struct iovec *vector, int count) +{ + if(c->has_error) + return; + + ++c->out.request; + if(!isvoid) + c->in.request_expected = c->out.request; + if(workaround != WORKAROUND_NONE || flags != 0) + _xcb_in_expect_reply(c, c->out.request, workaround, flags); + + while(count && c->out.queue_len + vector[0].iov_len <= sizeof(c->out.queue)) + { + memcpy(c->out.queue + c->out.queue_len, vector[0].iov_base, vector[0].iov_len); + c->out.queue_len += vector[0].iov_len; + vector[0].iov_base = (char *) vector[0].iov_base + vector[0].iov_len; + vector[0].iov_len = 0; + ++vector, --count; + } + if(!count) + return; + + --vector, ++count; + vector[0].iov_base = c->out.queue; + vector[0].iov_len = c->out.queue_len; + c->out.queue_len = 0; + _xcb_out_send(c, vector, count); +} + +static void send_sync(xcb_connection_t *c) +{ + static const union { + struct { + uint8_t major; + uint8_t pad; + uint16_t len; + } fields; + uint32_t packet; + } sync_req = { { /* GetInputFocus */ 43, 0, 1 } }; + struct iovec vector[2]; + vector[1].iov_base = (char *) &sync_req; + vector[1].iov_len = sizeof(sync_req); + send_request(c, 0, WORKAROUND_NONE, XCB_REQUEST_DISCARD_REPLY, vector + 1, 1); +} + +static void get_socket_back(xcb_connection_t *c) +{ + while(c->out.return_socket && c->out.socket_moving) + pthread_cond_wait(&c->out.socket_cond, &c->iolock); + if(!c->out.return_socket) + return; + + c->out.socket_moving = 1; + pthread_mutex_unlock(&c->iolock); + c->out.return_socket(c->out.socket_closure); + pthread_mutex_lock(&c->iolock); + c->out.socket_moving = 0; + + pthread_cond_broadcast(&c->out.socket_cond); + c->out.return_socket = 0; + c->out.socket_closure = 0; + _xcb_in_replies_done(c); +} + +/* Public interface */ + +void xcb_prefetch_maximum_request_length(xcb_connection_t *c) +{ + if(c->has_error) + return; + pthread_mutex_lock(&c->out.reqlenlock); + if(c->out.maximum_request_length_tag == LAZY_NONE) + { + const xcb_query_extension_reply_t *ext; + ext = xcb_get_extension_data(c, &xcb_big_requests_id); + if(ext && ext->present) + { + c->out.maximum_request_length_tag = LAZY_COOKIE; + c->out.maximum_request_length.cookie = xcb_big_requests_enable(c); + } + else + { + c->out.maximum_request_length_tag = LAZY_FORCED; + c->out.maximum_request_length.value = c->setup->maximum_request_length; + } + } + pthread_mutex_unlock(&c->out.reqlenlock); +} + +uint32_t xcb_get_maximum_request_length(xcb_connection_t *c) +{ + if(c->has_error) + return 0; + xcb_prefetch_maximum_request_length(c); + pthread_mutex_lock(&c->out.reqlenlock); + if(c->out.maximum_request_length_tag == LAZY_COOKIE) + { + xcb_big_requests_enable_reply_t *r = xcb_big_requests_enable_reply(c, c->out.maximum_request_length.cookie, 0); + c->out.maximum_request_length_tag = LAZY_FORCED; + if(r) + { + c->out.maximum_request_length.value = r->maximum_request_length; + free(r); + } + else + c->out.maximum_request_length.value = c->setup->maximum_request_length; + } + pthread_mutex_unlock(&c->out.reqlenlock); + return c->out.maximum_request_length.value; +} + +unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req) +{ + uint64_t request; + uint32_t prefix[2]; + int veclen = req->count; + enum workarounds workaround = WORKAROUND_NONE; + + if(c->has_error) + return 0; + + assert(c != 0); + assert(vector != 0); + assert(req->count > 0); + + if(!(flags & XCB_REQUEST_RAW)) + { + static const char pad[3]; + unsigned int i; + uint16_t shortlen = 0; + size_t longlen = 0; + assert(vector[0].iov_len >= 4); + /* set the major opcode, and the minor opcode for extensions */ + if(req->ext) + { + const xcb_query_extension_reply_t *extension = xcb_get_extension_data(c, req->ext); + if(!(extension && extension->present)) + { + _xcb_conn_shutdown(c, XCB_CONN_CLOSED_EXT_NOTSUPPORTED); + return 0; + } + ((uint8_t *) vector[0].iov_base)[0] = extension->major_opcode; + ((uint8_t *) vector[0].iov_base)[1] = req->opcode; + } + else + ((uint8_t *) vector[0].iov_base)[0] = req->opcode; + + /* put together the length field, possibly using BIGREQUESTS */ + for(i = 0; i < req->count; ++i) + { + longlen += vector[i].iov_len; + if(!vector[i].iov_base) + { + vector[i].iov_base = (char *) pad; + assert(vector[i].iov_len <= sizeof(pad)); + } + } + assert((longlen & 3) == 0); + longlen >>= 2; + + if(longlen <= c->setup->maximum_request_length) + { + /* we don't need BIGREQUESTS. */ + shortlen = longlen; + longlen = 0; + } + else if(longlen > xcb_get_maximum_request_length(c)) + { + _xcb_conn_shutdown(c, XCB_CONN_CLOSED_REQ_LEN_EXCEED); + return 0; /* server can't take this; maybe need BIGREQUESTS? */ + } + + /* set the length field. */ + ((uint16_t *) vector[0].iov_base)[1] = shortlen; + if(!shortlen) + { + prefix[0] = ((uint32_t *) vector[0].iov_base)[0]; + prefix[1] = ++longlen; + vector[0].iov_base = (uint32_t *) vector[0].iov_base + 1; + vector[0].iov_len -= sizeof(uint32_t); + --vector, ++veclen; + vector[0].iov_base = prefix; + vector[0].iov_len = sizeof(prefix); + } + } + flags &= ~XCB_REQUEST_RAW; + + /* do we need to work around the X server bug described in glx.xml? */ + /* XXX: GetFBConfigs won't use BIG-REQUESTS in any sane + * configuration, but that should be handled here anyway. */ + if(req->ext && !req->isvoid && !strcmp(req->ext->name, "GLX") && + ((req->opcode == 17 && ((uint32_t *) vector[0].iov_base)[1] == 0x10004) || + req->opcode == 21)) + workaround = WORKAROUND_GLX_GET_FB_CONFIGS_BUG; + + /* get a sequence number and arrange for delivery. */ + pthread_mutex_lock(&c->iolock); + /* wait for other writing threads to get out of my way. */ + while(c->out.writing) + pthread_cond_wait(&c->out.cond, &c->iolock); + get_socket_back(c); + + /* send GetInputFocus (sync_req) when 64k-2 requests have been sent without + * a reply. */ + if(req->isvoid && c->out.request == c->in.request_expected + (1 << 16) - 2) + send_sync(c); + /* Also send sync_req (could use NoOp) at 32-bit wrap to avoid having + * applications see sequence 0 as that is used to indicate + * an error in sending the request */ + if((unsigned int) (c->out.request + 1) == 0) + send_sync(c); + + /* The above send_sync calls could drop the I/O lock, but this + * thread will still exclude any other thread that tries to write, + * so the sequence number postconditions still hold. */ + send_request(c, req->isvoid, workaround, flags, vector, veclen); + request = c->has_error ? 0 : c->out.request; + pthread_mutex_unlock(&c->iolock); + return request; +} + +int xcb_take_socket(xcb_connection_t *c, void (*return_socket)(void *closure), void *closure, int flags, uint64_t *sent) +{ + int ret; + if(c->has_error) + return 0; + pthread_mutex_lock(&c->iolock); + get_socket_back(c); + + /* _xcb_out_flush may drop the iolock allowing other threads to + * write requests, so keep flushing until we're done + */ + do + ret = _xcb_out_flush_to(c, c->out.request); + while (ret && c->out.request != c->out.request_written); + if(ret) + { + c->out.return_socket = return_socket; + c->out.socket_closure = closure; + if(flags) + _xcb_in_expect_reply(c, c->out.request, WORKAROUND_EXTERNAL_SOCKET_OWNER, flags); + assert(c->out.request == c->out.request_written); + *sent = c->out.request; + } + pthread_mutex_unlock(&c->iolock); + return ret; +} + +int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t requests) +{ + int ret; + if(c->has_error) + return 0; + pthread_mutex_lock(&c->iolock); + c->out.request += requests; + ret = _xcb_out_send(c, vector, count); + pthread_mutex_unlock(&c->iolock); + return ret; +} + +int xcb_flush(xcb_connection_t *c) +{ + int ret; + if(c->has_error) + return 0; + pthread_mutex_lock(&c->iolock); + ret = _xcb_out_flush_to(c, c->out.request); + pthread_mutex_unlock(&c->iolock); + return ret; +} + +/* Private interface */ + +int _xcb_out_init(_xcb_out *out) +{ + if(pthread_cond_init(&out->socket_cond, 0)) + return 0; + out->return_socket = 0; + out->socket_closure = 0; + out->socket_moving = 0; + + if(pthread_cond_init(&out->cond, 0)) + return 0; + out->writing = 0; + + out->queue_len = 0; + + out->request = 0; + out->request_written = 0; + + if(pthread_mutex_init(&out->reqlenlock, 0)) + return 0; + out->maximum_request_length_tag = LAZY_NONE; + + return 1; +} + +void _xcb_out_destroy(_xcb_out *out) +{ + pthread_cond_destroy(&out->cond); + pthread_mutex_destroy(&out->reqlenlock); +} + +int _xcb_out_send(xcb_connection_t *c, struct iovec *vector, int count) +{ + int ret = 1; + while(ret && count) + ret = _xcb_conn_wait(c, &c->out.cond, &vector, &count); + c->out.request_written = c->out.request; + pthread_cond_broadcast(&c->out.cond); + _xcb_in_wake_up_next_reader(c); + return ret; +} + +void _xcb_out_send_sync(xcb_connection_t *c) +{ + /* wait for other writing threads to get out of my way. */ + while(c->out.writing) + pthread_cond_wait(&c->out.cond, &c->iolock); + get_socket_back(c); + send_sync(c); +} + +int _xcb_out_flush_to(xcb_connection_t *c, uint64_t request) +{ + assert(XCB_SEQUENCE_COMPARE(request, <=, c->out.request)); + if(XCB_SEQUENCE_COMPARE(c->out.request_written, >=, request)) + return 1; + if(c->out.queue_len) + { + struct iovec vec; + vec.iov_base = c->out.queue; + vec.iov_len = c->out.queue_len; + c->out.queue_len = 0; + return _xcb_out_send(c, &vec, 1); + } + while(c->out.writing) + pthread_cond_wait(&c->out.cond, &c->iolock); + assert(XCB_SEQUENCE_COMPARE(c->out.request_written, >=, request)); + return 1; +} diff --git a/libxcb/src/xcb_util.c b/libxcb/src/xcb_util.c index fcb11f042..9329b81dd 100644 --- a/libxcb/src/xcb_util.c +++ b/libxcb/src/xcb_util.c @@ -34,11 +34,11 @@ #include <stddef.h> #include <unistd.h> #include <string.h> -#include <arpa/inet.h> #ifdef _WIN32 #include "xcb_windefs.h" #else +#include <arpa/inet.h> #include <sys/socket.h> #include <sys/un.h> #include <netinet/in.h> @@ -424,13 +424,24 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname, int parsed = _xcb_parse_display(displayname, &host, &protocol, &display, screenp); if(!parsed) { - c = (xcb_connection_t *) &error_connection; + c = _xcb_conn_ret_error(XCB_CONN_CLOSED_PARSE_ERR); goto out; - } else + } else { +#ifdef _WIN32 + WSADATA wsaData; + if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) { + c = (xcb_connection_t *) &error_connection; + goto out; + } +#endif fd = _xcb_open(host, protocol, display); + } if(fd == -1) { - c = (xcb_connection_t *) &error_connection; + c = _xcb_conn_ret_error(XCB_CONN_ERROR); +#ifdef _WIN32 + WSACleanup(); +#endif goto out; } diff --git a/libxcb/src/xcbint.h b/libxcb/src/xcbint.h index 096576c4a..f9e5a52f7 100644 --- a/libxcb/src/xcbint.h +++ b/libxcb/src/xcbint.h @@ -174,8 +174,6 @@ void _xcb_ext_destroy(xcb_connection_t *c); /* xcb_conn.c */ -extern const int error_connection; - struct xcb_connection_t { int has_error; @@ -193,7 +191,10 @@ struct xcb_connection_t { _xcb_xid xid; }; -void _xcb_conn_shutdown(xcb_connection_t *c); +void _xcb_conn_shutdown(xcb_connection_t *c, int err); + +xcb_connection_t *_xcb_conn_ret_error(int err); + int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vector, int *count); diff --git a/libxcb/xcb-proto/NEWS b/libxcb/xcb-proto/NEWS index e6028d602..32bcc6924 100644 --- a/libxcb/xcb-proto/NEWS +++ b/libxcb/xcb-proto/NEWS @@ -1,5 +1,37 @@ +Release 1.7 (2012-01-11) +======================== +* Add missing padding bytes to ChangeKeyboardMapping request +* Corrected type of FakeInput rootX & rootY fields +* Changed Exception message in case of unknown/unhandled XML tags +* xcbgen: perform lenfield lookup within all anchestors +* Add support for new expr tags popcount, enumref, sumof +* Changed handling of anchestor types +* Assign switch name to bitcases +* Support name attribute for bitcases and set BitcaseType.has_name accordingly +* Use absolute imports in xcbgen for Python 3 compatibilit +* dri2: Update to version 1.3 (v2) +* glx: Replace some 'reserved' fields with explicit padding +* glx: Use glx:CONTEXT for share_list parameter of CreateNewContext +* glx: Use FBCONFIG type for fbconfig parameter of CreateNewContext and CreatePixmap +* glx: Add protocol for GLX_ARB_create_context and GLX_ARB_create_context_profile +* Add support for fence sync objects +* xf86dri: fix GetDrawableInfo reply +* xproto: fix TranslateCoordinates reply +* xcbgen: Add unop support +* xf86vidmode: Fix padding expressions +* dri2: Add proper padding before driver_name +* Add libdir/exec_prefix to xcb-xproto.pc +* Revive support for hex literals in protocol +* Add description of new protocol elements +* Add XKEYBOARD protocol description +* Fix ChangeHosts address string +* Fix SetFontPath path string encoding +* Fix some fields name +* Fix XKB GetState missing lookupMods field +* Add RENDER 0.11 definitions + Release 1.6 (2009-12-02) -======================= +======================== * Add DRI2 protocol, based off of dri2proto.h and the server code. (v2) * xf86dri.xml seems to have been wrong forever. Fixes bug #16894. * shape: add missing padding bytes to GetRectangles diff --git a/libxcb/xcb-proto/configure.ac b/libxcb/xcb-proto/configure.ac index 1a6ca0152..5368e2a05 100644 --- a/libxcb/xcb-proto/configure.ac +++ b/libxcb/xcb-proto/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.57) AC_INIT([XCB Proto], - 1.6, + 1.7, [xcb@lists.freedesktop.org]) AC_CONFIG_SRCDIR([xcb-proto.pc.in]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) diff --git a/libxcb/xcb-proto/src/xkb.xml b/libxcb/xcb-proto/src/xkb.xml index f738378f5..e8f4c021d 100644 --- a/libxcb/xcb-proto/src/xkb.xml +++ b/libxcb/xcb-proto/src/xkb.xml @@ -1,2774 +1,2775 @@ -<?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="xkb" extension-xname="XKEYBOARD" extension-name="xkb"
- major-version="1" minor-version="0">
-
- <import>xproto</import>
-
- <!-- Common Types -->
- <enum name="Const">
- <item name="MaxLegalKeyCode"> <value>255</value> </item>
- <item name="PerKeyBitArraySize">
- <value>32</value>
- </item>
- <item name="KeyNameLength">
- <value>4</value>
- </item>
- </enum>
-
- <enum name="EventType">
- <item name="NewKeyboardNotify"> <bit>0</bit> </item>
- <item name="MapNotify"> <bit>1</bit> </item>
- <item name="StateNotify"> <bit>2</bit> </item>
- <item name="ControlsNotify"> <bit>3</bit> </item>
- <item name="IndicatorStateNotify"> <bit>4</bit> </item>
- <item name="IndicatorMapNotify"> <bit>5</bit> </item>
- <item name="NamesNotify"> <bit>6</bit> </item>
- <item name="CompatMapNotify"> <bit>7</bit> </item>
- <item name="BellNotify"> <bit>8</bit> </item>
- <item name="ActionMessage"> <bit>9</bit> </item>
- <item name="AccessXNotify"> <bit>10</bit> </item>
- <item name="ExtensionDeviceNotify"> <bit>11</bit> </item>
- </enum>
-
- <enum name="NKNDetail">
- <item name="Keycodes"> <bit>0</bit> </item>
- <item name="Geometry"> <bit>1</bit> </item>
- <item name="DeviceID"> <bit>2</bit> </item>
- </enum>
-
- <enum name="AXNDetail">
- <item name="SKPress"> <bit>0</bit> </item>
- <item name="SKAccept"> <bit>1</bit> </item>
- <item name="SKReject"> <bit>2</bit> </item>
- <item name="SKRelease"> <bit>3</bit> </item>
- <item name="BKAccept"> <bit>4</bit> </item>
- <item name="BKReject"> <bit>5</bit> </item>
- <item name="AXKWarning"> <bit>6</bit> </item>
- </enum>
-
- <enum name="MapPart">
- <item name="KeyTypes"> <bit>0</bit> </item>
- <item name="KeySyms"> <bit>1</bit> </item>
- <item name="ModifierMap"> <bit>2</bit> </item>
- <item name="ExplicitComponents"> <bit>3</bit> </item>
- <item name="KeyActions"> <bit>4</bit> </item>
- <item name="KeyBehaviors"> <bit>5</bit> </item>
- <item name="VirtualMods"> <bit>6</bit> </item>
- <item name="VirtualModMap"> <bit>7</bit> </item>
- </enum>
-
- <enum name="SetMapFlags">
- <item name="ResizeTypes"> <bit>0</bit> </item>
- <item name="RecomputeActions"> <bit>1</bit> </item>
- </enum>
-
- <enum name="StatePart">
- <item name="ModifierState"> <bit>0</bit> </item>
- <item name="ModifierBase"> <bit>1</bit> </item>
- <item name="ModifierLatch"> <bit>2</bit> </item>
- <item name="ModifierLock"> <bit>3</bit> </item>
- <item name="GroupState"> <bit>4</bit> </item>
- <item name="GroupBase"> <bit>5</bit> </item>
- <item name="GroupLatch"> <bit>6</bit> </item>
- <item name="GroupLock"> <bit>7</bit> </item>
- <item name="CompatState"> <bit>8</bit> </item>
- <item name="GrabMods"> <bit>9</bit> </item>
- <item name="CompatGrabMods"> <bit>10</bit> </item>
- <item name="LookupMods"> <bit>11</bit> </item>
- <item name="CompatLookupMods"> <bit>12</bit> </item>
- <item name="PointerButtons"> <bit>13</bit> </item>
- </enum>
-
- <enum name="BoolCtrl">
- <item name="RepeatKeys"> <bit>0</bit> </item>
- <item name="SlowKeys"> <bit>1</bit> </item>
- <item name="BounceKeys"> <bit>2</bit> </item>
- <item name="StickyKeys"> <bit>3</bit> </item>
- <item name="MouseKeys"> <bit>4</bit> </item>
- <item name="MouseKeysAccel"> <bit>5</bit> </item>
- <item name="AccessXKeys"> <bit>6</bit> </item>
- <item name="AccessXTimeoutMask"> <bit>7</bit> </item>
- <item name="AccessXFeedbackMask"> <bit>8</bit> </item>
- <item name="AudibleBellMask"> <bit>9</bit> </item>
- <item name="Overlay1Mask"> <bit>10</bit> </item>
- <item name="Overlay2Mask"> <bit>11</bit> </item>
- <item name="IgnoreGroupLockMask"> <bit>12</bit> </item>
- </enum>
-
- <!-- XXX: one zero less than XKB specification says,
- uses the same values as libX11 -->
- <enum name="Control" >
- <item name="GroupsWrap"> <bit>27</bit> </item>
- <item name="InternalMods"> <bit>28</bit> </item>
- <item name="IgnoreLockMods"> <bit>29</bit> </item>
- <item name="PerKeyRepeat"> <bit>30</bit> </item>
- <item name="ControlsEnabled"> <bit>31</bit> </item>
- </enum>
-
- <enum name="AXFBOpt">
- <item name="SKPressFB"> <bit>0</bit> </item>
- <item name="SKAcceptFB"> <bit>1</bit> </item>
- <item name="FeatureFB"> <bit>2</bit> </item>
- <item name="SlowWarnFB"> <bit>3</bit> </item>
- <item name="IndicatorFB"> <bit>4</bit> </item>
- <item name="StickyKeysFB"> <bit>5</bit> </item>
- <item name="SKReleaseFB"> <bit>6</bit> </item>
- <item name="SKRejectFB"> <bit>7</bit> </item>
- <item name="BKRejectFB"> <bit>8</bit> </item>
- <item name="DumbBell"> <bit>9</bit> </item>
- </enum>
-
- <enum name="AXSKOpt">
- <item name="TwoKeys"> <bit>6</bit> </item>
- <item name="LatchToLock"> <bit>7</bit> </item>
- </enum>
-
- <union name="AXOption">
- <field name="fbopt" type="CARD16" enum="AXFBOpt" />
- <field name="skopt" type="CARD16" enum="AXSKOpt" />
- </union>
-
- <typedef oldname="CARD16" newname="DeviceSpec" />
-
- <enum name="LedClassResult">
- <item name="KbdFeedbackClass"> <value>0</value> </item>
- <item name="LedFeedbackClass"> <value>4</value> </item>
- </enum>
-
- <enum name="LedClass">
- <item name="DfltXIClass"> <value>768</value> </item> <!--0x300-->
- <item name="AllXIClasses"> <value>1280</value> </item> <!--0x500-->
- </enum>
- <typedef oldname="CARD16" newname="LedClassSpec" />
-
- <enum name="BellClassResult">
- <item name="KbdFeedbackClass"> <value>0</value> </item>
- <item name="BellFeedbackClass"> <value>5</value> </item>
- </enum>
-
- <enum name="BellClass">
- <item name="DfltXIClass"> <value>768</value> </item> <!--0x300-->
- </enum>
- <typedef oldname="CARD16" newname="BellClassSpec" />
-
- <enum name="ID">
- <item name="UseCoreKbd"> <value>256</value> </item> <!-- 0x100 -->
- <item name="UseCorePtr"> <value>512</value> </item> <!-- 0x200 -->
- <item name="DfltXIClass"> <value>768</value> </item> <!-- 0x300 -->
- <item name="DfltXIId"> <value>1024</value> </item> <!-- 0x400 -->
- <item name="AllXIClass"> <value>1280</value> </item> <!-- 0x500 -->
- <item name="AllXIId"> <value>1536</value> </item> <!-- 0x600 -->
- <item name="XINone"> <value>65280</value> </item> <!--0xff00-->
- </enum>
- <typedef oldname="CARD16" newname="IDSpec" />
-
- <enum name="Group">
- <item name="1"> <value>0</value> </item>
- <item name="2"> <value>1</value> </item>
- <item name="3"> <value>2</value> </item>
- <item name="4"> <value>3</value> </item>
- </enum>
-
- <enum name="Groups">
- <item name="Any"> <value>254</value> </item>
- <item name="All"> <value>255</value> </item>
- </enum>
-
- <enum name="SetOfGroup">
- <item name="Group1"> <bit>0</bit> </item>
- <item name="Group2"> <bit>1</bit> </item>
- <item name="Group3"> <bit>2</bit> </item>
- <item name="Group4"> <bit>3</bit> </item>
- </enum>
-
- <enum name="SetOfGroups">
- <item name="Any"> <bit>7</bit> </item>
- </enum>
-
- <enum name="GroupsWrap">
- <item name="WrapIntoRange"> <value>0</value> </item>
- <item name="ClampIntoRange"> <bit>6</bit> </item>
- <item name="RedirectIntoRange"> <bit>7</bit> </item>
- </enum>
-
- <enum name="VModsHigh">
- <item name="15"> <bit>7</bit> </item>
- <item name="14"> <bit>6</bit> </item>
- <item name="13"> <bit>5</bit> </item>
- <item name="12"> <bit>4</bit> </item>
- <item name="11"> <bit>3</bit> </item>
- <item name="10"> <bit>2</bit> </item>
- <item name="9"> <bit>1</bit> </item>
- <item name="8"> <bit>0</bit> </item>
- </enum>
-
- <enum name="VModsLow">
- <item name="7"> <bit>7</bit> </item>
- <item name="6"> <bit>6</bit> </item>
- <item name="5"> <bit>5</bit> </item>
- <item name="4"> <bit>4</bit> </item>
- <item name="3"> <bit>3</bit> </item>
- <item name="2"> <bit>2</bit> </item>
- <item name="1"> <bit>1</bit> </item>
- <item name="0"> <bit>0</bit> </item>
- </enum>
-
- <enum name="VMod">
- <item name="15"> <bit>15</bit> </item>
- <item name="14"> <bit>14</bit> </item>
- <item name="13"> <bit>13</bit> </item>
- <item name="12"> <bit>12</bit> </item>
- <item name="11"> <bit>11</bit> </item>
- <item name="10"> <bit>10</bit> </item>
- <item name="9"> <bit>9</bit> </item>
- <item name="8"> <bit>8</bit> </item>
- <item name="7"> <bit>7</bit> </item>
- <item name="6"> <bit>6</bit> </item>
- <item name="5"> <bit>5</bit> </item>
- <item name="4"> <bit>4</bit> </item>
- <item name="3"> <bit>3</bit> </item>
- <item name="2"> <bit>2</bit> </item>
- <item name="1"> <bit>1</bit> </item>
- <item name="0"> <bit>0</bit> </item>
- </enum>
-
- <enum name="Explicit">
- <item name="VModMap"> <bit>7</bit> </item>
- <item name="Behavior"> <bit>6</bit> </item>
- <item name="AutoRepeat"> <bit>5</bit> </item>
- <item name="Interpret"> <bit>4</bit> </item>
- <item name="KeyType4"> <bit>3</bit> </item>
- <item name="KeyType3"> <bit>2</bit> </item>
- <item name="KeyType2"> <bit>1</bit> </item>
- <item name="KeyType1"> <bit>0</bit> </item>
- </enum>
-
- <enum name="SymInterpret">
- <item name="NoneOf"> <value>0</value> </item>
- <item name="AnyOfOrNone"> <value>1</value> </item>
- <item name="AnyOf"> <value>2</value> </item>
- <item name="AllOf"> <value>3</value> </item>
- <item name="Exactly"> <value>4</value> </item>
- </enum>
-
- <enum name="SymInterpMatch">
- <item name="LevelOneOnly"> <bit>7</bit> </item>
- <item name="OpMask"> <value>127</value> </item> <!--0x7f-->
- </enum>
-
- <enum name="IMFlag">
- <item name="NoExplicit"> <bit>7</bit> </item>
- <item name="NoAutomatic"> <bit>6</bit> </item>
- <item name="LEDDrivesKB"> <bit>5</bit> </item>
- </enum>
-
- <enum name="IMModsWhich">
- <item name="UseCompat"> <bit>4</bit> </item>
- <item name="UseEffective"> <bit>3</bit> </item>
- <item name="UseLocked"> <bit>2</bit> </item>
- <item name="UseLatched"> <bit>1</bit> </item>
- <item name="UseBase"> <bit>0</bit> </item>
- </enum>
-
- <enum name="IMGroupsWhich">
- <item name="UseCompat"> <bit>4</bit> </item>
- <item name="UseEffective"> <bit>3</bit> </item>
- <item name="UseLocked"> <bit>2</bit> </item>
- <item name="UseLatched"> <bit>1</bit> </item>
- <item name="UseBase"> <bit>0</bit> </item>
- </enum>
-
- <struct name="IndicatorMap">
- <field name="flags" type="CARD8" enum="IMFlag" />
- <field name="whichGroups" type="CARD8" enum="IMGroupsWhich" />
- <field name="groups" type="CARD8" enum="SetOfGroup" />
- <field name="whichMods" type="CARD8" enum="IMModsWhich" />
- <field name="mods" type="CARD8" mask="ModMask" />
- <field name="realMods" type="CARD8" mask="ModMask" />
- <field name="vmods" type="CARD16" mask="VMod" />
- <field name="ctrls" type="CARD32" enum="BoolCtrl" />
- </struct>
-
- <enum name="CMDetail">
- <item name="SymInterp"> <bit>0</bit> </item>
- <item name="GroupCompat"> <bit>1</bit> </item>
- </enum>
-
- <enum name="NameDetail">
- <item name="Keycodes"> <bit>0</bit> </item>
- <item name="Geometry"> <bit>1</bit> </item>
- <item name="Symbols"> <bit>2</bit> </item>
- <item name="PhysSymbols"> <bit>3</bit> </item>
- <item name="Types"> <bit>4</bit> </item>
- <item name="Compat"> <bit>5</bit> </item>
- <item name="KeyTypeNames"> <bit>6</bit> </item>
- <item name="KTLevelNames"> <bit>7</bit> </item>
- <item name="IndicatorNames"> <bit>8</bit> </item>
- <item name="KeyNames"> <bit>9</bit> </item>
- <item name="KeyAliases"> <bit>10</bit> </item>
- <item name="VirtualModNames"> <bit>11</bit> </item>
- <item name="GroupNames"> <bit>12</bit> </item>
- <item name="RGNames"> <bit>13</bit> </item>
- </enum>
-
- <enum name="GBNDetail">
- <item name="Types"> <bit>0</bit> </item>
- <item name="CompatMap"> <bit>1</bit> </item>
- <item name="ClientSymbols"> <bit>2</bit> </item>
- <item name="ServerSymbols"> <bit>3</bit> </item>
- <item name="IndicatorMaps"> <bit>4</bit> </item>
- <item name="KeyNames"> <bit>5</bit> </item>
- <item name="Geometry"> <bit>6</bit> </item>
- <item name="OtherNames"> <bit>7</bit> </item>
- </enum>
-
- <enum name="XIFeature">
- <item name="Keyboards"> <bit>0</bit> </item>
- <item name="ButtonActions"> <bit>1</bit> </item>
- <item name="IndicatorNames"> <bit>2</bit> </item>
- <item name="IndicatorMaps"> <bit>3</bit> </item>
- <item name="IndicatorState"> <bit>4</bit> </item>
- </enum>
-
- <enum name="PerClientFlag">
- <item name="DetectableAutoRepeat"> <bit>0</bit> </item>
- <item name="GrabsUseXKBState"> <bit>1</bit> </item>
- <item name="AutoResetControls"> <bit>2</bit> </item>
- <item name="LookupStateWhenGrabbed"> <bit>3</bit> </item>
- <item name="SendEventUsesXKBState"> <bit>4</bit> </item>
- </enum>
-
- <struct name="ModDef">
- <field name="mask" type="CARD8" mask="ModMask" />
- <field name="realMods" type="CARD8" mask="ModMask" />
- <field name="vmods" type="CARD16" mask="VMod" />
- </struct>
-
- <struct name="KeyName">
- <list name="name" type="CARD8">
- <value>4</value>
- </list>
- </struct>
-
- <struct name="KeyAlias">
- <list name="real" type="CARD8">
- <value>4</value>
- </list>
- <list name="alias" type="CARD8">
- <value>4</value>
- </list>
- </struct>
-
- <struct name="CountedString8">
- <field name="length" type="CARD8" />
- <list name="string" type="CARD8">
- <fieldref>length</fieldref>
- </list>
- </struct>
-
- <struct name="CountedString16">
- <field name="length" type="CARD16" />
- <list name="string" type="CARD8">
- <fieldref>length</fieldref>
- </list>
- <pad bytes="1" />
- </struct>
-
- <struct name="KTMapEntry">
- <field name="active" type="BOOL" />
- <!-- Xlib uses a different arrangement of fields
- <field name="mods_mask" type="CARD8" mask="ModMask" />
- <field name="level" type="CARD8" />
- -->
- <field name="level" type="CARD8" />
- <field name="mods_mask" type="CARD8" mask="ModMask" />
- <field name="mods_mods" type="CARD8" mask="ModMask" />
- <field name="mods_vmods" type="CARD16" mask="VMod" />
- <pad bytes="2" />
- </struct>
-
- <struct name="KeyType">
- <field name="mods_mask" type="CARD8" mask="ModMask" />
- <field name="mods_mods" type="CARD8" mask="ModMask" />
- <field name="mods_vmods" type="CARD16" mask="VMod" />
- <field name="numLevels" type="CARD8" />
- <field name="nMapEntries" type="CARD8" />
- <field name="hasPreserve" type="BOOL" />
- <pad bytes="1" />
- <list name="map" type="KTMapEntry">
- <fieldref>nMapEntries</fieldref>
- </list>
- <list name="preserve" type="ModDef">
- <op op="*">
- <fieldref>hasPreserve</fieldref>
- <fieldref>nMapEntries</fieldref>
- </op>
- </list>
- </struct>
-
- <struct name="KeySymMap">
- <list name="kt_index" type="CARD8">
- <value>4</value>
- </list>
- <field name="groupInfo" type="CARD8" />
- <field name="width" type="CARD8" />
- <field name="nSyms" type="CARD16" />
- <list name="syms" type="KEYSYM">
- <fieldref>nSyms</fieldref>
- </list>
- </struct>
-
- <!-- Key Behaviors -->
-
- <struct name="CommonBehavior">
- <field name="type" type="CARD8" />
- <field name="data" type="CARD8" />
- </struct>
-
- <struct name="DefaultBehavior">
- <field name="type" type="CARD8" />
- <pad bytes="1" />
- </struct>
-
- <typedef oldname="DefaultBehavior" newname="LockBehavior" />
-
- <struct name="RadioGroupBehavior">
- <field name="type" type="CARD8" />
- <field name="group" type="CARD8" />
- </struct>
-
- <struct name="Overlay1Behavior">
- <field name="type" type="CARD8" />
- <field name="key" type="KEYCODE" />
- </struct>
-
- <struct name="Overlay2Behavior">
- <field name="type" type="CARD8" />
- <field name="key" type="CARD8" />
- </struct>
-
- <typedef oldname="LockBehavior" newname="PermamentLockBehavior" />
- <typedef oldname="RadioGroupBehavior" newname="PermamentRadioGroupBehavior" />
- <typedef oldname="Overlay1Behavior" newname="PermamentOverlay1Behavior" />
- <typedef oldname="Overlay2Behavior" newname="PermamentOverlay2Behavior" />
-
- <union name="Behavior">
- <field name="common" type="CommonBehavior" />
- <field name="default" type="DefaultBehavior" />
- <field name="lock" type="LockBehavior" />
- <field name="radioGroup" type="RadioGroupBehavior" />
- <field name="overlay1" type="Overlay1Behavior" />
- <field name="overlay2" type="Overlay2Behavior" />
- <field name="permamentLock" type="PermamentLockBehavior" />
- <field name="permamentRadioGroup" type="PermamentRadioGroupBehavior" />
- <field name="permamentOverlay1" type="PermamentOverlay1Behavior" />
- <field name="permamentOverlay2" type="PermamentOverlay2Behavior" />
- <field name="type" type="CARD8" />
- </union>
-
- <enum name="BehaviorType">
- <item name="Default"> <value>0</value> </item> <!--0x00-->
- <item name="Lock"> <value>1</value> </item> <!--0x01-->
- <item name="RadioGroup"> <value>2</value> </item> <!--0x02-->
- <item name="Overlay1"> <value>3</value> </item> <!--0x03-->
- <item name="Overlay2"> <value>4</value> </item> <!--0x04-->
- <item name="PermamentLock"> <value>129</value> </item> <!--0x81-->
- <item name="PermamentRadioGroup"> <value>130</value> </item> <!--0x82-->
- <item name="PermamentOverlay1"> <value>131</value> </item> <!--0x83-->
- <item name="PermamentOverlay2"> <value>132</value> </item> <!--0x84-->
- </enum>
-
- <struct name="SetBehavior">
- <field name="keycode" type="KEYCODE" />
- <field name="behavior" type="Behavior" />
- <pad bytes="1" />
- </struct>
-
- <struct name="SetExplicit">
- <field name="keycode" type="KEYCODE" />
- <field name="explicit" type="CARD8" mask="Explicit" />
- </struct>
-
- <struct name="KeyModMap">
- <field name="keycode" type="KEYCODE" />
- <field name="mods" type="CARD8" mask="ModMask" />
- </struct>
-
- <struct name="KeyVModMap">
- <field name="keycode" type="KEYCODE" />
- <pad bytes="1" />
- <field name="vmods" type="CARD16" mask="VMod" />
- </struct>
-
- <struct name="KTSetMapEntry">
- <field name="level" type="CARD8" />
- <field name="realMods" type="CARD8" mask="ModMask" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- </struct>
-
- <struct name="SetKeyType">
- <field name="mask" type="CARD8" mask="ModMask" />
- <field name="realMods" type="CARD8" mask="ModMask" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <field name="numLevels" type="CARD8" />
- <field name="nMapEntries" type="CARD8" />
- <field name="preserve" type="BOOL" />
- <pad bytes="1" />
- <list name="entries" type="KTSetMapEntry">
- <fieldref>nMapEntries</fieldref>
- </list>
- <list name="preserve_entries" type="KTSetMapEntry">
- <op op = "*">
- <fieldref>preserve</fieldref>
- <fieldref>nMapEntries</fieldref>
- </op>
- </list>
- </struct>
-
- <typedef oldname="char" newname="STRING8" />
-
- <struct name="Property">
- <field name="nameLength" type="CARD16" />
- <list name="name" type="STRING8">
- <fieldref>nameLength</fieldref>
- </list>
- <field name="valueLength" type="CARD16" />
- <list name="value" type="STRING8">
- <fieldref>valueLength</fieldref>
- </list>
- </struct>
-
- <struct name="Outline">
- <field name="nPoints" type="CARD8" />
- <field name="cornerRadius" type="CARD8" />
- <pad bytes="2" />
- <list name="points" type="POINT">
- <fieldref>nPoints</fieldref>
- </list>
- </struct>
-
- <struct name="Shape">
- <field name="name" type="ATOM" />
- <field name="nOutlines" type="CARD8" />
- <field name="primaryNdx" type="CARD8" />
- <field name="approxNdx" type="CARD8" />
- <pad bytes="1" />
- <list name="outlines" type="Outline">
- <fieldref>nOutlines</fieldref>
- </list>
- </struct>
-
- <struct name="Key">
- <list name="name" type="STRING8">
- <value>4</value>
- </list>
- <field name="gap" type="INT16" />
- <field name="shapeNdx" type="CARD8" />
- <field name="colorNdx" type="CARD8" />
- </struct>
-
- <struct name="OverlayKey">
- <list name="over" type="STRING8">
- <value>4</value>
- </list>
- <list name="under" type="STRING8">
- <value>4</value>
- </list>
- </struct>
-
- <struct name="OverlayRow">
- <field name="rowUnder" type="CARD8" />
- <field name="nKeys" type="CARD8" />
- <pad bytes="2" />
- <list name="keys" type="OverlayKey">
- <fieldref>nKeys</fieldref>
- </list>
- </struct>
-
- <struct name="Overlay">
- <field name="name" type="ATOM" />
- <field name="nRows" type="CARD8" />
- <pad bytes="3" />
- <list name="rows" type="OverlayRow">
- <fieldref>nRows</fieldref>
- </list>
- </struct>
-
- <struct name="Row">
- <field name="top" type="INT16" />
- <field name="left" type="INT16" />
- <field name="nKeys" type="CARD8" />
- <field name="vertical" type="BOOL" />
- <pad bytes="2" />
- <list name="keys" type="Key">
- <fieldref>nKeys</fieldref>
- </list>
- </struct>
-
- <enum name="DoodadType">
- <item name="Outline"> <value>1</value> </item>
- <item name="Solid"> <value>2</value> </item>
- <item name="Text"> <value>3</value> </item>
- <item name="Indicator"> <value>4</value> </item>
- <item name="Logo"> <value>5</value> </item>
- </enum>
-
- <struct name="CommonDoodad">
- <field name="name" type="ATOM" />
- <field name="type" type="CARD8" enum="DoodadType" />
- <field name="priority" type="CARD8" />
- <field name="top" type="INT16" />
- <field name="left" type="INT16" />
- <field name="angle" type="INT16" />
- </struct>
-
- <struct name="ShapeDoodad">
- <field name="name" type="ATOM" />
- <field name="type" type="CARD8" enum="DoodadType" />
- <field name="priority" type="CARD8" />
- <field name="top" type="INT16" />
- <field name="left" type="INT16" />
- <field name="angle" type="INT16" />
- <field name="colorNdx" type="CARD8" />
- <field name="shapeNdx" type="CARD8" />
- <pad bytes="6" />
- </struct>
-
- <struct name="TextDoodad">
- <field name="name" type="ATOM" />
- <field name="type" type="CARD8" enum="DoodadType" />
- <field name="priority" type="CARD8" />
- <field name="top" type="INT16" />
- <field name="left" type="INT16" />
- <field name="angle" type="INT16" />
- <field name="width" type="CARD16" />
- <field name="height" type="CARD16" />
- <field name="colorNdx" type="CARD8" />
- <pad bytes="3" />
- <field name="text" type="CountedString16" />
- <field name="font" type="CountedString16" />
- </struct>
-
- <struct name="IndicatorDoodad">
- <field name="name" type="ATOM" />
- <field name="type" type="CARD8" enum="DoodadType" />
- <field name="priority" type="CARD8" />
- <field name="top" type="INT16" />
- <field name="left" type="INT16" />
- <field name="angle" type="INT16" />
- <field name="shapeNdx" type="CARD8" />
- <field name="onColorNdx" type="CARD8" />
- <field name="offColorNdx" type="CARD8" />
- <pad bytes="5" />
- </struct>
-
- <struct name="LogoDoodad">
- <field name="name" type="ATOM" />
- <field name="type" type="CARD8" enum="DoodadType" />
- <field name="priority" type="CARD8" />
- <field name="top" type="INT16" />
- <field name="left" type="INT16" />
- <field name="angle" type="INT16" />
- <field name="colorNdx" type="CARD8" />
- <field name="shapeNdx" type="CARD8" />
- <pad bytes="6" />
- <field name="logoName" type="CountedString16" />
- </struct>
-
- <union name="Doodad">
- <field name="common" type="CommonDoodad" />
- <field name="shape" type="ShapeDoodad" />
- <field name="text" type="TextDoodad" />
- <field name="indicator" type="IndicatorDoodad" />
- <field name="logo" type="LogoDoodad" />
- </union>
-
- <struct name="Section">
- <field name="name" type="ATOM" />
- <field name="top" type="INT16" />
- <field name="left" type="INT16" />
- <field name="width" type="CARD16" />
- <field name="height" type="CARD16" />
- <field name="angle" type="INT16" />
- <field name="priority" type="CARD8" />
- <field name="nRows" type="CARD8" />
- <field name="nDoodads" type="CARD8" />
- <field name="nOverlays" type="CARD8" />
- <pad bytes="2" />
- <list name="rows" type="Row">
- <fieldref>nRows</fieldref>
- </list>
- <list name="doodads" type="Doodad">
- <fieldref>nDoodads</fieldref>
- </list>
- <list name="overlays" type="Overlay">
- <fieldref>nOverlays</fieldref>
- </list>
- </struct>
-
- <struct name="Listing">
- <field name="flags" type="CARD16" />
- <field name="length" type="CARD16" />
- <list name="string" type="STRING8">
- <fieldref>length</fieldref>
- </list>
- </struct>
-
- <struct name="DeviceLedInfo">
- <field name="ledClass" type="LedClassSpec" enum="LedClass" />
- <field name="ledID" type="IDSpec" altenum="ID" />
- <field name="namesPresent" type="CARD32" />
- <field name="mapsPresent" type="CARD32" />
- <field name="physIndicators" type="CARD32" />
- <field name="state" type="CARD32" />
- <list name="names" type="ATOM">
- <popcount>
- <fieldref>namesPresent</fieldref>
- </popcount>
- </list>
- <list name="maps" type="IndicatorMap">
- <popcount>
- <fieldref>mapsPresent</fieldref>
- </popcount>
- </list>
- </struct>
-
- <!-- Errors -->
-
- <enum name="Error">
- <item name="BadDevice"> <value>255</value> </item> <!--0xff-->
- <item name="BadClass"> <value>254</value> </item> <!--0xfe-->
- <item name="BadId"> <value>253</value> </item> <!--0xfd-->
- </enum>
-
- <error name="Keyboard" number="0">
- <field name="value" type="CARD32" />
- <field name="minorOpcode" type="CARD16" />
- <field name="majorOpcode" type="CARD8" />
- <pad bytes="21" />
- </error>
-
- <!-- Key Actions -->
-
- <enum name="SA">
- <item name="ClearLocks"> <bit>0</bit> </item>
- <item name="LatchToLock"> <bit>1</bit> </item>
- <item name="UseModMapMods"> <bit>2</bit> </item>
- <item name="GroupAbsolute"> <bit>2</bit> </item>
- </enum>
-
- <enum name="SAType">
- <item name="NoAction"> <value>0</value> </item>
- <item name="SetMods"> <value>1</value> </item>
- <item name="LatchMods"> <value>2</value> </item>
- <item name="LockMods"> <value>3</value> </item>
- <item name="SetGroup"> <value>4</value> </item>
- <item name="LatchGroup"> <value>5</value> </item>
- <item name="LockGroup"> <value>6</value> </item>
- <item name="MovePtr"> <value>7</value> </item>
- <item name="PtrBtn"> <value>8</value> </item>
- <item name="LockPtrBtn"> <value>9</value> </item>
- <item name="SetPtrDflt"> <value>10</value> </item>
- <item name="ISOLock"> <value>11</value> </item>
- <item name="Terminate"> <value>12</value> </item>
- <item name="SwitchScreen"> <value>13</value> </item>
- <item name="SetControls"> <value>14</value> </item>
- <item name="LockControls"> <value>15</value> </item>
- <item name="ActionMessage"> <value>16</value> </item>
- <item name="RedirectKey"> <value>17</value> </item>
- <item name="DeviceBtn"> <value>18</value> </item>
- <item name="LockDeviceBtn"> <value>19</value> </item>
- <item name="DeviceValuator"> <value>20</value> </item>
- </enum>
-
- <struct name="SANoAction">
- <field name="type" type="CARD8" enum="SAType" />
- <pad bytes="7" />
- </struct>
-
- <struct name="SASetMods">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" mask="SA" />
- <field name="mask" type="CARD8" mask="ModMask" />
- <field name="realMods" type="CARD8" mask="ModMask" />
- <field name="vmodsHigh" type="CARD8" mask="VModsHigh" />
- <field name="vmodsLow" type="CARD8" mask="VModsLow" />
- <pad bytes="2" />
- </struct>
-
- <typedef oldname="SASetMods" newname="SALatchMods" />
-
- <typedef oldname="SASetMods" newname="SALockMods" />
-
- <struct name="SASetGroup">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" mask="SA" />
- <field name="group" type="INT8" />
- <pad bytes="5" />
- </struct>
-
- <typedef oldname="SASetGroup" newname="SALatchGroup" />
-
- <typedef oldname="SASetGroup" newname="SALockGroup" />
-
- <enum name="SAMovePtrFlag">
- <item name="NoAcceleration"> <bit>0</bit> </item>
- <item name="MoveAbsoluteX"> <bit>1</bit> </item>
- <item name="MoveAbsoluteY"> <bit>2</bit> </item>
- </enum>
-
- <struct name="SAMovePtr">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" mask="SAMovePtrFlag" />
- <field name="xHigh" type="INT8" />
- <field name="xLow" type="CARD8" />
- <field name="yHigh" type="INT8" />
- <field name="yLow" type="CARD8" />
- <pad bytes="2" />
- </struct>
-
- <struct name="SAPtrBtn">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" />
- <field name="count" type="CARD8" />
- <field name="button" type="CARD8" />
- <pad bytes="4" />
- </struct>
-
- <struct name="SALockPtrBtn">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" />
- <pad bytes="1" />
- <field name="button" type="CARD8" />
- <pad bytes="4" />
- </struct>
-
- <enum name="SASetPtrDfltFlag">
- <item name="DfltBtnAbsolute"> <bit>1</bit> </item>
- <item name="AffectDfltButton"> <bit>0</bit> </item>
- </enum>
-
- <struct name="SASetPtrDflt">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" mask="SASetPtrDfltFlag" />
- <field name="affect" type="CARD8" mask="SASetPtrDfltFlag" />
- <field name="value" type="INT8" />
- <pad bytes="4" />
- </struct>
-
- <enum name="SAIsoLockFlag">
- <item name="NoLock"> <bit>0</bit> </item>
- <item name="NoUnlock"> <bit>1</bit> </item>
- <item name="UseModMapMods"> <bit>2</bit> </item>
- <item name="GroupAbsolute"> <bit>2</bit> </item>
- <item name="ISODfltIsGroup"> <bit>3</bit> </item>
- </enum>
-
- <enum name="SAIsoLockNoAffect">
- <item name="Ctrls"> <bit>3</bit> </item>
- <item name="Ptr"> <bit>4</bit> </item>
- <item name="Group"> <bit>5</bit> </item>
- <item name="Mods"> <bit>6</bit> </item>
- </enum>
-
- <struct name="SAIsoLock">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" mask="SAIsoLockFlag" />
- <field name="mask" type="CARD8" mask="ModMask" />
- <field name="realMods" type="CARD8" mask="ModMask" />
- <field name="group" type="INT8" />
- <field name="affect" type="CARD8" mask="SAIsoLockNoAffect" />
- <field name="vmodsHigh" type="CARD8" mask="VModsHigh" />
- <field name="vmodsLow" type="CARD8" mask="VModsLow" />
- </struct>
-
- <struct name="SATerminate">
- <field name="type" type="CARD8" enum="SAType" />
- <pad bytes="7" />
- </struct>
-
- <enum name="SwitchScreenFlag">
- <item name="Application"> <bit>0</bit> </item>
- <item name="Absolute" > <bit>2</bit> </item>
- </enum>
-
- <struct name="SASwitchScreen">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" />
- <field name="newScreen" type="INT8" />
- <pad bytes="5" />
- </struct>
-
- <enum name="BoolCtrlsHigh">
- <item name="AccessXFeedback"> <bit>0</bit> </item>
- <item name="AudibleBell"> <bit>1</bit> </item>
- <item name="Overlay1"> <bit>2</bit> </item>
- <item name="Overlay2"> <bit>3</bit> </item>
- <item name="IgnoreGroupLock"> <bit>4</bit> </item>
- </enum>
-
- <enum name="BoolCtrlsLow">
- <item name="RepeatKeys"> <bit>0</bit> </item>
- <item name="SlowKeys"> <bit>1</bit> </item>
- <item name="BounceKeys"> <bit>2</bit> </item>
- <item name="StickyKeys"> <bit>3</bit> </item>
- <item name="MouseKeys"> <bit>4</bit> </item>
- <item name="MouseKeysAccel"> <bit>5</bit> </item>
- <item name="AccessXKeys"> <bit>6</bit> </item>
- <item name="AccessXTimeout"> <bit>7</bit> </item>
- </enum>
-
- <struct name="SASetControls">
- <field name="type" type="CARD8" enum="SAType" />
- <pad bytes="3" />
- <field name="boolCtrlsHigh" type="CARD8" mask="BoolCtrlsHigh" />
- <field name="boolCtrlsLow" type="CARD8" mask="BoolCtrlsLow" />
- <pad bytes="2" />
- </struct>
-
- <typedef oldname="SASetControls" newname="SALockControls" />
-
- <enum name="ActionMessageFlag">
- <item name="OnPress"> <bit>0</bit> </item>
- <item name="OnRelease"> <bit>1</bit> </item>
- <item name="GenKeyEvent"> <bit>2</bit> </item>
- </enum>
-
- <struct name="SAActionMessage">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" mask="ActionMessageFlag" />
- <list name="message" type="CARD8">
- <value>6</value>
- </list>
- </struct>
-
- <struct name="SARedirectKey">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="newkey" type="KEYCODE" />
- <field name="mask" type="CARD8" mask="ModMask" />
- <field name="realModifiers" type="CARD8" mask="ModMask" />
- <field name="vmodsMaskHigh" type="CARD8" mask="VModsHigh"/>
- <field name="vmodsMaskLow" type="CARD8" mask="VModsLow"/>
- <field name="vmodsHigh" type="CARD8" mask="VModsHigh"/>
- <field name="vmodsLow" type="CARD8" mask="VModsLow"/>
- </struct>
-
- <struct name="SADeviceBtn">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" />
- <field name="count" type="CARD8" />
- <field name="button" type="CARD8" />
- <field name="device" type="CARD8" />
- <pad bytes="3" />
- </struct>
-
- <enum name="LockDeviceFlags">
- <item name="NoLock"> <bit>0</bit> </item>
- <item name="NoUnlock"> <bit>1</bit> </item>
- </enum>
-
- <struct name="SALockDeviceBtn">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="flags" type="CARD8" mask="LockDeviceFlags" />
- <pad bytes="1" />
- <field name="button" type="CARD8" />
- <field name="device" type="CARD8" />
- </struct>
-
- <enum name="SAValWhat">
- <item name="IgnoreVal"> <value>0</value> </item>
- <item name="SetValMin"> <value>1</value> </item>
- <item name="SetValCenter"> <value>2</value> </item>
- <item name="SetValMax"> <value>3</value> </item>
- <item name="SetValRelative"> <value>4</value> </item>
- <item name="SetValAbsolute"> <value>5</value> </item>
- </enum>
-
- <struct name="SADeviceValuator">
- <field name="type" type="CARD8" enum="SAType" />
- <field name="device" type="CARD8" />
- <field name="val1what" type="CARD8" enum="SAValWhat" />
- <field name="val1index" type="CARD8" />
- <field name="val1value" type="CARD8" />
- <field name="val2what" type="CARD8" enum="SAValWhat" />
- <field name="val2index" type="CARD8" />
- <field name="val2value" type="CARD8" />
- </struct>
-
- <union name="Action">
- <field name="noaction" type="SANoAction" />
- <field name="setmods" type="SASetMods" />
- <field name="latchmods" type="SALatchMods" />
- <field name="lockmods" type="SALockMods" />
- <field name="setgroup" type="SASetGroup" />
- <field name="latchgroup" type="SALatchGroup" />
- <field name="lockgroup" type="SALockGroup" />
- <field name="moveptr" type="SAMovePtr" />
- <field name="ptrbtn" type="SAPtrBtn" />
- <field name="lockptrbtn" type="SALockPtrBtn" />
- <field name="setptrdflt" type="SASetPtrDflt" />
- <field name="isolock" type="SAIsoLock" />
- <field name="terminate" type="SATerminate" />
- <field name="switchscreen" type="SASwitchScreen" />
- <field name="setcontrols" type="SASetControls" />
- <field name="lockcontrols" type="SALockControls" />
- <field name="message" type="SAActionMessage" />
- <field name="redirect" type="SARedirectKey" />
- <field name="devbtn" type="SADeviceBtn" />
- <field name="lockdevbtn" type="SALockDeviceBtn" />
- <field name="devval" type="SADeviceValuator" />
- <field name="type" type="CARD8" enum="SAType" />
- </union>
-
- <!-- Requests -->
-
- <request name="UseExtension" opcode="0">
- <field name="wantedMajor" type="CARD16" />
- <field name="wantedMinor" type="CARD16" />
- <reply>
- <field name="supported" type="BOOL" />
- <field name="serverMajor" type="CARD16" />
- <field name="serverMinor" type="CARD16" />
- <pad bytes="20" />
- </reply>
- </request>
-
- <request name="SelectEvents" opcode="1">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="affectWhich" type="CARD16" enum="EventType" />
- <field name="clear" type="CARD16" enum="EventType" />
- <field name="selectAll" type="CARD16" enum="EventType" />
- <field name="affectMap" type="CARD16" enum="MapPart" />
- <field name="map" type="CARD16" enum="MapPart" />
- <switch name="details">
- <op op="&">
- <fieldref>affectWhich</fieldref>
- <op op="&">
- <unop op="~"><fieldref>clear</fieldref></unop>
- <unop op="~"><fieldref>selectAll</fieldref></unop>
- </op>
- </op>
- <bitcase>
- <enumref ref="EventType">NewKeyboardNotify</enumref>
- <field name="affectNewKeyboard" type="CARD16" mask="NKNDetail" />
- <field name="newKeyboardDetails" type="CARD16" mask="NKNDetail" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">StateNotify</enumref>
- <field name="affectState" type="CARD16" mask="StatePart" />
- <field name="stateDetails" type="CARD16" mask="StatePart" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">ControlsNotify</enumref>
- <field name="affectCtrls" type="CARD32" mask="Control" />
- <field name="ctrlDetails" type="CARD32" mask="Control" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">IndicatorStateNotify</enumref>
- <field name="affectIndicatorState" type="CARD32" />
- <field name="indicatorStateDetails" type="CARD32" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">IndicatorMapNotify</enumref>
- <field name="affectIndicatorMap" type="CARD32" />
- <field name="indicatorMapDetails" type="CARD32" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">NamesNotify</enumref>
- <field name="affectNames" type="CARD16" mask="NameDetail" />
- <field name="namesDetails" type="CARD16" mask="NameDetail" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">CompatMapNotify</enumref>
- <field name="affectCompat" type="CARD8" mask="CMDetail" />
- <field name="compatDetails" type="CARD8" mask="CMDetail" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">BellNotify</enumref>
- <field name="affectBell" type="CARD8" />
- <field name="bellDetails" type="CARD8" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">ActionMessage</enumref>
- <field name="affectMsgDetails" type="CARD8" />
- <field name="msgDetails" type="CARD8" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">AccessXNotify</enumref>
- <field name="affectAccessX" type="CARD16" mask="AXNDetail" />
- <field name="accessXDetails" type="CARD16" mask="AXNDetail" />
- </bitcase>
- <bitcase>
- <enumref ref="EventType">ExtensionDeviceNotify</enumref>
- <field name="affectExtDev" type="CARD16" mask="XIFeature" />
- <field name="extdevDetails" type="CARD16" mask="XIFeature" />
- </bitcase>
- </switch>
- </request>
-
- <request name="Bell" opcode="3">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="bellClass" type="BellClassSpec" />
- <field name="bellID" type="IDSpec" />
- <field name="percent" type="INT8" />
- <field name="forceSound" type="BOOL" />
- <field name="eventOnly" type="BOOL" />
- <pad bytes="1" />
- <field name="pitch" type="INT16" />
- <field name="duration" type="INT16" />
- <pad bytes="2" />
- <field name="name" type="ATOM" />
- <field name="window" type="WINDOW" />
- </request>
-
- <request name="GetState" opcode="4">
- <field name="deviceSpec" type="DeviceSpec" />
- <pad bytes="2" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="mods" type="CARD8" mask="ModMask" />
- <field name="baseMods" type="CARD8" mask="ModMask" />
- <field name="latchedMods" type="CARD8" mask="ModMask" />
- <field name="lockedMods" type="CARD8" mask="ModMask" />
- <field name="group" type="CARD8" enum="Group" />
- <field name="lockedGroup" type="CARD8" enum="Group" />
- <field name="baseGroup" type="INT16" />
- <field name="latchedGroup" type="INT16" />
- <field name="compatState" type="CARD8" mask="ModMask" />
- <field name="grabMods" type="CARD8" mask="ModMask" />
- <field name="compatGrabMods" type="CARD8" mask="ModMask" />
- <field name="compatLookupMods" type="CARD8" mask="ModMask" />
- <pad bytes="1" />
- <field name="ptrBtnState" type="CARD16" mask="KeyButMask" />
- <pad bytes="6" />
- </reply>
- </request>
-
- <request name="LatchLockState" opcode="5">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="affectModLocks" type="CARD8" mask="ModMask" />
- <field name="modLocks" type="CARD8" mask="ModMask" />
- <field name="lockGroup" type="BOOL" />
- <field name="groupLock" type="CARD8" enum="Group" />
- <field name="affectModLatches" type="CARD8" mask="ModMask" />
- <pad bytes="1" />
- <field name="latchGroup" type="BOOL" />
- <field name="groupLatch" type="CARD16" />
- </request>
-
- <request name="GetControls" opcode="6">
- <field name="deviceSpec" type="DeviceSpec" />
- <pad bytes="2" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="mouseKeysDfltBtn" type="CARD8" />
- <field name="numGroups" type="CARD8" />
- <field name="groupsWrap" type="CARD8" />
- <field name="internalModsMask" type="CARD8" mask="ModMask" />
- <field name="ignoreLockModsMask" type="CARD8" mask="ModMask" />
- <field name="internalModsRealMods" type="CARD8" mask="ModMask" />
- <field name="ignoreLockModsRealMods" type="CARD8" mask="ModMask" />
- <pad bytes="1" />
- <field name="internalModsVmods" type="CARD16" mask="VMod" />
- <field name="ignoreLockModsVmods" type="CARD16" mask="VMod" />
- <field name="repeatDelay" type="CARD16" />
- <field name="repeatInterval" type="CARD16" />
- <field name="slowKeysDelay" type="CARD16" />
- <field name="debounceDelay" type="CARD16" />
- <field name="mouseKeysDelay" type="CARD16" />
- <field name="mouseKeysInterval" type="CARD16" />
- <field name="mouseKeysTimeToMax" type="CARD16" />
- <field name="mouseKeysMaxSpeed" type="CARD16" />
- <field name="mouseKeysCurve" type="INT16" />
- <field name="accessXOption" type="AXOption" />
- <field name="accessXTimeout" type="CARD16" />
- <field name="accessXTimeoutOptionsMask" type="AXOption" />
- <field name="accessXTimeoutOptionsValues" type="AXOption" />
- <pad bytes="2" />
- <field name="accessXTimeoutMask" type="CARD32" enum="BoolCtrl" />
- <field name="accessXTimeoutValues" type="CARD32" enum="BoolCtrl" />
- <field name="enabledControls" type="CARD32" enum="BoolCtrl" />
- <list name="perKeyRepeat" type="CARD8">
- <value>32</value>
- </list>
- </reply>
- </request>
-
- <request name="SetControls" opcode="7">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="affectInternalRealMods" type="CARD8" mask="ModMask" />
- <field name="interanlRealMods" type="CARD8" mask="ModMask" />
- <field name="affectIgnoreLockRealMods" type="CARD8" mask="ModMask" />
- <field name="ignoreLockRealMods" type="CARD8" mask="ModMask" />
- <field name="affectInternalVirtualMods" type="CARD16" mask="VMod" />
- <field name="internalVirtualMods" type="CARD16" mask="VMod" />
- <field name="affectInternalLockVirtualMods" type="CARD16" mask="VMod" />
- <field name="internalLockVirtualMods" type="CARD16" mask="VMod" />
- <field name="mouseKeysDfltBtn" type="CARD8" />
- <field name="groupsWrap" type="CARD8" />
- <field name="accessXOptions" type="AXOption" />
- <pad bytes="2" />
- <field name="affectEnabledControls" type="CARD32" enum="BoolCtrl" />
- <field name="enabledControls" type="CARD32" enum="BoolCtrl" />
- <field name="changeControls" type="CARD32" mask="Control" />
- <field name="repeatDelay" type="CARD16" />
- <field name="repeatInterval" type="CARD16" />
- <field name="slowKeysDelay" type="CARD16" />
- <field name="debounceDelay" type="CARD16" />
- <field name="mouseKeysDelay" type="CARD16" />
- <field name="mouseKeysInterval" type="CARD16" />
- <field name="mouseKeysTimeToMax" type="CARD16" />
- <field name="mouseKeysMaxSpeed" type="CARD16" />
- <field name="mouseKeysCurve" type="INT16" />
- <field name="accessXTimeout" type="CARD16" />
- <field name="accessXTimeoutMask" type="CARD32" enum="BoolCtrl" />
- <field name="accessXTimeoutValues" type="CARD32" enum="BoolCtrl" />
- <field name="accessXTimeoutOptionsMask" type="AXOption" />
- <field name="accessXTimeoutOptionsValues" type="AXOption" />
- <list name="perKeyRepeat" type="CARD8">
- <value>32</value>
- </list>
- </request>
-
- <request name="GetMap" opcode="8">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="full" type="CARD16" enum="MapPart" />
- <field name="partial" type="CARD16" enum="MapPart" />
- <field name="firstType" type="CARD8" />
- <field name="nTypes" type="CARD8" />
- <field name="firstKeySym" type="KEYCODE" />
- <field name="nKeySyms" type="CARD8" />
- <field name="firstKeyAction" type="KEYCODE" />
- <field name="nKeyActions" type="CARD8" />
- <field name="firstKeyBehavior" type="KEYCODE" />
- <field name="nKeyBehaviors" type="CARD8" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <field name="firstKeyExplicit" type="KEYCODE" />
- <field name="nKeyExplicit" type="CARD8" />
- <field name="firstModMapKey" type="KEYCODE" />
- <field name="nModMapKeys" type="CARD8" />
- <field name="firstVModMapKey" type="KEYCODE" />
- <field name="nVModMapKeys" type="CARD8" />
- <pad bytes="2" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <pad bytes="2" />
- <field name="minKeyCode" type="KEYCODE" />
- <field name="maxKeyCode" type="KEYCODE" />
- <field name="present" type="CARD16" enum="MapPart" />
- <field name="firstType" type="CARD8" />
- <field name="nTypes" type="CARD8" />
- <field name="totalTypes" type="CARD8" />
- <field name="firstKeySym" type="KEYCODE" />
- <field name="totalSyms" type="CARD16" />
- <field name="nKeySyms" type="CARD8" />
- <field name="firstKeyAction" type="KEYCODE" />
- <field name="totalActions" type="CARD16" />
- <field name="nKeyActions" type="CARD8" />
- <field name="firstKeyBehavior" type="KEYCODE" />
- <field name="nKeyBehaviors" type="CARD8" />
- <field name="totalKeyBehaviors" type="CARD8" />
- <field name="firstKeyExplicit" type="KEYCODE" />
- <field name="nKeyExplicit" type="CARD8" />
- <field name="totalKeyExplicit" type="CARD8" />
- <field name="firstModMapKey" type="KEYCODE" />
- <field name="nModMapKeys" type="CARD8" />
- <field name="totalModMapKeys" type="CARD8" />
- <field name="firstVModMapKey" type="KEYCODE" />
- <field name="nVModMapKeys" type="CARD8" />
- <field name="totalVModMapKeys" type="CARD8" />
- <pad bytes="1" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <switch name="map">
- <fieldref>present</fieldref>
- <bitcase>
- <enumref ref="MapPart">KeyTypes</enumref>
- <list name="types_rtrn" type="KeyType">
- <fieldref>nTypes</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeySyms</enumref>
- <list name="syms_rtrn" type="KeySymMap">
- <fieldref>nKeySyms</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyActions</enumref>
- <list name="acts_rtrn_count" type="CARD8">
- <fieldref>nKeyActions</fieldref>
- </list>
- <list name="acts_rtrn_acts" type="Action">
- <fieldref>totalActions</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyBehaviors</enumref>
- <list name="behaviors_rtrn" type="SetBehavior">
- <fieldref>totalKeyBehaviors</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualMods</enumref>
- <list name="vmods_rtrn" type="CARD8" mask="ModMask">
- <fieldref>nVModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ExplicitComponents</enumref>
- <list name="explicit_rtrn" type="SetExplicit">
- <fieldref>totalKeyExplicit</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ModifierMap</enumref>
- <list name="modmap_rtrn" type="KeyModMap">
- <fieldref>totalModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualModMap</enumref>
- <list name="vmodmap_rtrn" type="KeyVModMap">
- <fieldref>totalVModMapKeys</fieldref>
- </list>
- </bitcase>
- </switch>
- </reply>
- </request>
-
- <request name="SetMap" opcode="9">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="present" type="CARD16" enum="MapPart" />
- <field name="flags" type="CARD16" mask="SetMapFlags" />
- <field name="minKeyCode" type="KEYCODE" />
- <field name="maxKeyCode" type="KEYCODE" />
- <field name="firstType" type="CARD8" />
- <field name="nTypes" type="CARD8" />
- <field name="firstKeySym" type="KEYCODE" />
- <field name="nKeySyms" type="CARD8" />
- <field name="totalSyms" type="CARD16" />
- <field name="firstKeyAction" type="KEYCODE" />
- <field name="nKeyActions" type="CARD8" />
- <field name="totalActions" type="CARD16" />
- <field name="firstKeyBehavior" type="KEYCODE" />
- <field name="nKeyBehaviors" type="CARD8" />
- <field name="totalKeyBehaviors" type="CARD8" />
- <field name="firstKeyExplicit" type="KEYCODE" />
- <field name="nKeyExplicit" type="CARD8" />
- <field name="totalKeyExplicit" type="CARD8" />
- <field name="firstModMapKey" type="KEYCODE" />
- <field name="nModMapKeys" type="CARD8" />
- <field name="totalModMapKeys" type="CARD8" />
- <field name="firstVModMapKey" type="KEYCODE" />
- <field name="nVModMapKeys" type="CARD8" />
- <field name="totalVModMapKeys" type="CARD8" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <switch name="values">
- <fieldref>present</fieldref>
- <bitcase>
- <enumref ref="MapPart">KeyTypes</enumref>
- <list name="types" type="SetKeyType">
- <fieldref>nTypes</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeySyms</enumref>
- <list name="syms" type="KeySymMap">
- <fieldref>nKeySyms</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyActions</enumref>
- <list name="actionsCount" type="CARD8">
- <fieldref>nKeyActions</fieldref>
- </list>
- <list name="actions" type="Action">
- <fieldref>totalActions</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyBehaviors</enumref>
- <list name="behaviors" type="SetBehavior">
- <fieldref>totalKeyBehaviors</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualMods</enumref>
- <list name="vmods" type="CARD8">
- <fieldref>nVModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ExplicitComponents</enumref>
- <list name="explicit" type="SetExplicit">
- <fieldref>totalKeyExplicit</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ModifierMap</enumref>
- <list name="modmap" type="KeyModMap">
- <fieldref>totalModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualModMap</enumref>
- <list name="vmodmap" type="KeyVModMap">
- <fieldref>totalVModMapKeys</fieldref>
- </list>
- </bitcase>
- </switch>
- </request>
-
- <request name="GetCompatMap" opcode="10">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="groups" type="CARD8" mask="SetOfGroup" />
- <field name="getAllSI" type="BOOL" />
- <field name="firstSI" type="CARD16" />
- <field name="nSI" type="CARD16" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="groupsRtrn" type="CARD8" mask="SetOfGroup" />
- <pad bytes="1" />
- <field name="firstSIRtrn" type="CARD16" />
- <field name="nSIRtrn" type="CARD16" />
- <field name="nTotalSI" type="CARD16" />
- <pad bytes="16" />
- <list name="si_rtrn" type="CARD8" mask="SymInterpret">
- <op op="*">
- <value>16</value>
- <fieldref>nSIRtrn</fieldref>
- </op>
- </list>
- <list name="group_rtrn" type="ModDef">
- <popcount>
- <fieldref>groupsRtrn</fieldref>
- </popcount>
- </list>
- </reply>
- </request>
-
- <request name="SetCompatMap" opcode="11">
- <field name="deviceSpec" type="DeviceSpec" />
- <pad bytes="1" />
- <field name="recomputeActions" type="BOOL" />
- <field name="truncateSI" type="BOOL" />
- <field name="groups" type="CARD8" mask="SetOfGroup" />
- <field name="firstSI" type="CARD16" />
- <field name="nSI" type="CARD16" />
- <pad bytes="2"/>
- <list name="si" type="CARD8" mask="SymInterpret">
- <op op="*">
- <value>16</value>
- <fieldref>nSI</fieldref>
- </op>
- </list>
- <list name="groupMaps" type="ModDef">
- <popcount>
- <fieldref>groups</fieldref>
- </popcount>
- </list>
- </request>
-
- <request name="GetIndicatorState" opcode="12">
- <field name="deviceSpec" type="DeviceSpec" />
- <pad bytes="2" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="state" type="CARD32" />
- <pad bytes="20" />
- </reply>
- </request>
-
- <request name="GetIndicatorMap" opcode="13">
- <field name="deviceSpec" type="DeviceSpec" />
- <pad bytes="2" />
- <field name="which" type="CARD32" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="which" type="CARD32" />
- <field name="realIndicators" type="CARD32" />
- <field name="nIndicators" type="CARD8" />
- <pad bytes="15" />
- <list name="maps" type="IndicatorMap">
- <fieldref>nIndicators</fieldref>
- </list>
- </reply>
- </request>
-
- <request name="SetIndicatorMap" opcode="14">
- <field name="deviceSpec" type="DeviceSpec" />
- <pad bytes="2" />
- <field name="which" type="CARD32" />
- <list name="maps" type="IndicatorMap">
- <popcount>
- <fieldref>which</fieldref>
- </popcount>
- </list>
- </request>
-
- <request name="GetNamedIndicator" opcode="15">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="ledClass" type="LedClassSpec" enum="LedClass" />
- <field name="ledID" type="IDSpec" altenum="ID" />
- <pad bytes="2" />
- <field name="indicator" type="ATOM" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="indicator" type="ATOM" />
- <field name="found" type="BOOL" />
- <field name="on" type="BOOL" />
- <field name="realIndicator" type="BOOL" />
- <field name="ndx" type="CARD8" />
- <field name="map_flags" type="CARD8" mask="IMFlag" />
- <field name="map_whichGroups" type="CARD8" mask="IMGroupsWhich" />
- <field name="map_groups" type="CARD8" mask="SetOfGroups" />
- <field name="map_whichMods" type="CARD8" mask="IMModsWhich" />
- <field name="map_mods" type="CARD8" mask="ModMask" />
- <field name="map_realMods" type="CARD8" mask="ModMask" />
- <field name="map_vmod" type="CARD16" mask="VMod" />
- <field name="map_ctrls" type="CARD32" mask="BoolCtrl" />
- <pad bytes="3" />
- </reply>
- </request>
-
- <request name="SetNamedIndicator" opcode="16" >
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="ledClass" type="LedClassSpec" enum="LedClass" />
- <field name="ledID" type="IDSpec" altenum="ID" />
- <pad bytes="2" />
- <field name="indicator" type="ATOM" />
- <field name="setState" type="BOOL" />
- <field name="on" type="BOOL" />
- <field name="setMap" type="BOOL" />
- <field name="createMap" type="BOOL" />
- <pad bytes="1" />
- <field name="map_flags" type="CARD8" mask="IMFlag" />
- <field name="map_whichGroups" type="CARD8" mask="IMGroupsWhich" />
- <field name="map_groups" type="CARD8" mask="SetOfGroups" />
- <field name="map_whichMods" type="CARD8" mask="IMModsWhich" />
- <field name="map_realMods" type="CARD8" mask="ModMask" />
- <field name="map_vmods" type="CARD16" mask="VMod" />
- <field name="map_ctrls" type="CARD32" mask="BoolCtrl" />
- </request>
-
- <request name="GetNames" opcode="17">
- <field name="deviceSpec" type="DeviceSpec" />
- <pad bytes="2" />
- <field name="which" type="CARD32" mask="NameDetail" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="which" type="CARD32" mask="NameDetail" />
- <field name="minKeyCode" type="KEYCODE" />
- <field name="maxKeyCode" type="KEYCODE" />
- <field name="nTypes" type="CARD8" />
- <field name="groupNames" type="CARD8" mask="SetOfGroup" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <field name="firstKey" type="KEYCODE" />
- <field name="nKeys" type="CARD8" />
- <field name="indicators" type="CARD32" />
- <field name="nRadioGroups" type="CARD8" />
- <field name="nKeyAliases" type="CARD8" />
- <field name="nKTLevels" type="CARD16" />
- <pad bytes="4" />
- <switch name="valueList">
- <fieldref>which</fieldref>
- <bitcase>
- <enumref ref="NameDetail">Keycodes</enumref>
- <field name="keycodesName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Geometry</enumref>
- <field name="geometryName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Symbols</enumref>
- <field name="symbolsName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">PhysSymbols</enumref>
- <field name="physSymbolsName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Types</enumref>
- <field name="typesName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Compat</enumref>
- <field name="compatName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyTypeNames</enumref>
- <list name="typeNames" type="ATOM">
- <fieldref>nTypes</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KTLevelNames</enumref>
- <list name="nLevelsPerType" type="CARD8">
- <!-- Xlib uses NTypes here -
- the spec says nKTLevels is correct, but
- it does not work in reality
- <fieldref>nKTLevels</fieldref> -->
- <fieldref>nTypes</fieldref>
- </list>
- <list name="ktLevelNames" type="ATOM">
- <sumof ref="nLevelsPerType" />
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">IndicatorNames</enumref>
- <list name="indicatorNames" type="ATOM">
- <popcount>
- <fieldref>indicators</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">VirtualModNames</enumref>
- <list name="virtualModNames" type="ATOM">
- <popcount>
- <fieldref>virtualMods</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">GroupNames</enumref>
- <list name="groups" type="ATOM">
- <popcount>
- <fieldref>groupNames</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyNames</enumref>
- <list name="keyNames" type="KeyName">
- <fieldref>nKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyAliases</enumref>
- <list name="keyAliases" type="KeyAlias">
- <fieldref>nKeyAliases</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">RGNames</enumref>
- <list name="radioGroupNames" type="ATOM">
- <fieldref>nRadioGroups</fieldref>
- </list>
- </bitcase>
- </switch>
- </reply>
- </request>
-
- <request name="SetNames" opcode="18">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <field name="which" type="CARD32" mask="NameDetail" />
- <field name="firstType" type="CARD8" />
- <field name="nTypes" type="CARD8" />
- <field name="firstKTLevelt" type="CARD8" />
- <field name="nKTLevels" type="CARD8" />
- <field name="indicators" type="CARD32" />
- <field name="groupNames" type="CARD8" mask="SetOfGroup" />
- <field name="nRadioGroups" type="CARD8" />
- <field name="firstKey" type="KEYCODE" />
- <field name="nKeys" type="CARD8" />
- <field name="nKeyAliases" type="CARD8"/>
- <pad bytes="1" />
- <field name="totalKTLevelNames" type="CARD16" />
- <switch name="values">
- <fieldref>which</fieldref>
- <bitcase>
- <enumref ref="NameDetail">Keycodes</enumref>
- <field name="keycodesName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Geometry</enumref>
- <field name="geometryName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Symbols</enumref>
- <field name="symbolsName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">PhysSymbols</enumref>
- <field name="physSymbolsName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Types</enumref>
- <field name="typesName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Compat</enumref>
- <field name="compatName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyTypeNames</enumref>
- <list name="typeNames" type="ATOM">
- <fieldref>nTypes</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KTLevelNames</enumref>
- <list name="nLevelsPerType" type="CARD8">
- <fieldref>nKTLevels</fieldref>
- </list>
- <list name="ktLevelNames" type="ATOM">
- <sumof ref="nLevelsPerType" />
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">IndicatorNames</enumref>
- <list name="indicatorNames" type="ATOM">
- <popcount>
- <fieldref>indicators</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">VirtualModNames</enumref>
- <list name="virtualModNames" type="ATOM">
- <popcount>
- <fieldref>virtualMods</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">GroupNames</enumref>
- <list name="groups" type="ATOM">
- <popcount>
- <fieldref>groupNames</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyNames</enumref>
- <list name="keyNames" type="KeyName">
- <fieldref>nKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyAliases</enumref>
- <list name="keyAliases" type="KeyAlias">
- <fieldref>nKeyAliases</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">RGNames</enumref>
- <list name="radioGroupNames" type="ATOM">
- <fieldref>nRadioGroups</fieldref>
- </list>
- </bitcase>
- </switch>
- </request>
-
- <request name="GetGeometry" opcode="19">
- <field name="deviceSpec" type="DeviceSpec" />
- <pad bytes="2" />
- <field name="name" type="ATOM" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="name" type="ATOM" />
- <field name="found" type="BOOL" />
- <pad bytes="1" />
- <field name="widthMM" type="CARD16" />
- <field name="heightMM" type="CARD16" />
- <field name="nProperties" type="CARD16" />
- <field name="nColors" type="CARD16" />
- <field name="nShapes" type="CARD16" />
- <field name="nSections" type="CARD16" />
- <field name="nDoodads" type="CARD16" />
- <field name="nKeyAliases" type="CARD16" />
- <field name="baseColorNdx" type="CARD8" />
- <field name="labelColorNdx" type="CARD8" />
- <field name="labelFont" type="CountedString16" />
- <list name="properties" type="Property">
- <fieldref>nProperties</fieldref>
- </list>
- <list name="colors" type="CountedString16">
- <fieldref>nColors</fieldref>
- </list>
- <list name="shapes" type="Shape">
- <fieldref>nShapes</fieldref>
- </list>
- <list name="sections" type="Section">
- <fieldref>nSections</fieldref>
- </list>
- <list name="doodads" type="Doodad">
- <fieldref>nDoodads</fieldref>
- </list>
- <list name="keyAliases" type="KeyAlias">
- <fieldref>nKeyAliases</fieldref>
- </list>
- </reply>
- </request>
-
- <request name="SetGeometry" opcode="20">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="nShapes" type="CARD8" />
- <field name="nSections" type="CARD8" />
- <field name="name" type="ATOM" />
- <field name="widthMM" type="CARD16" />
- <field name="heightMM" type="CARD16" />
- <field name="nProperties" type="CARD16" />
- <field name="nColors" type="CARD16" />
- <field name="nDoodads" type="CARD16" />
- <field name="nKeyAliases" type="CARD16" />
- <field name="baseColorNdx" type="CARD8" />
- <field name="labelColorNdx" type="CARD8" />
- <pad bytes="2" />
- <field name="labelFont" type="CountedString16" />
- <list name="properties" type="Property">
- <fieldref>nProperties</fieldref>
- </list>
- <list name="colors" type="CountedString16">
- <fieldref>nColors</fieldref>
- </list>
- <list name="shapes" type="Shape">
- <fieldref>nShapes</fieldref>
- </list>
- <list name="sections" type="Section">
- <fieldref>nSections</fieldref>
- </list>
- <list name="doodads" type="Doodad">
- <fieldref>nDoodads</fieldref>
- </list>
- <list name="keyAliases" type="KeyAlias">
- <fieldref>nKeyAliases</fieldref>
- </list>
- </request>
-
- <request name="PerClientFlags" opcode="21">
- <field name="deviceSpec" type="DeviceSpec" />
- <pad bytes="2" />
- <field name="change" type="CARD32" mask="PerClientFlag" />
- <field name="value" type="CARD32" mask="PerClientFlag" />
- <field name="ctrlsToChange" type="CARD32" mask="BoolCtrl" />
- <field name="autoCtrls" type="CARD32" mask="BoolCtrl" />
- <field name="autoCtrlsValues" type="CARD32" mask="BoolCtrl" />
- <reply>
- <field name="deviceID" type="CARD8"/>
- <field name="supported" type="CARD32" mask="PerClientFlag" />
- <field name="value" type="CARD32" mask="PerClientFlag" />
- <field name="autoCtrls" type="CARD32" mask="BoolCtrl" />
- <field name="autoCtrlsValues" type="CARD32" mask="BoolCtrl" />
- <pad bytes="8" />
- </reply>
- </request>
-
- <request name="ListComponents" opcode="22">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="maxNames" type="CARD16" />
- <field name="keymapsSpecLen" type="CARD8" />
- <list name="keymapsSpec" type="STRING8">
- <fieldref>keymapsSpecLen</fieldref>
- </list>
- <field name="keycodesSpecLen" type="CARD8" />
- <list name="keycodesSpec" type="STRING8">
- <fieldref>keycodesSpecLen</fieldref>
- </list>
- <field name="typesSpecLen" type="CARD8" />
- <list name="typesSpec" type="STRING8">
- <fieldref>typesSpecLen</fieldref>
- </list>
- <field name="compatMapSpecLen" type="CARD8" />
- <list name="compatMapSpec" type="STRING8">
- <fieldref>compatMapSpecLen</fieldref>
- </list>
- <field name="symbolsSpecLen" type="CARD8" />
- <list name="symbolsSpec" type="STRING8">
- <fieldref>symbolsSpecLen</fieldref>
- </list>
- <field name="geometrySpecLen" type="CARD8" />
- <list name="geometrySpec" type="STRING8">
- <fieldref>geometrySpecLen</fieldref>
- </list>
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="nKeymaps" type="CARD16" />
- <field name="nKeycodes" type="CARD16" />
- <field name="nTypes" type="CARD16" />
- <field name="nCompatMaps" type="CARD16" />
- <field name="nSymbols" type="CARD16" />
- <field name="nGeometries" type="CARD16" />
- <field name="extra" type="CARD16" />
- <pad bytes="10" />
- <list name="keymaps" type="Listing">
- <fieldref>nKeymaps</fieldref>
- </list>
- <list name="keycodes" type="Listing">
- <fieldref>nKeycodes</fieldref>
- </list>
- <list name="types" type="Listing">
- <fieldref>nTypes</fieldref>
- </list>
- <list name="compatMaps" type="Listing">
- <fieldref>nCompatMaps</fieldref>
- </list>
- <list name="symbols" type="Listing">
- <fieldref>nSymbols</fieldref>
- </list>
- <list name="geometries" type="Listing">
- <fieldref>nGeometries</fieldref>
- </list>
- </reply>
- </request>
-
- <request name="GetKbdByName" opcode="23">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="need" type="CARD16" mask="GBNDetail" />
- <field name="want" type="CARD16" mask="GBNDetail" />
- <field name="load" type="BOOL" />
- <pad bytes="1" />
- <field name="keymapsSpecLen" type="CARD8" />
- <list name="keymapsSpec" type="STRING8">
- <fieldref>keymapsSpecLen</fieldref>
- </list>
- <field name="keycodesSpecLen" type="CARD8" />
- <list name="keycodesSpec" type="STRING8">
- <fieldref>keycodesSpecLen</fieldref>
- </list>
- <field name="typesSpecLen" type="CARD8" />
- <list name="typesSpec" type="STRING8">
- <fieldref>typesSpecLen</fieldref>
- </list>
- <field name="compatMapSpecLen" type="CARD8" />
- <list name="compatMapSpec" type="STRING8">
- <fieldref>compatMapSpecLen</fieldref>
- </list>
- <field name="symbolsSpecLen" type="CARD8" />
- <list name="symbolsSpec" type="STRING8">
- <fieldref>symbolsSpecLen</fieldref>
- </list>
- <field name="geometrySpecLen" type="CARD8" />
- <list name="geometrySpec" type="STRING8">
- <fieldref>geometrySpecLen</fieldref>
- </list>
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="minKeyCode" type="KEYCODE" />
- <field name="maxKeyCode" type="KEYCODE" />
- <field name="loaded" type="BOOL" />
- <field name="newKeyboard" type="BOOL" />
- <field name="found" type="CARD16" mask="GBNDetail" />
- <field name="reported" type="CARD16" mask="GBNDetail" />
- <pad bytes="16" />
- <switch name="replies">
- <fieldref>reported</fieldref>
- <bitcase name="types">
- <enumref ref="GBNDetail">Types</enumref>
- <!-- from the spec, this has to be a GetMap reply -->
- <field name="getmap_type" type="CARD8" />
- <!-- done 'emulating' GetMap reply header-->
- <field name="typeDeviceID" type="CARD8" />
- <!-- from the spec, this has to be a GetMap reply -->
- <field name="getmap_sequence" type="CARD16" />
- <field name="getmap_length" type="CARD32" />
- <!-- done 'emulating' GetMap reply header-->
- <pad bytes="2" />
- <field name="typeMinKeyCode" type="KEYCODE" />
- <field name="typeMaxKeyCode" type="KEYCODE" />
- <field name="present" type="CARD16" enum="MapPart" />
- <field name="firstType" type="CARD8" />
- <field name="nTypes" type="CARD8" />
- <field name="totalTypes" type="CARD8" />
- <field name="firstKeySym" type="KEYCODE" />
- <field name="totalSyms" type="CARD16" />
- <field name="nKeySyms" type="CARD8" />
- <field name="firstKeyAction" type="KEYCODE" />
- <field name="totalActions" type="CARD16" />
- <field name="nKeyActions" type="CARD8" />
- <field name="firstKeyBehavior" type="KEYCODE" />
- <field name="nKeyBehaviors" type="CARD8" />
- <field name="totalKeyBehaviors" type="CARD8" />
- <field name="firstKeyExplicit" type="KEYCODE" />
- <field name="nKeyExplicit" type="CARD8" />
- <field name="totalKeyExplicit" type="CARD8" />
- <field name="firstModMapKey" type="KEYCODE" />
- <field name="nModMapKeys" type="CARD8" />
- <field name="totalModMapKeys" type="CARD8" />
- <field name="firstVModMapKey" type="KEYCODE" />
- <field name="nVModMapKeys" type="CARD8" />
- <field name="totalVModMapKeys" type="CARD8" />
- <pad bytes="1" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <switch name="map">
- <fieldref>present</fieldref>
- <bitcase>
- <enumref ref="MapPart">KeyTypes</enumref>
- <list name="types_rtrn" type="KeyType">
- <fieldref>nTypes</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeySyms</enumref>
- <list name="syms_rtrn" type="KeySymMap">
- <fieldref>nKeySyms</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyActions</enumref>
- <list name="acts_rtrn_count" type="CARD8">
- <fieldref>nKeyActions</fieldref>
- </list>
- <list name="acts_rtrn_acts" type="Action">
- <fieldref>totalActions</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyBehaviors</enumref>
- <list name="behaviors_rtrn" type="SetBehavior">
- <fieldref>totalKeyBehaviors</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualMods</enumref>
- <list name="vmods_rtrn" type="CARD8" mask="ModMask">
- <fieldref>nVModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ExplicitComponents</enumref>
- <list name="explicit_rtrn" type="SetExplicit">
- <fieldref>totalKeyExplicit</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ModifierMap</enumref>
- <list name="modmap_rtrn" type="KeyModMap">
- <fieldref>totalModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualModMap</enumref>
- <list name="vmodmap_rtrn" type="KeyVModMap">
- <fieldref>totalVModMapKeys</fieldref>
- </list>
- </bitcase>
- </switch>
- </bitcase>
- <bitcase name="compat_map">
- <enumref ref="GBNDetail">CompatMap</enumref>
- <field name="compatDeviceID" type="CARD8" />
- <field name="groupsRtrn" type="CARD8" mask="SetOfGroup" />
- <pad bytes="1" />
- <field name="firstSIRtrn" type="CARD16" />
- <field name="nSIRtrn" type="CARD16" />
- <field name="nTotalSI" type="CARD16" />
- <pad bytes="16" />
- <list name="si_rtrn" type="CARD8" mask="SymInterpret">
- <op op="*">
- <value>16</value>
- <fieldref>nSIRtrn</fieldref>
- </op>
- </list>
- <list name="group_rtrn" type="ModDef">
- <popcount>
- <fieldref>groupsRtrn</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase name="client_symbols">
- <enumref ref="GBNDetail">ClientSymbols</enumref>
- <field name="clientDeviceID" type="CARD8" />
- <pad bytes="2" />
- <field name="clientMinKeyCode" type="KEYCODE" />
- <field name="clientMaxKeyCode" type="KEYCODE" />
- <field name="present" type="CARD16" enum="MapPart" />
- <field name="firstType" type="CARD8" />
- <field name="nTypes" type="CARD8" />
- <field name="totalTypes" type="CARD8" />
- <field name="firstKeySym" type="KEYCODE" />
- <field name="totalSyms" type="CARD16" />
- <field name="nKeySyms" type="CARD8" />
- <field name="firstKeyAction" type="KEYCODE" />
- <field name="totalActions" type="CARD16" />
- <field name="nKeyActions" type="CARD8" />
- <field name="firstKeyBehavior" type="KEYCODE" />
- <field name="nKeyBehaviors" type="CARD8" />
- <field name="totalKeyBehaviors" type="CARD8" />
- <field name="firstKeyExplicit" type="KEYCODE" />
- <field name="nKeyExplicit" type="CARD8" />
- <field name="totalKeyExplicit" type="CARD8" />
- <field name="firstModMapKey" type="KEYCODE" />
- <field name="nModMapKeys" type="CARD8" />
- <field name="totalModMapKeys" type="CARD8" />
- <field name="firstVModMapKey" type="KEYCODE" />
- <field name="nVModMapKeys" type="CARD8" />
- <field name="totalVModMapKeys" type="CARD8" />
- <pad bytes="1" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <switch name="map">
- <fieldref>present</fieldref>
- <bitcase>
- <enumref ref="MapPart">KeyTypes</enumref>
- <list name="types_rtrn" type="KeyType">
- <fieldref>nTypes</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeySyms</enumref>
- <list name="syms_rtrn" type="KeySymMap">
- <fieldref>nKeySyms</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyActions</enumref>
- <list name="acts_rtrn_count" type="CARD8">
- <fieldref>nKeyActions</fieldref>
- </list>
- <list name="acts_rtrn_acts" type="Action">
- <fieldref>totalActions</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyBehaviors</enumref>
- <list name="behaviors_rtrn" type="SetBehavior">
- <fieldref>totalKeyBehaviors</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualMods</enumref>
- <list name="vmods_rtrn" type="CARD8" mask="ModMask">
- <fieldref>nVModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ExplicitComponents</enumref>
- <list name="explicit_rtrn" type="SetExplicit">
- <fieldref>totalKeyExplicit</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ModifierMap</enumref>
- <list name="modmap_rtrn" type="KeyModMap">
- <fieldref>totalModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualModMap</enumref>
- <list name="vmodmap_rtrn" type="KeyVModMap">
- <fieldref>totalVModMapKeys</fieldref>
- </list>
- </bitcase>
- </switch>
- </bitcase>
- <bitcase name="server_symbols">
- <enumref ref="GBNDetail">ServerSymbols</enumref>
- <field name="serverDeviceID" type="CARD8" />
- <pad bytes="2" />
- <field name="serverMinKeyCode" type="KEYCODE" />
- <field name="serverMaxKeyCode" type="KEYCODE" />
- <field name="present" type="CARD16" enum="MapPart" />
- <field name="firstType" type="CARD8" />
- <field name="nTypes" type="CARD8" />
- <field name="totalTypes" type="CARD8" />
- <field name="firstKeySym" type="KEYCODE" />
- <field name="totalSyms" type="CARD16" />
- <field name="nKeySyms" type="CARD8" />
- <field name="firstKeyAction" type="KEYCODE" />
- <field name="totalActions" type="CARD16" />
- <field name="nKeyActions" type="CARD8" />
- <field name="firstKeyBehavior" type="KEYCODE" />
- <field name="nKeyBehaviors" type="CARD8" />
- <field name="totalKeyBehaviors" type="CARD8" />
- <field name="firstKeyExplicit" type="KEYCODE" />
- <field name="nKeyExplicit" type="CARD8" />
- <field name="totalKeyExplicit" type="CARD8" />
- <field name="firstModMapKey" type="KEYCODE" />
- <field name="nModMapKeys" type="CARD8" />
- <field name="totalModMapKeys" type="CARD8" />
- <field name="firstVModMapKey" type="KEYCODE" />
- <field name="nVModMapKeys" type="CARD8" />
- <field name="totalVModMapKeys" type="CARD8" />
- <pad bytes="1" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <switch name="map">
- <fieldref>present</fieldref>
- <bitcase>
- <enumref ref="MapPart">KeyTypes</enumref>
- <list name="types_rtrn" type="KeyType">
- <fieldref>nTypes</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeySyms</enumref>
- <list name="syms_rtrn" type="KeySymMap">
- <fieldref>nKeySyms</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyActions</enumref>
- <list name="acts_rtrn_count" type="CARD8">
- <fieldref>nKeyActions</fieldref>
- </list>
- <list name="acts_rtrn_acts" type="Action">
- <fieldref>totalActions</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">KeyBehaviors</enumref>
- <list name="behaviors_rtrn" type="SetBehavior">
- <fieldref>totalKeyBehaviors</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualMods</enumref>
- <list name="vmods_rtrn" type="CARD8" mask="ModMask">
- <fieldref>nVModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ExplicitComponents</enumref>
- <list name="explicit_rtrn" type="SetExplicit">
- <fieldref>totalKeyExplicit</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">ModifierMap</enumref>
- <list name="modmap_rtrn" type="KeyModMap">
- <fieldref>totalModMapKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="MapPart">VirtualModMap</enumref>
- <list name="vmodmap_rtrn" type="KeyVModMap">
- <fieldref>totalVModMapKeys</fieldref>
- </list>
- </bitcase>
- </switch>
- </bitcase>
- <bitcase name="indicator_maps">
- <enumref ref="GBNDetail">IndicatorMaps</enumref>
- <field name="indicatorDeviceID" type="CARD8" />
- <field name="which" type="CARD32" />
- <field name="realIndicators" type="CARD32" />
- <field name="nIndicators" type="CARD8" />
- <pad bytes="15" />
- <list name="maps" type="IndicatorMap">
- <fieldref>nIndicators</fieldref>
- </list>
- </bitcase>
- <bitcase name="key_names">
- <enumref ref="GBNDetail">KeyNames</enumref>
- <field name="keyDeviceID" type="CARD8" />
- <field name="which" type="CARD32" mask="NameDetail" />
- <field name="keyMinKeyCode" type="KEYCODE" />
- <field name="keyMaxKeyCode" type="KEYCODE" />
- <field name="nTypes" type="CARD8" />
- <field name="groupNames" type="CARD8" mask="SetOfGroup" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <field name="firstKey" type="KEYCODE" />
- <field name="nKeys" type="CARD8" />
- <field name="indicators" type="CARD32" />
- <field name="nRadioGroups" type="CARD8" />
- <field name="nKeyAliases" type="CARD8" />
- <field name="nKTLevels" type="CARD16" />
- <pad bytes="4" />
- <switch name="valueList">
- <fieldref>which</fieldref>
- <bitcase>
- <enumref ref="NameDetail">Keycodes</enumref>
- <field name="keycodesName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Geometry</enumref>
- <field name="geometryName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Symbols</enumref>
- <field name="symbolsName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">PhysSymbols</enumref>
- <field name="physSymbolsName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Types</enumref>
- <field name="typesName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Compat</enumref>
- <field name="compatName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyTypeNames</enumref>
- <list name="typeNames" type="ATOM">
- <fieldref>nTypes</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KTLevelNames</enumref>
- <list name="nLevelsPerType" type="CARD8">
- <fieldref>nKTLevels</fieldref>
- </list>
- <list name="ktLevelNames" type="ATOM">
- <sumof ref="nLevelsPerType" />
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">IndicatorNames</enumref>
- <list name="indicatorNames" type="ATOM">
- <popcount>
- <fieldref>indicators</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">VirtualModNames</enumref>
- <list name="virtualModNames" type="ATOM">
- <popcount>
- <fieldref>virtualMods</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">GroupNames</enumref>
- <list name="groups" type="ATOM">
- <popcount>
- <fieldref>groupNames</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyNames</enumref>
- <list name="keyNames" type="KeyName">
- <fieldref>nKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyAliases</enumref>
- <list name="keyAliases" type="KeyAlias">
- <fieldref>nKeyAliases</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">RGNames</enumref>
- <list name="radioGroupNames" type="ATOM">
- <fieldref>nRadioGroups</fieldref>
- </list>
- </bitcase>
- </switch>
- </bitcase>
- <bitcase name="other_names">
- <enumref ref="GBNDetail">OtherNames</enumref>
- <field name="otherDeviceID" type="CARD8" />
- <field name="which" type="CARD32" mask="NameDetail" />
- <field name="otherMinKeyCode" type="KEYCODE" />
- <field name="otherMaxKeyCode" type="KEYCODE" />
- <field name="nTypes" type="CARD8" />
- <field name="groupNames" type="CARD8" mask="SetOfGroup" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <field name="firstKey" type="KEYCODE" />
- <field name="nKeys" type="CARD8" />
- <field name="indicators" type="CARD32" />
- <field name="nRadioGroups" type="CARD8" />
- <field name="nKeyAliases" type="CARD8" />
- <field name="nKTLevels" type="CARD16" />
- <pad bytes="4" />
- <switch name="valueList">
- <fieldref>which</fieldref>
- <bitcase>
- <enumref ref="NameDetail">Keycodes</enumref>
- <field name="keycodesName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Geometry</enumref>
- <field name="geometryName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Symbols</enumref>
- <field name="symbolsName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">PhysSymbols</enumref>
- <field name="physSymbolsName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Types</enumref>
- <field name="typesName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">Compat</enumref>
- <field name="compatName" type="ATOM" />
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyTypeNames</enumref>
- <list name="typeNames" type="ATOM">
- <fieldref>nTypes</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KTLevelNames</enumref>
- <list name="nLevelsPerType" type="CARD8">
- <fieldref>nKTLevels</fieldref>
- </list>
- <list name="ktLevelNames" type="ATOM">
- <sumof ref="nLevelsPerType" />
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">IndicatorNames</enumref>
- <list name="indicatorNames" type="ATOM">
- <popcount>
- <fieldref>indicators</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">VirtualModNames</enumref>
- <list name="virtualModNames" type="ATOM">
- <popcount>
- <fieldref>virtualMods</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">GroupNames</enumref>
- <list name="groups" type="ATOM">
- <popcount>
- <fieldref>groupNames</fieldref>
- </popcount>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyNames</enumref>
- <list name="keyNames" type="KeyName">
- <fieldref>nKeys</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">KeyAliases</enumref>
- <list name="keyAliases" type="KeyAlias">
- <fieldref>nKeyAliases</fieldref>
- </list>
- </bitcase>
- <bitcase>
- <enumref ref="NameDetail">RGNames</enumref>
- <list name="radioGroupNames" type="ATOM">
- <fieldref>nRadioGroups</fieldref>
- </list>
- </bitcase>
- </switch>
- </bitcase>
- <bitcase name="geometry">
- <enumref ref="GBNDetail">Geometry</enumref>
- <field name="geometryDeviceID" type="CARD8" />
- <field name="name" type="ATOM" />
- <field name="geometryFound" type="BOOL" />
- <pad bytes="1" />
- <field name="widthMM" type="CARD16" />
- <field name="heightMM" type="CARD16" />
- <field name="nProperties" type="CARD16" />
- <field name="nColors" type="CARD16" />
- <field name="nShapes" type="CARD16" />
- <field name="nSections" type="CARD16" />
- <field name="nDoodads" type="CARD16" />
- <field name="nKeyAliases" type="CARD16" />
- <field name="baseColorNdx" type="CARD8" />
- <field name="labelColorNdx" type="CARD8" />
- <field name="labelFont" type="CountedString16" />
- <list name="properties" type="Property">
- <fieldref>nProperties</fieldref>
- </list>
- <list name="colors" type="CountedString16">
- <fieldref>nColors</fieldref>
- </list>
- <list name="shapes" type="Shape">
- <fieldref>nShapes</fieldref>
- </list>
- <list name="sections" type="Section">
- <fieldref>nSections</fieldref>
- </list>
- <list name="doodads" type="Doodad">
- <fieldref>nDoodads</fieldref>
- </list>
- <list name="keyAliases" type="KeyAlias">
- <fieldref>nKeyAliases</fieldref>
- </list>
- </bitcase>
- </switch>
- </reply>
- </request>
-
- <request name="GetDeviceInfo" opcode="24">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="wanted" type="CARD16" mask="XIFeature" />
- <field name="allButtons" type="BOOL" />
- <field name="firstButton" type="CARD8" />
- <field name="nButtons" type="CARD8" />
- <pad bytes="1" />
- <field name="ledClass" type="LedClassSpec" enum="LedClass" />
- <field name="ledID" type="IDSpec" altenum="ID" />
- <reply>
- <field name="deviceID" type="CARD8" />
- <field name="present" type="CARD16" mask="XIFeature" />
- <field name="supported" type="CARD16" mask="XIFeature" />
- <field name="unsupported" type="CARD16" mask="XIFeature" />
- <field name="nDeviceLedFBs" type="CARD16" />
- <field name="firstBtnWanted" type="CARD8" />
- <field name="nBtnsWanted" type="CARD8" />
- <field name="firstBtnRtrn" type="CARD8" />
- <field name="nBtnsRtrn" type="CARD8" />
- <field name="totalBtns" type="CARD8" />
- <field name="hasOwnState" type="BOOL" />
- <field name="dfltKbdFB" type="CARD16" altenum="ID" />
- <field name="dfltLedFB" type="CARD16" altenum="ID" />
- <pad bytes="2" />
- <field name="devType" type="ATOM" />
- <field name="nameLen" type="CARD16" />
- <list name="name" type="STRING8">
- <fieldref>nameLen</fieldref>
- </list>
- <list name="btnActions" type="Action">
- <fieldref>nBtnsRtrn</fieldref>
- </list>
- <list name="leds" type="DeviceLedInfo">
- <fieldref>nDeviceLedFBs</fieldref>
- </list>
- </reply>
- </request>
-
-
- <request name="SetDeviceInfo" opcode="25">
- <field name="deviceSpec" type="DeviceSpec" />
- <field name="firstBtn" type="CARD8" />
- <field name="nBtns" type="CARD8" />
- <field name="change" type="CARD16" mask="XIFeature" />
- <field name="nDeviceLedFBs" type="CARD16" />
- <list name="btnActions" type="Action">
- <fieldref>nBtns</fieldref>
- </list>
- <list name="leds" type="DeviceLedInfo">
- <fieldref>nDeviceLedFBs</fieldref>
- </list>
- </request>
-
- <request name="SetDebuggingFlags" opcode="101">
- <field name="msgLength" type="CARD16" />
- <pad bytes="2" />
- <field name="affectFlags" type="CARD32" />
- <field name="flags" type="CARD32" />
- <field name="affectCtrls" type="CARD32" />
- <field name="ctrls" type="CARD32" />
- <list name="message" type="STRING8">
- <fieldref>msgLength</fieldref>
- </list>
- <reply>
- <pad bytes="1" />
- <field name="currentFlags" type="CARD32" />
- <field name="currentCtrls" type="CARD32" />
- <field name="supportedFlags" type="CARD32" />
- <field name="supportedCtrls" type="CARD32" />
- <pad bytes="8" />
- </reply>
- </request>
-
- <!-- Events -->
-
- <event name="NewKeyboardNotify" number="0">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <field name="oldDeviceID" type="CARD8" />
- <field name="minKeyCode" type="KEYCODE" />
- <field name="maxKeyCode" type="KEYCODE" />
- <field name="oldMinKeyCode" type="KEYCODE" />
- <field name="oldMaxKeyCode" type="KEYCODE" />
- <field name="requestMajor" type="CARD8" />
- <field name="requestMinor" type="CARD8" />
- <field name="changed" type="CARD16" mask="NKNDetail" />
- <pad bytes="14" />
- </event>
-
- <event name="MapNotify" number="1">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <field name="ptrBtnActions" type="CARD8" />
- <field name="changed" type="CARD16" mask="MapPart" />
- <field name="minKeyCode" type="KEYCODE" />
- <field name="maxKeyCode" type="KEYCODE" />
- <field name="firstType" type="CARD8" />
- <field name="nTypes" type="CARD8" />
- <field name="firstKeySym" type="KEYCODE" />
- <field name="nKeySyms" type="CARD8" />
- <field name="firstKeyAct" type="KEYCODE" />
- <field name="nKeyActs" type="CARD8" />
- <field name="firstKeyBehavior" type="KEYCODE" />
- <field name="nKeyBehavior" type="CARD8" />
- <field name="firstKeyExplicit" type="KEYCODE" />
- <field name="nKeyExplicit" type="CARD8" />
- <field name="firstModMapKey" type="KEYCODE" />
- <field name="nModMapKeys" type="CARD8" />
- <field name="firstVModMapKey" type="KEYCODE" />
- <field name="nVModMapKeys" type="CARD8" />
- <field name="virtualMods" type="CARD16" mask="VMod" />
- <pad bytes="2" />
- </event>
-
- <event name="StateNotify" number="2">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <field name="mods" type="CARD8" mask="ModMask" />
- <field name="baseMods" type="CARD8" mask="ModMask" />
- <field name="latchedMods" type="CARD8" mask="ModMask" />
- <field name="lockedMods" type="CARD8" mask="ModMask" />
- <field name="group" type="CARD8" enum="Group" />
- <field name="baseGroup" type="INT16" />
- <field name="latchedGroup" type="INT16" />
- <field name="lockedGroup" type="CARD8" enum="Group" />
- <field name="compatState" type="CARD8" mask="ModMask" />
- <field name="grabMods" type="CARD8" mask="ModMask" />
- <field name="compatGrabMods" type="CARD8" mask="ModMask" />
- <field name="lookupMods" type="CARD8" mask="ModMask" />
- <field name="compatLoockupMods" type="CARD8" mask="ModMask" />
- <field name="ptrBtnState" type="CARD16" mask="KeyButMask" />
- <field name="changed" type="CARD16" mask="StatePart" />
- <field name="keycode" type="KEYCODE" />
- <field name="eventType" type="CARD8" />
- <field name="requestMajor" type="CARD8" />
- <field name="requestMinor" type="CARD8" />
- </event>
-
- <event name="ControlsNotify" number="3">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <field name="numGroups" type="CARD8" />
- <pad bytes="2" />
- <field name="changedControls" type="CARD32" mask="Control" />
- <field name="enabledControls" type="CARD32" mask="BoolCtrl" />
- <field name="enabledControlChanges" type="CARD32" mask="BoolCtrl" />
- <field name="keycode" type="KEYCODE" />
- <field name="eventType" type="CARD8" />
- <field name="requestMajor" type="CARD8" />
- <field name="requestMinor" type="CARD8" />
- <pad bytes="4" />
- </event>
-
- <event name="IndicatorStateNotify" number="4">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <pad bytes="3" />
- <field name="state" type="CARD32" />
- <field name="stateChanged" type="CARD32" />
- <pad bytes="12" />
- </event>
-
- <event name="IndicatorMapNotify" number="5">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <pad bytes="3" />
- <field name="state" type="CARD32" />
- <field name="mapChanged" type="CARD32" />
- <pad bytes="12" />
- </event>
-
- <event name="NamesNotify" number="6">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <pad bytes="1" />
- <field name="changed" type="CARD16" mask="NameDetail" />
- <field name="firstType" type="CARD8" />
- <field name="nTypes" type="CARD8" />
- <field name="firstLevelName" type="CARD8" />
- <field name="nLevelNames" type="CARD8" />
- <pad bytes="1" />
- <field name="nRadioGroups" type="CARD8" />
- <field name="nKeyAliases" type="CARD8" />
- <field name="changedGroupNames" type="CARD8" mask="SetOfGroup" />
- <field name="changedVirtualMods" type="CARD16" mask="VMod" />
- <field name="firstKey" type="KEYCODE" />
- <field name="nKeys" type="CARD8" />
- <field name="changedIndicators" type="CARD32" />
- <pad bytes="4" />
- </event>
-
- <event name="CompatMapNotify" number="7">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <field name="changedGroups" type="CARD8" mask="SetOfGroup" />
- <field name="firstSI" type="CARD16" />
- <field name="nSI" type="CARD16" />
- <field name="nTotalSI" type="CARD16" />
- <pad bytes="16" />
- </event>
-
- <event name="BellNotify" number="8">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <field name="bellClass" type="CARD8" enum="BellClassResult" />
- <field name="bellID" type="CARD8" />
- <field name="percent" type="CARD8" />
- <field name="pitch" type="CARD16" />
- <field name="duration" type="CARD16" />
- <field name="name" type="ATOM" />
- <field name="window" type="WINDOW" />
- <field name="eventOnly" type="BOOL" />
- <pad bytes="7" />
- </event>
-
- <event name="ActionMessage" number="9">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <field name="keycode" type="KEYCODE" />
- <field name="press" type="BOOL" />
- <field name="keyEventFollows" type="BOOL" />
- <field name="mods" type="CARD8" mask="ModMask" />
- <field name="group" type="CARD8" enum="Group" />
- <list name="message" type="STRING8">
- <value>8</value>
- </list>
- <pad bytes="10" />
- </event>
-
- <event name="AccessXNotify" number="10">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <field name="keycode" type="KEYCODE" />
- <field name="detailt" type="CARD16" mask="AXNDetail" />
- <field name="slowKeysDelay" type="CARD16" />
- <field name="debounceDelay" type="CARD16" />
- <pad bytes="16" />
- </event>
-
- <event name="ExtensionDeviceNotify" number="11">
- <field name="time" type="TIMESTAMP" />
- <field name="deviceID" type="CARD8" />
- <pad bytes="1" />
- <field name="reason" type="CARD16" mask="XIFeature" />
- <field name="ledClass" type="CARD16" enum="LedClassResult" />
- <field name="ledID" type="CARD8" />
- <field name="ledsDefined" type="CARD32" />
- <field name="ledState" type="CARD32" />
- <field name="firstButton" type="CARD8" />
- <field name="nButtons" type="CARD8" />
- <field name="supported" type="CARD16" mask="XIFeature" />
- <field name="unsupported" type="CARD16" mask="XIFeature" />
- <pad bytes="2" />
- </event>
-</xcb>
+<?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="xkb" extension-xname="XKEYBOARD" extension-name="xkb" + major-version="1" minor-version="0"> + + <import>xproto</import> + + <!-- Common Types --> + <enum name="Const"> + <item name="MaxLegalKeyCode"> <value>255</value> </item> + <item name="PerKeyBitArraySize"> + <value>32</value> + </item> + <item name="KeyNameLength"> + <value>4</value> + </item> + </enum> + + <enum name="EventType"> + <item name="NewKeyboardNotify"> <bit>0</bit> </item> + <item name="MapNotify"> <bit>1</bit> </item> + <item name="StateNotify"> <bit>2</bit> </item> + <item name="ControlsNotify"> <bit>3</bit> </item> + <item name="IndicatorStateNotify"> <bit>4</bit> </item> + <item name="IndicatorMapNotify"> <bit>5</bit> </item> + <item name="NamesNotify"> <bit>6</bit> </item> + <item name="CompatMapNotify"> <bit>7</bit> </item> + <item name="BellNotify"> <bit>8</bit> </item> + <item name="ActionMessage"> <bit>9</bit> </item> + <item name="AccessXNotify"> <bit>10</bit> </item> + <item name="ExtensionDeviceNotify"> <bit>11</bit> </item> + </enum> + + <enum name="NKNDetail"> + <item name="Keycodes"> <bit>0</bit> </item> + <item name="Geometry"> <bit>1</bit> </item> + <item name="DeviceID"> <bit>2</bit> </item> + </enum> + + <enum name="AXNDetail"> + <item name="SKPress"> <bit>0</bit> </item> + <item name="SKAccept"> <bit>1</bit> </item> + <item name="SKReject"> <bit>2</bit> </item> + <item name="SKRelease"> <bit>3</bit> </item> + <item name="BKAccept"> <bit>4</bit> </item> + <item name="BKReject"> <bit>5</bit> </item> + <item name="AXKWarning"> <bit>6</bit> </item> + </enum> + + <enum name="MapPart"> + <item name="KeyTypes"> <bit>0</bit> </item> + <item name="KeySyms"> <bit>1</bit> </item> + <item name="ModifierMap"> <bit>2</bit> </item> + <item name="ExplicitComponents"> <bit>3</bit> </item> + <item name="KeyActions"> <bit>4</bit> </item> + <item name="KeyBehaviors"> <bit>5</bit> </item> + <item name="VirtualMods"> <bit>6</bit> </item> + <item name="VirtualModMap"> <bit>7</bit> </item> + </enum> + + <enum name="SetMapFlags"> + <item name="ResizeTypes"> <bit>0</bit> </item> + <item name="RecomputeActions"> <bit>1</bit> </item> + </enum> + + <enum name="StatePart"> + <item name="ModifierState"> <bit>0</bit> </item> + <item name="ModifierBase"> <bit>1</bit> </item> + <item name="ModifierLatch"> <bit>2</bit> </item> + <item name="ModifierLock"> <bit>3</bit> </item> + <item name="GroupState"> <bit>4</bit> </item> + <item name="GroupBase"> <bit>5</bit> </item> + <item name="GroupLatch"> <bit>6</bit> </item> + <item name="GroupLock"> <bit>7</bit> </item> + <item name="CompatState"> <bit>8</bit> </item> + <item name="GrabMods"> <bit>9</bit> </item> + <item name="CompatGrabMods"> <bit>10</bit> </item> + <item name="LookupMods"> <bit>11</bit> </item> + <item name="CompatLookupMods"> <bit>12</bit> </item> + <item name="PointerButtons"> <bit>13</bit> </item> + </enum> + + <enum name="BoolCtrl"> + <item name="RepeatKeys"> <bit>0</bit> </item> + <item name="SlowKeys"> <bit>1</bit> </item> + <item name="BounceKeys"> <bit>2</bit> </item> + <item name="StickyKeys"> <bit>3</bit> </item> + <item name="MouseKeys"> <bit>4</bit> </item> + <item name="MouseKeysAccel"> <bit>5</bit> </item> + <item name="AccessXKeys"> <bit>6</bit> </item> + <item name="AccessXTimeoutMask"> <bit>7</bit> </item> + <item name="AccessXFeedbackMask"> <bit>8</bit> </item> + <item name="AudibleBellMask"> <bit>9</bit> </item> + <item name="Overlay1Mask"> <bit>10</bit> </item> + <item name="Overlay2Mask"> <bit>11</bit> </item> + <item name="IgnoreGroupLockMask"> <bit>12</bit> </item> + </enum> + + <!-- XXX: one zero less than XKB specification says, + uses the same values as libX11 --> + <enum name="Control" > + <item name="GroupsWrap"> <bit>27</bit> </item> + <item name="InternalMods"> <bit>28</bit> </item> + <item name="IgnoreLockMods"> <bit>29</bit> </item> + <item name="PerKeyRepeat"> <bit>30</bit> </item> + <item name="ControlsEnabled"> <bit>31</bit> </item> + </enum> + + <enum name="AXFBOpt"> + <item name="SKPressFB"> <bit>0</bit> </item> + <item name="SKAcceptFB"> <bit>1</bit> </item> + <item name="FeatureFB"> <bit>2</bit> </item> + <item name="SlowWarnFB"> <bit>3</bit> </item> + <item name="IndicatorFB"> <bit>4</bit> </item> + <item name="StickyKeysFB"> <bit>5</bit> </item> + <item name="SKReleaseFB"> <bit>6</bit> </item> + <item name="SKRejectFB"> <bit>7</bit> </item> + <item name="BKRejectFB"> <bit>8</bit> </item> + <item name="DumbBell"> <bit>9</bit> </item> + </enum> + + <enum name="AXSKOpt"> + <item name="TwoKeys"> <bit>6</bit> </item> + <item name="LatchToLock"> <bit>7</bit> </item> + </enum> + + <union name="AXOption"> + <field name="fbopt" type="CARD16" enum="AXFBOpt" /> + <field name="skopt" type="CARD16" enum="AXSKOpt" /> + </union> + + <typedef oldname="CARD16" newname="DeviceSpec" /> + + <enum name="LedClassResult"> + <item name="KbdFeedbackClass"> <value>0</value> </item> + <item name="LedFeedbackClass"> <value>4</value> </item> + </enum> + + <enum name="LedClass"> + <item name="DfltXIClass"> <value>768</value> </item> <!--0x300--> + <item name="AllXIClasses"> <value>1280</value> </item> <!--0x500--> + </enum> + <typedef oldname="CARD16" newname="LedClassSpec" /> + + <enum name="BellClassResult"> + <item name="KbdFeedbackClass"> <value>0</value> </item> + <item name="BellFeedbackClass"> <value>5</value> </item> + </enum> + + <enum name="BellClass"> + <item name="DfltXIClass"> <value>768</value> </item> <!--0x300--> + </enum> + <typedef oldname="CARD16" newname="BellClassSpec" /> + + <enum name="ID"> + <item name="UseCoreKbd"> <value>256</value> </item> <!-- 0x100 --> + <item name="UseCorePtr"> <value>512</value> </item> <!-- 0x200 --> + <item name="DfltXIClass"> <value>768</value> </item> <!-- 0x300 --> + <item name="DfltXIId"> <value>1024</value> </item> <!-- 0x400 --> + <item name="AllXIClass"> <value>1280</value> </item> <!-- 0x500 --> + <item name="AllXIId"> <value>1536</value> </item> <!-- 0x600 --> + <item name="XINone"> <value>65280</value> </item> <!--0xff00--> + </enum> + <typedef oldname="CARD16" newname="IDSpec" /> + + <enum name="Group"> + <item name="1"> <value>0</value> </item> + <item name="2"> <value>1</value> </item> + <item name="3"> <value>2</value> </item> + <item name="4"> <value>3</value> </item> + </enum> + + <enum name="Groups"> + <item name="Any"> <value>254</value> </item> + <item name="All"> <value>255</value> </item> + </enum> + + <enum name="SetOfGroup"> + <item name="Group1"> <bit>0</bit> </item> + <item name="Group2"> <bit>1</bit> </item> + <item name="Group3"> <bit>2</bit> </item> + <item name="Group4"> <bit>3</bit> </item> + </enum> + + <enum name="SetOfGroups"> + <item name="Any"> <bit>7</bit> </item> + </enum> + + <enum name="GroupsWrap"> + <item name="WrapIntoRange"> <value>0</value> </item> + <item name="ClampIntoRange"> <bit>6</bit> </item> + <item name="RedirectIntoRange"> <bit>7</bit> </item> + </enum> + + <enum name="VModsHigh"> + <item name="15"> <bit>7</bit> </item> + <item name="14"> <bit>6</bit> </item> + <item name="13"> <bit>5</bit> </item> + <item name="12"> <bit>4</bit> </item> + <item name="11"> <bit>3</bit> </item> + <item name="10"> <bit>2</bit> </item> + <item name="9"> <bit>1</bit> </item> + <item name="8"> <bit>0</bit> </item> + </enum> + + <enum name="VModsLow"> + <item name="7"> <bit>7</bit> </item> + <item name="6"> <bit>6</bit> </item> + <item name="5"> <bit>5</bit> </item> + <item name="4"> <bit>4</bit> </item> + <item name="3"> <bit>3</bit> </item> + <item name="2"> <bit>2</bit> </item> + <item name="1"> <bit>1</bit> </item> + <item name="0"> <bit>0</bit> </item> + </enum> + + <enum name="VMod"> + <item name="15"> <bit>15</bit> </item> + <item name="14"> <bit>14</bit> </item> + <item name="13"> <bit>13</bit> </item> + <item name="12"> <bit>12</bit> </item> + <item name="11"> <bit>11</bit> </item> + <item name="10"> <bit>10</bit> </item> + <item name="9"> <bit>9</bit> </item> + <item name="8"> <bit>8</bit> </item> + <item name="7"> <bit>7</bit> </item> + <item name="6"> <bit>6</bit> </item> + <item name="5"> <bit>5</bit> </item> + <item name="4"> <bit>4</bit> </item> + <item name="3"> <bit>3</bit> </item> + <item name="2"> <bit>2</bit> </item> + <item name="1"> <bit>1</bit> </item> + <item name="0"> <bit>0</bit> </item> + </enum> + + <enum name="Explicit"> + <item name="VModMap"> <bit>7</bit> </item> + <item name="Behavior"> <bit>6</bit> </item> + <item name="AutoRepeat"> <bit>5</bit> </item> + <item name="Interpret"> <bit>4</bit> </item> + <item name="KeyType4"> <bit>3</bit> </item> + <item name="KeyType3"> <bit>2</bit> </item> + <item name="KeyType2"> <bit>1</bit> </item> + <item name="KeyType1"> <bit>0</bit> </item> + </enum> + + <enum name="SymInterpret"> + <item name="NoneOf"> <value>0</value> </item> + <item name="AnyOfOrNone"> <value>1</value> </item> + <item name="AnyOf"> <value>2</value> </item> + <item name="AllOf"> <value>3</value> </item> + <item name="Exactly"> <value>4</value> </item> + </enum> + + <enum name="SymInterpMatch"> + <item name="LevelOneOnly"> <bit>7</bit> </item> + <item name="OpMask"> <value>127</value> </item> <!--0x7f--> + </enum> + + <enum name="IMFlag"> + <item name="NoExplicit"> <bit>7</bit> </item> + <item name="NoAutomatic"> <bit>6</bit> </item> + <item name="LEDDrivesKB"> <bit>5</bit> </item> + </enum> + + <enum name="IMModsWhich"> + <item name="UseCompat"> <bit>4</bit> </item> + <item name="UseEffective"> <bit>3</bit> </item> + <item name="UseLocked"> <bit>2</bit> </item> + <item name="UseLatched"> <bit>1</bit> </item> + <item name="UseBase"> <bit>0</bit> </item> + </enum> + + <enum name="IMGroupsWhich"> + <item name="UseCompat"> <bit>4</bit> </item> + <item name="UseEffective"> <bit>3</bit> </item> + <item name="UseLocked"> <bit>2</bit> </item> + <item name="UseLatched"> <bit>1</bit> </item> + <item name="UseBase"> <bit>0</bit> </item> + </enum> + + <struct name="IndicatorMap"> + <field name="flags" type="CARD8" enum="IMFlag" /> + <field name="whichGroups" type="CARD8" enum="IMGroupsWhich" /> + <field name="groups" type="CARD8" enum="SetOfGroup" /> + <field name="whichMods" type="CARD8" enum="IMModsWhich" /> + <field name="mods" type="CARD8" mask="ModMask" /> + <field name="realMods" type="CARD8" mask="ModMask" /> + <field name="vmods" type="CARD16" mask="VMod" /> + <field name="ctrls" type="CARD32" enum="BoolCtrl" /> + </struct> + + <enum name="CMDetail"> + <item name="SymInterp"> <bit>0</bit> </item> + <item name="GroupCompat"> <bit>1</bit> </item> + </enum> + + <enum name="NameDetail"> + <item name="Keycodes"> <bit>0</bit> </item> + <item name="Geometry"> <bit>1</bit> </item> + <item name="Symbols"> <bit>2</bit> </item> + <item name="PhysSymbols"> <bit>3</bit> </item> + <item name="Types"> <bit>4</bit> </item> + <item name="Compat"> <bit>5</bit> </item> + <item name="KeyTypeNames"> <bit>6</bit> </item> + <item name="KTLevelNames"> <bit>7</bit> </item> + <item name="IndicatorNames"> <bit>8</bit> </item> + <item name="KeyNames"> <bit>9</bit> </item> + <item name="KeyAliases"> <bit>10</bit> </item> + <item name="VirtualModNames"> <bit>11</bit> </item> + <item name="GroupNames"> <bit>12</bit> </item> + <item name="RGNames"> <bit>13</bit> </item> + </enum> + + <enum name="GBNDetail"> + <item name="Types"> <bit>0</bit> </item> + <item name="CompatMap"> <bit>1</bit> </item> + <item name="ClientSymbols"> <bit>2</bit> </item> + <item name="ServerSymbols"> <bit>3</bit> </item> + <item name="IndicatorMaps"> <bit>4</bit> </item> + <item name="KeyNames"> <bit>5</bit> </item> + <item name="Geometry"> <bit>6</bit> </item> + <item name="OtherNames"> <bit>7</bit> </item> + </enum> + + <enum name="XIFeature"> + <item name="Keyboards"> <bit>0</bit> </item> + <item name="ButtonActions"> <bit>1</bit> </item> + <item name="IndicatorNames"> <bit>2</bit> </item> + <item name="IndicatorMaps"> <bit>3</bit> </item> + <item name="IndicatorState"> <bit>4</bit> </item> + </enum> + + <enum name="PerClientFlag"> + <item name="DetectableAutoRepeat"> <bit>0</bit> </item> + <item name="GrabsUseXKBState"> <bit>1</bit> </item> + <item name="AutoResetControls"> <bit>2</bit> </item> + <item name="LookupStateWhenGrabbed"> <bit>3</bit> </item> + <item name="SendEventUsesXKBState"> <bit>4</bit> </item> + </enum> + + <struct name="ModDef"> + <field name="mask" type="CARD8" mask="ModMask" /> + <field name="realMods" type="CARD8" mask="ModMask" /> + <field name="vmods" type="CARD16" mask="VMod" /> + </struct> + + <struct name="KeyName"> + <list name="name" type="CARD8"> + <value>4</value> + </list> + </struct> + + <struct name="KeyAlias"> + <list name="real" type="CARD8"> + <value>4</value> + </list> + <list name="alias" type="CARD8"> + <value>4</value> + </list> + </struct> + + <struct name="CountedString8"> + <field name="length" type="CARD8" /> + <list name="string" type="CARD8"> + <fieldref>length</fieldref> + </list> + </struct> + + <struct name="CountedString16"> + <field name="length" type="CARD16" /> + <list name="string" type="CARD8"> + <fieldref>length</fieldref> + </list> + <pad bytes="1" /> + </struct> + + <struct name="KTMapEntry"> + <field name="active" type="BOOL" /> + <!-- Xlib uses a different arrangement of fields + <field name="mods_mask" type="CARD8" mask="ModMask" /> + <field name="level" type="CARD8" /> + --> + <field name="level" type="CARD8" /> + <field name="mods_mask" type="CARD8" mask="ModMask" /> + <field name="mods_mods" type="CARD8" mask="ModMask" /> + <field name="mods_vmods" type="CARD16" mask="VMod" /> + <pad bytes="2" /> + </struct> + + <struct name="KeyType"> + <field name="mods_mask" type="CARD8" mask="ModMask" /> + <field name="mods_mods" type="CARD8" mask="ModMask" /> + <field name="mods_vmods" type="CARD16" mask="VMod" /> + <field name="numLevels" type="CARD8" /> + <field name="nMapEntries" type="CARD8" /> + <field name="hasPreserve" type="BOOL" /> + <pad bytes="1" /> + <list name="map" type="KTMapEntry"> + <fieldref>nMapEntries</fieldref> + </list> + <list name="preserve" type="ModDef"> + <op op="*"> + <fieldref>hasPreserve</fieldref> + <fieldref>nMapEntries</fieldref> + </op> + </list> + </struct> + + <struct name="KeySymMap"> + <list name="kt_index" type="CARD8"> + <value>4</value> + </list> + <field name="groupInfo" type="CARD8" /> + <field name="width" type="CARD8" /> + <field name="nSyms" type="CARD16" /> + <list name="syms" type="KEYSYM"> + <fieldref>nSyms</fieldref> + </list> + </struct> + + <!-- Key Behaviors --> + + <struct name="CommonBehavior"> + <field name="type" type="CARD8" /> + <field name="data" type="CARD8" /> + </struct> + + <struct name="DefaultBehavior"> + <field name="type" type="CARD8" /> + <pad bytes="1" /> + </struct> + + <typedef oldname="DefaultBehavior" newname="LockBehavior" /> + + <struct name="RadioGroupBehavior"> + <field name="type" type="CARD8" /> + <field name="group" type="CARD8" /> + </struct> + + <struct name="Overlay1Behavior"> + <field name="type" type="CARD8" /> + <field name="key" type="KEYCODE" /> + </struct> + + <struct name="Overlay2Behavior"> + <field name="type" type="CARD8" /> + <field name="key" type="CARD8" /> + </struct> + + <typedef oldname="LockBehavior" newname="PermamentLockBehavior" /> + <typedef oldname="RadioGroupBehavior" newname="PermamentRadioGroupBehavior" /> + <typedef oldname="Overlay1Behavior" newname="PermamentOverlay1Behavior" /> + <typedef oldname="Overlay2Behavior" newname="PermamentOverlay2Behavior" /> + + <union name="Behavior"> + <field name="common" type="CommonBehavior" /> + <field name="default" type="DefaultBehavior" /> + <field name="lock" type="LockBehavior" /> + <field name="radioGroup" type="RadioGroupBehavior" /> + <field name="overlay1" type="Overlay1Behavior" /> + <field name="overlay2" type="Overlay2Behavior" /> + <field name="permamentLock" type="PermamentLockBehavior" /> + <field name="permamentRadioGroup" type="PermamentRadioGroupBehavior" /> + <field name="permamentOverlay1" type="PermamentOverlay1Behavior" /> + <field name="permamentOverlay2" type="PermamentOverlay2Behavior" /> + <field name="type" type="CARD8" /> + </union> + + <enum name="BehaviorType"> + <item name="Default"> <value>0</value> </item> <!--0x00--> + <item name="Lock"> <value>1</value> </item> <!--0x01--> + <item name="RadioGroup"> <value>2</value> </item> <!--0x02--> + <item name="Overlay1"> <value>3</value> </item> <!--0x03--> + <item name="Overlay2"> <value>4</value> </item> <!--0x04--> + <item name="PermamentLock"> <value>129</value> </item> <!--0x81--> + <item name="PermamentRadioGroup"> <value>130</value> </item> <!--0x82--> + <item name="PermamentOverlay1"> <value>131</value> </item> <!--0x83--> + <item name="PermamentOverlay2"> <value>132</value> </item> <!--0x84--> + </enum> + + <struct name="SetBehavior"> + <field name="keycode" type="KEYCODE" /> + <field name="behavior" type="Behavior" /> + <pad bytes="1" /> + </struct> + + <struct name="SetExplicit"> + <field name="keycode" type="KEYCODE" /> + <field name="explicit" type="CARD8" mask="Explicit" /> + </struct> + + <struct name="KeyModMap"> + <field name="keycode" type="KEYCODE" /> + <field name="mods" type="CARD8" mask="ModMask" /> + </struct> + + <struct name="KeyVModMap"> + <field name="keycode" type="KEYCODE" /> + <pad bytes="1" /> + <field name="vmods" type="CARD16" mask="VMod" /> + </struct> + + <struct name="KTSetMapEntry"> + <field name="level" type="CARD8" /> + <field name="realMods" type="CARD8" mask="ModMask" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + </struct> + + <struct name="SetKeyType"> + <field name="mask" type="CARD8" mask="ModMask" /> + <field name="realMods" type="CARD8" mask="ModMask" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <field name="numLevels" type="CARD8" /> + <field name="nMapEntries" type="CARD8" /> + <field name="preserve" type="BOOL" /> + <pad bytes="1" /> + <list name="entries" type="KTSetMapEntry"> + <fieldref>nMapEntries</fieldref> + </list> + <list name="preserve_entries" type="KTSetMapEntry"> + <op op = "*"> + <fieldref>preserve</fieldref> + <fieldref>nMapEntries</fieldref> + </op> + </list> + </struct> + + <typedef oldname="char" newname="STRING8" /> + + <struct name="Property"> + <field name="nameLength" type="CARD16" /> + <list name="name" type="STRING8"> + <fieldref>nameLength</fieldref> + </list> + <field name="valueLength" type="CARD16" /> + <list name="value" type="STRING8"> + <fieldref>valueLength</fieldref> + </list> + </struct> + + <struct name="Outline"> + <field name="nPoints" type="CARD8" /> + <field name="cornerRadius" type="CARD8" /> + <pad bytes="2" /> + <list name="points" type="POINT"> + <fieldref>nPoints</fieldref> + </list> + </struct> + + <struct name="Shape"> + <field name="name" type="ATOM" /> + <field name="nOutlines" type="CARD8" /> + <field name="primaryNdx" type="CARD8" /> + <field name="approxNdx" type="CARD8" /> + <pad bytes="1" /> + <list name="outlines" type="Outline"> + <fieldref>nOutlines</fieldref> + </list> + </struct> + + <struct name="Key"> + <list name="name" type="STRING8"> + <value>4</value> + </list> + <field name="gap" type="INT16" /> + <field name="shapeNdx" type="CARD8" /> + <field name="colorNdx" type="CARD8" /> + </struct> + + <struct name="OverlayKey"> + <list name="over" type="STRING8"> + <value>4</value> + </list> + <list name="under" type="STRING8"> + <value>4</value> + </list> + </struct> + + <struct name="OverlayRow"> + <field name="rowUnder" type="CARD8" /> + <field name="nKeys" type="CARD8" /> + <pad bytes="2" /> + <list name="keys" type="OverlayKey"> + <fieldref>nKeys</fieldref> + </list> + </struct> + + <struct name="Overlay"> + <field name="name" type="ATOM" /> + <field name="nRows" type="CARD8" /> + <pad bytes="3" /> + <list name="rows" type="OverlayRow"> + <fieldref>nRows</fieldref> + </list> + </struct> + + <struct name="Row"> + <field name="top" type="INT16" /> + <field name="left" type="INT16" /> + <field name="nKeys" type="CARD8" /> + <field name="vertical" type="BOOL" /> + <pad bytes="2" /> + <list name="keys" type="Key"> + <fieldref>nKeys</fieldref> + </list> + </struct> + + <enum name="DoodadType"> + <item name="Outline"> <value>1</value> </item> + <item name="Solid"> <value>2</value> </item> + <item name="Text"> <value>3</value> </item> + <item name="Indicator"> <value>4</value> </item> + <item name="Logo"> <value>5</value> </item> + </enum> + + <struct name="CommonDoodad"> + <field name="name" type="ATOM" /> + <field name="type" type="CARD8" enum="DoodadType" /> + <field name="priority" type="CARD8" /> + <field name="top" type="INT16" /> + <field name="left" type="INT16" /> + <field name="angle" type="INT16" /> + </struct> + + <struct name="ShapeDoodad"> + <field name="name" type="ATOM" /> + <field name="type" type="CARD8" enum="DoodadType" /> + <field name="priority" type="CARD8" /> + <field name="top" type="INT16" /> + <field name="left" type="INT16" /> + <field name="angle" type="INT16" /> + <field name="colorNdx" type="CARD8" /> + <field name="shapeNdx" type="CARD8" /> + <pad bytes="6" /> + </struct> + + <struct name="TextDoodad"> + <field name="name" type="ATOM" /> + <field name="type" type="CARD8" enum="DoodadType" /> + <field name="priority" type="CARD8" /> + <field name="top" type="INT16" /> + <field name="left" type="INT16" /> + <field name="angle" type="INT16" /> + <field name="width" type="CARD16" /> + <field name="height" type="CARD16" /> + <field name="colorNdx" type="CARD8" /> + <pad bytes="3" /> + <field name="text" type="CountedString16" /> + <field name="font" type="CountedString16" /> + </struct> + + <struct name="IndicatorDoodad"> + <field name="name" type="ATOM" /> + <field name="type" type="CARD8" enum="DoodadType" /> + <field name="priority" type="CARD8" /> + <field name="top" type="INT16" /> + <field name="left" type="INT16" /> + <field name="angle" type="INT16" /> + <field name="shapeNdx" type="CARD8" /> + <field name="onColorNdx" type="CARD8" /> + <field name="offColorNdx" type="CARD8" /> + <pad bytes="5" /> + </struct> + + <struct name="LogoDoodad"> + <field name="name" type="ATOM" /> + <field name="type" type="CARD8" enum="DoodadType" /> + <field name="priority" type="CARD8" /> + <field name="top" type="INT16" /> + <field name="left" type="INT16" /> + <field name="angle" type="INT16" /> + <field name="colorNdx" type="CARD8" /> + <field name="shapeNdx" type="CARD8" /> + <pad bytes="6" /> + <field name="logoName" type="CountedString16" /> + </struct> + + <union name="Doodad"> + <field name="common" type="CommonDoodad" /> + <field name="shape" type="ShapeDoodad" /> + <field name="text" type="TextDoodad" /> + <field name="indicator" type="IndicatorDoodad" /> + <field name="logo" type="LogoDoodad" /> + </union> + + <struct name="Section"> + <field name="name" type="ATOM" /> + <field name="top" type="INT16" /> + <field name="left" type="INT16" /> + <field name="width" type="CARD16" /> + <field name="height" type="CARD16" /> + <field name="angle" type="INT16" /> + <field name="priority" type="CARD8" /> + <field name="nRows" type="CARD8" /> + <field name="nDoodads" type="CARD8" /> + <field name="nOverlays" type="CARD8" /> + <pad bytes="2" /> + <list name="rows" type="Row"> + <fieldref>nRows</fieldref> + </list> + <list name="doodads" type="Doodad"> + <fieldref>nDoodads</fieldref> + </list> + <list name="overlays" type="Overlay"> + <fieldref>nOverlays</fieldref> + </list> + </struct> + + <struct name="Listing"> + <field name="flags" type="CARD16" /> + <field name="length" type="CARD16" /> + <list name="string" type="STRING8"> + <fieldref>length</fieldref> + </list> + </struct> + + <struct name="DeviceLedInfo"> + <field name="ledClass" type="LedClassSpec" enum="LedClass" /> + <field name="ledID" type="IDSpec" altenum="ID" /> + <field name="namesPresent" type="CARD32" /> + <field name="mapsPresent" type="CARD32" /> + <field name="physIndicators" type="CARD32" /> + <field name="state" type="CARD32" /> + <list name="names" type="ATOM"> + <popcount> + <fieldref>namesPresent</fieldref> + </popcount> + </list> + <list name="maps" type="IndicatorMap"> + <popcount> + <fieldref>mapsPresent</fieldref> + </popcount> + </list> + </struct> + + <!-- Errors --> + + <enum name="Error"> + <item name="BadDevice"> <value>255</value> </item> <!--0xff--> + <item name="BadClass"> <value>254</value> </item> <!--0xfe--> + <item name="BadId"> <value>253</value> </item> <!--0xfd--> + </enum> + + <error name="Keyboard" number="0"> + <field name="value" type="CARD32" /> + <field name="minorOpcode" type="CARD16" /> + <field name="majorOpcode" type="CARD8" /> + <pad bytes="21" /> + </error> + + <!-- Key Actions --> + + <enum name="SA"> + <item name="ClearLocks"> <bit>0</bit> </item> + <item name="LatchToLock"> <bit>1</bit> </item> + <item name="UseModMapMods"> <bit>2</bit> </item> + <item name="GroupAbsolute"> <bit>2</bit> </item> + </enum> + + <enum name="SAType"> + <item name="NoAction"> <value>0</value> </item> + <item name="SetMods"> <value>1</value> </item> + <item name="LatchMods"> <value>2</value> </item> + <item name="LockMods"> <value>3</value> </item> + <item name="SetGroup"> <value>4</value> </item> + <item name="LatchGroup"> <value>5</value> </item> + <item name="LockGroup"> <value>6</value> </item> + <item name="MovePtr"> <value>7</value> </item> + <item name="PtrBtn"> <value>8</value> </item> + <item name="LockPtrBtn"> <value>9</value> </item> + <item name="SetPtrDflt"> <value>10</value> </item> + <item name="ISOLock"> <value>11</value> </item> + <item name="Terminate"> <value>12</value> </item> + <item name="SwitchScreen"> <value>13</value> </item> + <item name="SetControls"> <value>14</value> </item> + <item name="LockControls"> <value>15</value> </item> + <item name="ActionMessage"> <value>16</value> </item> + <item name="RedirectKey"> <value>17</value> </item> + <item name="DeviceBtn"> <value>18</value> </item> + <item name="LockDeviceBtn"> <value>19</value> </item> + <item name="DeviceValuator"> <value>20</value> </item> + </enum> + + <struct name="SANoAction"> + <field name="type" type="CARD8" enum="SAType" /> + <pad bytes="7" /> + </struct> + + <struct name="SASetMods"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" mask="SA" /> + <field name="mask" type="CARD8" mask="ModMask" /> + <field name="realMods" type="CARD8" mask="ModMask" /> + <field name="vmodsHigh" type="CARD8" mask="VModsHigh" /> + <field name="vmodsLow" type="CARD8" mask="VModsLow" /> + <pad bytes="2" /> + </struct> + + <typedef oldname="SASetMods" newname="SALatchMods" /> + + <typedef oldname="SASetMods" newname="SALockMods" /> + + <struct name="SASetGroup"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" mask="SA" /> + <field name="group" type="INT8" /> + <pad bytes="5" /> + </struct> + + <typedef oldname="SASetGroup" newname="SALatchGroup" /> + + <typedef oldname="SASetGroup" newname="SALockGroup" /> + + <enum name="SAMovePtrFlag"> + <item name="NoAcceleration"> <bit>0</bit> </item> + <item name="MoveAbsoluteX"> <bit>1</bit> </item> + <item name="MoveAbsoluteY"> <bit>2</bit> </item> + </enum> + + <struct name="SAMovePtr"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" mask="SAMovePtrFlag" /> + <field name="xHigh" type="INT8" /> + <field name="xLow" type="CARD8" /> + <field name="yHigh" type="INT8" /> + <field name="yLow" type="CARD8" /> + <pad bytes="2" /> + </struct> + + <struct name="SAPtrBtn"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" /> + <field name="count" type="CARD8" /> + <field name="button" type="CARD8" /> + <pad bytes="4" /> + </struct> + + <struct name="SALockPtrBtn"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" /> + <pad bytes="1" /> + <field name="button" type="CARD8" /> + <pad bytes="4" /> + </struct> + + <enum name="SASetPtrDfltFlag"> + <item name="DfltBtnAbsolute"> <bit>1</bit> </item> + <item name="AffectDfltButton"> <bit>0</bit> </item> + </enum> + + <struct name="SASetPtrDflt"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" mask="SASetPtrDfltFlag" /> + <field name="affect" type="CARD8" mask="SASetPtrDfltFlag" /> + <field name="value" type="INT8" /> + <pad bytes="4" /> + </struct> + + <enum name="SAIsoLockFlag"> + <item name="NoLock"> <bit>0</bit> </item> + <item name="NoUnlock"> <bit>1</bit> </item> + <item name="UseModMapMods"> <bit>2</bit> </item> + <item name="GroupAbsolute"> <bit>2</bit> </item> + <item name="ISODfltIsGroup"> <bit>3</bit> </item> + </enum> + + <enum name="SAIsoLockNoAffect"> + <item name="Ctrls"> <bit>3</bit> </item> + <item name="Ptr"> <bit>4</bit> </item> + <item name="Group"> <bit>5</bit> </item> + <item name="Mods"> <bit>6</bit> </item> + </enum> + + <struct name="SAIsoLock"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" mask="SAIsoLockFlag" /> + <field name="mask" type="CARD8" mask="ModMask" /> + <field name="realMods" type="CARD8" mask="ModMask" /> + <field name="group" type="INT8" /> + <field name="affect" type="CARD8" mask="SAIsoLockNoAffect" /> + <field name="vmodsHigh" type="CARD8" mask="VModsHigh" /> + <field name="vmodsLow" type="CARD8" mask="VModsLow" /> + </struct> + + <struct name="SATerminate"> + <field name="type" type="CARD8" enum="SAType" /> + <pad bytes="7" /> + </struct> + + <enum name="SwitchScreenFlag"> + <item name="Application"> <bit>0</bit> </item> + <item name="Absolute" > <bit>2</bit> </item> + </enum> + + <struct name="SASwitchScreen"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" /> + <field name="newScreen" type="INT8" /> + <pad bytes="5" /> + </struct> + + <enum name="BoolCtrlsHigh"> + <item name="AccessXFeedback"> <bit>0</bit> </item> + <item name="AudibleBell"> <bit>1</bit> </item> + <item name="Overlay1"> <bit>2</bit> </item> + <item name="Overlay2"> <bit>3</bit> </item> + <item name="IgnoreGroupLock"> <bit>4</bit> </item> + </enum> + + <enum name="BoolCtrlsLow"> + <item name="RepeatKeys"> <bit>0</bit> </item> + <item name="SlowKeys"> <bit>1</bit> </item> + <item name="BounceKeys"> <bit>2</bit> </item> + <item name="StickyKeys"> <bit>3</bit> </item> + <item name="MouseKeys"> <bit>4</bit> </item> + <item name="MouseKeysAccel"> <bit>5</bit> </item> + <item name="AccessXKeys"> <bit>6</bit> </item> + <item name="AccessXTimeout"> <bit>7</bit> </item> + </enum> + + <struct name="SASetControls"> + <field name="type" type="CARD8" enum="SAType" /> + <pad bytes="3" /> + <field name="boolCtrlsHigh" type="CARD8" mask="BoolCtrlsHigh" /> + <field name="boolCtrlsLow" type="CARD8" mask="BoolCtrlsLow" /> + <pad bytes="2" /> + </struct> + + <typedef oldname="SASetControls" newname="SALockControls" /> + + <enum name="ActionMessageFlag"> + <item name="OnPress"> <bit>0</bit> </item> + <item name="OnRelease"> <bit>1</bit> </item> + <item name="GenKeyEvent"> <bit>2</bit> </item> + </enum> + + <struct name="SAActionMessage"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" mask="ActionMessageFlag" /> + <list name="message" type="CARD8"> + <value>6</value> + </list> + </struct> + + <struct name="SARedirectKey"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="newkey" type="KEYCODE" /> + <field name="mask" type="CARD8" mask="ModMask" /> + <field name="realModifiers" type="CARD8" mask="ModMask" /> + <field name="vmodsMaskHigh" type="CARD8" mask="VModsHigh"/> + <field name="vmodsMaskLow" type="CARD8" mask="VModsLow"/> + <field name="vmodsHigh" type="CARD8" mask="VModsHigh"/> + <field name="vmodsLow" type="CARD8" mask="VModsLow"/> + </struct> + + <struct name="SADeviceBtn"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" /> + <field name="count" type="CARD8" /> + <field name="button" type="CARD8" /> + <field name="device" type="CARD8" /> + <pad bytes="3" /> + </struct> + + <enum name="LockDeviceFlags"> + <item name="NoLock"> <bit>0</bit> </item> + <item name="NoUnlock"> <bit>1</bit> </item> + </enum> + + <struct name="SALockDeviceBtn"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="flags" type="CARD8" mask="LockDeviceFlags" /> + <pad bytes="1" /> + <field name="button" type="CARD8" /> + <field name="device" type="CARD8" /> + </struct> + + <enum name="SAValWhat"> + <item name="IgnoreVal"> <value>0</value> </item> + <item name="SetValMin"> <value>1</value> </item> + <item name="SetValCenter"> <value>2</value> </item> + <item name="SetValMax"> <value>3</value> </item> + <item name="SetValRelative"> <value>4</value> </item> + <item name="SetValAbsolute"> <value>5</value> </item> + </enum> + + <struct name="SADeviceValuator"> + <field name="type" type="CARD8" enum="SAType" /> + <field name="device" type="CARD8" /> + <field name="val1what" type="CARD8" enum="SAValWhat" /> + <field name="val1index" type="CARD8" /> + <field name="val1value" type="CARD8" /> + <field name="val2what" type="CARD8" enum="SAValWhat" /> + <field name="val2index" type="CARD8" /> + <field name="val2value" type="CARD8" /> + </struct> + + <union name="Action"> + <field name="noaction" type="SANoAction" /> + <field name="setmods" type="SASetMods" /> + <field name="latchmods" type="SALatchMods" /> + <field name="lockmods" type="SALockMods" /> + <field name="setgroup" type="SASetGroup" /> + <field name="latchgroup" type="SALatchGroup" /> + <field name="lockgroup" type="SALockGroup" /> + <field name="moveptr" type="SAMovePtr" /> + <field name="ptrbtn" type="SAPtrBtn" /> + <field name="lockptrbtn" type="SALockPtrBtn" /> + <field name="setptrdflt" type="SASetPtrDflt" /> + <field name="isolock" type="SAIsoLock" /> + <field name="terminate" type="SATerminate" /> + <field name="switchscreen" type="SASwitchScreen" /> + <field name="setcontrols" type="SASetControls" /> + <field name="lockcontrols" type="SALockControls" /> + <field name="message" type="SAActionMessage" /> + <field name="redirect" type="SARedirectKey" /> + <field name="devbtn" type="SADeviceBtn" /> + <field name="lockdevbtn" type="SALockDeviceBtn" /> + <field name="devval" type="SADeviceValuator" /> + <field name="type" type="CARD8" enum="SAType" /> + </union> + + <!-- Requests --> + + <request name="UseExtension" opcode="0"> + <field name="wantedMajor" type="CARD16" /> + <field name="wantedMinor" type="CARD16" /> + <reply> + <field name="supported" type="BOOL" /> + <field name="serverMajor" type="CARD16" /> + <field name="serverMinor" type="CARD16" /> + <pad bytes="20" /> + </reply> + </request> + + <request name="SelectEvents" opcode="1"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="affectWhich" type="CARD16" enum="EventType" /> + <field name="clear" type="CARD16" enum="EventType" /> + <field name="selectAll" type="CARD16" enum="EventType" /> + <field name="affectMap" type="CARD16" enum="MapPart" /> + <field name="map" type="CARD16" enum="MapPart" /> + <switch name="details"> + <op op="&"> + <fieldref>affectWhich</fieldref> + <op op="&"> + <unop op="~"><fieldref>clear</fieldref></unop> + <unop op="~"><fieldref>selectAll</fieldref></unop> + </op> + </op> + <bitcase> + <enumref ref="EventType">NewKeyboardNotify</enumref> + <field name="affectNewKeyboard" type="CARD16" mask="NKNDetail" /> + <field name="newKeyboardDetails" type="CARD16" mask="NKNDetail" /> + </bitcase> + <bitcase> + <enumref ref="EventType">StateNotify</enumref> + <field name="affectState" type="CARD16" mask="StatePart" /> + <field name="stateDetails" type="CARD16" mask="StatePart" /> + </bitcase> + <bitcase> + <enumref ref="EventType">ControlsNotify</enumref> + <field name="affectCtrls" type="CARD32" mask="Control" /> + <field name="ctrlDetails" type="CARD32" mask="Control" /> + </bitcase> + <bitcase> + <enumref ref="EventType">IndicatorStateNotify</enumref> + <field name="affectIndicatorState" type="CARD32" /> + <field name="indicatorStateDetails" type="CARD32" /> + </bitcase> + <bitcase> + <enumref ref="EventType">IndicatorMapNotify</enumref> + <field name="affectIndicatorMap" type="CARD32" /> + <field name="indicatorMapDetails" type="CARD32" /> + </bitcase> + <bitcase> + <enumref ref="EventType">NamesNotify</enumref> + <field name="affectNames" type="CARD16" mask="NameDetail" /> + <field name="namesDetails" type="CARD16" mask="NameDetail" /> + </bitcase> + <bitcase> + <enumref ref="EventType">CompatMapNotify</enumref> + <field name="affectCompat" type="CARD8" mask="CMDetail" /> + <field name="compatDetails" type="CARD8" mask="CMDetail" /> + </bitcase> + <bitcase> + <enumref ref="EventType">BellNotify</enumref> + <field name="affectBell" type="CARD8" /> + <field name="bellDetails" type="CARD8" /> + </bitcase> + <bitcase> + <enumref ref="EventType">ActionMessage</enumref> + <field name="affectMsgDetails" type="CARD8" /> + <field name="msgDetails" type="CARD8" /> + </bitcase> + <bitcase> + <enumref ref="EventType">AccessXNotify</enumref> + <field name="affectAccessX" type="CARD16" mask="AXNDetail" /> + <field name="accessXDetails" type="CARD16" mask="AXNDetail" /> + </bitcase> + <bitcase> + <enumref ref="EventType">ExtensionDeviceNotify</enumref> + <field name="affectExtDev" type="CARD16" mask="XIFeature" /> + <field name="extdevDetails" type="CARD16" mask="XIFeature" /> + </bitcase> + </switch> + </request> + + <request name="Bell" opcode="3"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="bellClass" type="BellClassSpec" /> + <field name="bellID" type="IDSpec" /> + <field name="percent" type="INT8" /> + <field name="forceSound" type="BOOL" /> + <field name="eventOnly" type="BOOL" /> + <pad bytes="1" /> + <field name="pitch" type="INT16" /> + <field name="duration" type="INT16" /> + <pad bytes="2" /> + <field name="name" type="ATOM" /> + <field name="window" type="WINDOW" /> + </request> + + <request name="GetState" opcode="4"> + <field name="deviceSpec" type="DeviceSpec" /> + <pad bytes="2" /> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="mods" type="CARD8" mask="ModMask" /> + <field name="baseMods" type="CARD8" mask="ModMask" /> + <field name="latchedMods" type="CARD8" mask="ModMask" /> + <field name="lockedMods" type="CARD8" mask="ModMask" /> + <field name="group" type="CARD8" enum="Group" /> + <field name="lockedGroup" type="CARD8" enum="Group" /> + <field name="baseGroup" type="INT16" /> + <field name="latchedGroup" type="INT16" /> + <field name="compatState" type="CARD8" mask="ModMask" /> + <field name="grabMods" type="CARD8" mask="ModMask" /> + <field name="compatGrabMods" type="CARD8" mask="ModMask" /> + <field name="lookupMods" type="CARD8" mask="ModMask" /> + <field name="compatLookupMods" type="CARD8" mask="ModMask" /> + <pad bytes="1" /> + <field name="ptrBtnState" type="CARD16" mask="KeyButMask" /> + <pad bytes="6" /> + </reply> + </request> + + <request name="LatchLockState" opcode="5"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="affectModLocks" type="CARD8" mask="ModMask" /> + <field name="modLocks" type="CARD8" mask="ModMask" /> + <field name="lockGroup" type="BOOL" /> + <field name="groupLock" type="CARD8" enum="Group" /> + <field name="affectModLatches" type="CARD8" mask="ModMask" /> + <pad bytes="1" /> + <field name="latchGroup" type="BOOL" /> + <field name="groupLatch" type="CARD16" /> + </request> + + <request name="GetControls" opcode="6"> + <field name="deviceSpec" type="DeviceSpec" /> + <pad bytes="2" /> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="mouseKeysDfltBtn" type="CARD8" /> + <field name="numGroups" type="CARD8" /> + <field name="groupsWrap" type="CARD8" /> + <field name="internalModsMask" type="CARD8" mask="ModMask" /> + <field name="ignoreLockModsMask" type="CARD8" mask="ModMask" /> + <field name="internalModsRealMods" type="CARD8" mask="ModMask" /> + <field name="ignoreLockModsRealMods" type="CARD8" mask="ModMask" /> + <pad bytes="1" /> + <field name="internalModsVmods" type="CARD16" mask="VMod" /> + <field name="ignoreLockModsVmods" type="CARD16" mask="VMod" /> + <field name="repeatDelay" type="CARD16" /> + <field name="repeatInterval" type="CARD16" /> + <field name="slowKeysDelay" type="CARD16" /> + <field name="debounceDelay" type="CARD16" /> + <field name="mouseKeysDelay" type="CARD16" /> + <field name="mouseKeysInterval" type="CARD16" /> + <field name="mouseKeysTimeToMax" type="CARD16" /> + <field name="mouseKeysMaxSpeed" type="CARD16" /> + <field name="mouseKeysCurve" type="INT16" /> + <field name="accessXOption" type="AXOption" /> + <field name="accessXTimeout" type="CARD16" /> + <field name="accessXTimeoutOptionsMask" type="AXOption" /> + <field name="accessXTimeoutOptionsValues" type="AXOption" /> + <pad bytes="2" /> + <field name="accessXTimeoutMask" type="CARD32" enum="BoolCtrl" /> + <field name="accessXTimeoutValues" type="CARD32" enum="BoolCtrl" /> + <field name="enabledControls" type="CARD32" enum="BoolCtrl" /> + <list name="perKeyRepeat" type="CARD8"> + <value>32</value> + </list> + </reply> + </request> + + <request name="SetControls" opcode="7"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="affectInternalRealMods" type="CARD8" mask="ModMask" /> + <field name="internalRealMods" type="CARD8" mask="ModMask" /> + <field name="affectIgnoreLockRealMods" type="CARD8" mask="ModMask" /> + <field name="ignoreLockRealMods" type="CARD8" mask="ModMask" /> + <field name="affectInternalVirtualMods" type="CARD16" mask="VMod" /> + <field name="internalVirtualMods" type="CARD16" mask="VMod" /> + <field name="affectIgnoreLockVirtualMods" type="CARD16" mask="VMod" /> + <field name="ignoreLockVirtualMods" type="CARD16" mask="VMod" /> + <field name="mouseKeysDfltBtn" type="CARD8" /> + <field name="groupsWrap" type="CARD8" /> + <field name="accessXOptions" type="AXOption" /> + <pad bytes="2" /> + <field name="affectEnabledControls" type="CARD32" enum="BoolCtrl" /> + <field name="enabledControls" type="CARD32" enum="BoolCtrl" /> + <field name="changeControls" type="CARD32" mask="Control" /> + <field name="repeatDelay" type="CARD16" /> + <field name="repeatInterval" type="CARD16" /> + <field name="slowKeysDelay" type="CARD16" /> + <field name="debounceDelay" type="CARD16" /> + <field name="mouseKeysDelay" type="CARD16" /> + <field name="mouseKeysInterval" type="CARD16" /> + <field name="mouseKeysTimeToMax" type="CARD16" /> + <field name="mouseKeysMaxSpeed" type="CARD16" /> + <field name="mouseKeysCurve" type="INT16" /> + <field name="accessXTimeout" type="CARD16" /> + <field name="accessXTimeoutMask" type="CARD32" enum="BoolCtrl" /> + <field name="accessXTimeoutValues" type="CARD32" enum="BoolCtrl" /> + <field name="accessXTimeoutOptionsMask" type="AXOption" /> + <field name="accessXTimeoutOptionsValues" type="AXOption" /> + <list name="perKeyRepeat" type="CARD8"> + <value>32</value> + </list> + </request> + + <request name="GetMap" opcode="8"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="full" type="CARD16" enum="MapPart" /> + <field name="partial" type="CARD16" enum="MapPart" /> + <field name="firstType" type="CARD8" /> + <field name="nTypes" type="CARD8" /> + <field name="firstKeySym" type="KEYCODE" /> + <field name="nKeySyms" type="CARD8" /> + <field name="firstKeyAction" type="KEYCODE" /> + <field name="nKeyActions" type="CARD8" /> + <field name="firstKeyBehavior" type="KEYCODE" /> + <field name="nKeyBehaviors" type="CARD8" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <field name="firstKeyExplicit" type="KEYCODE" /> + <field name="nKeyExplicit" type="CARD8" /> + <field name="firstModMapKey" type="KEYCODE" /> + <field name="nModMapKeys" type="CARD8" /> + <field name="firstVModMapKey" type="KEYCODE" /> + <field name="nVModMapKeys" type="CARD8" /> + <pad bytes="2" /> + <reply> + <field name="deviceID" type="CARD8" /> + <pad bytes="2" /> + <field name="minKeyCode" type="KEYCODE" /> + <field name="maxKeyCode" type="KEYCODE" /> + <field name="present" type="CARD16" enum="MapPart" /> + <field name="firstType" type="CARD8" /> + <field name="nTypes" type="CARD8" /> + <field name="totalTypes" type="CARD8" /> + <field name="firstKeySym" type="KEYCODE" /> + <field name="totalSyms" type="CARD16" /> + <field name="nKeySyms" type="CARD8" /> + <field name="firstKeyAction" type="KEYCODE" /> + <field name="totalActions" type="CARD16" /> + <field name="nKeyActions" type="CARD8" /> + <field name="firstKeyBehavior" type="KEYCODE" /> + <field name="nKeyBehaviors" type="CARD8" /> + <field name="totalKeyBehaviors" type="CARD8" /> + <field name="firstKeyExplicit" type="KEYCODE" /> + <field name="nKeyExplicit" type="CARD8" /> + <field name="totalKeyExplicit" type="CARD8" /> + <field name="firstModMapKey" type="KEYCODE" /> + <field name="nModMapKeys" type="CARD8" /> + <field name="totalModMapKeys" type="CARD8" /> + <field name="firstVModMapKey" type="KEYCODE" /> + <field name="nVModMapKeys" type="CARD8" /> + <field name="totalVModMapKeys" type="CARD8" /> + <pad bytes="1" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <switch name="map"> + <fieldref>present</fieldref> + <bitcase> + <enumref ref="MapPart">KeyTypes</enumref> + <list name="types_rtrn" type="KeyType"> + <fieldref>nTypes</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeySyms</enumref> + <list name="syms_rtrn" type="KeySymMap"> + <fieldref>nKeySyms</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyActions</enumref> + <list name="acts_rtrn_count" type="CARD8"> + <fieldref>nKeyActions</fieldref> + </list> + <list name="acts_rtrn_acts" type="Action"> + <fieldref>totalActions</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyBehaviors</enumref> + <list name="behaviors_rtrn" type="SetBehavior"> + <fieldref>totalKeyBehaviors</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualMods</enumref> + <list name="vmods_rtrn" type="CARD8" mask="ModMask"> + <fieldref>nVModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ExplicitComponents</enumref> + <list name="explicit_rtrn" type="SetExplicit"> + <fieldref>totalKeyExplicit</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ModifierMap</enumref> + <list name="modmap_rtrn" type="KeyModMap"> + <fieldref>totalModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualModMap</enumref> + <list name="vmodmap_rtrn" type="KeyVModMap"> + <fieldref>totalVModMapKeys</fieldref> + </list> + </bitcase> + </switch> + </reply> + </request> + + <request name="SetMap" opcode="9"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="present" type="CARD16" enum="MapPart" /> + <field name="flags" type="CARD16" mask="SetMapFlags" /> + <field name="minKeyCode" type="KEYCODE" /> + <field name="maxKeyCode" type="KEYCODE" /> + <field name="firstType" type="CARD8" /> + <field name="nTypes" type="CARD8" /> + <field name="firstKeySym" type="KEYCODE" /> + <field name="nKeySyms" type="CARD8" /> + <field name="totalSyms" type="CARD16" /> + <field name="firstKeyAction" type="KEYCODE" /> + <field name="nKeyActions" type="CARD8" /> + <field name="totalActions" type="CARD16" /> + <field name="firstKeyBehavior" type="KEYCODE" /> + <field name="nKeyBehaviors" type="CARD8" /> + <field name="totalKeyBehaviors" type="CARD8" /> + <field name="firstKeyExplicit" type="KEYCODE" /> + <field name="nKeyExplicit" type="CARD8" /> + <field name="totalKeyExplicit" type="CARD8" /> + <field name="firstModMapKey" type="KEYCODE" /> + <field name="nModMapKeys" type="CARD8" /> + <field name="totalModMapKeys" type="CARD8" /> + <field name="firstVModMapKey" type="KEYCODE" /> + <field name="nVModMapKeys" type="CARD8" /> + <field name="totalVModMapKeys" type="CARD8" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <switch name="values"> + <fieldref>present</fieldref> + <bitcase> + <enumref ref="MapPart">KeyTypes</enumref> + <list name="types" type="SetKeyType"> + <fieldref>nTypes</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeySyms</enumref> + <list name="syms" type="KeySymMap"> + <fieldref>nKeySyms</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyActions</enumref> + <list name="actionsCount" type="CARD8"> + <fieldref>nKeyActions</fieldref> + </list> + <list name="actions" type="Action"> + <fieldref>totalActions</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyBehaviors</enumref> + <list name="behaviors" type="SetBehavior"> + <fieldref>totalKeyBehaviors</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualMods</enumref> + <list name="vmods" type="CARD8"> + <fieldref>nVModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ExplicitComponents</enumref> + <list name="explicit" type="SetExplicit"> + <fieldref>totalKeyExplicit</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ModifierMap</enumref> + <list name="modmap" type="KeyModMap"> + <fieldref>totalModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualModMap</enumref> + <list name="vmodmap" type="KeyVModMap"> + <fieldref>totalVModMapKeys</fieldref> + </list> + </bitcase> + </switch> + </request> + + <request name="GetCompatMap" opcode="10"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="groups" type="CARD8" mask="SetOfGroup" /> + <field name="getAllSI" type="BOOL" /> + <field name="firstSI" type="CARD16" /> + <field name="nSI" type="CARD16" /> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="groupsRtrn" type="CARD8" mask="SetOfGroup" /> + <pad bytes="1" /> + <field name="firstSIRtrn" type="CARD16" /> + <field name="nSIRtrn" type="CARD16" /> + <field name="nTotalSI" type="CARD16" /> + <pad bytes="16" /> + <list name="si_rtrn" type="CARD8" mask="SymInterpret"> + <op op="*"> + <value>16</value> + <fieldref>nSIRtrn</fieldref> + </op> + </list> + <list name="group_rtrn" type="ModDef"> + <popcount> + <fieldref>groupsRtrn</fieldref> + </popcount> + </list> + </reply> + </request> + + <request name="SetCompatMap" opcode="11"> + <field name="deviceSpec" type="DeviceSpec" /> + <pad bytes="1" /> + <field name="recomputeActions" type="BOOL" /> + <field name="truncateSI" type="BOOL" /> + <field name="groups" type="CARD8" mask="SetOfGroup" /> + <field name="firstSI" type="CARD16" /> + <field name="nSI" type="CARD16" /> + <pad bytes="2"/> + <list name="si" type="CARD8" mask="SymInterpret"> + <op op="*"> + <value>16</value> + <fieldref>nSI</fieldref> + </op> + </list> + <list name="groupMaps" type="ModDef"> + <popcount> + <fieldref>groups</fieldref> + </popcount> + </list> + </request> + + <request name="GetIndicatorState" opcode="12"> + <field name="deviceSpec" type="DeviceSpec" /> + <pad bytes="2" /> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="state" type="CARD32" /> + <pad bytes="20" /> + </reply> + </request> + + <request name="GetIndicatorMap" opcode="13"> + <field name="deviceSpec" type="DeviceSpec" /> + <pad bytes="2" /> + <field name="which" type="CARD32" /> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="which" type="CARD32" /> + <field name="realIndicators" type="CARD32" /> + <field name="nIndicators" type="CARD8" /> + <pad bytes="15" /> + <list name="maps" type="IndicatorMap"> + <fieldref>nIndicators</fieldref> + </list> + </reply> + </request> + + <request name="SetIndicatorMap" opcode="14"> + <field name="deviceSpec" type="DeviceSpec" /> + <pad bytes="2" /> + <field name="which" type="CARD32" /> + <list name="maps" type="IndicatorMap"> + <popcount> + <fieldref>which</fieldref> + </popcount> + </list> + </request> + + <request name="GetNamedIndicator" opcode="15"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="ledClass" type="LedClassSpec" enum="LedClass" /> + <field name="ledID" type="IDSpec" altenum="ID" /> + <pad bytes="2" /> + <field name="indicator" type="ATOM" /> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="indicator" type="ATOM" /> + <field name="found" type="BOOL" /> + <field name="on" type="BOOL" /> + <field name="realIndicator" type="BOOL" /> + <field name="ndx" type="CARD8" /> + <field name="map_flags" type="CARD8" mask="IMFlag" /> + <field name="map_whichGroups" type="CARD8" mask="IMGroupsWhich" /> + <field name="map_groups" type="CARD8" mask="SetOfGroups" /> + <field name="map_whichMods" type="CARD8" mask="IMModsWhich" /> + <field name="map_mods" type="CARD8" mask="ModMask" /> + <field name="map_realMods" type="CARD8" mask="ModMask" /> + <field name="map_vmod" type="CARD16" mask="VMod" /> + <field name="map_ctrls" type="CARD32" mask="BoolCtrl" /> + <pad bytes="3" /> + </reply> + </request> + + <request name="SetNamedIndicator" opcode="16" > + <field name="deviceSpec" type="DeviceSpec" /> + <field name="ledClass" type="LedClassSpec" enum="LedClass" /> + <field name="ledID" type="IDSpec" altenum="ID" /> + <pad bytes="2" /> + <field name="indicator" type="ATOM" /> + <field name="setState" type="BOOL" /> + <field name="on" type="BOOL" /> + <field name="setMap" type="BOOL" /> + <field name="createMap" type="BOOL" /> + <pad bytes="1" /> + <field name="map_flags" type="CARD8" mask="IMFlag" /> + <field name="map_whichGroups" type="CARD8" mask="IMGroupsWhich" /> + <field name="map_groups" type="CARD8" mask="SetOfGroups" /> + <field name="map_whichMods" type="CARD8" mask="IMModsWhich" /> + <field name="map_realMods" type="CARD8" mask="ModMask" /> + <field name="map_vmods" type="CARD16" mask="VMod" /> + <field name="map_ctrls" type="CARD32" mask="BoolCtrl" /> + </request> + + <request name="GetNames" opcode="17"> + <field name="deviceSpec" type="DeviceSpec" /> + <pad bytes="2" /> + <field name="which" type="CARD32" mask="NameDetail" /> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="which" type="CARD32" mask="NameDetail" /> + <field name="minKeyCode" type="KEYCODE" /> + <field name="maxKeyCode" type="KEYCODE" /> + <field name="nTypes" type="CARD8" /> + <field name="groupNames" type="CARD8" mask="SetOfGroup" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <field name="firstKey" type="KEYCODE" /> + <field name="nKeys" type="CARD8" /> + <field name="indicators" type="CARD32" /> + <field name="nRadioGroups" type="CARD8" /> + <field name="nKeyAliases" type="CARD8" /> + <field name="nKTLevels" type="CARD16" /> + <pad bytes="4" /> + <switch name="valueList"> + <fieldref>which</fieldref> + <bitcase> + <enumref ref="NameDetail">Keycodes</enumref> + <field name="keycodesName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Geometry</enumref> + <field name="geometryName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Symbols</enumref> + <field name="symbolsName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">PhysSymbols</enumref> + <field name="physSymbolsName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Types</enumref> + <field name="typesName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Compat</enumref> + <field name="compatName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyTypeNames</enumref> + <list name="typeNames" type="ATOM"> + <fieldref>nTypes</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KTLevelNames</enumref> + <list name="nLevelsPerType" type="CARD8"> + <!-- Xlib uses NTypes here - + the spec says nKTLevels is correct, but + it does not work in reality + <fieldref>nKTLevels</fieldref> --> + <fieldref>nTypes</fieldref> + </list> + <list name="ktLevelNames" type="ATOM"> + <sumof ref="nLevelsPerType" /> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">IndicatorNames</enumref> + <list name="indicatorNames" type="ATOM"> + <popcount> + <fieldref>indicators</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">VirtualModNames</enumref> + <list name="virtualModNames" type="ATOM"> + <popcount> + <fieldref>virtualMods</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">GroupNames</enumref> + <list name="groups" type="ATOM"> + <popcount> + <fieldref>groupNames</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyNames</enumref> + <list name="keyNames" type="KeyName"> + <fieldref>nKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyAliases</enumref> + <list name="keyAliases" type="KeyAlias"> + <fieldref>nKeyAliases</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">RGNames</enumref> + <list name="radioGroupNames" type="ATOM"> + <fieldref>nRadioGroups</fieldref> + </list> + </bitcase> + </switch> + </reply> + </request> + + <request name="SetNames" opcode="18"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <field name="which" type="CARD32" mask="NameDetail" /> + <field name="firstType" type="CARD8" /> + <field name="nTypes" type="CARD8" /> + <field name="firstKTLevelt" type="CARD8" /> + <field name="nKTLevels" type="CARD8" /> + <field name="indicators" type="CARD32" /> + <field name="groupNames" type="CARD8" mask="SetOfGroup" /> + <field name="nRadioGroups" type="CARD8" /> + <field name="firstKey" type="KEYCODE" /> + <field name="nKeys" type="CARD8" /> + <field name="nKeyAliases" type="CARD8"/> + <pad bytes="1" /> + <field name="totalKTLevelNames" type="CARD16" /> + <switch name="values"> + <fieldref>which</fieldref> + <bitcase> + <enumref ref="NameDetail">Keycodes</enumref> + <field name="keycodesName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Geometry</enumref> + <field name="geometryName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Symbols</enumref> + <field name="symbolsName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">PhysSymbols</enumref> + <field name="physSymbolsName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Types</enumref> + <field name="typesName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Compat</enumref> + <field name="compatName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyTypeNames</enumref> + <list name="typeNames" type="ATOM"> + <fieldref>nTypes</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KTLevelNames</enumref> + <list name="nLevelsPerType" type="CARD8"> + <fieldref>nKTLevels</fieldref> + </list> + <list name="ktLevelNames" type="ATOM"> + <sumof ref="nLevelsPerType" /> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">IndicatorNames</enumref> + <list name="indicatorNames" type="ATOM"> + <popcount> + <fieldref>indicators</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">VirtualModNames</enumref> + <list name="virtualModNames" type="ATOM"> + <popcount> + <fieldref>virtualMods</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">GroupNames</enumref> + <list name="groups" type="ATOM"> + <popcount> + <fieldref>groupNames</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyNames</enumref> + <list name="keyNames" type="KeyName"> + <fieldref>nKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyAliases</enumref> + <list name="keyAliases" type="KeyAlias"> + <fieldref>nKeyAliases</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">RGNames</enumref> + <list name="radioGroupNames" type="ATOM"> + <fieldref>nRadioGroups</fieldref> + </list> + </bitcase> + </switch> + </request> + + <request name="GetGeometry" opcode="19"> + <field name="deviceSpec" type="DeviceSpec" /> + <pad bytes="2" /> + <field name="name" type="ATOM" /> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="name" type="ATOM" /> + <field name="found" type="BOOL" /> + <pad bytes="1" /> + <field name="widthMM" type="CARD16" /> + <field name="heightMM" type="CARD16" /> + <field name="nProperties" type="CARD16" /> + <field name="nColors" type="CARD16" /> + <field name="nShapes" type="CARD16" /> + <field name="nSections" type="CARD16" /> + <field name="nDoodads" type="CARD16" /> + <field name="nKeyAliases" type="CARD16" /> + <field name="baseColorNdx" type="CARD8" /> + <field name="labelColorNdx" type="CARD8" /> + <field name="labelFont" type="CountedString16" /> + <list name="properties" type="Property"> + <fieldref>nProperties</fieldref> + </list> + <list name="colors" type="CountedString16"> + <fieldref>nColors</fieldref> + </list> + <list name="shapes" type="Shape"> + <fieldref>nShapes</fieldref> + </list> + <list name="sections" type="Section"> + <fieldref>nSections</fieldref> + </list> + <list name="doodads" type="Doodad"> + <fieldref>nDoodads</fieldref> + </list> + <list name="keyAliases" type="KeyAlias"> + <fieldref>nKeyAliases</fieldref> + </list> + </reply> + </request> + + <request name="SetGeometry" opcode="20"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="nShapes" type="CARD8" /> + <field name="nSections" type="CARD8" /> + <field name="name" type="ATOM" /> + <field name="widthMM" type="CARD16" /> + <field name="heightMM" type="CARD16" /> + <field name="nProperties" type="CARD16" /> + <field name="nColors" type="CARD16" /> + <field name="nDoodads" type="CARD16" /> + <field name="nKeyAliases" type="CARD16" /> + <field name="baseColorNdx" type="CARD8" /> + <field name="labelColorNdx" type="CARD8" /> + <pad bytes="2" /> + <field name="labelFont" type="CountedString16" /> + <list name="properties" type="Property"> + <fieldref>nProperties</fieldref> + </list> + <list name="colors" type="CountedString16"> + <fieldref>nColors</fieldref> + </list> + <list name="shapes" type="Shape"> + <fieldref>nShapes</fieldref> + </list> + <list name="sections" type="Section"> + <fieldref>nSections</fieldref> + </list> + <list name="doodads" type="Doodad"> + <fieldref>nDoodads</fieldref> + </list> + <list name="keyAliases" type="KeyAlias"> + <fieldref>nKeyAliases</fieldref> + </list> + </request> + + <request name="PerClientFlags" opcode="21"> + <field name="deviceSpec" type="DeviceSpec" /> + <pad bytes="2" /> + <field name="change" type="CARD32" mask="PerClientFlag" /> + <field name="value" type="CARD32" mask="PerClientFlag" /> + <field name="ctrlsToChange" type="CARD32" mask="BoolCtrl" /> + <field name="autoCtrls" type="CARD32" mask="BoolCtrl" /> + <field name="autoCtrlsValues" type="CARD32" mask="BoolCtrl" /> + <reply> + <field name="deviceID" type="CARD8"/> + <field name="supported" type="CARD32" mask="PerClientFlag" /> + <field name="value" type="CARD32" mask="PerClientFlag" /> + <field name="autoCtrls" type="CARD32" mask="BoolCtrl" /> + <field name="autoCtrlsValues" type="CARD32" mask="BoolCtrl" /> + <pad bytes="8" /> + </reply> + </request> + + <request name="ListComponents" opcode="22"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="maxNames" type="CARD16" /> + <field name="keymapsSpecLen" type="CARD8" /> + <list name="keymapsSpec" type="STRING8"> + <fieldref>keymapsSpecLen</fieldref> + </list> + <field name="keycodesSpecLen" type="CARD8" /> + <list name="keycodesSpec" type="STRING8"> + <fieldref>keycodesSpecLen</fieldref> + </list> + <field name="typesSpecLen" type="CARD8" /> + <list name="typesSpec" type="STRING8"> + <fieldref>typesSpecLen</fieldref> + </list> + <field name="compatMapSpecLen" type="CARD8" /> + <list name="compatMapSpec" type="STRING8"> + <fieldref>compatMapSpecLen</fieldref> + </list> + <field name="symbolsSpecLen" type="CARD8" /> + <list name="symbolsSpec" type="STRING8"> + <fieldref>symbolsSpecLen</fieldref> + </list> + <field name="geometrySpecLen" type="CARD8" /> + <list name="geometrySpec" type="STRING8"> + <fieldref>geometrySpecLen</fieldref> + </list> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="nKeymaps" type="CARD16" /> + <field name="nKeycodes" type="CARD16" /> + <field name="nTypes" type="CARD16" /> + <field name="nCompatMaps" type="CARD16" /> + <field name="nSymbols" type="CARD16" /> + <field name="nGeometries" type="CARD16" /> + <field name="extra" type="CARD16" /> + <pad bytes="10" /> + <list name="keymaps" type="Listing"> + <fieldref>nKeymaps</fieldref> + </list> + <list name="keycodes" type="Listing"> + <fieldref>nKeycodes</fieldref> + </list> + <list name="types" type="Listing"> + <fieldref>nTypes</fieldref> + </list> + <list name="compatMaps" type="Listing"> + <fieldref>nCompatMaps</fieldref> + </list> + <list name="symbols" type="Listing"> + <fieldref>nSymbols</fieldref> + </list> + <list name="geometries" type="Listing"> + <fieldref>nGeometries</fieldref> + </list> + </reply> + </request> + + <request name="GetKbdByName" opcode="23"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="need" type="CARD16" mask="GBNDetail" /> + <field name="want" type="CARD16" mask="GBNDetail" /> + <field name="load" type="BOOL" /> + <pad bytes="1" /> + <field name="keymapsSpecLen" type="CARD8" /> + <list name="keymapsSpec" type="STRING8"> + <fieldref>keymapsSpecLen</fieldref> + </list> + <field name="keycodesSpecLen" type="CARD8" /> + <list name="keycodesSpec" type="STRING8"> + <fieldref>keycodesSpecLen</fieldref> + </list> + <field name="typesSpecLen" type="CARD8" /> + <list name="typesSpec" type="STRING8"> + <fieldref>typesSpecLen</fieldref> + </list> + <field name="compatMapSpecLen" type="CARD8" /> + <list name="compatMapSpec" type="STRING8"> + <fieldref>compatMapSpecLen</fieldref> + </list> + <field name="symbolsSpecLen" type="CARD8" /> + <list name="symbolsSpec" type="STRING8"> + <fieldref>symbolsSpecLen</fieldref> + </list> + <field name="geometrySpecLen" type="CARD8" /> + <list name="geometrySpec" type="STRING8"> + <fieldref>geometrySpecLen</fieldref> + </list> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="minKeyCode" type="KEYCODE" /> + <field name="maxKeyCode" type="KEYCODE" /> + <field name="loaded" type="BOOL" /> + <field name="newKeyboard" type="BOOL" /> + <field name="found" type="CARD16" mask="GBNDetail" /> + <field name="reported" type="CARD16" mask="GBNDetail" /> + <pad bytes="16" /> + <switch name="replies"> + <fieldref>reported</fieldref> + <bitcase name="types"> + <enumref ref="GBNDetail">Types</enumref> + <!-- from the spec, this has to be a GetMap reply --> + <field name="getmap_type" type="CARD8" /> + <!-- done 'emulating' GetMap reply header--> + <field name="typeDeviceID" type="CARD8" /> + <!-- from the spec, this has to be a GetMap reply --> + <field name="getmap_sequence" type="CARD16" /> + <field name="getmap_length" type="CARD32" /> + <!-- done 'emulating' GetMap reply header--> + <pad bytes="2" /> + <field name="typeMinKeyCode" type="KEYCODE" /> + <field name="typeMaxKeyCode" type="KEYCODE" /> + <field name="present" type="CARD16" enum="MapPart" /> + <field name="firstType" type="CARD8" /> + <field name="nTypes" type="CARD8" /> + <field name="totalTypes" type="CARD8" /> + <field name="firstKeySym" type="KEYCODE" /> + <field name="totalSyms" type="CARD16" /> + <field name="nKeySyms" type="CARD8" /> + <field name="firstKeyAction" type="KEYCODE" /> + <field name="totalActions" type="CARD16" /> + <field name="nKeyActions" type="CARD8" /> + <field name="firstKeyBehavior" type="KEYCODE" /> + <field name="nKeyBehaviors" type="CARD8" /> + <field name="totalKeyBehaviors" type="CARD8" /> + <field name="firstKeyExplicit" type="KEYCODE" /> + <field name="nKeyExplicit" type="CARD8" /> + <field name="totalKeyExplicit" type="CARD8" /> + <field name="firstModMapKey" type="KEYCODE" /> + <field name="nModMapKeys" type="CARD8" /> + <field name="totalModMapKeys" type="CARD8" /> + <field name="firstVModMapKey" type="KEYCODE" /> + <field name="nVModMapKeys" type="CARD8" /> + <field name="totalVModMapKeys" type="CARD8" /> + <pad bytes="1" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <switch name="map"> + <fieldref>present</fieldref> + <bitcase> + <enumref ref="MapPart">KeyTypes</enumref> + <list name="types_rtrn" type="KeyType"> + <fieldref>nTypes</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeySyms</enumref> + <list name="syms_rtrn" type="KeySymMap"> + <fieldref>nKeySyms</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyActions</enumref> + <list name="acts_rtrn_count" type="CARD8"> + <fieldref>nKeyActions</fieldref> + </list> + <list name="acts_rtrn_acts" type="Action"> + <fieldref>totalActions</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyBehaviors</enumref> + <list name="behaviors_rtrn" type="SetBehavior"> + <fieldref>totalKeyBehaviors</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualMods</enumref> + <list name="vmods_rtrn" type="CARD8" mask="ModMask"> + <fieldref>nVModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ExplicitComponents</enumref> + <list name="explicit_rtrn" type="SetExplicit"> + <fieldref>totalKeyExplicit</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ModifierMap</enumref> + <list name="modmap_rtrn" type="KeyModMap"> + <fieldref>totalModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualModMap</enumref> + <list name="vmodmap_rtrn" type="KeyVModMap"> + <fieldref>totalVModMapKeys</fieldref> + </list> + </bitcase> + </switch> + </bitcase> + <bitcase name="compat_map"> + <enumref ref="GBNDetail">CompatMap</enumref> + <field name="compatDeviceID" type="CARD8" /> + <field name="groupsRtrn" type="CARD8" mask="SetOfGroup" /> + <pad bytes="1" /> + <field name="firstSIRtrn" type="CARD16" /> + <field name="nSIRtrn" type="CARD16" /> + <field name="nTotalSI" type="CARD16" /> + <pad bytes="16" /> + <list name="si_rtrn" type="CARD8" mask="SymInterpret"> + <op op="*"> + <value>16</value> + <fieldref>nSIRtrn</fieldref> + </op> + </list> + <list name="group_rtrn" type="ModDef"> + <popcount> + <fieldref>groupsRtrn</fieldref> + </popcount> + </list> + </bitcase> + <bitcase name="client_symbols"> + <enumref ref="GBNDetail">ClientSymbols</enumref> + <field name="clientDeviceID" type="CARD8" /> + <pad bytes="2" /> + <field name="clientMinKeyCode" type="KEYCODE" /> + <field name="clientMaxKeyCode" type="KEYCODE" /> + <field name="present" type="CARD16" enum="MapPart" /> + <field name="firstType" type="CARD8" /> + <field name="nTypes" type="CARD8" /> + <field name="totalTypes" type="CARD8" /> + <field name="firstKeySym" type="KEYCODE" /> + <field name="totalSyms" type="CARD16" /> + <field name="nKeySyms" type="CARD8" /> + <field name="firstKeyAction" type="KEYCODE" /> + <field name="totalActions" type="CARD16" /> + <field name="nKeyActions" type="CARD8" /> + <field name="firstKeyBehavior" type="KEYCODE" /> + <field name="nKeyBehaviors" type="CARD8" /> + <field name="totalKeyBehaviors" type="CARD8" /> + <field name="firstKeyExplicit" type="KEYCODE" /> + <field name="nKeyExplicit" type="CARD8" /> + <field name="totalKeyExplicit" type="CARD8" /> + <field name="firstModMapKey" type="KEYCODE" /> + <field name="nModMapKeys" type="CARD8" /> + <field name="totalModMapKeys" type="CARD8" /> + <field name="firstVModMapKey" type="KEYCODE" /> + <field name="nVModMapKeys" type="CARD8" /> + <field name="totalVModMapKeys" type="CARD8" /> + <pad bytes="1" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <switch name="map"> + <fieldref>present</fieldref> + <bitcase> + <enumref ref="MapPart">KeyTypes</enumref> + <list name="types_rtrn" type="KeyType"> + <fieldref>nTypes</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeySyms</enumref> + <list name="syms_rtrn" type="KeySymMap"> + <fieldref>nKeySyms</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyActions</enumref> + <list name="acts_rtrn_count" type="CARD8"> + <fieldref>nKeyActions</fieldref> + </list> + <list name="acts_rtrn_acts" type="Action"> + <fieldref>totalActions</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyBehaviors</enumref> + <list name="behaviors_rtrn" type="SetBehavior"> + <fieldref>totalKeyBehaviors</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualMods</enumref> + <list name="vmods_rtrn" type="CARD8" mask="ModMask"> + <fieldref>nVModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ExplicitComponents</enumref> + <list name="explicit_rtrn" type="SetExplicit"> + <fieldref>totalKeyExplicit</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ModifierMap</enumref> + <list name="modmap_rtrn" type="KeyModMap"> + <fieldref>totalModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualModMap</enumref> + <list name="vmodmap_rtrn" type="KeyVModMap"> + <fieldref>totalVModMapKeys</fieldref> + </list> + </bitcase> + </switch> + </bitcase> + <bitcase name="server_symbols"> + <enumref ref="GBNDetail">ServerSymbols</enumref> + <field name="serverDeviceID" type="CARD8" /> + <pad bytes="2" /> + <field name="serverMinKeyCode" type="KEYCODE" /> + <field name="serverMaxKeyCode" type="KEYCODE" /> + <field name="present" type="CARD16" enum="MapPart" /> + <field name="firstType" type="CARD8" /> + <field name="nTypes" type="CARD8" /> + <field name="totalTypes" type="CARD8" /> + <field name="firstKeySym" type="KEYCODE" /> + <field name="totalSyms" type="CARD16" /> + <field name="nKeySyms" type="CARD8" /> + <field name="firstKeyAction" type="KEYCODE" /> + <field name="totalActions" type="CARD16" /> + <field name="nKeyActions" type="CARD8" /> + <field name="firstKeyBehavior" type="KEYCODE" /> + <field name="nKeyBehaviors" type="CARD8" /> + <field name="totalKeyBehaviors" type="CARD8" /> + <field name="firstKeyExplicit" type="KEYCODE" /> + <field name="nKeyExplicit" type="CARD8" /> + <field name="totalKeyExplicit" type="CARD8" /> + <field name="firstModMapKey" type="KEYCODE" /> + <field name="nModMapKeys" type="CARD8" /> + <field name="totalModMapKeys" type="CARD8" /> + <field name="firstVModMapKey" type="KEYCODE" /> + <field name="nVModMapKeys" type="CARD8" /> + <field name="totalVModMapKeys" type="CARD8" /> + <pad bytes="1" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <switch name="map"> + <fieldref>present</fieldref> + <bitcase> + <enumref ref="MapPart">KeyTypes</enumref> + <list name="types_rtrn" type="KeyType"> + <fieldref>nTypes</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeySyms</enumref> + <list name="syms_rtrn" type="KeySymMap"> + <fieldref>nKeySyms</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyActions</enumref> + <list name="acts_rtrn_count" type="CARD8"> + <fieldref>nKeyActions</fieldref> + </list> + <list name="acts_rtrn_acts" type="Action"> + <fieldref>totalActions</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">KeyBehaviors</enumref> + <list name="behaviors_rtrn" type="SetBehavior"> + <fieldref>totalKeyBehaviors</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualMods</enumref> + <list name="vmods_rtrn" type="CARD8" mask="ModMask"> + <fieldref>nVModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ExplicitComponents</enumref> + <list name="explicit_rtrn" type="SetExplicit"> + <fieldref>totalKeyExplicit</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">ModifierMap</enumref> + <list name="modmap_rtrn" type="KeyModMap"> + <fieldref>totalModMapKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="MapPart">VirtualModMap</enumref> + <list name="vmodmap_rtrn" type="KeyVModMap"> + <fieldref>totalVModMapKeys</fieldref> + </list> + </bitcase> + </switch> + </bitcase> + <bitcase name="indicator_maps"> + <enumref ref="GBNDetail">IndicatorMaps</enumref> + <field name="indicatorDeviceID" type="CARD8" /> + <field name="which" type="CARD32" /> + <field name="realIndicators" type="CARD32" /> + <field name="nIndicators" type="CARD8" /> + <pad bytes="15" /> + <list name="maps" type="IndicatorMap"> + <fieldref>nIndicators</fieldref> + </list> + </bitcase> + <bitcase name="key_names"> + <enumref ref="GBNDetail">KeyNames</enumref> + <field name="keyDeviceID" type="CARD8" /> + <field name="which" type="CARD32" mask="NameDetail" /> + <field name="keyMinKeyCode" type="KEYCODE" /> + <field name="keyMaxKeyCode" type="KEYCODE" /> + <field name="nTypes" type="CARD8" /> + <field name="groupNames" type="CARD8" mask="SetOfGroup" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <field name="firstKey" type="KEYCODE" /> + <field name="nKeys" type="CARD8" /> + <field name="indicators" type="CARD32" /> + <field name="nRadioGroups" type="CARD8" /> + <field name="nKeyAliases" type="CARD8" /> + <field name="nKTLevels" type="CARD16" /> + <pad bytes="4" /> + <switch name="valueList"> + <fieldref>which</fieldref> + <bitcase> + <enumref ref="NameDetail">Keycodes</enumref> + <field name="keycodesName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Geometry</enumref> + <field name="geometryName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Symbols</enumref> + <field name="symbolsName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">PhysSymbols</enumref> + <field name="physSymbolsName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Types</enumref> + <field name="typesName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Compat</enumref> + <field name="compatName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyTypeNames</enumref> + <list name="typeNames" type="ATOM"> + <fieldref>nTypes</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KTLevelNames</enumref> + <list name="nLevelsPerType" type="CARD8"> + <fieldref>nKTLevels</fieldref> + </list> + <list name="ktLevelNames" type="ATOM"> + <sumof ref="nLevelsPerType" /> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">IndicatorNames</enumref> + <list name="indicatorNames" type="ATOM"> + <popcount> + <fieldref>indicators</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">VirtualModNames</enumref> + <list name="virtualModNames" type="ATOM"> + <popcount> + <fieldref>virtualMods</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">GroupNames</enumref> + <list name="groups" type="ATOM"> + <popcount> + <fieldref>groupNames</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyNames</enumref> + <list name="keyNames" type="KeyName"> + <fieldref>nKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyAliases</enumref> + <list name="keyAliases" type="KeyAlias"> + <fieldref>nKeyAliases</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">RGNames</enumref> + <list name="radioGroupNames" type="ATOM"> + <fieldref>nRadioGroups</fieldref> + </list> + </bitcase> + </switch> + </bitcase> + <bitcase name="other_names"> + <enumref ref="GBNDetail">OtherNames</enumref> + <field name="otherDeviceID" type="CARD8" /> + <field name="which" type="CARD32" mask="NameDetail" /> + <field name="otherMinKeyCode" type="KEYCODE" /> + <field name="otherMaxKeyCode" type="KEYCODE" /> + <field name="nTypes" type="CARD8" /> + <field name="groupNames" type="CARD8" mask="SetOfGroup" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <field name="firstKey" type="KEYCODE" /> + <field name="nKeys" type="CARD8" /> + <field name="indicators" type="CARD32" /> + <field name="nRadioGroups" type="CARD8" /> + <field name="nKeyAliases" type="CARD8" /> + <field name="nKTLevels" type="CARD16" /> + <pad bytes="4" /> + <switch name="valueList"> + <fieldref>which</fieldref> + <bitcase> + <enumref ref="NameDetail">Keycodes</enumref> + <field name="keycodesName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Geometry</enumref> + <field name="geometryName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Symbols</enumref> + <field name="symbolsName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">PhysSymbols</enumref> + <field name="physSymbolsName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Types</enumref> + <field name="typesName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">Compat</enumref> + <field name="compatName" type="ATOM" /> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyTypeNames</enumref> + <list name="typeNames" type="ATOM"> + <fieldref>nTypes</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KTLevelNames</enumref> + <list name="nLevelsPerType" type="CARD8"> + <fieldref>nKTLevels</fieldref> + </list> + <list name="ktLevelNames" type="ATOM"> + <sumof ref="nLevelsPerType" /> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">IndicatorNames</enumref> + <list name="indicatorNames" type="ATOM"> + <popcount> + <fieldref>indicators</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">VirtualModNames</enumref> + <list name="virtualModNames" type="ATOM"> + <popcount> + <fieldref>virtualMods</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">GroupNames</enumref> + <list name="groups" type="ATOM"> + <popcount> + <fieldref>groupNames</fieldref> + </popcount> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyNames</enumref> + <list name="keyNames" type="KeyName"> + <fieldref>nKeys</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">KeyAliases</enumref> + <list name="keyAliases" type="KeyAlias"> + <fieldref>nKeyAliases</fieldref> + </list> + </bitcase> + <bitcase> + <enumref ref="NameDetail">RGNames</enumref> + <list name="radioGroupNames" type="ATOM"> + <fieldref>nRadioGroups</fieldref> + </list> + </bitcase> + </switch> + </bitcase> + <bitcase name="geometry"> + <enumref ref="GBNDetail">Geometry</enumref> + <field name="geometryDeviceID" type="CARD8" /> + <field name="name" type="ATOM" /> + <field name="geometryFound" type="BOOL" /> + <pad bytes="1" /> + <field name="widthMM" type="CARD16" /> + <field name="heightMM" type="CARD16" /> + <field name="nProperties" type="CARD16" /> + <field name="nColors" type="CARD16" /> + <field name="nShapes" type="CARD16" /> + <field name="nSections" type="CARD16" /> + <field name="nDoodads" type="CARD16" /> + <field name="nKeyAliases" type="CARD16" /> + <field name="baseColorNdx" type="CARD8" /> + <field name="labelColorNdx" type="CARD8" /> + <field name="labelFont" type="CountedString16" /> + <list name="properties" type="Property"> + <fieldref>nProperties</fieldref> + </list> + <list name="colors" type="CountedString16"> + <fieldref>nColors</fieldref> + </list> + <list name="shapes" type="Shape"> + <fieldref>nShapes</fieldref> + </list> + <list name="sections" type="Section"> + <fieldref>nSections</fieldref> + </list> + <list name="doodads" type="Doodad"> + <fieldref>nDoodads</fieldref> + </list> + <list name="keyAliases" type="KeyAlias"> + <fieldref>nKeyAliases</fieldref> + </list> + </bitcase> + </switch> + </reply> + </request> + + <request name="GetDeviceInfo" opcode="24"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="wanted" type="CARD16" mask="XIFeature" /> + <field name="allButtons" type="BOOL" /> + <field name="firstButton" type="CARD8" /> + <field name="nButtons" type="CARD8" /> + <pad bytes="1" /> + <field name="ledClass" type="LedClassSpec" enum="LedClass" /> + <field name="ledID" type="IDSpec" altenum="ID" /> + <reply> + <field name="deviceID" type="CARD8" /> + <field name="present" type="CARD16" mask="XIFeature" /> + <field name="supported" type="CARD16" mask="XIFeature" /> + <field name="unsupported" type="CARD16" mask="XIFeature" /> + <field name="nDeviceLedFBs" type="CARD16" /> + <field name="firstBtnWanted" type="CARD8" /> + <field name="nBtnsWanted" type="CARD8" /> + <field name="firstBtnRtrn" type="CARD8" /> + <field name="nBtnsRtrn" type="CARD8" /> + <field name="totalBtns" type="CARD8" /> + <field name="hasOwnState" type="BOOL" /> + <field name="dfltKbdFB" type="CARD16" altenum="ID" /> + <field name="dfltLedFB" type="CARD16" altenum="ID" /> + <pad bytes="2" /> + <field name="devType" type="ATOM" /> + <field name="nameLen" type="CARD16" /> + <list name="name" type="STRING8"> + <fieldref>nameLen</fieldref> + </list> + <list name="btnActions" type="Action"> + <fieldref>nBtnsRtrn</fieldref> + </list> + <list name="leds" type="DeviceLedInfo"> + <fieldref>nDeviceLedFBs</fieldref> + </list> + </reply> + </request> + + + <request name="SetDeviceInfo" opcode="25"> + <field name="deviceSpec" type="DeviceSpec" /> + <field name="firstBtn" type="CARD8" /> + <field name="nBtns" type="CARD8" /> + <field name="change" type="CARD16" mask="XIFeature" /> + <field name="nDeviceLedFBs" type="CARD16" /> + <list name="btnActions" type="Action"> + <fieldref>nBtns</fieldref> + </list> + <list name="leds" type="DeviceLedInfo"> + <fieldref>nDeviceLedFBs</fieldref> + </list> + </request> + + <request name="SetDebuggingFlags" opcode="101"> + <field name="msgLength" type="CARD16" /> + <pad bytes="2" /> + <field name="affectFlags" type="CARD32" /> + <field name="flags" type="CARD32" /> + <field name="affectCtrls" type="CARD32" /> + <field name="ctrls" type="CARD32" /> + <list name="message" type="STRING8"> + <fieldref>msgLength</fieldref> + </list> + <reply> + <pad bytes="1" /> + <field name="currentFlags" type="CARD32" /> + <field name="currentCtrls" type="CARD32" /> + <field name="supportedFlags" type="CARD32" /> + <field name="supportedCtrls" type="CARD32" /> + <pad bytes="8" /> + </reply> + </request> + + <!-- Events --> + + <event name="NewKeyboardNotify" number="0"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <field name="oldDeviceID" type="CARD8" /> + <field name="minKeyCode" type="KEYCODE" /> + <field name="maxKeyCode" type="KEYCODE" /> + <field name="oldMinKeyCode" type="KEYCODE" /> + <field name="oldMaxKeyCode" type="KEYCODE" /> + <field name="requestMajor" type="CARD8" /> + <field name="requestMinor" type="CARD8" /> + <field name="changed" type="CARD16" mask="NKNDetail" /> + <pad bytes="14" /> + </event> + + <event name="MapNotify" number="1"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <field name="ptrBtnActions" type="CARD8" /> + <field name="changed" type="CARD16" mask="MapPart" /> + <field name="minKeyCode" type="KEYCODE" /> + <field name="maxKeyCode" type="KEYCODE" /> + <field name="firstType" type="CARD8" /> + <field name="nTypes" type="CARD8" /> + <field name="firstKeySym" type="KEYCODE" /> + <field name="nKeySyms" type="CARD8" /> + <field name="firstKeyAct" type="KEYCODE" /> + <field name="nKeyActs" type="CARD8" /> + <field name="firstKeyBehavior" type="KEYCODE" /> + <field name="nKeyBehavior" type="CARD8" /> + <field name="firstKeyExplicit" type="KEYCODE" /> + <field name="nKeyExplicit" type="CARD8" /> + <field name="firstModMapKey" type="KEYCODE" /> + <field name="nModMapKeys" type="CARD8" /> + <field name="firstVModMapKey" type="KEYCODE" /> + <field name="nVModMapKeys" type="CARD8" /> + <field name="virtualMods" type="CARD16" mask="VMod" /> + <pad bytes="2" /> + </event> + + <event name="StateNotify" number="2"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <field name="mods" type="CARD8" mask="ModMask" /> + <field name="baseMods" type="CARD8" mask="ModMask" /> + <field name="latchedMods" type="CARD8" mask="ModMask" /> + <field name="lockedMods" type="CARD8" mask="ModMask" /> + <field name="group" type="CARD8" enum="Group" /> + <field name="baseGroup" type="INT16" /> + <field name="latchedGroup" type="INT16" /> + <field name="lockedGroup" type="CARD8" enum="Group" /> + <field name="compatState" type="CARD8" mask="ModMask" /> + <field name="grabMods" type="CARD8" mask="ModMask" /> + <field name="compatGrabMods" type="CARD8" mask="ModMask" /> + <field name="lookupMods" type="CARD8" mask="ModMask" /> + <field name="compatLoockupMods" type="CARD8" mask="ModMask" /> + <field name="ptrBtnState" type="CARD16" mask="KeyButMask" /> + <field name="changed" type="CARD16" mask="StatePart" /> + <field name="keycode" type="KEYCODE" /> + <field name="eventType" type="CARD8" /> + <field name="requestMajor" type="CARD8" /> + <field name="requestMinor" type="CARD8" /> + </event> + + <event name="ControlsNotify" number="3"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <field name="numGroups" type="CARD8" /> + <pad bytes="2" /> + <field name="changedControls" type="CARD32" mask="Control" /> + <field name="enabledControls" type="CARD32" mask="BoolCtrl" /> + <field name="enabledControlChanges" type="CARD32" mask="BoolCtrl" /> + <field name="keycode" type="KEYCODE" /> + <field name="eventType" type="CARD8" /> + <field name="requestMajor" type="CARD8" /> + <field name="requestMinor" type="CARD8" /> + <pad bytes="4" /> + </event> + + <event name="IndicatorStateNotify" number="4"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <pad bytes="3" /> + <field name="state" type="CARD32" /> + <field name="stateChanged" type="CARD32" /> + <pad bytes="12" /> + </event> + + <event name="IndicatorMapNotify" number="5"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <pad bytes="3" /> + <field name="state" type="CARD32" /> + <field name="mapChanged" type="CARD32" /> + <pad bytes="12" /> + </event> + + <event name="NamesNotify" number="6"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <pad bytes="1" /> + <field name="changed" type="CARD16" mask="NameDetail" /> + <field name="firstType" type="CARD8" /> + <field name="nTypes" type="CARD8" /> + <field name="firstLevelName" type="CARD8" /> + <field name="nLevelNames" type="CARD8" /> + <pad bytes="1" /> + <field name="nRadioGroups" type="CARD8" /> + <field name="nKeyAliases" type="CARD8" /> + <field name="changedGroupNames" type="CARD8" mask="SetOfGroup" /> + <field name="changedVirtualMods" type="CARD16" mask="VMod" /> + <field name="firstKey" type="KEYCODE" /> + <field name="nKeys" type="CARD8" /> + <field name="changedIndicators" type="CARD32" /> + <pad bytes="4" /> + </event> + + <event name="CompatMapNotify" number="7"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <field name="changedGroups" type="CARD8" mask="SetOfGroup" /> + <field name="firstSI" type="CARD16" /> + <field name="nSI" type="CARD16" /> + <field name="nTotalSI" type="CARD16" /> + <pad bytes="16" /> + </event> + + <event name="BellNotify" number="8"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <field name="bellClass" type="CARD8" enum="BellClassResult" /> + <field name="bellID" type="CARD8" /> + <field name="percent" type="CARD8" /> + <field name="pitch" type="CARD16" /> + <field name="duration" type="CARD16" /> + <field name="name" type="ATOM" /> + <field name="window" type="WINDOW" /> + <field name="eventOnly" type="BOOL" /> + <pad bytes="7" /> + </event> + + <event name="ActionMessage" number="9"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <field name="keycode" type="KEYCODE" /> + <field name="press" type="BOOL" /> + <field name="keyEventFollows" type="BOOL" /> + <field name="mods" type="CARD8" mask="ModMask" /> + <field name="group" type="CARD8" enum="Group" /> + <list name="message" type="STRING8"> + <value>8</value> + </list> + <pad bytes="10" /> + </event> + + <event name="AccessXNotify" number="10"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <field name="keycode" type="KEYCODE" /> + <field name="detailt" type="CARD16" mask="AXNDetail" /> + <field name="slowKeysDelay" type="CARD16" /> + <field name="debounceDelay" type="CARD16" /> + <pad bytes="16" /> + </event> + + <event name="ExtensionDeviceNotify" number="11"> + <field name="time" type="TIMESTAMP" /> + <field name="deviceID" type="CARD8" /> + <pad bytes="1" /> + <field name="reason" type="CARD16" mask="XIFeature" /> + <field name="ledClass" type="CARD16" enum="LedClassResult" /> + <field name="ledID" type="CARD8" /> + <field name="ledsDefined" type="CARD32" /> + <field name="ledState" type="CARD32" /> + <field name="firstButton" type="CARD8" /> + <field name="nButtons" type="CARD8" /> + <field name="supported" type="CARD16" mask="XIFeature" /> + <field name="unsupported" type="CARD16" mask="XIFeature" /> + <pad bytes="2" /> + </event> +</xcb> diff --git a/libxcb/xcb-proto/src/xproto.xml b/libxcb/xcb-proto/src/xproto.xml index cbb5fa2db..42a6852a1 100644 --- a/libxcb/xcb-proto/src/xproto.xml +++ b/libxcb/xcb-proto/src/xproto.xml @@ -1482,7 +1482,10 @@ authorization from the authors. <request name="SetFontPath" opcode="51"> <pad bytes="1" /> <field type="CARD16" name="font_qty" /> - <list type="char" name="path" /> + <pad bytes="2" /> + <list type="STR" name="font"> + <fieldref>font_qty</fieldref> + </list> </request> <request name="GetFontPath" opcode="52"> @@ -2295,7 +2298,7 @@ authorization from the authors. <field type="CARD8" name="family" enum="Family" /> <pad bytes="1" /> <field type="CARD16" name="address_len" /> - <list type="char" name="address"> + <list type="BYTE" name="address"> <fieldref>address_len</fieldref> </list> </request> |