This essentially requires to have a correct sizeof-function for the struct. This in turn requires a sizeof-function for the switch, too. Making a sizeof-function for the switch is triggered by replacing "elif" by "if" in the first change of this patch. This way, c_need_sizeof is also set to True for switches if appropriate. The _c_serialize_helper_switch_field function has to support the context "sizeof": This is done in the second change of this patch The third change of this patch fixes an alignment error: It does not make sense to base the padding on the struct-type which is generated for switch because this struct does not represent the protocol. Rather it is the output of deserialization. ( The implicit padding for var-sized fields has other issues, IMHO, but I am not touching these now...) The effect on the generated code for the current xml-files is as follows: * several additional sizeof-functions are generated * the fix of the alignment error only changes one place in the XKB-extension for the GetKbdByName-reply. This is no problem because that reply in its current form is broken/unfinished anyways. Note: This patch also fixes a problem in the generator when a fixed-size list is the last field of a case or bitcase. Message-ID: <1408653356-21191-2-git-send-email-chris@demorecorder.com> Patch-Thread-Subject: [Xcb] xinput:QueryDeviceState: full-support: generator and xml-changes Patch-Set: QueryDeviceState Patch-Number: libxcb 2/3 Patch-Version: V1 Signed-off-by: Christian Linhart <chris@DemoRecorder.com> Reviewed-By: Ran Benita <ran234@gmail.com> |
||
---|---|---|
doc | ||
m4 | ||
man | ||
src | ||
tests | ||
tools | ||
.autom4te.cfg | ||
.gitignore | ||
COPYING | ||
Makefile.am | ||
NEWS | ||
README | ||
autogen.sh | ||
check-pc-requires | ||
configure.ac | ||
xcb-composite.pc.in | ||
xcb-damage.pc.in | ||
xcb-dpms.pc.in | ||
xcb-dri2.pc.in | ||
xcb-dri3.pc.in | ||
xcb-glx.pc.in | ||
xcb-present.pc.in | ||
xcb-randr.pc.in | ||
xcb-record.pc.in | ||
xcb-render.pc.in | ||
xcb-res.pc.in | ||
xcb-screensaver.pc.in | ||
xcb-shape.pc.in | ||
xcb-shm.pc.in | ||
xcb-sync.pc.in | ||
xcb-xevie.pc.in | ||
xcb-xf86dri.pc.in | ||
xcb-xfixes.pc.in | ||
xcb-xinerama.pc.in | ||
xcb-xinput.pc.in | ||
xcb-xkb.pc.in | ||
xcb-xprint.pc.in | ||
xcb-xselinux.pc.in | ||
xcb-xtest.pc.in | ||
xcb-xv.pc.in | ||
xcb-xvmc.pc.in | ||
xcb.pc.in |
About libxcb ============ libxcb provides an interface to the X Window System protocol, which replaces the current Xlib interface. It has several advantages over Xlib, including: - size: small, simple library, and lower memory footprint - latency hiding: batch several requests and wait for the replies later - direct protocol access: interface and protocol correspond exactly - proven thread support: transparently access XCB from multiple threads - easy extension implementation: interfaces auto-generated from XML-XCB Xlib can also use XCB as a transport layer, allowing software to make requests and receive responses with both, which eases porting to XCB. However, client programs, libraries, and toolkits will gain the most benefit from a native XCB port. Please report any issues you find to the freedesktop.org bug tracker, at: <https://bugs.freedesktop.org/enter_bug.cgi?product=XCB> Discussion about XCB occurs on the XCB mailing list: <mailto:xcb at lists.freedesktop.org> <http://lists.freedesktop.org/mailman/listinfo/xcb> You can obtain the latest development versions of XCB using GIT. For anonymous checkouts, use: git clone git://anongit.freedesktop.org/git/xcb/libxcb For developers, use: git clone git+ssh://git.freedesktop.org/git/xcb/libxcb