From 21bd66e1ea06e466754ab06ee2c5f8b737bb4bd7 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 29 Oct 2012 12:59:09 +0100 Subject: Add configure option to minimize xcb runtime dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of the xcb- libraries we depend upon are not (yet) common across distributions. This is problematic for binaries that should be working on different distributions. The patch mitigates this by: Adding the files from libxcb-proto (version 0.1.6), compiled with libxcb-1.5 xcb-util (version 0.3.9) xcb-util-image (version 0.3.9) xcb-util-keysyms (version 0.3.9) xcb-util-renderutil (version 0.3.8) xcb-util-wm (version 0.3.9) from xcb.freedesktop.org/dist to src/3rdparty/xcb. Adding a configure option '-qt-xcb' to use the sources instead of linking to the respective runtime libraries. Task-number: QTBUG-27803 Change-Id: I6ea87daa382871b2b9072a601511523fa0b9f44b Reviewed-by: Samuel Rødal --- src/3rdparty/xcb/include/xcb/xcb_keysyms.h | 71 ++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/3rdparty/xcb/include/xcb/xcb_keysyms.h (limited to 'src/3rdparty/xcb/include/xcb/xcb_keysyms.h') diff --git a/src/3rdparty/xcb/include/xcb/xcb_keysyms.h b/src/3rdparty/xcb/include/xcb/xcb_keysyms.h new file mode 100644 index 0000000000..9d34a50ad1 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_keysyms.h @@ -0,0 +1,71 @@ +#ifndef __XCB_KEYSYMS_H__ +#define __XCB_KEYSYMS_H__ + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef struct _XCBKeySymbols xcb_key_symbols_t; + +xcb_key_symbols_t *xcb_key_symbols_alloc (xcb_connection_t *c); + +void xcb_key_symbols_free (xcb_key_symbols_t *syms); + +xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms, + xcb_keycode_t keycode, + int col); + +/** + * @brief Get the keycodes attached to a keysyms. + * There can be several value, so what is returned is an array of keycode + * terminated by XCB_NO_SYMBOL. You are responsible to free it. + * Be aware that this function can be slow. It will convert all + * combinations of all available keycodes to keysyms to find the ones that + * match. + * @param syms Key symbols. + * @param keysym The keysym to look for. + * @return A XCB_NO_SYMBOL terminated array of keycode, or NULL if nothing is found. + */ +xcb_keycode_t * xcb_key_symbols_get_keycode(xcb_key_symbols_t *syms, + xcb_keysym_t keysym); + +xcb_keysym_t xcb_key_press_lookup_keysym (xcb_key_symbols_t *syms, + xcb_key_press_event_t *event, + int col); + +xcb_keysym_t xcb_key_release_lookup_keysym (xcb_key_symbols_t *syms, + xcb_key_release_event_t *event, + int col); + +int xcb_refresh_keyboard_mapping (xcb_key_symbols_t *syms, + xcb_mapping_notify_event_t *event); + +/* TODO: need XLookupString equivalent */ + +/* Tests for classes of symbols */ + +int xcb_is_keypad_key (xcb_keysym_t keysym); + +int xcb_is_private_keypad_key (xcb_keysym_t keysym); + +int xcb_is_cursor_key (xcb_keysym_t keysym); + +int xcb_is_pf_key (xcb_keysym_t keysym); + +int xcb_is_function_key (xcb_keysym_t keysym); + +int xcb_is_misc_function_key (xcb_keysym_t keysym); + +int xcb_is_modifier_key (xcb_keysym_t keysym); + + +#ifdef __cplusplus +} +#endif + + +#endif /* __XCB_KEYSYMS_H__ */ -- cgit v1.2.3