summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/sqlite/shell.c97
-rw-r--r--src/3rdparty/sqlite/sqlite3.c3154
-rw-r--r--src/3rdparty/sqlite/sqlite3.h109
-rw-r--r--src/3rdparty/xcb/README1
-rw-r--r--src/3rdparty/xcb/include/xcb/xkb.h14871
-rw-r--r--src/3rdparty/xcb/libxcb/xkb.c22021
-rw-r--r--src/3rdparty/xcb/libxcb/xkb.patch172
-rw-r--r--src/3rdparty/xkbcommon.pri40
-rw-r--r--src/3rdparty/xkbcommon/COPYING188
-rw-r--r--src/3rdparty/xkbcommon/README119
-rw-r--r--src/3rdparty/xkbcommon/src/atom.c248
-rw-r--r--src/3rdparty/xkbcommon/src/atom.h52
-rw-r--r--src/3rdparty/xkbcommon/src/context.c492
-rw-r--r--src/3rdparty/xkbcommon/src/context.h124
-rw-r--r--src/3rdparty/xkbcommon/src/darray.h388
-rw-r--r--src/3rdparty/xkbcommon/src/keymap.h451
-rw-r--r--src/3rdparty/xkbcommon/src/keysym-utf.c971
-rw-r--r--src/3rdparty/xkbcommon/src/keysym.c720
-rw-r--r--src/3rdparty/xkbcommon/src/keysym.h62
-rw-r--r--src/3rdparty/xkbcommon/src/ks_tables.h4681
-rw-r--r--src/3rdparty/xkbcommon/src/state.c1144
-rw-r--r--src/3rdparty/xkbcommon/src/text.c357
-rw-r--r--src/3rdparty/xkbcommon/src/text.h78
-rw-r--r--src/3rdparty/xkbcommon/src/utils.h136
-rw-r--r--src/3rdparty/xkbcommon/src/xkb-compat.c189
-rw-r--r--src/3rdparty/xkbcommon/src/xkb-keymap.c555
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/action.c951
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/action.h53
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/ast-build.c793
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/ast-build.h104
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/ast.h295
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/compat.c1078
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/expr.c685
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/expr.h83
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/include.c289
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/include.h42
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/keycodes.c692
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/keymap-dump.c662
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/keymap.c333
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/parser-priv.h47
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/parser.c3674
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/parser.h230
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/rules.c1231
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/rules.h32
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/scanner.c2861
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/symbols.c1638
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/types.c842
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/vmod.c69
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/vmod.h33
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-priv.h130
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp.c171
-rw-r--r--src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compat.h94
-rw-r--r--src/3rdparty/xkbcommon/xkbcommon/xkbcommon-keysyms.h3004
-rw-r--r--src/3rdparty/xkbcommon/xkbcommon/xkbcommon-names.h44
-rw-r--r--src/3rdparty/xkbcommon/xkbcommon/xkbcommon.h1495
-rw-r--r--src/3rdparty/xkbcommon/xkbcommon/xkbcommon_workaround.h (renamed from src/plugins/platforminputcontexts/compose/xkbcommon_workaround.h)0
-rw-r--r--src/android/java/res/values/libs.xml2
-rw-r--r--src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java3
-rw-r--r--src/corelib/Qt5Config.cmake.in2
-rw-r--r--src/corelib/Qt5CoreConfigExtras.cmake.in49
-rw-r--r--src/corelib/codecs/qtextcodec.cpp4
-rw-r--r--src/corelib/global/qcompilerdetection.h6
-rw-r--r--src/corelib/global/qflags.h15
-rw-r--r--src/corelib/global/qglobal.cpp44
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/corelib/global/qlibraryinfo.cpp1
-rw-r--r--src/corelib/global/qlibraryinfo.h1
-rw-r--r--src/corelib/global/qlogging.h20
-rw-r--r--src/corelib/global/qnamespace.h3
-rw-r--r--src/corelib/global/qnamespace.qdoc6
-rw-r--r--src/corelib/global/qsysinfo.h2
-rw-r--r--src/corelib/global/qsystemdetection.h8
-rw-r--r--src/corelib/io/qdatastream.cpp7
-rw-r--r--src/corelib/io/qdatastream.h2
-rw-r--r--src/corelib/io/qdebug.h2
-rw-r--r--src/corelib/io/qfile.cpp43
-rw-r--r--src/corelib/io/qfilesystemengine.cpp2
-rw-r--r--src/corelib/io/qfilesystemengine_p.h2
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp16
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h4
-rw-r--r--src/corelib/io/qprocess.cpp38
-rw-r--r--src/corelib/io/qprocess.h2
-rw-r--r--src/corelib/io/qprocess_p.h44
-rw-r--r--src/corelib/io/qprocess_unix.cpp6
-rw-r--r--src/corelib/io/qprocess_win.cpp22
-rw-r--r--src/corelib/io/qprocess_wince.cpp5
-rw-r--r--src/corelib/io/qresource.cpp2
-rw-r--r--src/corelib/io/qurl.cpp2
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h2
-rw-r--r--src/corelib/json/qjson.cpp11
-rw-r--r--src/corelib/json/qjson_p.h5
-rw-r--r--src/corelib/json/qjsonarray.cpp24
-rw-r--r--src/corelib/json/qjsondocument.h3
-rw-r--r--src/corelib/json/qjsonobject.cpp16
-rw-r--r--src/corelib/json/qjsonparser.cpp21
-rw-r--r--src/corelib/kernel/qcorecmdlineargs_p.h7
-rw-r--r--src/corelib/kernel/qeventdispatcher_blackberry.cpp1
-rw-r--r--src/corelib/kernel/qobject.cpp10
-rw-r--r--src/corelib/thread/qthreadpool.cpp2
-rw-r--r--src/corelib/tools/qdatetime.cpp7
-rw-r--r--src/corelib/tools/qhash.cpp25
-rw-r--r--src/corelib/tools/qhash.h1
-rw-r--r--src/corelib/tools/qlocale.cpp13
-rw-r--r--src/corelib/tools/qlocale_p.h3
-rw-r--r--src/corelib/tools/qsharedpointer.cpp2
-rw-r--r--src/corelib/tools/qstring.h8
-rw-r--r--src/dbus/Qt5DBusConfigExtras.cmake.in18
-rw-r--r--src/dbus/dbus.pro4
-rw-r--r--src/dbus/qdbusunixfiledescriptor.cpp2
-rw-r--r--src/dbus/qdbusunixfiledescriptor.h2
-rw-r--r--src/gui/Qt5GuiConfigExtras.cmake.in33
-rw-r--r--src/gui/doc/qtgui.qdocconf3
-rw-r--r--src/gui/gui.pro8
-rw-r--r--src/gui/image/qpixmap.cpp15
-rw-r--r--src/gui/kernel/qguiapplication.cpp13
-rw-r--r--src/gui/kernel/qguiapplication_p.h1
-rw-r--r--src/gui/kernel/qkeysequence.cpp32
-rw-r--r--src/gui/kernel/qpalette.cpp4
-rw-r--r--src/gui/kernel/qplatformwindow.cpp3
-rw-r--r--src/gui/kernel/qwindow.cpp43
-rw-r--r--src/gui/kernel/qwindow.h1
-rw-r--r--src/gui/kernel/qwindow_p.h2
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp7
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h1
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h13
-rw-r--r--src/gui/opengl/qopenglfunctions_1_0.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_1_1.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_1_2.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_1_3.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_1_4.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_1_5.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_2_0.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_2_1.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_3_0.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_3_1.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_3_2_core.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_3_3_core.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_4_0_core.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_4_2_core.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_4_3_core.cpp1
-rw-r--r--src/gui/opengl/qopenglfunctions_es2.cpp1
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp10
-rw-r--r--src/gui/painting/qdrawhelper.cpp1
-rw-r--r--src/gui/painting/qpaintengine.cpp2
-rw-r--r--src/gui/painting/qpaintengine.h3
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp3
-rw-r--r--src/gui/painting/qpainter.cpp17
-rw-r--r--src/gui/painting/qrgb.h18
-rw-r--r--src/gui/text/qfont.h1
-rw-r--r--src/gui/text/qfontengine_p.h2
-rw-r--r--src/gui/text/qfontmetrics.cpp19
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp15
-rw-r--r--src/gui/text/qtextlayout.h1
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp4
-rw-r--r--src/network/kernel/qnetworkinterface.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp6
-rw-r--r--src/network/ssl/qsslsocket_p.h4
-rw-r--r--src/network/ssl/ssl.pri6
-rw-r--r--src/opengl/doc/qtopengl.qdocconf2
-rw-r--r--src/opengl/qgl.cpp7
-rw-r--r--src/opengl/qgl_p.h4
-rw-r--r--src/opengl/qgl_qpa.cpp9
-rw-r--r--src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp1
-rw-r--r--src/platformsupport/cglconvenience/cglconvenience.pri2
-rw-r--r--src/platformsupport/devicediscovery/devicediscovery.pri2
-rw-r--r--src/platformsupport/dnd/qsimpledrag.cpp8
-rw-r--r--src/platformsupport/dnd/qsimpledrag_p.h2
-rw-r--r--src/platformsupport/fbconvenience/qfbbackingstore.cpp5
-rw-r--r--src/platformsupport/fbconvenience/qfbscreen.cpp13
-rw-r--r--src/platformsupport/fbconvenience/qfbscreen_p.h4
-rw-r--r--src/platformsupport/fontdatabases/basic/basic.pri1
-rw-r--r--src/platformsupport/fontdatabases/mac/coretext.pri4
-rw-r--r--src/platformsupport/glxconvenience/glxconvenience.pri2
-rw-r--r--src/platformsupport/input/evdevkeyboard/evdevkeyboard.pri2
-rw-r--r--src/platformsupport/input/evdevmouse/evdevmouse.pri2
-rw-r--r--src/platformsupport/input/evdevtablet/evdevtablet.pri2
-rw-r--r--src/platformsupport/input/evdevtouch/evdevtouch.pri2
-rw-r--r--src/platformsupport/jniconvenience/jniconvenience.pri2
-rw-r--r--src/platformsupport/linuxaccessibility/linuxaccessibility.pri2
-rw-r--r--src/platformsupport/platformsupport.pro6
-rw-r--r--src/plugins/platforminputcontexts/compose/compose.pro13
-rw-r--r--src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp7
-rw-r--r--src/plugins/platforminputcontexts/platforminputcontexts.pro2
-rw-r--r--src/plugins/platforms/android/src/opengl/qeglfshooks_android.cpp7
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm16
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm12
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm1
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm10
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm53
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h2
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm32
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.h2
-rw-r--r--src/plugins/platforms/eglfs/eglfs.pri2
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks_stub.cpp4
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks_x11.cpp160
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp4
-rw-r--r--src/plugins/platforms/eglfs/qeglfsscreen.cpp8
-rw-r--r--src/plugins/platforms/ios/qioscontext.mm3
-rw-r--r--src/plugins/platforms/ios/qioswindow.h7
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm103
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp9
-rw-r--r--src/plugins/platforms/qnx/qnx.pro2
-rw-r--r--src/plugins/platforms/qnx/qqnxbuffer.cpp21
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp30
-rw-r--r--src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp19
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp12
-rw-r--r--src/plugins/platforms/qnx/qqnxnavigatorpps.cpp3
-rw-r--r--src/plugins/platforms/qnx/qqnxrootwindow.cpp60
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp10
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp53
-rw-r--r--src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp15
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp81
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp24
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.h1
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp41
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h3
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp164
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h26
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp14
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp115
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.h7
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp24
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp32
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp909
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.h89
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp10
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h5
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.cpp280
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.h71
-rw-r--r--src/plugins/platforms/xcb/xcb-plugin.pro25
-rw-r--r--src/plugins/platforms/xcb/xcb-static/xcb-static.pro3
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog.cpp3
-rw-r--r--src/printsupport/dialogs/qprintpreviewdialog.cpp11
-rw-r--r--src/printsupport/doc/qtprintsupport.qdocconf6
-rw-r--r--src/printsupport/doc/snippets/widgetprinting.cpp36
-rw-r--r--src/printsupport/doc/src/qtprintsupport-index.qdoc6
-rw-r--r--src/printsupport/widgets/qprintpreviewwidget.cpp2
-rw-r--r--src/sql/doc/src/qsqldatatype-table.qdoc2
-rw-r--r--src/sql/doc/src/sql-driver.qdoc2
-rw-r--r--src/sql/doc/src/sql-programming.qdoc6
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.pri9
-rw-r--r--src/testlib/qtestcase.cpp10
-rw-r--r--src/testlib/qtestlog.cpp10
-rw-r--r--src/tools/moc/generator.cpp4
-rw-r--r--src/tools/moc/moc.cpp5
-rw-r--r--src/tools/moc/parser.cpp4
-rw-r--r--src/tools/qdoc/codeparser.cpp7
-rw-r--r--src/tools/qdoc/config.cpp2
-rw-r--r--src/tools/qdoc/cppcodeparser.cpp18
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp13
-rw-r--r--src/tools/qdoc/doc/config/qdoc.qdocconf3
-rw-r--r--src/tools/qdoc/generator.cpp2
-rw-r--r--src/tools/qdoc/helpprojectwriter.cpp1
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp17
-rw-r--r--src/tools/qdoc/node.cpp12
-rw-r--r--src/tools/qdoc/node.h11
-rw-r--r--src/tools/qdoc/qdocindexfiles.cpp19
-rw-r--r--src/tools/qdoc/qmlcodeparser.cpp5
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp4
-rw-r--r--src/tools/qdoc/text.cpp5
-rw-r--r--src/widgets/Qt5WidgetsConfigExtras.cmake.in9
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp22
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp1
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp6
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp9
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.cpp2
-rw-r--r--src/widgets/itemviews/qitemdelegate.cpp44
-rw-r--r--src/widgets/itemviews/qstyleditemdelegate.cpp44
-rw-r--r--src/widgets/kernel/qapplication.cpp3
-rw-r--r--src/widgets/kernel/qformlayout.cpp4
-rw-r--r--src/widgets/kernel/qformlayout.h2
-rw-r--r--src/widgets/kernel/qlayout.cpp10
-rw-r--r--src/widgets/kernel/qshortcut.cpp10
-rw-r--r--src/widgets/kernel/qstandardgestures.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp16
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp14
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp10
-rw-r--r--src/widgets/styles/qfusionstyle_p_p.h6
-rw-r--r--src/widgets/styles/qgtkstyle_p.cpp4
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm28
-rw-r--r--src/widgets/styles/qstyleoption.cpp2
-rw-r--r--src/widgets/util/qcolormap.h4
-rw-r--r--src/widgets/widgets/qdockwidget.cpp14
-rw-r--r--src/widgets/widgets/qfontcombobox.h1
-rw-r--r--src/widgets/widgets/qmenu.cpp1
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp4
300 files changed, 75476 insertions, 1694 deletions
diff --git a/src/3rdparty/sqlite/shell.c b/src/3rdparty/sqlite/shell.c
index c6d7fa3d53..1be2871fed 100644
--- a/src/3rdparty/sqlite/shell.c
+++ b/src/3rdparty/sqlite/shell.c
@@ -1481,18 +1481,6 @@ static void open_db(struct callback_data *p){
#ifndef SQLITE_OMIT_LOAD_EXTENSION
sqlite3_enable_load_extension(p->db, 1);
#endif
-#ifdef SQLITE_ENABLE_REGEXP
- {
- extern int sqlite3_add_regexp_func(sqlite3*);
- sqlite3_add_regexp_func(db);
- }
-#endif
-#ifdef SQLITE_ENABLE_SPELLFIX
- {
- extern int sqlite3_spellfix1_register(sqlite3*);
- sqlite3_spellfix1_register(db);
- }
-#endif
}
}
@@ -1553,6 +1541,43 @@ static int booleanValue(char *zArg){
}
/*
+** Interpret zArg as an integer value, possibly with suffixes.
+*/
+static sqlite3_int64 integerValue(const char *zArg){
+ sqlite3_int64 v = 0;
+ static const struct { char *zSuffix; int iMult; } aMult[] = {
+ { "KiB", 1024 },
+ { "MiB", 1024*1024 },
+ { "GiB", 1024*1024*1024 },
+ { "KB", 1000 },
+ { "MB", 1000000 },
+ { "GB", 1000000000 },
+ { "K", 1000 },
+ { "M", 1000000 },
+ { "G", 1000000000 },
+ };
+ int i;
+ int isNeg = 0;
+ if( zArg[0]=='-' ){
+ isNeg = 1;
+ zArg++;
+ }else if( zArg[0]=='+' ){
+ zArg++;
+ }
+ while( isdigit(zArg[0]) ){
+ v = v*10 + zArg[0] - '0';
+ zArg++;
+ }
+ for(i=0; i<sizeof(aMult)/sizeof(aMult[0]); i++){
+ if( sqlite3_stricmp(aMult[i].zSuffix, zArg)==0 ){
+ v *= aMult[i].iMult;
+ break;
+ }
+ }
+ return isNeg? -v : v;
+}
+
+/*
** Close an output file, assuming it is not stderr or stdout
*/
static void output_file_close(FILE *f){
@@ -2253,8 +2278,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
" SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) "
"WHERE lower(tbl_name) LIKE shellstatic()"
" AND type!='meta' AND sql NOTNULL "
- "ORDER BY substr(type,2,1), "
- " CASE type WHEN 'view' THEN rowid ELSE name END",
+ "ORDER BY rowid",
callback, &data, &zErrMsg);
zShellStatic = 0;
}
@@ -2265,8 +2289,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
" FROM sqlite_master UNION ALL"
" SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) "
"WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%'"
- "ORDER BY substr(type,2,1),"
- " CASE type WHEN 'view' THEN rowid ELSE name END",
+ "ORDER BY rowid",
callback, &data, &zErrMsg
);
}
@@ -2388,9 +2411,9 @@ static int do_meta_command(char *zLine, struct callback_data *p){
for(i=0; i<nPrintRow; i++){
for(j=i; j<nRow; j+=nPrintRow){
char *zSp = j<nPrintRow ? "" : " ";
- printf("%s%-*s", zSp, maxlen, azResult[j] ? azResult[j] : "");
+ fprintf(p->out, "%s%-*s", zSp, maxlen, azResult[j] ? azResult[j] : "");
}
- printf("\n");
+ fprintf(p->out, "\n");
}
}
for(ii=0; ii<nRow; ii++) sqlite3_free(azResult[ii]);
@@ -2447,7 +2470,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
if( nArg==3 ){
int opt = (int)strtol(azArg[2], 0, 0);
rc = sqlite3_test_control(testctrl, p->db, opt);
- printf("%d (0x%08x)\n", rc, rc);
+ fprintf(p->out, "%d (0x%08x)\n", rc, rc);
} else {
fprintf(stderr,"Error: testctrl %s takes a single int option\n",
azArg[1]);
@@ -2460,7 +2483,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
case SQLITE_TESTCTRL_PRNG_RESET:
if( nArg==2 ){
rc = sqlite3_test_control(testctrl);
- printf("%d (0x%08x)\n", rc, rc);
+ fprintf(p->out, "%d (0x%08x)\n", rc, rc);
} else {
fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
}
@@ -2469,9 +2492,9 @@ static int do_meta_command(char *zLine, struct callback_data *p){
/* sqlite3_test_control(int, uint) */
case SQLITE_TESTCTRL_PENDING_BYTE:
if( nArg==3 ){
- unsigned int opt = (unsigned int)atoi(azArg[2]);
+ unsigned int opt = (unsigned int)integerValue(azArg[2]);
rc = sqlite3_test_control(testctrl, opt);
- printf("%d (0x%08x)\n", rc, rc);
+ fprintf(p->out, "%d (0x%08x)\n", rc, rc);
} else {
fprintf(stderr,"Error: testctrl %s takes a single unsigned"
" int option\n", azArg[1]);
@@ -2484,7 +2507,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
if( nArg==3 ){
int opt = atoi(azArg[2]);
rc = sqlite3_test_control(testctrl, opt);
- printf("%d (0x%08x)\n", rc, rc);
+ fprintf(p->out, "%d (0x%08x)\n", rc, rc);
} else {
fprintf(stderr,"Error: testctrl %s takes a single int option\n",
azArg[1]);
@@ -2497,7 +2520,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
if( nArg==3 ){
const char *opt = azArg[2];
rc = sqlite3_test_control(testctrl, opt);
- printf("%d (0x%08x)\n", rc, rc);
+ fprintf(p->out, "%d (0x%08x)\n", rc, rc);
} else {
fprintf(stderr,"Error: testctrl %s takes a single char * option\n",
azArg[1]);
@@ -2542,7 +2565,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
}else
if( c=='v' && strncmp(azArg[0], "version", n)==0 ){
- printf("SQLite %s %s\n" /*extra-version-info*/,
+ fprintf(p->out, "SQLite %s %s\n" /*extra-version-info*/,
sqlite3_libversion(), sqlite3_sourceid());
}else
@@ -2552,7 +2575,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
if( p->db ){
sqlite3_file_control(p->db, zDbName, SQLITE_FCNTL_VFSNAME, &zVfsName);
if( zVfsName ){
- printf("%s\n", zVfsName);
+ fprintf(p->out, "%s\n", zVfsName);
sqlite3_free(zVfsName);
}
}
@@ -2561,7 +2584,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
#if defined(SQLITE_DEBUG) && defined(SQLITE_ENABLE_WHERETRACE)
if( c=='w' && strncmp(azArg[0], "wheretrace", n)==0 ){
extern int sqlite3WhereTrace;
- sqlite3WhereTrace = atoi(azArg[1]);
+ sqlite3WhereTrace = booleanValue(azArg[1]);
}else
#endif
@@ -2747,6 +2770,10 @@ static int process_input(struct callback_data *p, FILE *in){
free(zSql);
zSql = 0;
nSql = 0;
+ }else if( zSql && _all_whitespace(zSql) ){
+ free(zSql);
+ zSql = 0;
+ nSql = 0;
}
}
if( zSql ){
@@ -2882,6 +2909,7 @@ static const char zOptions[] =
" -interactive force interactive I/O\n"
" -line set output mode to 'line'\n"
" -list set output mode to 'list'\n"
+ " -mmap N default mmap size set to N\n"
#ifdef SQLITE_ENABLE_MULTIPLEX
" -multiplex enable the multiplexor VFS\n"
#endif
@@ -3001,12 +3029,7 @@ int main(int argc, char **argv){
sqlite3_int64 szHeap;
zSize = cmdline_option_value(argc, argv, ++i);
- szHeap = atoi(zSize);
- for(j=0; (c = zSize[j])!=0; j++){
- if( c=='M' ){ szHeap *= 1000000; break; }
- if( c=='K' ){ szHeap *= 1000; break; }
- if( c=='G' ){ szHeap *= 1000000000; break; }
- }
+ szHeap = integerValue(zSize);
if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
#endif
@@ -3026,6 +3049,9 @@ int main(int argc, char **argv){
extern int sqlite3_multiple_initialize(const char*,int);
sqlite3_multiplex_initialize(0, 1);
#endif
+ }else if( strcmp(z,"-mmap")==0 ){
+ sqlite3_int64 sz = integerValue(cmdline_option_value(argc,argv,++i));
+ sqlite3_config(SQLITE_CONFIG_MMAP_SIZE, sz, sz);
}else if( strcmp(z,"-vfs")==0 ){
sqlite3_vfs *pVfs = sqlite3_vfs_find(cmdline_option_value(argc,argv,++i));
if( pVfs ){
@@ -3111,6 +3137,8 @@ int main(int argc, char **argv){
stdin_is_interactive = 0;
}else if( strcmp(z,"-heap")==0 ){
i++;
+ }else if( strcmp(z,"-mmap")==0 ){
+ i++;
}else if( strcmp(z,"-vfs")==0 ){
i++;
#ifdef SQLITE_ENABLE_VFSTRACE
@@ -3128,7 +3156,7 @@ int main(int argc, char **argv){
z = cmdline_option_value(argc,argv,++i);
if( z[0]=='.' ){
rc = do_meta_command(z, &data);
- if( rc && bail_on_error ) return rc;
+ if( rc && bail_on_error ) return rc==2 ? 0 : rc;
}else{
open_db(&data);
rc = shell_exec(data.db, z, shell_callback, &data, &zErrMsg);
@@ -3152,6 +3180,7 @@ int main(int argc, char **argv){
*/
if( zFirstCmd[0]=='.' ){
rc = do_meta_command(zFirstCmd, &data);
+ if( rc==2 ) rc = 0;
}else{
open_db(&data);
rc = shell_exec(data.db, zFirstCmd, shell_callback, &data, &zErrMsg);
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
index 53f68627bb..03fa649610 100644
--- a/src/3rdparty/sqlite/sqlite3.c
+++ b/src/3rdparty/sqlite/sqlite3.c
@@ -1,6 +1,6 @@
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
-** version 3.7.16.2. By combining all the individual C code files into this
+** version 3.7.17. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a single translation
** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements
@@ -362,11 +362,11 @@
** We support that for legacy.
*/
#if !defined(SQLITE_THREADSAFE)
-#if defined(THREADSAFE)
-# define SQLITE_THREADSAFE THREADSAFE
-#else
-# define SQLITE_THREADSAFE 1 /* IMP: R-07272-22309 */
-#endif
+# if defined(THREADSAFE)
+# define SQLITE_THREADSAFE THREADSAFE
+# else
+# define SQLITE_THREADSAFE 1 /* IMP: R-07272-22309 */
+# endif
#endif
/*
@@ -678,9 +678,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.7.16.2"
-#define SQLITE_VERSION_NUMBER 3007016
-#define SQLITE_SOURCE_ID "2013-04-12 11:52:43 cbea02d93865ce0e06789db95fd9168ebac970c7"
+#define SQLITE_VERSION "3.7.17"
+#define SQLITE_VERSION_NUMBER 3007017
+#define SQLITE_SOURCE_ID "2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -996,6 +996,8 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_FORMAT 24 /* Auxiliary database format error */
#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */
#define SQLITE_NOTADB 26 /* File opened that is not a database file */
+#define SQLITE_NOTICE 27 /* Notifications from sqlite3_log() */
+#define SQLITE_WARNING 28 /* Warnings from sqlite3_log() */
#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */
#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */
/* end-of-error-codes */
@@ -1046,6 +1048,7 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8))
#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8))
#define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8))
+#define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8))
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8))
@@ -1065,6 +1068,8 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8))
#define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<8))
#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8))
+#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8))
+#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
/*
** CAPI3REF: Flags For File Open Operations
@@ -1304,6 +1309,9 @@ struct sqlite3_io_methods {
void (*xShmBarrier)(sqlite3_file*);
int (*xShmUnmap)(sqlite3_file*, int deleteFlag);
/* Methods above are valid for version 2 */
+ int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp);
+ int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p);
+ /* Methods above are valid for version 3 */
/* Additional methods may be added in future releases */
};
@@ -1440,7 +1448,8 @@ struct sqlite3_io_methods {
** it is able to override built-in [PRAGMA] statements.
**
** <li>[[SQLITE_FCNTL_BUSYHANDLER]]
-** ^This file-control may be invoked by SQLite on the database file handle
+** ^The [SQLITE_FCNTL_BUSYHANDLER]
+** file-control may be invoked by SQLite on the database file handle
** shortly after it is opened in order to provide a custom VFS with access
** to the connections busy-handler callback. The argument is of type (void **)
** - an array of two (void *) values. The first (void *) actually points
@@ -1451,13 +1460,24 @@ struct sqlite3_io_methods {
** current operation.
**
** <li>[[SQLITE_FCNTL_TEMPFILENAME]]
-** ^Application can invoke this file-control to have SQLite generate a
+** ^Application can invoke the [SQLITE_FCNTL_TEMPFILENAME] file-control
+** to have SQLite generate a
** temporary filename using the same algorithm that is followed to generate
** temporary filenames for TEMP tables and other internal uses. The
** argument should be a char** which will be filled with the filename
** written into memory obtained from [sqlite3_malloc()]. The caller should
** invoke [sqlite3_free()] on the result to avoid a memory leak.
**
+** <li>[[SQLITE_FCNTL_MMAP_SIZE]]
+** The [SQLITE_FCNTL_MMAP_SIZE] file control is used to query or set the
+** maximum number of bytes that will be used for memory-mapped I/O.
+** The argument is a pointer to a value of type sqlite3_int64 that
+** is an advisory maximum number of bytes in the file to memory map. The
+** pointer is overwritten with the old value. The limit is not changed if
+** the value originally pointed to is negative, and so the current limit
+** can be queried by passing in a pointer to a negative number. This
+** file-control is used internally to implement [PRAGMA mmap_size].
+**
** </ul>
*/
#define SQLITE_FCNTL_LOCKSTATE 1
@@ -1476,6 +1496,7 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_PRAGMA 14
#define SQLITE_FCNTL_BUSYHANDLER 15
#define SQLITE_FCNTL_TEMPFILENAME 16
+#define SQLITE_FCNTL_MMAP_SIZE 18
/*
** CAPI3REF: Mutex Handle
@@ -2142,7 +2163,9 @@ struct sqlite3_mem_methods {
** page cache implementation into that object.)^ </dd>
**
** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt>
-** <dd> ^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a
+** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite
+** global [error log].
+** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a
** function with a call signature of void(*)(void*,int,const char*),
** and a pointer to void. ^If the function pointer is not NULL, it is
** invoked by [sqlite3_log()] to process each logging event. ^If the
@@ -2188,12 +2211,12 @@ struct sqlite3_mem_methods {
** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE
** <dd> These options are obsolete and should not be used by new code.
** They are retained for backwards compatibility but are now no-ops.
-** </dl>
+** </dd>
**
** [[SQLITE_CONFIG_SQLLOG]]
** <dt>SQLITE_CONFIG_SQLLOG
** <dd>This option is only available if sqlite is compiled with the
-** SQLITE_ENABLE_SQLLOG pre-processor macro defined. The first argument should
+** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should
** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).
** The second should be of type (void*). The callback is invoked by the library
** in three separate circumstances, identified by the value passed as the
@@ -2203,7 +2226,23 @@ struct sqlite3_mem_methods {
** fourth parameter is 1, then the SQL statement that the third parameter
** points to has just been executed. Or, if the fourth parameter is 2, then
** the connection being passed as the second parameter is being closed. The
-** third parameter is passed NULL In this case.
+** third parameter is passed NULL In this case. An example of using this
+** configuration option can be seen in the "test_sqllog.c" source file in
+** the canonical SQLite source tree.</dd>
+**
+** [[SQLITE_CONFIG_MMAP_SIZE]]
+** <dt>SQLITE_CONFIG_MMAP_SIZE
+** <dd>SQLITE_CONFIG_MMAP_SIZE takes two 64-bit integer (sqlite3_int64) values
+** that are the default mmap size limit (the default setting for
+** [PRAGMA mmap_size]) and the maximum allowed mmap size limit.
+** The default setting can be overridden by each database connection using
+** either the [PRAGMA mmap_size] command, or by using the
+** [SQLITE_FCNTL_MMAP_SIZE] file control. The maximum allowed mmap size
+** cannot be changed at run-time. Nor may the maximum allowed mmap size
+** exceed the compile-time maximum mmap size set by the
+** [SQLITE_MAX_MMAP_SIZE] compile-time option.
+** If either argument to this option is negative, then that argument is
+** changed to its compile-time default.
** </dl>
*/
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
@@ -2227,6 +2266,7 @@ struct sqlite3_mem_methods {
#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */
#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */
+#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */
/*
** CAPI3REF: Database Connection Configuration Options
@@ -3060,6 +3100,9 @@ SQLITE_API int sqlite3_set_authorizer(
** as each triggered subprogram is entered. The callbacks for triggers
** contain a UTF-8 SQL comment that identifies the trigger.)^
**
+** The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit
+** the length of [bound parameter] expansion in the output of sqlite3_trace().
+**
** ^The callback function registered by sqlite3_profile() is invoked
** as each SQL statement finishes. ^The profile callback contains
** the original statement text and an estimate of wall-clock time
@@ -3598,7 +3641,8 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
** <li>
** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it
** always used to do, [sqlite3_step()] will automatically recompile the SQL
-** statement and try to run it again.
+** statement and try to run it again. As many as [SQLITE_MAX_SCHEMA_RETRY]
+** retries will occur before sqlite3_step() gives up and returns an error.
** </li>
**
** <li>
@@ -3802,6 +3846,9 @@ typedef struct sqlite3_context sqlite3_context;
** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).
**
** ^The third argument is the value to bind to the parameter.
+** ^If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16()
+** or sqlite3_bind_blob() is a NULL pointer then the fourth parameter
+** is ignored and the end result is the same as sqlite3_bind_null().
**
** ^(In those routines that have a fourth argument, its value is the
** number of bytes in the parameter. To be clear: the value is the
@@ -4758,7 +4805,7 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi
** the content before returning.
**
** The typedef is necessary to work around problems in certain
-** C++ compilers. See ticket #2191.
+** C++ compilers.
*/
typedef void (*sqlite3_destructor_type)(void*);
#define SQLITE_STATIC ((sqlite3_destructor_type)0)
@@ -5557,11 +5604,20 @@ SQLITE_API int sqlite3_table_column_metadata(
** ^This interface loads an SQLite extension library from the named file.
**
** ^The sqlite3_load_extension() interface attempts to load an
-** SQLite extension library contained in the file zFile.
+** [SQLite extension] library contained in the file zFile. If
+** the file cannot be loaded directly, attempts are made to load
+** with various operating-system specific extensions added.
+** So for example, if "samplelib" cannot be loaded, then names like
+** "samplelib.so" or "samplelib.dylib" or "samplelib.dll" might
+** be tried also.
**
** ^The entry point is zProc.
-** ^zProc may be 0, in which case the name of the entry point
-** defaults to "sqlite3_extension_init".
+** ^(zProc may be 0, in which case SQLite will try to come up with an
+** entry point name on its own. It first tries "sqlite3_extension_init".
+** If that does not work, it constructs a name "sqlite3_X_init" where the
+** X is consists of the lower-case equivalent of all ASCII alphabetic
+** characters in the filename from the last "/" to the first following
+** "." and omitting any initial "lib".)^
** ^The sqlite3_load_extension() interface returns
** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
** ^If an error occurs and pzErrMsg is not 0, then the
@@ -5587,11 +5643,11 @@ SQLITE_API int sqlite3_load_extension(
** CAPI3REF: Enable Or Disable Extension Loading
**
** ^So as not to open security holes in older applications that are
-** unprepared to deal with extension loading, and as a means of disabling
-** extension loading while evaluating user-entered SQL, the following API
+** unprepared to deal with [extension loading], and as a means of disabling
+** [extension loading] while evaluating user-entered SQL, the following API
** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
**
-** ^Extension loading is off by default. See ticket #1863.
+** ^Extension loading is off by default.
** ^Call the sqlite3_enable_load_extension() routine with onoff==1
** to turn extension loading on and call it with onoff==0 to turn
** it back off again.
@@ -5603,7 +5659,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
**
** ^This interface causes the xEntryPoint() function to be invoked for
** each new [database connection] that is created. The idea here is that
-** xEntryPoint() is the entry point for a statically linked SQLite extension
+** xEntryPoint() is the entry point for a statically linked [SQLite extension]
** that is to be automatically loaded into all new database connections.
**
** ^(Even though the function prototype shows that xEntryPoint() takes
@@ -7384,9 +7440,24 @@ SQLITE_API int sqlite3_stricmp(const char *, const char *);
SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
/*
+** CAPI3REF: String Globbing
+*
+** ^The [sqlite3_strglob(P,X)] interface returns zero if string X matches
+** the glob pattern P, and it returns non-zero if string X does not match
+** the glob pattern P. ^The definition of glob pattern matching used in
+** [sqlite3_strglob(P,X)] is the same as for the "X GLOB P" operator in the
+** SQL dialect used by SQLite. ^The sqlite3_strglob(P,X) function is case
+** sensitive.
+**
+** Note that this routine returns zero on a match and non-zero if the strings
+** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
+*/
+SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
+
+/*
** CAPI3REF: Error Logging Interface
**
-** ^The [sqlite3_log()] interface writes a message into the error log
+** ^The [sqlite3_log()] interface writes a message into the [error log]
** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].
** ^If logging is enabled, the zFormat string and subsequent arguments are
** used with [sqlite3_snprintf()] to generate the final output string.
@@ -8071,6 +8142,7 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
*/
#ifndef SQLITE_TEMP_STORE
# define SQLITE_TEMP_STORE 1
+# define SQLITE_TEMP_STORE_xc 1 /* Exclude from ctime.c */
#endif
/*
@@ -8218,6 +8290,49 @@ SQLITE_PRIVATE const int sqlite3one;
# define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&7)==0)
#endif
+/*
+** Disable MMAP on platforms where it is known to not work
+*/
+#if defined(__OpenBSD__) || defined(__QNXNTO__)
+# undef SQLITE_MAX_MMAP_SIZE
+# define SQLITE_MAX_MMAP_SIZE 0
+#endif
+
+/*
+** Default maximum size of memory used by memory-mapped I/O in the VFS
+*/
+#ifdef __APPLE__
+# include <TargetConditionals.h>
+# if TARGET_OS_IPHONE
+# undef SQLITE_MAX_MMAP_SIZE
+# define SQLITE_MAX_MMAP_SIZE 0
+# endif
+#endif
+#ifndef SQLITE_MAX_MMAP_SIZE
+# if defined(__linux__) \
+ || defined(_WIN32) \
+ || (defined(__APPLE__) && defined(__MACH__)) \
+ || defined(__sun)
+# define SQLITE_MAX_MMAP_SIZE 0x7fff0000 /* 2147418112 */
+# else
+# define SQLITE_MAX_MMAP_SIZE 0
+# endif
+# define SQLITE_MAX_MMAP_SIZE_xc 1 /* exclude from ctime.c */
+#endif
+
+/*
+** The default MMAP_SIZE is zero on all platforms. Or, even if a larger
+** default MMAP_SIZE is specified at compile-time, make sure that it does
+** not exceed the maximum mmap size.
+*/
+#ifndef SQLITE_DEFAULT_MMAP_SIZE
+# define SQLITE_DEFAULT_MMAP_SIZE 0
+# define SQLITE_DEFAULT_MMAP_SIZE_xc 1 /* Exclude from ctime.c */
+#endif
+#if SQLITE_DEFAULT_MMAP_SIZE>SQLITE_MAX_MMAP_SIZE
+# undef SQLITE_DEFAULT_MMAP_SIZE
+# define SQLITE_DEFAULT_MMAP_SIZE SQLITE_MAX_MMAP_SIZE
+#endif
/*
** An instance of the following structure is used to store the busy-handler
@@ -8439,6 +8554,7 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
SQLITE_PRIVATE int sqlite3BtreeClose(Btree*);
SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int);
+SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
SQLITE_PRIVATE int sqlite3BtreeSetSafetyLevel(Btree*,int,int,int);
SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*);
SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
@@ -8515,6 +8631,7 @@ SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p);
#define BTREE_TEXT_ENCODING 5
#define BTREE_USER_VERSION 6
#define BTREE_INCR_VACUUM 7
+#define BTREE_APPLICATION_ID 8
/*
** Values that may be OR'd together to form the second argument of an
@@ -9140,6 +9257,12 @@ typedef struct PgHdr DbPage;
#define PAGER_JOURNALMODE_WAL 5 /* Use write-ahead logging */
/*
+** Flags that make up the mask passed to sqlite3PagerAcquire().
+*/
+#define PAGER_ACQUIRE_NOCONTENT 0x01 /* Do not load data from disk */
+#define PAGER_ACQUIRE_READONLY 0x02 /* Read-only page is acceptable */
+
+/*
** The remainder of this file contains the declarations of the functions
** that make up the Pager sub-system API. See source code comments for
** a detailed description of each routine.
@@ -9163,6 +9286,7 @@ SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(Pager*, int(*)(void *), void *);
SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int);
SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager*, int);
SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int);
+SQLITE_PRIVATE void sqlite3PagerSetMmapLimit(Pager *, sqlite3_int64);
SQLITE_PRIVATE void sqlite3PagerShrink(Pager*);
SQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(Pager*,int,int,int);
SQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *, int);
@@ -9309,6 +9433,8 @@ struct PgHdr {
#define PGHDR_REUSE_UNLIKELY 0x010 /* A hint that reuse is unlikely */
#define PGHDR_DONT_WRITE 0x020 /* Do not write content to disk */
+#define PGHDR_MMAP 0x040 /* This is an mmap page object */
+
/* Initialize and shutdown the page cache subsystem */
SQLITE_PRIVATE int sqlite3PcacheInitialize(void);
SQLITE_PRIVATE void sqlite3PcacheShutdown(void);
@@ -9520,14 +9646,6 @@ SQLITE_PRIVATE void sqlite3PCacheSetDefault(void);
# define SQLITE_OS_WINRT 0
#endif
-/*
-** When compiled for WinCE or WinRT, there is no concept of the current
-** directory.
- */
-#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT
-# define SQLITE_CURDIR 1
-#endif
-
/* If the SET_FULLSYNC macro is not defined above, then make it
** a no-op
*/
@@ -9680,6 +9798,8 @@ SQLITE_PRIVATE int sqlite3OsShmMap(sqlite3_file *,int,int,int,void volatile **);
SQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int, int, int);
SQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id);
SQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int);
+SQLITE_PRIVATE int sqlite3OsFetch(sqlite3_file *id, i64, int, void **);
+SQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *, i64, void *);
/*
@@ -9919,6 +10039,7 @@ struct sqlite3 {
int nDb; /* Number of backends currently in use */
int flags; /* Miscellaneous flags. See below */
i64 lastRowid; /* ROWID of most recent insert (see above) */
+ i64 szMmap; /* Default mmap_size setting */
unsigned int openFlags; /* Flags passed to sqlite3_vfs.xOpen() */
int errCode; /* Most recent error code (SQLITE_*) */
int errMask; /* & result codes with this before returning */
@@ -11155,6 +11276,8 @@ struct NameContext {
#define NC_HasAgg 0x02 /* One or more aggregate functions seen */
#define NC_IsCheck 0x04 /* True if resolving names in a CHECK constraint */
#define NC_InAggFunc 0x08 /* True if analyzing arguments to an agg func */
+#define NC_AsMaybe 0x10 /* Resolve to AS terms of the result set only
+ ** if no other resolution is available */
/*
** An instance of the following structure contains all information
@@ -11590,6 +11713,8 @@ struct Sqlite3Config {
void *pHeap; /* Heap storage space */
int nHeap; /* Size of pHeap[] */
int mnReq, mxReq; /* Min and max heap requests sizes */
+ sqlite3_int64 szMmap; /* mmap() space per open file */
+ sqlite3_int64 mxMmap; /* Maximum value for szMmap */
void *pScratch; /* Scratch memory */
int szScratch; /* Size of each scratch buffer */
int nScratch; /* Number of scratch buffers */
@@ -11624,6 +11749,7 @@ struct Walker {
int (*xSelectCallback)(Walker*,Select*); /* Callback for SELECTs */
Parse *pParse; /* Parser context. */
int walkerDepth; /* Number of subqueries */
+ u8 bSelectDepthFirst; /* Do subqueries first */
union { /* Extra data for callback */
NameContext *pNC; /* Naming context */
int i; /* Integer value */
@@ -12127,6 +12253,12 @@ SQLITE_PRIVATE void sqlite3Error(sqlite3*, int, const char*,...);
SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);
SQLITE_PRIVATE u8 sqlite3HexToInt(int h);
SQLITE_PRIVATE int sqlite3TwoPartName(Parse *, Token *, Token *, Token **);
+
+#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST) || \
+ defined(SQLITE_DEBUG_OS_TRACE)
+SQLITE_PRIVATE const char *sqlite3ErrName(int);
+#endif
+
SQLITE_PRIVATE const char *sqlite3ErrStr(int);
SQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse);
SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);
@@ -12611,6 +12743,8 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {
(void*)0, /* pHeap */
0, /* nHeap */
0, 0, /* mnHeap, mxHeap */
+ SQLITE_DEFAULT_MMAP_SIZE, /* szMmap */
+ SQLITE_MAX_MMAP_SIZE, /* mxMmap */
(void*)0, /* pScratch */
0, /* szScratch */
0, /* nScratch */
@@ -12734,15 +12868,15 @@ static const char * const azCompileOpt[] = {
#ifdef SQLITE_COVERAGE_TEST
"COVERAGE_TEST",
#endif
-#ifdef SQLITE_CURDIR
- "CURDIR",
-#endif
#ifdef SQLITE_DEBUG
"DEBUG",
#endif
#ifdef SQLITE_DEFAULT_LOCKING_MODE
"DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE),
#endif
+#if defined(SQLITE_DEFAULT_MMAP_SIZE) && !defined(SQLITE_DEFAULT_MMAP_SIZE_xc)
+ "DEFAULT_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_DEFAULT_MMAP_SIZE),
+#endif
#ifdef SQLITE_DISABLE_DIRSYNC
"DISABLE_DIRSYNC",
#endif
@@ -12833,6 +12967,9 @@ static const char * const azCompileOpt[] = {
#ifdef SQLITE_LOCK_TRACE
"LOCK_TRACE",
#endif
+#if defined(SQLITE_MAX_MMAP_SIZE) && !defined(SQLITE_MAX_MMAP_SIZE_xc)
+ "MAX_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_MAX_MMAP_SIZE),
+#endif
#ifdef SQLITE_MAX_SCHEMA_RETRY
"MAX_SCHEMA_RETRY=" CTIMEOPT_VAL(SQLITE_MAX_SCHEMA_RETRY),
#endif
@@ -12890,11 +13027,6 @@ static const char * const azCompileOpt[] = {
#ifdef SQLITE_OMIT_CHECK
"OMIT_CHECK",
#endif
-/* // redundant
-** #ifdef SQLITE_OMIT_COMPILEOPTION_DIAGS
-** "OMIT_COMPILEOPTION_DIAGS",
-** #endif
-*/
#ifdef SQLITE_OMIT_COMPLETE
"OMIT_COMPLETE",
#endif
@@ -13036,13 +13168,13 @@ static const char * const azCompileOpt[] = {
#ifdef SQLITE_TCL
"TCL",
#endif
-#ifdef SQLITE_TEMP_STORE
+#if defined(SQLITE_TEMP_STORE) && !defined(SQLITE_TEMP_STORE_xc)
"TEMP_STORE=" CTIMEOPT_VAL(SQLITE_TEMP_STORE),
#endif
#ifdef SQLITE_TEST
"TEST",
#endif
-#ifdef SQLITE_THREADSAFE
+#if defined(SQLITE_THREADSAFE)
"THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE),
#endif
#ifdef SQLITE_USE_ALLOCA
@@ -13068,8 +13200,11 @@ SQLITE_API int sqlite3_compileoption_used(const char *zOptName){
/* Since ArraySize(azCompileOpt) is normally in single digits, a
** linear search is adequate. No need for a binary search. */
for(i=0; i<ArraySize(azCompileOpt); i++){
- if( (sqlite3StrNICmp(zOptName, azCompileOpt[i], n)==0)
- && ( (azCompileOpt[i][n]==0) || (azCompileOpt[i][n]=='=') ) ) return 1;
+ if( sqlite3StrNICmp(zOptName, azCompileOpt[i], n)==0
+ && sqlite3CtypeMap[(unsigned char)azCompileOpt[i][n]]==0
+ ){
+ return 1;
+ }
}
return 0;
}
@@ -13127,6 +13262,14 @@ SQLITE_API const char *sqlite3_compileoption_get(int N){
#define _VDBEINT_H_
/*
+** The maximum number of times that a statement will try to reparse
+** itself before giving up and returning SQLITE_SCHEMA.
+*/
+#ifndef SQLITE_MAX_SCHEMA_RETRY
+# define SQLITE_MAX_SCHEMA_RETRY 50
+#endif
+
+/*
** SQL is translated into a sequence of instructions to be
** executed by a virtual machine. Each instruction is an instance
** of the following structure.
@@ -15096,6 +15239,26 @@ SQLITE_PRIVATE int sqlite3OsShmMap(
return id->pMethods->xShmMap(id, iPage, pgsz, bExtend, pp);
}
+#if SQLITE_MAX_MMAP_SIZE>0
+/* The real implementation of xFetch and xUnfetch */
+SQLITE_PRIVATE int sqlite3OsFetch(sqlite3_file *id, i64 iOff, int iAmt, void **pp){
+ DO_OS_MALLOC_TEST(id);
+ return id->pMethods->xFetch(id, iOff, iAmt, pp);
+}
+SQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *id, i64 iOff, void *p){
+ return id->pMethods->xUnfetch(id, iOff, p);
+}
+#else
+/* No-op stubs to use when memory-mapped I/O is disabled */
+SQLITE_PRIVATE int sqlite3OsFetch(sqlite3_file *id, i64 iOff, int iAmt, void **pp){
+ *pp = 0;
+ return SQLITE_OK;
+}
+SQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *id, i64 iOff, void *p){
+ return SQLITE_OK;
+}
+#endif
+
/*
** The next group of routines are convenience wrappers around the
** VFS methods.
@@ -22852,7 +23015,7 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
/* #include <time.h> */
#include <sys/time.h>
#include <errno.h>
-#ifndef SQLITE_OMIT_WAL
+#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
#include <sys/mman.h>
#endif
@@ -22951,6 +23114,11 @@ struct unixFile {
const char *zPath; /* Name of the file */
unixShm *pShm; /* Shared memory segment information */
int szChunk; /* Configured by FCNTL_CHUNK_SIZE */
+ int nFetchOut; /* Number of outstanding xFetch refs */
+ sqlite3_int64 mmapSize; /* Usable size of mapping at pMapRegion */
+ sqlite3_int64 mmapSizeActual; /* Actual size of mapping at pMapRegion */
+ sqlite3_int64 mmapSizeMax; /* Configured FCNTL_MMAP_SIZE value */
+ void *pMapRegion; /* Memory mapped region */
#ifdef __QNXNTO__
int sectorSize; /* Device sector size */
int deviceCharacteristics; /* Precomputed device characteristics */
@@ -22975,7 +23143,9 @@ struct unixFile {
unsigned char transCntrChng; /* True if the transaction counter changed */
unsigned char dbUpdate; /* True if any part of database file changed */
unsigned char inNormalWrite; /* True if in a normal write operation */
+
#endif
+
#ifdef SQLITE_TEST
/* In test mode, increase the size of this structure a bit so that
** it is larger than the struct CrashFile defined in test6.c.
@@ -22999,6 +23169,7 @@ struct unixFile {
#define UNIXFILE_DELETE 0x20 /* Delete on close */
#define UNIXFILE_URI 0x40 /* Filename might have query parameters */
#define UNIXFILE_NOLOCK 0x80 /* Do no file locking */
+#define UNIXFILE_WARNED 0x0100 /* verifyDbFile() warnings have been issued */
/*
** Include code that is common to all os_*.c files
@@ -23241,6 +23412,17 @@ SQLITE_API int sqlite3_open_file_count = 0;
#endif
/*
+** HAVE_MREMAP defaults to true on Linux and false everywhere else.
+*/
+#if !defined(HAVE_MREMAP)
+# if defined(__linux__) && defined(_GNU_SOURCE)
+# define HAVE_MREMAP 1
+# else
+# define HAVE_MREMAP 0
+# endif
+#endif
+
+/*
** Different Unix systems declare open() in different ways. Same use
** open(const char*,int,mode_t). Others use open(const char*,int,...).
** The difference is important when using a pointer to the function.
@@ -23371,6 +23553,19 @@ static struct unix_syscall {
{ "fchown", (sqlite3_syscall_ptr)posixFchown, 0 },
#define osFchown ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent)
+ { "mmap", (sqlite3_syscall_ptr)mmap, 0 },
+#define osMmap ((void*(*)(void*,size_t,int,int,int,off_t))aSyscall[21].pCurrent)
+
+ { "munmap", (sqlite3_syscall_ptr)munmap, 0 },
+#define osMunmap ((void*(*)(void*,size_t))aSyscall[22].pCurrent)
+
+#if HAVE_MREMAP
+ { "mremap", (sqlite3_syscall_ptr)mremap, 0 },
+#else
+ { "mremap", (sqlite3_syscall_ptr)0, 0 },
+#endif
+#define osMremap ((void*(*)(void*,size_t,size_t,int,...))aSyscall[23].pCurrent)
+
}; /* End of the overrideable system calls */
/*
@@ -23702,7 +23897,6 @@ static int sqliteErrorFromPosixError(int posixError, int sqliteIOErr) {
}
-
/******************************************************************************
****************** Begin Unique File ID Utility Used By VxWorks ***************
**
@@ -24038,7 +24232,6 @@ static int unixLogErrorAtLine(
zErr = strerror(iErrno);
#endif
- assert( errcode!=SQLITE_OK );
if( zPath==0 ) zPath = "";
sqlite3_log(errcode,
"os_unix.c:%d: (%d) %s(%s) - %s",
@@ -24205,6 +24398,50 @@ static int findInodeInfo(
/*
+** Check a unixFile that is a database. Verify the following:
+**
+** (1) There is exactly one hard link on the file
+** (2) The file is not a symbolic link
+** (3) The file has not been renamed or unlinked
+**
+** Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right.
+*/
+static void verifyDbFile(unixFile *pFile){
+ struct stat buf;
+ int rc;
+ if( pFile->ctrlFlags & UNIXFILE_WARNED ){
+ /* One or more of the following warnings have already been issued. Do not
+ ** repeat them so as not to clutter the error log */
+ return;
+ }
+ rc = osFstat(pFile->h, &buf);
+ if( rc!=0 ){
+ sqlite3_log(SQLITE_WARNING, "cannot fstat db file %s", pFile->zPath);
+ pFile->ctrlFlags |= UNIXFILE_WARNED;
+ return;
+ }
+ if( buf.st_nlink==0 && (pFile->ctrlFlags & UNIXFILE_DELETE)==0 ){
+ sqlite3_log(SQLITE_WARNING, "file unlinked while open: %s", pFile->zPath);
+ pFile->ctrlFlags |= UNIXFILE_WARNED;
+ return;
+ }
+ if( buf.st_nlink>1 ){
+ sqlite3_log(SQLITE_WARNING, "multiple links to file: %s", pFile->zPath);
+ pFile->ctrlFlags |= UNIXFILE_WARNED;
+ return;
+ }
+ if( pFile->pInode!=0
+ && ((rc = osStat(pFile->zPath, &buf))!=0
+ || buf.st_ino!=pFile->pInode->fileId.ino)
+ ){
+ sqlite3_log(SQLITE_WARNING, "file renamed while open: %s", pFile->zPath);
+ pFile->ctrlFlags |= UNIXFILE_WARNED;
+ return;
+ }
+}
+
+
+/*
** This routine checks if there is a RESERVED lock held on the specified
** file by this or any other process. If such a lock is held, set *pResOut
** to a non-zero value otherwise *pResOut is set to zero. The return value
@@ -24734,9 +24971,13 @@ end_unlock:
** the requested locking level, this routine is a no-op.
*/
static int unixUnlock(sqlite3_file *id, int eFileLock){
+ assert( eFileLock==SHARED_LOCK || ((unixFile *)id)->nFetchOut==0 );
return posixUnlock(id, eFileLock, 0);
}
+static int unixMapfile(unixFile *pFd, i64 nByte);
+static void unixUnmapfile(unixFile *pFd);
+
/*
** This function performs the parts of the "close file" operation
** common to all locking schemes. It closes the directory and file
@@ -24749,6 +24990,7 @@ static int unixUnlock(sqlite3_file *id, int eFileLock){
*/
static int closeUnixFile(sqlite3_file *id){
unixFile *pFile = (unixFile*)id;
+ unixUnmapfile(pFile);
if( pFile->h>=0 ){
robust_close(pFile, pFile->h, __LINE__);
pFile->h = -1;
@@ -24775,6 +25017,7 @@ static int closeUnixFile(sqlite3_file *id){
static int unixClose(sqlite3_file *id){
int rc = SQLITE_OK;
unixFile *pFile = (unixFile *)id;
+ verifyDbFile(pFile);
unixUnlock(id, NO_LOCK);
unixEnterMutex();
@@ -26006,6 +26249,8 @@ static int unixRead(
unixFile *pFile = (unixFile *)id;
int got;
assert( id );
+ assert( offset>=0 );
+ assert( amt>0 );
/* If this is a database file (not a journal, master-journal or temp
** file), the bytes in the locking range should never be read or written. */
@@ -26016,6 +26261,23 @@ static int unixRead(
);
#endif
+#if SQLITE_MAX_MMAP_SIZE>0
+ /* Deal with as much of this read request as possible by transfering
+ ** data from the memory mapping using memcpy(). */
+ if( offset<pFile->mmapSize ){
+ if( offset+amt <= pFile->mmapSize ){
+ memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);
+ return SQLITE_OK;
+ }else{
+ int nCopy = pFile->mmapSize - offset;
+ memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);
+ pBuf = &((u8 *)pBuf)[nCopy];
+ amt -= nCopy;
+ offset += nCopy;
+ }
+ }
+#endif
+
got = seekAndRead(pFile, offset, pBuf, amt);
if( got==amt ){
return SQLITE_OK;
@@ -26031,46 +26293,59 @@ static int unixRead(
}
/*
-** Seek to the offset in id->offset then read cnt bytes into pBuf.
-** Return the number of bytes actually read. Update the offset.
-**
-** To avoid stomping the errno value on a failed write the lastErrno value
-** is set before returning.
+** Attempt to seek the file-descriptor passed as the first argument to
+** absolute offset iOff, then attempt to write nBuf bytes of data from
+** pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise,
+** return the actual number of bytes written (which may be less than
+** nBuf).
*/
-static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){
- int got;
-#if (!defined(USE_PREAD) && !defined(USE_PREAD64))
- i64 newOffset;
-#endif
- assert( cnt==(cnt&0x1ffff) );
- cnt &= 0x1ffff;
+static int seekAndWriteFd(
+ int fd, /* File descriptor to write to */
+ i64 iOff, /* File offset to begin writing at */
+ const void *pBuf, /* Copy data from this buffer to the file */
+ int nBuf, /* Size of buffer pBuf in bytes */
+ int *piErrno /* OUT: Error number if error occurs */
+){
+ int rc = 0; /* Value returned by system call */
+
+ assert( nBuf==(nBuf&0x1ffff) );
+ nBuf &= 0x1ffff;
TIMER_START;
+
#if defined(USE_PREAD)
- do{ got = osPwrite(id->h, pBuf, cnt, offset); }while( got<0 && errno==EINTR );
+ do{ rc = osPwrite(fd, pBuf, nBuf, iOff); }while( rc<0 && errno==EINTR );
#elif defined(USE_PREAD64)
- do{ got = osPwrite64(id->h, pBuf, cnt, offset);}while( got<0 && errno==EINTR);
+ do{ rc = osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
#else
do{
- newOffset = lseek(id->h, offset, SEEK_SET);
- SimulateIOError( newOffset-- );
- if( newOffset!=offset ){
- if( newOffset == -1 ){
- ((unixFile*)id)->lastErrno = errno;
- }else{
- ((unixFile*)id)->lastErrno = 0;
- }
+ i64 iSeek = lseek(fd, iOff, SEEK_SET);
+ SimulateIOError( iSeek-- );
+
+ if( iSeek!=iOff ){
+ if( piErrno ) *piErrno = (iSeek==-1 ? errno : 0);
return -1;
}
- got = osWrite(id->h, pBuf, cnt);
- }while( got<0 && errno==EINTR );
+ rc = osWrite(fd, pBuf, nBuf);
+ }while( rc<0 && errno==EINTR );
#endif
+
TIMER_END;
- if( got<0 ){
- ((unixFile*)id)->lastErrno = errno;
- }
+ OSTRACE(("WRITE %-3d %5d %7lld %llu\n", fd, rc, iOff, TIMER_ELAPSED));
- OSTRACE(("WRITE %-3d %5d %7lld %llu\n", id->h, got, offset, TIMER_ELAPSED));
- return got;
+ if( rc<0 && piErrno ) *piErrno = errno;
+ return rc;
+}
+
+
+/*
+** Seek to the offset in id->offset then read cnt bytes into pBuf.
+** Return the number of bytes actually read. Update the offset.
+**
+** To avoid stomping the errno value on a failed write the lastErrno value
+** is set before returning.
+*/
+static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){
+ return seekAndWriteFd(id->h, offset, pBuf, cnt, &id->lastErrno);
}
@@ -26120,6 +26395,23 @@ static int unixWrite(
}
#endif
+#if SQLITE_MAX_MMAP_SIZE>0
+ /* Deal with as much of this write request as possible by transfering
+ ** data from the memory mapping using memcpy(). */
+ if( offset<pFile->mmapSize ){
+ if( offset+amt <= pFile->mmapSize ){
+ memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);
+ return SQLITE_OK;
+ }else{
+ int nCopy = pFile->mmapSize - offset;
+ memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);
+ pBuf = &((u8 *)pBuf)[nCopy];
+ amt -= nCopy;
+ offset += nCopy;
+ }
+ }
+#endif
+
while( amt>0 && (wrote = seekAndWrite(pFile, offset, pBuf, amt))>0 ){
amt -= wrote;
offset += wrote;
@@ -26402,6 +26694,14 @@ static int unixTruncate(sqlite3_file *id, i64 nByte){
}
#endif
+ /* If the file was just truncated to a size smaller than the currently
+ ** mapped region, reduce the effective mapping size as well. SQLite will
+ ** use read() and write() to access data beyond this point from now on.
+ */
+ if( nByte<pFile->mmapSize ){
+ pFile->mmapSize = nByte;
+ }
+
return SQLITE_OK;
}
}
@@ -26490,6 +26790,19 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){
}
}
+ if( pFile->mmapSizeMax>0 && nByte>pFile->mmapSize ){
+ int rc;
+ if( pFile->szChunk<=0 ){
+ if( robust_ftruncate(pFile->h, nByte) ){
+ pFile->lastErrno = errno;
+ return unixLogError(SQLITE_IOERR_TRUNCATE, "ftruncate", pFile->zPath);
+ }
+ }
+
+ rc = unixMapfile(pFile, nByte);
+ return rc;
+ }
+
return SQLITE_OK;
}
@@ -26557,6 +26870,18 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
}
return SQLITE_OK;
}
+ case SQLITE_FCNTL_MMAP_SIZE: {
+ i64 newLimit = *(i64*)pArg;
+ if( newLimit>sqlite3GlobalConfig.mxMmap ){
+ newLimit = sqlite3GlobalConfig.mxMmap;
+ }
+ *(i64*)pArg = pFile->mmapSizeMax;
+ if( newLimit>=0 ){
+ pFile->mmapSizeMax = newLimit;
+ if( newLimit<pFile->mmapSize ) pFile->mmapSize = newLimit;
+ }
+ return SQLITE_OK;
+ }
#ifdef SQLITE_DEBUG
/* The pager calls this method to signal that it has done
** a rollback and that the database is therefore unchanged and
@@ -26869,7 +27194,7 @@ static void unixShmPurge(unixFile *pFd){
sqlite3_mutex_free(p->mutex);
for(i=0; i<p->nRegion; i++){
if( p->h>=0 ){
- munmap(p->apRegion[i], p->szRegion);
+ osMunmap(p->apRegion[i], p->szRegion);
}else{
sqlite3_free(p->apRegion[i]);
}
@@ -27109,24 +27434,32 @@ static int unixShmMap(
if( sStat.st_size<nByte ){
/* The requested memory region does not exist. If bExtend is set to
** false, exit early. *pp will be set to NULL and SQLITE_OK returned.
- **
- ** Alternatively, if bExtend is true, use ftruncate() to allocate
- ** the requested memory region.
*/
- if( !bExtend ) goto shmpage_out;
-#if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
- if( osFallocate(pShmNode->h, sStat.st_size, nByte)!=0 ){
- rc = unixLogError(SQLITE_IOERR_SHMSIZE, "fallocate",
- pShmNode->zFilename);
+ if( !bExtend ){
goto shmpage_out;
}
-#else
- if( robust_ftruncate(pShmNode->h, nByte) ){
- rc = unixLogError(SQLITE_IOERR_SHMSIZE, "ftruncate",
- pShmNode->zFilename);
- goto shmpage_out;
+
+ /* Alternatively, if bExtend is true, extend the file. Do this by
+ ** writing a single byte to the end of each (OS) page being
+ ** allocated or extended. Technically, we need only write to the
+ ** last page in order to extend the file. But writing to all new
+ ** pages forces the OS to allocate them immediately, which reduces
+ ** the chances of SIGBUS while accessing the mapped region later on.
+ */
+ else{
+ static const int pgsz = 4096;
+ int iPg;
+
+ /* Write to the last byte of each newly allocated or extended page */
+ assert( (nByte % pgsz)==0 );
+ for(iPg=(sStat.st_size/pgsz); iPg<(nByte/pgsz); iPg++){
+ if( seekAndWriteFd(pShmNode->h, iPg*pgsz + pgsz-1, "", 1, 0)!=1 ){
+ const char *zFile = pShmNode->zFilename;
+ rc = unixLogError(SQLITE_IOERR_SHMSIZE, "write", zFile);
+ goto shmpage_out;
+ }
+ }
}
-#endif
}
}
@@ -27142,7 +27475,7 @@ static int unixShmMap(
while(pShmNode->nRegion<=iRegion){
void *pMem;
if( pShmNode->h>=0 ){
- pMem = mmap(0, szRegion,
+ pMem = osMmap(0, szRegion,
pShmNode->isReadonly ? PROT_READ : PROT_READ|PROT_WRITE,
MAP_SHARED, pShmNode->h, szRegion*(i64)pShmNode->nRegion
);
@@ -27360,6 +27693,236 @@ static int unixShmUnmap(
#endif /* #ifndef SQLITE_OMIT_WAL */
/*
+** If it is currently memory mapped, unmap file pFd.
+*/
+static void unixUnmapfile(unixFile *pFd){
+ assert( pFd->nFetchOut==0 );
+#if SQLITE_MAX_MMAP_SIZE>0
+ if( pFd->pMapRegion ){
+ osMunmap(pFd->pMapRegion, pFd->mmapSizeActual);
+ pFd->pMapRegion = 0;
+ pFd->mmapSize = 0;
+ pFd->mmapSizeActual = 0;
+ }
+#endif
+}
+
+#if SQLITE_MAX_MMAP_SIZE>0
+/*
+** Return the system page size.
+*/
+static int unixGetPagesize(void){
+#if HAVE_MREMAP
+ return 512;
+#elif defined(_BSD_SOURCE)
+ return getpagesize();
+#else
+ return (int)sysconf(_SC_PAGESIZE);
+#endif
+}
+#endif /* SQLITE_MAX_MMAP_SIZE>0 */
+
+#if SQLITE_MAX_MMAP_SIZE>0
+/*
+** Attempt to set the size of the memory mapping maintained by file
+** descriptor pFd to nNew bytes. Any existing mapping is discarded.
+**
+** If successful, this function sets the following variables:
+**
+** unixFile.pMapRegion
+** unixFile.mmapSize
+** unixFile.mmapSizeActual
+**
+** If unsuccessful, an error message is logged via sqlite3_log() and
+** the three variables above are zeroed. In this case SQLite should
+** continue accessing the database using the xRead() and xWrite()
+** methods.
+*/
+static void unixRemapfile(
+ unixFile *pFd, /* File descriptor object */
+ i64 nNew /* Required mapping size */
+){
+ const char *zErr = "mmap";
+ int h = pFd->h; /* File descriptor open on db file */
+ u8 *pOrig = (u8 *)pFd->pMapRegion; /* Pointer to current file mapping */
+ i64 nOrig = pFd->mmapSizeActual; /* Size of pOrig region in bytes */
+ u8 *pNew = 0; /* Location of new mapping */
+ int flags = PROT_READ; /* Flags to pass to mmap() */
+
+ assert( pFd->nFetchOut==0 );
+ assert( nNew>pFd->mmapSize );
+ assert( nNew<=pFd->mmapSizeMax );
+ assert( nNew>0 );
+ assert( pFd->mmapSizeActual>=pFd->mmapSize );
+ assert( MAP_FAILED!=0 );
+
+ if( (pFd->ctrlFlags & UNIXFILE_RDONLY)==0 ) flags |= PROT_WRITE;
+
+ if( pOrig ){
+ const int szSyspage = unixGetPagesize();
+ i64 nReuse = (pFd->mmapSize & ~(szSyspage-1));
+ u8 *pReq = &pOrig[nReuse];
+
+ /* Unmap any pages of the existing mapping that cannot be reused. */
+ if( nReuse!=nOrig ){
+ osMunmap(pReq, nOrig-nReuse);
+ }
+
+#if HAVE_MREMAP
+ pNew = osMremap(pOrig, nReuse, nNew, MREMAP_MAYMOVE);
+ zErr = "mremap";
+#else
+ pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED, h, nReuse);
+ if( pNew!=MAP_FAILED ){
+ if( pNew!=pReq ){
+ osMunmap(pNew, nNew - nReuse);
+ pNew = 0;
+ }else{
+ pNew = pOrig;
+ }
+ }
+#endif
+
+ /* The attempt to extend the existing mapping failed. Free it. */
+ if( pNew==MAP_FAILED || pNew==0 ){
+ osMunmap(pOrig, nReuse);
+ }
+ }
+
+ /* If pNew is still NULL, try to create an entirely new mapping. */
+ if( pNew==0 ){
+ pNew = osMmap(0, nNew, flags, MAP_SHARED, h, 0);
+ }
+
+ if( pNew==MAP_FAILED ){
+ pNew = 0;
+ nNew = 0;
+ unixLogError(SQLITE_OK, zErr, pFd->zPath);
+
+ /* If the mmap() above failed, assume that all subsequent mmap() calls
+ ** will probably fail too. Fall back to using xRead/xWrite exclusively
+ ** in this case. */
+ pFd->mmapSizeMax = 0;
+ }
+ pFd->pMapRegion = (void *)pNew;
+ pFd->mmapSize = pFd->mmapSizeActual = nNew;
+}
+#endif
+
+/*
+** Memory map or remap the file opened by file-descriptor pFd (if the file
+** is already mapped, the existing mapping is replaced by the new). Or, if
+** there already exists a mapping for this file, and there are still
+** outstanding xFetch() references to it, this function is a no-op.
+**
+** If parameter nByte is non-negative, then it is the requested size of
+** the mapping to create. Otherwise, if nByte is less than zero, then the
+** requested size is the size of the file on disk. The actual size of the
+** created mapping is either the requested size or the value configured
+** using SQLITE_FCNTL_MMAP_LIMIT, whichever is smaller.
+**
+** SQLITE_OK is returned if no error occurs (even if the mapping is not
+** recreated as a result of outstanding references) or an SQLite error
+** code otherwise.
+*/
+static int unixMapfile(unixFile *pFd, i64 nByte){
+#if SQLITE_MAX_MMAP_SIZE>0
+ i64 nMap = nByte;
+ int rc;
+
+ assert( nMap>=0 || pFd->nFetchOut==0 );
+ if( pFd->nFetchOut>0 ) return SQLITE_OK;
+
+ if( nMap<0 ){
+ struct stat statbuf; /* Low-level file information */
+ rc = osFstat(pFd->h, &statbuf);
+ if( rc!=SQLITE_OK ){
+ return SQLITE_IOERR_FSTAT;
+ }
+ nMap = statbuf.st_size;
+ }
+ if( nMap>pFd->mmapSizeMax ){
+ nMap = pFd->mmapSizeMax;
+ }
+
+ if( nMap!=pFd->mmapSize ){
+ if( nMap>0 ){
+ unixRemapfile(pFd, nMap);
+ }else{
+ unixUnmapfile(pFd);
+ }
+ }
+#endif
+
+ return SQLITE_OK;
+}
+
+/*
+** If possible, return a pointer to a mapping of file fd starting at offset
+** iOff. The mapping must be valid for at least nAmt bytes.
+**
+** If such a pointer can be obtained, store it in *pp and return SQLITE_OK.
+** Or, if one cannot but no error occurs, set *pp to 0 and return SQLITE_OK.
+** Finally, if an error does occur, return an SQLite error code. The final
+** value of *pp is undefined in this case.
+**
+** If this function does return a pointer, the caller must eventually
+** release the reference by calling unixUnfetch().
+*/
+static int unixFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){
+#if SQLITE_MAX_MMAP_SIZE>0
+ unixFile *pFd = (unixFile *)fd; /* The underlying database file */
+#endif
+ *pp = 0;
+
+#if SQLITE_MAX_MMAP_SIZE>0
+ if( pFd->mmapSizeMax>0 ){
+ if( pFd->pMapRegion==0 ){
+ int rc = unixMapfile(pFd, -1);
+ if( rc!=SQLITE_OK ) return rc;
+ }
+ if( pFd->mmapSize >= iOff+nAmt ){
+ *pp = &((u8 *)pFd->pMapRegion)[iOff];
+ pFd->nFetchOut++;
+ }
+ }
+#endif
+ return SQLITE_OK;
+}
+
+/*
+** If the third argument is non-NULL, then this function releases a
+** reference obtained by an earlier call to unixFetch(). The second
+** argument passed to this function must be the same as the corresponding
+** argument that was passed to the unixFetch() invocation.
+**
+** Or, if the third argument is NULL, then this function is being called
+** to inform the VFS layer that, according to POSIX, any existing mapping
+** may now be invalid and should be unmapped.
+*/
+static int unixUnfetch(sqlite3_file *fd, i64 iOff, void *p){
+ unixFile *pFd = (unixFile *)fd; /* The underlying database file */
+ UNUSED_PARAMETER(iOff);
+
+ /* If p==0 (unmap the entire file) then there must be no outstanding
+ ** xFetch references. Or, if p!=0 (meaning it is an xFetch reference),
+ ** then there must be at least one outstanding. */
+ assert( (p==0)==(pFd->nFetchOut==0) );
+
+ /* If p!=0, it must match the iOff value. */
+ assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );
+
+ if( p ){
+ pFd->nFetchOut--;
+ }else{
+ unixUnmapfile(pFd);
+ }
+
+ assert( pFd->nFetchOut>=0 );
+ return SQLITE_OK;
+}
+
+/*
** Here ends the implementation of all sqlite3_file methods.
**
********************** End sqlite3_file Methods *******************************
@@ -27417,7 +27980,9 @@ static const sqlite3_io_methods METHOD = { \
unixShmMap, /* xShmMap */ \
unixShmLock, /* xShmLock */ \
unixShmBarrier, /* xShmBarrier */ \
- unixShmUnmap /* xShmUnmap */ \
+ unixShmUnmap, /* xShmUnmap */ \
+ unixFetch, /* xFetch */ \
+ unixUnfetch, /* xUnfetch */ \
}; \
static const sqlite3_io_methods *FINDER##Impl(const char *z, unixFile *p){ \
UNUSED_PARAMETER(z); UNUSED_PARAMETER(p); \
@@ -27434,7 +27999,7 @@ static const sqlite3_io_methods *(*const FINDER)(const char*,unixFile *p) \
IOMETHODS(
posixIoFinder, /* Finder function name */
posixIoMethods, /* sqlite3_io_methods object name */
- 2, /* shared memory is enabled */
+ 3, /* shared memory and mmap are enabled */
unixClose, /* xClose method */
unixLock, /* xLock method */
unixUnlock, /* xUnlock method */
@@ -27685,6 +28250,7 @@ static int fillInUnixFile(
pNew->pVfs = pVfs;
pNew->zPath = zFilename;
pNew->ctrlFlags = (u8)ctrlFlags;
+ pNew->mmapSizeMax = sqlite3GlobalConfig.szMmap;
if( sqlite3_uri_boolean(((ctrlFlags & UNIXFILE_URI) ? zFilename : 0),
"psow", SQLITE_POWERSAFE_OVERWRITE) ){
pNew->ctrlFlags |= UNIXFILE_PSOW;
@@ -27820,15 +28386,15 @@ static int fillInUnixFile(
if( h>=0 ) robust_close(pNew, h, __LINE__);
h = -1;
osUnlink(zFilename);
- isDelete = 0;
+ pNew->ctrlFlags |= UNIXFILE_DELETE;
}
- if( isDelete ) pNew->ctrlFlags |= UNIXFILE_DELETE;
#endif
if( rc!=SQLITE_OK ){
if( h>=0 ) robust_close(pNew, h, __LINE__);
}else{
pNew->pMethod = pLockingStyle;
OpenCounter(+1);
+ verifyDbFile(pNew);
}
return rc;
}
@@ -29922,7 +30488,7 @@ SQLITE_API int sqlite3_os_init(void){
/* Double-check that the aSyscall[] array has been constructed
** correctly. See ticket [bb3a86e890c8e96ab] */
- assert( ArraySize(aSyscall)==21 );
+ assert( ArraySize(aSyscall)==24 );
/* Register all VFSes defined in the aVfs[] array */
for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){
@@ -30305,11 +30871,20 @@ struct winFile {
winceLock local; /* Locks obtained by this instance of winFile */
winceLock *shared; /* Global shared lock memory for the file */
#endif
+#if SQLITE_MAX_MMAP_SIZE>0
+ int nFetchOut; /* Number of outstanding xFetch references */
+ HANDLE hMap; /* Handle for accessing memory mapping */
+ void *pMapRegion; /* Area memory mapped */
+ sqlite3_int64 mmapSize; /* Usable size of mapped region */
+ sqlite3_int64 mmapSizeActual; /* Actual size of mapped region */
+ sqlite3_int64 mmapSizeMax; /* Configured FCNTL_MMAP_SIZE value */
+#endif
};
/*
** Allowed values for winFile.ctrlFlags
*/
+#define WINFILE_RDONLY 0x02 /* Connection is read only */
#define WINFILE_PERSIST_WAL 0x04 /* Persistent WAL mode */
#define WINFILE_PSOW 0x10 /* SQLITE_IOCAP_POWERSAFE_OVERWRITE */
@@ -31669,7 +32244,7 @@ static int getLastErrorMsg(DWORD lastErrno, int nBuf, char *zBuf){
}
#endif
if( 0 == dwLen ){
- sqlite3_snprintf(nBuf, zBuf, "OsError 0x%x (%u)", lastErrno, lastErrno);
+ sqlite3_snprintf(nBuf, zBuf, "OsError 0x%lx (%lu)", lastErrno, lastErrno);
}else{
/* copy a maximum of nBuf chars to output buffer */
sqlite3_snprintf(nBuf, zBuf, "%s", zOut);
@@ -31712,7 +32287,7 @@ static int winLogErrorAtLine(
for(i=0; zMsg[i] && zMsg[i]!='\r' && zMsg[i]!='\n'; i++){}
zMsg[i] = 0;
sqlite3_log(errcode,
- "os_win.c:%d: (%d) %s(%s) - %s",
+ "os_win.c:%d: (%lu) %s(%s) - %s",
iLine, lastErrno, zFunc, zPath, zMsg
);
@@ -32173,6 +32748,8 @@ static int seekWinFile(winFile *pFile, sqlite3_int64 iOffset){
DWORD dwRet; /* Value returned by SetFilePointer() */
DWORD lastErrno; /* Value returned by GetLastError() */
+ OSTRACE(("SEEK file=%p, offset=%lld\n", pFile->h, iOffset));
+
upperBits = (LONG)((iOffset>>32) & 0x7fffffff);
lowerBits = (LONG)(iOffset & 0xffffffff);
@@ -32190,9 +32767,11 @@ static int seekWinFile(winFile *pFile, sqlite3_int64 iOffset){
pFile->lastErrno = lastErrno;
winLogError(SQLITE_IOERR_SEEK, pFile->lastErrno,
"seekWinFile", pFile->zPath);
+ OSTRACE(("SEEK file=%p, rc=SQLITE_IOERR_SEEK\n", pFile->h));
return 1;
}
+ OSTRACE(("SEEK file=%p, rc=SQLITE_OK\n", pFile->h));
return 0;
#else
/*
@@ -32209,13 +32788,20 @@ static int seekWinFile(winFile *pFile, sqlite3_int64 iOffset){
pFile->lastErrno = osGetLastError();
winLogError(SQLITE_IOERR_SEEK, pFile->lastErrno,
"seekWinFile", pFile->zPath);
+ OSTRACE(("SEEK file=%p, rc=SQLITE_IOERR_SEEK\n", pFile->h));
return 1;
}
+ OSTRACE(("SEEK file=%p, rc=SQLITE_OK\n", pFile->h));
return 0;
#endif
}
+#if SQLITE_MAX_MMAP_SIZE>0
+/* Forward references to VFS methods */
+static int winUnmapfile(winFile*);
+#endif
+
/*
** Close a file.
**
@@ -32235,8 +32821,14 @@ static int winClose(sqlite3_file *id){
#ifndef SQLITE_OMIT_WAL
assert( pFile->pShm==0 );
#endif
- OSTRACE(("CLOSE %d\n", pFile->h));
assert( pFile->h!=NULL && pFile->h!=INVALID_HANDLE_VALUE );
+ OSTRACE(("CLOSE file=%p\n", pFile->h));
+
+#if SQLITE_MAX_MMAP_SIZE>0
+ rc = winUnmapfile(pFile);
+ if( rc!=SQLITE_OK ) return rc;
+#endif
+
do{
rc = osCloseHandle(pFile->h);
/* SimulateIOError( rc=0; cnt=MX_CLOSE_ATTEMPT; ); */
@@ -32256,11 +32848,11 @@ static int winClose(sqlite3_file *id){
sqlite3_free(pFile->zDeleteOnClose);
}
#endif
- OSTRACE(("CLOSE %d %s\n", pFile->h, rc ? "ok" : "failed"));
if( rc ){
pFile->h = NULL;
}
OpenCounter(-1);
+ OSTRACE(("CLOSE file=%p, rc=%s\n", pFile->h, rc ? "ok" : "failed"));
return rc ? SQLITE_OK
: winLogError(SQLITE_IOERR_CLOSE, osGetLastError(),
"winClose", pFile->zPath);
@@ -32285,11 +32877,33 @@ static int winRead(
int nRetry = 0; /* Number of retrys */
assert( id!=0 );
+ assert( amt>0 );
+ assert( offset>=0 );
SimulateIOError(return SQLITE_IOERR_READ);
- OSTRACE(("READ %d lock=%d\n", pFile->h, pFile->locktype));
+ OSTRACE(("READ file=%p, buffer=%p, amount=%d, offset=%lld, lock=%d\n",
+ pFile->h, pBuf, amt, offset, pFile->locktype));
+
+#if SQLITE_MAX_MMAP_SIZE>0
+ /* Deal with as much of this read request as possible by transfering
+ ** data from the memory mapping using memcpy(). */
+ if( offset<pFile->mmapSize ){
+ if( offset+amt <= pFile->mmapSize ){
+ memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);
+ OSTRACE(("READ-MMAP file=%p, rc=SQLITE_OK\n", pFile->h));
+ return SQLITE_OK;
+ }else{
+ int nCopy = (int)(pFile->mmapSize - offset);
+ memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);
+ pBuf = &((u8 *)pBuf)[nCopy];
+ amt -= nCopy;
+ offset += nCopy;
+ }
+ }
+#endif
#if SQLITE_OS_WINCE
if( seekWinFile(pFile, offset) ){
+ OSTRACE(("READ file=%p, rc=SQLITE_FULL\n", pFile->h));
return SQLITE_FULL;
}
while( !osReadFile(pFile->h, pBuf, amt, &nRead, 0) ){
@@ -32303,6 +32917,7 @@ static int winRead(
DWORD lastErrno;
if( retryIoerr(&nRetry, &lastErrno) ) continue;
pFile->lastErrno = lastErrno;
+ OSTRACE(("READ file=%p, rc=SQLITE_IOERR_READ\n", pFile->h));
return winLogError(SQLITE_IOERR_READ, pFile->lastErrno,
"winRead", pFile->zPath);
}
@@ -32310,9 +32925,11 @@ static int winRead(
if( nRead<(DWORD)amt ){
/* Unread parts of the buffer must be zero-filled */
memset(&((char*)pBuf)[nRead], 0, amt-nRead);
+ OSTRACE(("READ file=%p, rc=SQLITE_IOERR_SHORT_READ\n", pFile->h));
return SQLITE_IOERR_SHORT_READ;
}
+ OSTRACE(("READ file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
@@ -32335,7 +32952,26 @@ static int winWrite(
SimulateIOError(return SQLITE_IOERR_WRITE);
SimulateDiskfullError(return SQLITE_FULL);
- OSTRACE(("WRITE %d lock=%d\n", pFile->h, pFile->locktype));
+ OSTRACE(("WRITE file=%p, buffer=%p, amount=%d, offset=%lld, lock=%d\n",
+ pFile->h, pBuf, amt, offset, pFile->locktype));
+
+#if SQLITE_MAX_MMAP_SIZE>0
+ /* Deal with as much of this write request as possible by transfering
+ ** data from the memory mapping using memcpy(). */
+ if( offset<pFile->mmapSize ){
+ if( offset+amt <= pFile->mmapSize ){
+ memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);
+ OSTRACE(("WRITE-MMAP file=%p, rc=SQLITE_OK\n", pFile->h));
+ return SQLITE_OK;
+ }else{
+ int nCopy = (int)(pFile->mmapSize - offset);
+ memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);
+ pBuf = &((u8 *)pBuf)[nCopy];
+ amt -= nCopy;
+ offset += nCopy;
+ }
+ }
+#endif
#if SQLITE_OS_WINCE
rc = seekWinFile(pFile, offset);
@@ -32388,13 +33024,16 @@ static int winWrite(
if( rc ){
if( ( pFile->lastErrno==ERROR_HANDLE_DISK_FULL )
|| ( pFile->lastErrno==ERROR_DISK_FULL )){
+ OSTRACE(("WRITE file=%p, rc=SQLITE_FULL\n", pFile->h));
return SQLITE_FULL;
}
+ OSTRACE(("WRITE file=%p, rc=SQLITE_IOERR_WRITE\n", pFile->h));
return winLogError(SQLITE_IOERR_WRITE, pFile->lastErrno,
"winWrite", pFile->zPath);
}else{
logIoerr(nRetry);
}
+ OSTRACE(("WRITE file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
@@ -32404,11 +33043,12 @@ static int winWrite(
static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
winFile *pFile = (winFile*)id; /* File handle object */
int rc = SQLITE_OK; /* Return code for this function */
+ DWORD lastErrno;
assert( pFile );
-
- OSTRACE(("TRUNCATE %d %lld\n", pFile->h, nByte));
SimulateIOError(return SQLITE_IOERR_TRUNCATE);
+ OSTRACE(("TRUNCATE file=%p, size=%lld, lock=%d\n",
+ pFile->h, nByte, pFile->locktype));
/* If the user has configured a chunk-size for this file, truncate the
** file so that it consists of an integer number of chunks (i.e. the
@@ -32422,14 +33062,25 @@ static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
/* SetEndOfFile() returns non-zero when successful, or zero when it fails. */
if( seekWinFile(pFile, nByte) ){
rc = winLogError(SQLITE_IOERR_TRUNCATE, pFile->lastErrno,
- "winTruncate1", pFile->zPath);
- }else if( 0==osSetEndOfFile(pFile->h) ){
- pFile->lastErrno = osGetLastError();
+ "winTruncate1", pFile->zPath);
+ }else if( 0==osSetEndOfFile(pFile->h) &&
+ ((lastErrno = osGetLastError())!=ERROR_USER_MAPPED_FILE) ){
+ pFile->lastErrno = lastErrno;
rc = winLogError(SQLITE_IOERR_TRUNCATE, pFile->lastErrno,
- "winTruncate2", pFile->zPath);
+ "winTruncate2", pFile->zPath);
}
- OSTRACE(("TRUNCATE %d %lld %s\n", pFile->h, nByte, rc ? "failed" : "ok"));
+#if SQLITE_MAX_MMAP_SIZE>0
+ /* If the file was truncated to a size smaller than the currently
+ ** mapped region, reduce the effective mapping size as well. SQLite will
+ ** use read() and write() to access data beyond this point from now on.
+ */
+ if( pFile->pMapRegion && nByte<pFile->mmapSize ){
+ pFile->mmapSize = nByte;
+ }
+#endif
+
+ OSTRACE(("TRUNCATE file=%p, rc=%s\n", pFile->h, sqlite3ErrName(rc)));
return rc;
}
@@ -32469,13 +33120,14 @@ static int winSync(sqlite3_file *id, int flags){
|| (flags&0x0F)==SQLITE_SYNC_FULL
);
- OSTRACE(("SYNC %d lock=%d\n", pFile->h, pFile->locktype));
-
/* Unix cannot, but some systems may return SQLITE_FULL from here. This
** line is to test that doing so does not cause any problems.
*/
SimulateDiskfullError( return SQLITE_FULL );
+ OSTRACE(("SYNC file=%p, flags=%x, lock=%d\n",
+ pFile->h, flags, pFile->locktype));
+
#ifndef SQLITE_TEST
UNUSED_PARAMETER(flags);
#else
@@ -32494,9 +33146,11 @@ static int winSync(sqlite3_file *id, int flags){
rc = osFlushFileBuffers(pFile->h);
SimulateIOError( rc=FALSE );
if( rc ){
+ OSTRACE(("SYNC file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}else{
pFile->lastErrno = osGetLastError();
+ OSTRACE(("SYNC file=%p, rc=SQLITE_IOERR_FSYNC\n", pFile->h));
return winLogError(SQLITE_IOERR_FSYNC, pFile->lastErrno,
"winSync", pFile->zPath);
}
@@ -32511,7 +33165,10 @@ static int winFileSize(sqlite3_file *id, sqlite3_int64 *pSize){
int rc = SQLITE_OK;
assert( id!=0 );
+ assert( pSize!=0 );
SimulateIOError(return SQLITE_IOERR_FSTAT);
+ OSTRACE(("SIZE file=%p, pSize=%p\n", pFile->h, pSize));
+
#if SQLITE_OS_WINRT
{
FILE_STANDARD_INFO info;
@@ -32540,6 +33197,8 @@ static int winFileSize(sqlite3_file *id, sqlite3_int64 *pSize){
}
}
#endif
+ OSTRACE(("SIZE file=%p, pSize=%p, *pSize=%lld, rc=%s\n",
+ pFile->h, pSize, *pSize, sqlite3ErrName(rc)));
return rc;
}
@@ -32581,6 +33240,7 @@ static int winFileSize(sqlite3_file *id, sqlite3_int64 *pSize){
*/
static int getReadLock(winFile *pFile){
int res;
+ OSTRACE(("READ-LOCK file=%p, lock=%d\n", pFile->h, pFile->locktype));
if( isNT() ){
#if SQLITE_OS_WINCE
/*
@@ -32606,6 +33266,7 @@ static int getReadLock(winFile *pFile){
pFile->lastErrno = osGetLastError();
/* No need to log a failure to lock */
}
+ OSTRACE(("READ-LOCK file=%p, rc=%s\n", pFile->h, sqlite3ErrName(res)));
return res;
}
@@ -32615,6 +33276,7 @@ static int getReadLock(winFile *pFile){
static int unlockReadLock(winFile *pFile){
int res;
DWORD lastErrno;
+ OSTRACE(("READ-UNLOCK file=%p, lock=%d\n", pFile->h, pFile->locktype));
if( isNT() ){
res = winUnlockFile(&pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
}
@@ -32628,6 +33290,7 @@ static int unlockReadLock(winFile *pFile){
winLogError(SQLITE_IOERR_UNLOCK, pFile->lastErrno,
"unlockReadLock", pFile->zPath);
}
+ OSTRACE(("READ-UNLOCK file=%p, rc=%s\n", pFile->h, sqlite3ErrName(res)));
return res;
}
@@ -32666,14 +33329,15 @@ static int winLock(sqlite3_file *id, int locktype){
DWORD lastErrno = NO_ERROR;
assert( id!=0 );
- OSTRACE(("LOCK %d %d was %d(%d)\n",
- pFile->h, locktype, pFile->locktype, pFile->sharedLockByte));
+ OSTRACE(("LOCK file=%p, oldLock=%d(%d), newLock=%d\n",
+ pFile->h, pFile->locktype, pFile->sharedLockByte, locktype));
/* If there is already a lock of this type or more restrictive on the
** OsFile, do nothing. Don't use the end_lock: exit path, as
** sqlite3OsEnterMutex() hasn't been called yet.
*/
if( pFile->locktype>=locktype ){
+ OSTRACE(("LOCK-HELD file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
@@ -32701,7 +33365,8 @@ static int winLock(sqlite3_file *id, int locktype){
** If you are using this code as a model for alternative VFSes, do not
** copy this retry logic. It is a hack intended for Windows only.
*/
- OSTRACE(("could not get a PENDING lock. cnt=%d\n", cnt));
+ OSTRACE(("LOCK-PENDING-FAIL file=%p, count=%d, rc=%s\n",
+ pFile->h, cnt, sqlite3ErrName(res)));
if( cnt ) sqlite3_win32_sleep(1);
}
gotPendingLock = res;
@@ -32746,14 +33411,12 @@ static int winLock(sqlite3_file *id, int locktype){
if( locktype==EXCLUSIVE_LOCK && res ){
assert( pFile->locktype>=SHARED_LOCK );
res = unlockReadLock(pFile);
- OSTRACE(("unreadlock = %d\n", res));
res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS, SHARED_FIRST, 0,
SHARED_SIZE, 0);
if( res ){
newLocktype = EXCLUSIVE_LOCK;
}else{
lastErrno = osGetLastError();
- OSTRACE(("error-code = %d\n", lastErrno));
getReadLock(pFile);
}
}
@@ -32771,12 +33434,14 @@ static int winLock(sqlite3_file *id, int locktype){
if( res ){
rc = SQLITE_OK;
}else{
- OSTRACE(("LOCK FAILED %d trying for %d but got %d\n", pFile->h,
- locktype, newLocktype));
+ OSTRACE(("LOCK-FAIL file=%p, wanted=%d, got=%d\n",
+ pFile->h, locktype, newLocktype));
pFile->lastErrno = lastErrno;
rc = SQLITE_BUSY;
}
pFile->locktype = (u8)newLocktype;
+ OSTRACE(("LOCK file=%p, lock=%d, rc=%s\n",
+ pFile->h, pFile->locktype, sqlite3ErrName(rc)));
return rc;
}
@@ -32790,20 +33455,23 @@ static int winCheckReservedLock(sqlite3_file *id, int *pResOut){
winFile *pFile = (winFile*)id;
SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
+ OSTRACE(("TEST-WR-LOCK file=%p, pResOut=%p\n", pFile->h, pResOut));
assert( id!=0 );
if( pFile->locktype>=RESERVED_LOCK ){
rc = 1;
- OSTRACE(("TEST WR-LOCK %d %d (local)\n", pFile->h, rc));
+ OSTRACE(("TEST-WR-LOCK file=%p, rc=%d (local)\n", pFile->h, rc));
}else{
rc = winLockFile(&pFile->h, SQLITE_LOCKFILEEX_FLAGS,RESERVED_BYTE, 0, 1, 0);
if( rc ){
winUnlockFile(&pFile->h, RESERVED_BYTE, 0, 1, 0);
}
rc = !rc;
- OSTRACE(("TEST WR-LOCK %d %d (remote)\n", pFile->h, rc));
+ OSTRACE(("TEST-WR-LOCK file=%p, rc=%d (remote)\n", pFile->h, rc));
}
*pResOut = rc;
+ OSTRACE(("TEST-WR-LOCK file=%p, pResOut=%p, *pResOut=%d, rc=SQLITE_OK\n",
+ pFile->h, pResOut, *pResOut));
return SQLITE_OK;
}
@@ -32824,8 +33492,8 @@ static int winUnlock(sqlite3_file *id, int locktype){
int rc = SQLITE_OK;
assert( pFile!=0 );
assert( locktype<=SHARED_LOCK );
- OSTRACE(("UNLOCK %d to %d was %d(%d)\n", pFile->h, locktype,
- pFile->locktype, pFile->sharedLockByte));
+ OSTRACE(("UNLOCK file=%p, oldLock=%d(%d), newLock=%d\n",
+ pFile->h, pFile->locktype, pFile->sharedLockByte, locktype));
type = pFile->locktype;
if( type>=EXCLUSIVE_LOCK ){
winUnlockFile(&pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
@@ -32846,6 +33514,8 @@ static int winUnlock(sqlite3_file *id, int locktype){
winUnlockFile(&pFile->h, PENDING_BYTE, 0, 1, 0);
}
pFile->locktype = (u8)locktype;
+ OSTRACE(("UNLOCK file=%p, lock=%d, rc=%s\n",
+ pFile->h, pFile->locktype, sqlite3ErrName(rc)));
return rc;
}
@@ -32873,17 +33543,21 @@ static int getTempname(int nBuf, char *zBuf);
*/
static int winFileControl(sqlite3_file *id, int op, void *pArg){
winFile *pFile = (winFile*)id;
+ OSTRACE(("FCNTL file=%p, op=%d, pArg=%p\n", pFile->h, op, pArg));
switch( op ){
case SQLITE_FCNTL_LOCKSTATE: {
*(int*)pArg = pFile->locktype;
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_LAST_ERRNO: {
*(int*)pArg = (int)pFile->lastErrno;
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_FCNTL_CHUNK_SIZE: {
pFile->szChunk = *(int *)pArg;
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_FCNTL_SIZE_HINT: {
@@ -32898,20 +33572,25 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
SimulateIOErrorBenign(0);
}
}
+ OSTRACE(("FCNTL file=%p, rc=%s\n", pFile->h, sqlite3ErrName(rc)));
return rc;
}
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_FCNTL_PERSIST_WAL: {
winModeBit(pFile, WINFILE_PERSIST_WAL, (int*)pArg);
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_FCNTL_POWERSAFE_OVERWRITE: {
winModeBit(pFile, WINFILE_PSOW, (int*)pArg);
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_FCNTL_VFSNAME: {
*(char**)pArg = sqlite3_mprintf("win32");
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_FCNTL_WIN32_AV_RETRY: {
@@ -32926,6 +33605,7 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
}else{
a[1] = win32IoerrRetryDelay;
}
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_FCNTL_TEMPFILENAME: {
@@ -32934,9 +33614,23 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
getTempname(pFile->pVfs->mxPathname, zTFile);
*(char**)pArg = zTFile;
}
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
+ return SQLITE_OK;
+ }
+#if SQLITE_MAX_MMAP_SIZE>0
+ case SQLITE_FCNTL_MMAP_SIZE: {
+ i64 newLimit = *(i64*)pArg;
+ if( newLimit>sqlite3GlobalConfig.mxMmap ){
+ newLimit = sqlite3GlobalConfig.mxMmap;
+ }
+ *(i64*)pArg = pFile->mmapSizeMax;
+ if( newLimit>=0 ) pFile->mmapSizeMax = newLimit;
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
+#endif
}
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_NOTFOUND\n", pFile->h));
return SQLITE_NOTFOUND;
}
@@ -32964,8 +33658,6 @@ static int winDeviceCharacteristics(sqlite3_file *id){
((p->ctrlFlags & WINFILE_PSOW)?SQLITE_IOCAP_POWERSAFE_OVERWRITE:0);
}
-#ifndef SQLITE_OMIT_WAL
-
/*
** Windows will only let you create file view mappings
** on allocation size granularity boundaries.
@@ -32974,6 +33666,8 @@ static int winDeviceCharacteristics(sqlite3_file *id){
*/
SYSTEM_INFO winSysInfo;
+#ifndef SQLITE_OMIT_WAL
+
/*
** Helper functions to obtain and relinquish the global mutex. The
** global mutex is used to protect the winLockInfo objects used by
@@ -33097,6 +33791,9 @@ static int winShmSystemLock(
/* Access to the winShmNode object is serialized by the caller */
assert( sqlite3_mutex_held(pFile->mutex) || pFile->nRef==0 );
+ OSTRACE(("SHM-LOCK file=%p, lock=%d, offset=%d, size=%d\n",
+ pFile->hFile.h, lockType, ofst, nByte));
+
/* Release/Acquire the system-level lock */
if( lockType==_SHM_UNLCK ){
rc = winUnlockFile(&pFile->hFile.h, ofst, 0, nByte, 0);
@@ -33114,11 +33811,9 @@ static int winShmSystemLock(
rc = SQLITE_BUSY;
}
- OSTRACE(("SHM-LOCK %d %s %s 0x%08lx\n",
- pFile->hFile.h,
- rc==SQLITE_OK ? "ok" : "failed",
- lockType==_SHM_UNLCK ? "UnlockFileEx" : "LockFileEx",
- pFile->lastErrno));
+ OSTRACE(("SHM-LOCK file=%p, func=%s, errno=%lu, rc=%s\n",
+ pFile->hFile.h, (lockType == _SHM_UNLCK) ? "winUnlockFile" :
+ "winLockFile", pFile->lastErrno, sqlite3ErrName(rc)));
return rc;
}
@@ -33138,6 +33833,8 @@ static void winShmPurge(sqlite3_vfs *pVfs, int deleteFlag){
winShmNode *p;
BOOL bRc;
assert( winShmMutexHeld() );
+ OSTRACE(("SHM-PURGE pid=%lu, deleteFlag=%d\n",
+ osGetCurrentProcessId(), deleteFlag));
pp = &winShmNodeList;
while( (p = *pp)!=0 ){
if( p->nRef==0 ){
@@ -33145,13 +33842,11 @@ static void winShmPurge(sqlite3_vfs *pVfs, int deleteFlag){
if( p->mutex ) sqlite3_mutex_free(p->mutex);
for(i=0; i<p->nRegion; i++){
bRc = osUnmapViewOfFile(p->aRegion[i].pMap);
- OSTRACE(("SHM-PURGE pid-%d unmap region=%d %s\n",
- (int)osGetCurrentProcessId(), i,
- bRc ? "ok" : "failed"));
+ OSTRACE(("SHM-PURGE-UNMAP pid=%lu, region=%d, rc=%s\n",
+ osGetCurrentProcessId(), i, bRc ? "ok" : "failed"));
bRc = osCloseHandle(p->aRegion[i].hMap);
- OSTRACE(("SHM-PURGE pid-%d close region=%d %s\n",
- (int)osGetCurrentProcessId(), i,
- bRc ? "ok" : "failed"));
+ OSTRACE(("SHM-PURGE-CLOSE pid=%lu, region=%d, rc=%s\n",
+ osGetCurrentProcessId(), i, bRc ? "ok" : "failed"));
}
if( p->hFile.h!=NULL && p->hFile.h!=INVALID_HANDLE_VALUE ){
SimulateIOErrorBenign(1);
@@ -33430,9 +34125,9 @@ static int winShmLock(
}
}
sqlite3_mutex_leave(pShmNode->mutex);
- OSTRACE(("SHM-LOCK shmid-%d, pid-%d got %03x,%03x %s\n",
- p->id, (int)osGetCurrentProcessId(), p->sharedMask, p->exclMask,
- rc ? "failed" : "ok"));
+ OSTRACE(("SHM-LOCK pid=%lu, id=%d, sharedMask=%03x, exclMask=%03x, rc=%s\n",
+ osGetCurrentProcessId(), p->id, p->sharedMask, p->exclMask,
+ sqlite3ErrName(rc)));
return rc;
}
@@ -33553,8 +34248,8 @@ static int winShmMap(
NULL, PAGE_READWRITE, 0, nByte, NULL
);
#endif
- OSTRACE(("SHM-MAP pid-%d create region=%d nbyte=%d %s\n",
- (int)osGetCurrentProcessId(), pShmNode->nRegion, nByte,
+ OSTRACE(("SHM-MAP-CREATE pid=%lu, region=%d, size=%d, rc=%s\n",
+ osGetCurrentProcessId(), pShmNode->nRegion, nByte,
hMap ? "ok" : "failed"));
if( hMap ){
int iOffset = pShmNode->nRegion*szRegion;
@@ -33568,8 +34263,8 @@ static int winShmMap(
0, iOffset - iOffsetShift, szRegion + iOffsetShift
);
#endif
- OSTRACE(("SHM-MAP pid-%d map region=%d offset=%d size=%d %s\n",
- (int)osGetCurrentProcessId(), pShmNode->nRegion, iOffset,
+ OSTRACE(("SHM-MAP-MAP pid=%lu, region=%d, offset=%d, size=%d, rc=%s\n",
+ osGetCurrentProcessId(), pShmNode->nRegion, iOffset,
szRegion, pMap ? "ok" : "failed"));
}
if( !pMap ){
@@ -33607,6 +34302,230 @@ shmpage_out:
#endif /* #ifndef SQLITE_OMIT_WAL */
/*
+** Cleans up the mapped region of the specified file, if any.
+*/
+#if SQLITE_MAX_MMAP_SIZE>0
+static int winUnmapfile(winFile *pFile){
+ assert( pFile!=0 );
+ OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, pMapRegion=%p, "
+ "mmapSize=%lld, mmapSizeActual=%lld, mmapSizeMax=%lld\n",
+ osGetCurrentProcessId(), pFile, pFile->hMap, pFile->pMapRegion,
+ pFile->mmapSize, pFile->mmapSizeActual, pFile->mmapSizeMax));
+ if( pFile->pMapRegion ){
+ if( !osUnmapViewOfFile(pFile->pMapRegion) ){
+ pFile->lastErrno = osGetLastError();
+ OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, pMapRegion=%p, "
+ "rc=SQLITE_IOERR_MMAP\n", osGetCurrentProcessId(), pFile,
+ pFile->pMapRegion));
+ return winLogError(SQLITE_IOERR_MMAP, pFile->lastErrno,
+ "winUnmap1", pFile->zPath);
+ }
+ pFile->pMapRegion = 0;
+ pFile->mmapSize = 0;
+ pFile->mmapSizeActual = 0;
+ }
+ if( pFile->hMap!=NULL ){
+ if( !osCloseHandle(pFile->hMap) ){
+ pFile->lastErrno = osGetLastError();
+ OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, rc=SQLITE_IOERR_MMAP\n",
+ osGetCurrentProcessId(), pFile, pFile->hMap));
+ return winLogError(SQLITE_IOERR_MMAP, pFile->lastErrno,
+ "winUnmap2", pFile->zPath);
+ }
+ pFile->hMap = NULL;
+ }
+ OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, rc=SQLITE_OK\n",
+ osGetCurrentProcessId(), pFile));
+ return SQLITE_OK;
+}
+
+/*
+** Memory map or remap the file opened by file-descriptor pFd (if the file
+** is already mapped, the existing mapping is replaced by the new). Or, if
+** there already exists a mapping for this file, and there are still
+** outstanding xFetch() references to it, this function is a no-op.
+**
+** If parameter nByte is non-negative, then it is the requested size of
+** the mapping to create. Otherwise, if nByte is less than zero, then the
+** requested size is the size of the file on disk. The actual size of the
+** created mapping is either the requested size or the value configured
+** using SQLITE_FCNTL_MMAP_SIZE, whichever is smaller.
+**
+** SQLITE_OK is returned if no error occurs (even if the mapping is not
+** recreated as a result of outstanding references) or an SQLite error
+** code otherwise.
+*/
+static int winMapfile(winFile *pFd, sqlite3_int64 nByte){
+ sqlite3_int64 nMap = nByte;
+ int rc;
+
+ assert( nMap>=0 || pFd->nFetchOut==0 );
+ OSTRACE(("MAP-FILE pid=%lu, pFile=%p, size=%lld\n",
+ osGetCurrentProcessId(), pFd, nByte));
+
+ if( pFd->nFetchOut>0 ) return SQLITE_OK;
+
+ if( nMap<0 ){
+ rc = winFileSize((sqlite3_file*)pFd, &nMap);
+ if( rc ){
+ OSTRACE(("MAP-FILE pid=%lu, pFile=%p, rc=SQLITE_IOERR_FSTAT\n",
+ osGetCurrentProcessId(), pFd));
+ return SQLITE_IOERR_FSTAT;
+ }
+ }
+ if( nMap>pFd->mmapSizeMax ){
+ nMap = pFd->mmapSizeMax;
+ }
+ nMap &= ~(sqlite3_int64)(winSysInfo.dwPageSize - 1);
+
+ if( nMap==0 && pFd->mmapSize>0 ){
+ winUnmapfile(pFd);
+ }
+ if( nMap!=pFd->mmapSize ){
+ void *pNew = 0;
+ DWORD protect = PAGE_READONLY;
+ DWORD flags = FILE_MAP_READ;
+
+ winUnmapfile(pFd);
+ if( (pFd->ctrlFlags & WINFILE_RDONLY)==0 ){
+ protect = PAGE_READWRITE;
+ flags |= FILE_MAP_WRITE;
+ }
+#if SQLITE_OS_WINRT
+ pFd->hMap = osCreateFileMappingFromApp(pFd->h, NULL, protect, nMap, NULL);
+#elif defined(SQLITE_WIN32_HAS_WIDE)
+ pFd->hMap = osCreateFileMappingW(pFd->h, NULL, protect,
+ (DWORD)((nMap>>32) & 0xffffffff),
+ (DWORD)(nMap & 0xffffffff), NULL);
+#elif defined(SQLITE_WIN32_HAS_ANSI)
+ pFd->hMap = osCreateFileMappingA(pFd->h, NULL, protect,
+ (DWORD)((nMap>>32) & 0xffffffff),
+ (DWORD)(nMap & 0xffffffff), NULL);
+#endif
+ if( pFd->hMap==NULL ){
+ pFd->lastErrno = osGetLastError();
+ rc = winLogError(SQLITE_IOERR_MMAP, pFd->lastErrno,
+ "winMapfile", pFd->zPath);
+ /* Log the error, but continue normal operation using xRead/xWrite */
+ OSTRACE(("MAP-FILE-CREATE pid=%lu, pFile=%p, rc=SQLITE_IOERR_MMAP\n",
+ osGetCurrentProcessId(), pFd));
+ return SQLITE_OK;
+ }
+ assert( (nMap % winSysInfo.dwPageSize)==0 );
+#if SQLITE_OS_WINRT
+ pNew = osMapViewOfFileFromApp(pFd->hMap, flags, 0, nMap);
+#else
+ assert( sizeof(SIZE_T)==sizeof(sqlite3_int64) || nMap<=0xffffffff );
+ pNew = osMapViewOfFile(pFd->hMap, flags, 0, 0, (SIZE_T)nMap);
+#endif
+ if( pNew==NULL ){
+ osCloseHandle(pFd->hMap);
+ pFd->hMap = NULL;
+ pFd->lastErrno = osGetLastError();
+ winLogError(SQLITE_IOERR_MMAP, pFd->lastErrno,
+ "winMapfile", pFd->zPath);
+ OSTRACE(("MAP-FILE-MAP pid=%lu, pFile=%p, rc=SQLITE_IOERR_MMAP\n",
+ osGetCurrentProcessId(), pFd));
+ return SQLITE_OK;
+ }
+ pFd->pMapRegion = pNew;
+ pFd->mmapSize = nMap;
+ pFd->mmapSizeActual = nMap;
+ }
+
+ OSTRACE(("MAP-FILE pid=%lu, pFile=%p, rc=SQLITE_OK\n",
+ osGetCurrentProcessId(), pFd));
+ return SQLITE_OK;
+}
+#endif /* SQLITE_MAX_MMAP_SIZE>0 */
+
+/*
+** If possible, return a pointer to a mapping of file fd starting at offset
+** iOff. The mapping must be valid for at least nAmt bytes.
+**
+** If such a pointer can be obtained, store it in *pp and return SQLITE_OK.
+** Or, if one cannot but no error occurs, set *pp to 0 and return SQLITE_OK.
+** Finally, if an error does occur, return an SQLite error code. The final
+** value of *pp is undefined in this case.
+**
+** If this function does return a pointer, the caller must eventually
+** release the reference by calling winUnfetch().
+*/
+static int winFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){
+#if SQLITE_MAX_MMAP_SIZE>0
+ winFile *pFd = (winFile*)fd; /* The underlying database file */
+#endif
+ *pp = 0;
+
+ OSTRACE(("FETCH pid=%lu, pFile=%p, offset=%lld, amount=%d, pp=%p\n",
+ osGetCurrentProcessId(), fd, iOff, nAmt, pp));
+
+#if SQLITE_MAX_MMAP_SIZE>0
+ if( pFd->mmapSizeMax>0 ){
+ if( pFd->pMapRegion==0 ){
+ int rc = winMapfile(pFd, -1);
+ if( rc!=SQLITE_OK ){
+ OSTRACE(("FETCH pid=%lu, pFile=%p, rc=%s\n",
+ osGetCurrentProcessId(), pFd, sqlite3ErrName(rc)));
+ return rc;
+ }
+ }
+ if( pFd->mmapSize >= iOff+nAmt ){
+ *pp = &((u8 *)pFd->pMapRegion)[iOff];
+ pFd->nFetchOut++;
+ }
+ }
+#endif
+
+ OSTRACE(("FETCH pid=%lu, pFile=%p, pp=%p, *pp=%p, rc=SQLITE_OK\n",
+ osGetCurrentProcessId(), fd, pp, *pp));
+ return SQLITE_OK;
+}
+
+/*
+** If the third argument is non-NULL, then this function releases a
+** reference obtained by an earlier call to winFetch(). The second
+** argument passed to this function must be the same as the corresponding
+** argument that was passed to the winFetch() invocation.
+**
+** Or, if the third argument is NULL, then this function is being called
+** to inform the VFS layer that, according to POSIX, any existing mapping
+** may now be invalid and should be unmapped.
+*/
+static int winUnfetch(sqlite3_file *fd, i64 iOff, void *p){
+#if SQLITE_MAX_MMAP_SIZE>0
+ winFile *pFd = (winFile*)fd; /* The underlying database file */
+
+ /* If p==0 (unmap the entire file) then there must be no outstanding
+ ** xFetch references. Or, if p!=0 (meaning it is an xFetch reference),
+ ** then there must be at least one outstanding. */
+ assert( (p==0)==(pFd->nFetchOut==0) );
+
+ /* If p!=0, it must match the iOff value. */
+ assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );
+
+ OSTRACE(("UNFETCH pid=%lu, pFile=%p, offset=%lld, p=%p\n",
+ osGetCurrentProcessId(), pFd, iOff, p));
+
+ if( p ){
+ pFd->nFetchOut--;
+ }else{
+ /* FIXME: If Windows truly always prevents truncating or deleting a
+ ** file while a mapping is held, then the following winUnmapfile() call
+ ** is unnecessary can can be omitted - potentially improving
+ ** performance. */
+ winUnmapfile(pFd);
+ }
+
+ assert( pFd->nFetchOut>=0 );
+#endif
+
+ OSTRACE(("UNFETCH pid=%lu, pFile=%p, rc=SQLITE_OK\n",
+ osGetCurrentProcessId(), fd));
+ return SQLITE_OK;
+}
+
+/*
** Here ends the implementation of all sqlite3_file methods.
**
********************** End sqlite3_file Methods *******************************
@@ -33617,7 +34536,7 @@ shmpage_out:
** sqlite3_file for win32.
*/
static const sqlite3_io_methods winIoMethod = {
- 2, /* iVersion */
+ 3, /* iVersion */
winClose, /* xClose */
winRead, /* xRead */
winWrite, /* xWrite */
@@ -33633,7 +34552,9 @@ static const sqlite3_io_methods winIoMethod = {
winShmMap, /* xShmMap */
winShmLock, /* xShmLock */
winShmBarrier, /* xShmBarrier */
- winShmUnmap /* xShmUnmap */
+ winShmUnmap, /* xShmUnmap */
+ winFetch, /* xFetch */
+ winUnfetch /* xUnfetch */
};
/****************************************************************************
@@ -33697,6 +34618,7 @@ static int getTempname(int nBuf, char *zBuf){
sqlite3_snprintf(MAX_PATH-30, zTempPath, "%s", zMulti);
sqlite3_free(zMulti);
}else{
+ OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
return SQLITE_IOERR_NOMEM;
}
}
@@ -33710,6 +34632,7 @@ static int getTempname(int nBuf, char *zBuf){
sqlite3_snprintf(MAX_PATH-30, zTempPath, "%s", zUtf8);
sqlite3_free(zUtf8);
}else{
+ OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
return SQLITE_IOERR_NOMEM;
}
}
@@ -33722,6 +34645,7 @@ static int getTempname(int nBuf, char *zBuf){
nTempPath = sqlite3Strlen30(zTempPath);
if( (nTempPath + sqlite3Strlen30(SQLITE_TEMP_FILE_PREFIX) + 18) >= nBuf ){
+ OSTRACE(("TEMP-FILENAME rc=SQLITE_ERROR\n"));
return SQLITE_ERROR;
}
@@ -33739,8 +34663,8 @@ static int getTempname(int nBuf, char *zBuf){
zBuf[j] = 0;
zBuf[j+1] = 0;
- OSTRACE(("TEMP FILENAME: %s\n", zBuf));
- return SQLITE_OK;
+ OSTRACE(("TEMP-FILENAME name=%s, rc=SQLITE_OK\n", zBuf));
+ return SQLITE_OK;
}
/*
@@ -33809,9 +34733,7 @@ static int winOpen(
int isExclusive = (flags & SQLITE_OPEN_EXCLUSIVE);
int isDelete = (flags & SQLITE_OPEN_DELETEONCLOSE);
int isCreate = (flags & SQLITE_OPEN_CREATE);
-#ifndef NDEBUG
int isReadonly = (flags & SQLITE_OPEN_READONLY);
-#endif
int isReadWrite = (flags & SQLITE_OPEN_READWRITE);
#ifndef NDEBUG
@@ -33822,6 +34744,9 @@ static int winOpen(
));
#endif
+ OSTRACE(("OPEN name=%s, pFile=%p, flags=%x, pOutFlags=%p\n",
+ zUtf8Name, id, flags, pOutFlags));
+
/* Check the following statements are true:
**
** (a) Exactly one of the READWRITE and READONLY flags must be set, and
@@ -33867,6 +34792,7 @@ static int winOpen(
memset(zTmpname, 0, MAX_PATH+2);
rc = getTempname(MAX_PATH+2, zTmpname);
if( rc!=SQLITE_OK ){
+ OSTRACE(("OPEN name=%s, rc=%s", zUtf8Name, sqlite3ErrName(rc)));
return rc;
}
zUtf8Name = zTmpname;
@@ -33882,11 +34808,13 @@ static int winOpen(
/* Convert the filename to the system encoding. */
zConverted = convertUtf8Filename(zUtf8Name);
if( zConverted==0 ){
+ OSTRACE(("OPEN name=%s, rc=SQLITE_IOERR_NOMEM", zUtf8Name));
return SQLITE_IOERR_NOMEM;
}
if( winIsDir(zConverted) ){
sqlite3_free(zConverted);
+ OSTRACE(("OPEN name=%s, rc=SQLITE_CANTOPEN_ISDIR", zUtf8Name));
return SQLITE_CANTOPEN_ISDIR;
}
@@ -33977,9 +34905,8 @@ static int winOpen(
#endif
logIoerr(cnt);
- OSTRACE(("OPEN %d %s 0x%lx %s\n",
- h, zName, dwDesiredAccess,
- h==INVALID_HANDLE_VALUE ? "failed" : "ok"));
+ OSTRACE(("OPEN file=%p, name=%s, access=%lx, rc=%s\n", h, zUtf8Name,
+ dwDesiredAccess, (h==INVALID_HANDLE_VALUE) ? "failed" : "ok"));
if( h==INVALID_HANDLE_VALUE ){
pFile->lastErrno = lastErrno;
@@ -34003,12 +34930,17 @@ static int winOpen(
}
}
+ OSTRACE(("OPEN file=%p, name=%s, access=%lx, pOutFlags=%p, *pOutFlags=%d, "
+ "rc=%s\n", h, zUtf8Name, dwDesiredAccess, pOutFlags, pOutFlags ?
+ *pOutFlags : 0, (h==INVALID_HANDLE_VALUE) ? "failed" : "ok"));
+
#if SQLITE_OS_WINCE
if( isReadWrite && eType==SQLITE_OPEN_MAIN_DB
&& (rc = winceCreateLock(zName, pFile))!=SQLITE_OK
){
osCloseHandle(h);
sqlite3_free(zConverted);
+ OSTRACE(("OPEN-CE-LOCK name=%s, rc=%s\n", zName, sqlite3ErrName(rc)));
return rc;
}
if( isTemp ){
@@ -34022,11 +34954,21 @@ static int winOpen(
pFile->pMethod = &winIoMethod;
pFile->pVfs = pVfs;
pFile->h = h;
+ if( isReadonly ){
+ pFile->ctrlFlags |= WINFILE_RDONLY;
+ }
if( sqlite3_uri_boolean(zName, "psow", SQLITE_POWERSAFE_OVERWRITE) ){
pFile->ctrlFlags |= WINFILE_PSOW;
}
pFile->lastErrno = NO_ERROR;
pFile->zPath = zName;
+#if SQLITE_MAX_MMAP_SIZE>0
+ pFile->hMap = NULL;
+ pFile->pMapRegion = 0;
+ pFile->mmapSize = 0;
+ pFile->mmapSizeActual = 0;
+ pFile->mmapSizeMax = sqlite3GlobalConfig.szMmap;
+#endif
OpenCounter(+1);
return rc;
@@ -34058,6 +35000,8 @@ static int winDelete(
UNUSED_PARAMETER(syncDir);
SimulateIOError(return SQLITE_IOERR_DELETE);
+ OSTRACE(("DELETE name=%s, syncDir=%d\n", zFilename, syncDir));
+
zConverted = convertUtf8Filename(zFilename);
if( zConverted==0 ){
return SQLITE_IOERR_NOMEM;
@@ -34143,7 +35087,7 @@ static int winDelete(
logIoerr(cnt);
}
sqlite3_free(zConverted);
- OSTRACE(("DELETE \"%s\" %s\n", zFilename, (rc ? "failed" : "ok" )));
+ OSTRACE(("DELETE name=%s, rc=%s\n", zFilename, sqlite3ErrName(rc)));
return rc;
}
@@ -34163,8 +35107,12 @@ static int winAccess(
UNUSED_PARAMETER(pVfs);
SimulateIOError( return SQLITE_IOERR_ACCESS; );
+ OSTRACE(("ACCESS name=%s, flags=%x, pResOut=%p\n",
+ zFilename, flags, pResOut));
+
zConverted = convertUtf8Filename(zFilename);
if( zConverted==0 ){
+ OSTRACE(("ACCESS name=%s, rc=SQLITE_IOERR_NOMEM\n", zFilename));
return SQLITE_IOERR_NOMEM;
}
if( isNT() ){
@@ -34215,6 +35163,8 @@ static int winAccess(
assert(!"Invalid flags argument");
}
*pResOut = rc;
+ OSTRACE(("ACCESS name=%s, pResOut=%p, *pResOut=%d, rc=SQLITE_OK\n",
+ zFilename, pResOut, *pResOut));
return SQLITE_OK;
}
@@ -34655,7 +35605,6 @@ SQLITE_API int sqlite3_os_init(void){
** correctly. See ticket [bb3a86e890c8e96ab] */
assert( ArraySize(aSyscall)==74 );
-#ifndef SQLITE_OMIT_WAL
/* get memory map allocation granularity */
memset(&winSysInfo, 0, sizeof(SYSTEM_INFO));
#if SQLITE_OS_WINRT
@@ -34663,8 +35612,8 @@ SQLITE_API int sqlite3_os_init(void){
#else
osGetSystemInfo(&winSysInfo);
#endif
- assert(winSysInfo.dwAllocationGranularity > 0);
-#endif
+ assert( winSysInfo.dwAllocationGranularity>0 );
+ assert( winSysInfo.dwPageSize>0 );
sqlite3_vfs_register(&winVfs, 1);
return SQLITE_OK;
@@ -37301,7 +38250,6 @@ SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, u8 iBatch, sqlite3_int64 i
# define sqlite3WalClose(w,x,y,z) 0
# define sqlite3WalBeginReadTransaction(y,z) 0
# define sqlite3WalEndReadTransaction(z)
-# define sqlite3WalRead(v,w,x,y,z) 0
# define sqlite3WalDbsize(y) 0
# define sqlite3WalBeginWriteTransaction(y) 0
# define sqlite3WalEndWriteTransaction(x) 0
@@ -37314,6 +38262,7 @@ SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, u8 iBatch, sqlite3_int64 i
# define sqlite3WalExclusiveMode(y,z) 0
# define sqlite3WalHeapMemory(z) 0
# define sqlite3WalFramesize(z) 0
+# define sqlite3WalFindFrame(x,y,z) 0
#else
#define WAL_SAVEPOINT_NDATA 4
@@ -37341,7 +38290,8 @@ SQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *);
SQLITE_PRIVATE void sqlite3WalEndReadTransaction(Wal *pWal);
/* Read a page from the write-ahead log, if it is present. */
-SQLITE_PRIVATE int sqlite3WalRead(Wal *pWal, Pgno pgno, int *pInWal, int nOut, u8 *pOut);
+SQLITE_PRIVATE int sqlite3WalFindFrame(Wal *, Pgno, u32 *);
+SQLITE_PRIVATE int sqlite3WalReadFrame(Wal *, u32, int, u8 *);
/* If the WAL is not empty, return the size of the database. */
SQLITE_PRIVATE Pgno sqlite3WalDbsize(Wal *pWal);
@@ -38041,6 +38991,11 @@ struct Pager {
PagerSavepoint *aSavepoint; /* Array of active savepoints */
int nSavepoint; /* Number of elements in aSavepoint[] */
char dbFileVers[16]; /* Changes whenever database file changes */
+
+ u8 bUseFetch; /* True to use xFetch() */
+ int nMmapOut; /* Number of mmap pages currently outstanding */
+ sqlite3_int64 szMmap; /* Desired maximum mmap size */
+ PgHdr *pMmapFreelist; /* List of free mmap page headers (pDirty) */
/*
** End of the routinely-changing class members
***************************************************************************/
@@ -38152,6 +39107,16 @@ static const unsigned char aJournalMagic[] = {
#endif
/*
+** The macro USEFETCH is true if we are allowed to use the xFetch and xUnfetch
+** interfaces to access the database using memory-mapped I/O.
+*/
+#if SQLITE_MAX_MMAP_SIZE>0
+# define USEFETCH(x) ((x)->bUseFetch)
+#else
+# define USEFETCH(x) 0
+#endif
+
+/*
** The maximum legal page number is (2^31 - 1).
*/
#define PAGER_MAX_PGNO 2147483647
@@ -39638,7 +40603,7 @@ static int pager_playback_one_page(
i64 ofst = (pgno-1)*(i64)pPager->pageSize;
testcase( !isSavepnt && pPg!=0 && (pPg->flags&PGHDR_NEED_SYNC)!=0 );
assert( !pagerUseWal(pPager) );
- rc = sqlite3OsWrite(pPager->fd, (u8*)aData, pPager->pageSize, ofst);
+ rc = sqlite3OsWrite(pPager->fd, (u8 *)aData, pPager->pageSize, ofst);
if( pgno>pPager->dbFileSize ){
pPager->dbFileSize = pgno;
}
@@ -40029,6 +40994,7 @@ static int pager_playback(Pager *pPager, int isHot){
int res = 1; /* Value returned by sqlite3OsAccess() */
char *zMaster = 0; /* Name of master journal file if any */
int needPagerReset; /* True to reset page prior to first page rollback */
+ int nPlayback = 0; /* Total number of pages restored from journal */
/* Figure out how many records are in the journal. Abort early if
** the journal is empty.
@@ -40129,7 +41095,9 @@ static int pager_playback(Pager *pPager, int isHot){
needPagerReset = 0;
}
rc = pager_playback_one_page(pPager,&pPager->journalOff,0,1,0);
- if( rc!=SQLITE_OK ){
+ if( rc==SQLITE_OK ){
+ nPlayback++;
+ }else{
if( rc==SQLITE_DONE ){
pPager->journalOff = szJ;
break;
@@ -40199,6 +41167,10 @@ end_playback:
rc = pager_delmaster(pPager, zMaster);
testcase( rc!=SQLITE_OK );
}
+ if( isHot && nPlayback ){
+ sqlite3_log(SQLITE_NOTICE_RECOVER_ROLLBACK, "recovered %d pages from %s",
+ nPlayback, pPager->zJournal);
+ }
/* The Pager.sectorSize variable may have been updated while rolling
** back a journal created by a process with a different sector size
@@ -40220,11 +41192,10 @@ end_playback:
** If an IO error occurs, then the IO error is returned to the caller.
** Otherwise, SQLITE_OK is returned.
*/
-static int readDbPage(PgHdr *pPg){
+static int readDbPage(PgHdr *pPg, u32 iFrame){
Pager *pPager = pPg->pPager; /* Pager object associated with page pPg */
Pgno pgno = pPg->pgno; /* Page number to read */
int rc = SQLITE_OK; /* Return code */
- int isInWal = 0; /* True if page is in log file */
int pgsz = pPager->pageSize; /* Number of bytes to read */
assert( pPager->eState>=PAGER_READER && !MEMDB );
@@ -40236,11 +41207,13 @@ static int readDbPage(PgHdr *pPg){
return SQLITE_OK;
}
- if( pagerUseWal(pPager) ){
+#ifndef SQLITE_OMIT_WAL
+ if( iFrame ){
/* Try to pull the page from the write-ahead log. */
- rc = sqlite3WalRead(pPager->pWal, pgno, &isInWal, pgsz, pPg->pData);
- }
- if( rc==SQLITE_OK && !isInWal ){
+ rc = sqlite3WalReadFrame(pPager->pWal, iFrame, pgsz, pPg->pData);
+ }else
+#endif
+ {
i64 iOffset = (pgno-1)*(i64)pPager->pageSize;
rc = sqlite3OsRead(pPager->fd, pPg->pData, pgsz, iOffset);
if( rc==SQLITE_IOERR_SHORT_READ ){
@@ -40319,12 +41292,17 @@ static int pagerUndoCallback(void *pCtx, Pgno iPg){
Pager *pPager = (Pager *)pCtx;
PgHdr *pPg;
+ assert( pagerUseWal(pPager) );
pPg = sqlite3PagerLookup(pPager, iPg);
if( pPg ){
if( sqlite3PcachePageRefcount(pPg)==1 ){
sqlite3PcacheDrop(pPg);
}else{
- rc = readDbPage(pPg);
+ u32 iFrame = 0;
+ rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
+ if( rc==SQLITE_OK ){
+ rc = readDbPage(pPg, iFrame);
+ }
if( rc==SQLITE_OK ){
pPager->xReiniter(pPg);
}
@@ -40468,6 +41446,7 @@ static int pagerBeginReadTransaction(Pager *pPager){
rc = sqlite3WalBeginReadTransaction(pPager->pWal, &changed);
if( rc!=SQLITE_OK || changed ){
pager_reset(pPager);
+ if( USEFETCH(pPager) ) sqlite3OsUnfetch(pPager->fd, 0, 0);
}
return rc;
@@ -40730,6 +41709,29 @@ SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager *pPager, int mxPage){
}
/*
+** Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap.
+*/
+static void pagerFixMaplimit(Pager *pPager){
+#if SQLITE_MAX_MMAP_SIZE>0
+ sqlite3_file *fd = pPager->fd;
+ if( isOpen(fd) ){
+ sqlite3_int64 sz;
+ pPager->bUseFetch = (fd->pMethods->iVersion>=3) && pPager->szMmap>0;
+ sz = pPager->szMmap;
+ sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_MMAP_SIZE, &sz);
+ }
+#endif
+}
+
+/*
+** Change the maximum size of any memory mapping made of the database file.
+*/
+SQLITE_PRIVATE void sqlite3PagerSetMmapLimit(Pager *pPager, sqlite3_int64 szMmap){
+ pPager->szMmap = szMmap;
+ pagerFixMaplimit(pPager);
+}
+
+/*
** Free as much memory as possible from the pager.
*/
SQLITE_PRIVATE void sqlite3PagerShrink(Pager *pPager){
@@ -40964,6 +41966,7 @@ SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager *pPager, u32 *pPageSize, int nR
assert( nReserve>=0 && nReserve<1000 );
pPager->nReserve = (i16)nReserve;
pagerReportSize(pPager);
+ pagerFixMaplimit(pPager);
}
return rc;
}
@@ -41190,6 +42193,81 @@ static int pagerSyncHotJournal(Pager *pPager){
}
/*
+** Obtain a reference to a memory mapped page object for page number pgno.
+** The new object will use the pointer pData, obtained from xFetch().
+** If successful, set *ppPage to point to the new page reference
+** and return SQLITE_OK. Otherwise, return an SQLite error code and set
+** *ppPage to zero.
+**
+** Page references obtained by calling this function should be released
+** by calling pagerReleaseMapPage().
+*/
+static int pagerAcquireMapPage(
+ Pager *pPager, /* Pager object */
+ Pgno pgno, /* Page number */
+ void *pData, /* xFetch()'d data for this page */
+ PgHdr **ppPage /* OUT: Acquired page object */
+){
+ PgHdr *p; /* Memory mapped page to return */
+
+ if( pPager->pMmapFreelist ){
+ *ppPage = p = pPager->pMmapFreelist;
+ pPager->pMmapFreelist = p->pDirty;
+ p->pDirty = 0;
+ memset(p->pExtra, 0, pPager->nExtra);
+ }else{
+ *ppPage = p = (PgHdr *)sqlite3MallocZero(sizeof(PgHdr) + pPager->nExtra);
+ if( p==0 ){
+ sqlite3OsUnfetch(pPager->fd, (i64)(pgno-1) * pPager->pageSize, pData);
+ return SQLITE_NOMEM;
+ }
+ p->pExtra = (void *)&p[1];
+ p->flags = PGHDR_MMAP;
+ p->nRef = 1;
+ p->pPager = pPager;
+ }
+
+ assert( p->pExtra==(void *)&p[1] );
+ assert( p->pPage==0 );
+ assert( p->flags==PGHDR_MMAP );
+ assert( p->pPager==pPager );
+ assert( p->nRef==1 );
+
+ p->pgno = pgno;
+ p->pData = pData;
+ pPager->nMmapOut++;
+
+ return SQLITE_OK;
+}
+
+/*
+** Release a reference to page pPg. pPg must have been returned by an
+** earlier call to pagerAcquireMapPage().
+*/
+static void pagerReleaseMapPage(PgHdr *pPg){
+ Pager *pPager = pPg->pPager;
+ pPager->nMmapOut--;
+ pPg->pDirty = pPager->pMmapFreelist;
+ pPager->pMmapFreelist = pPg;
+
+ assert( pPager->fd->pMethods->iVersion>=3 );
+ sqlite3OsUnfetch(pPager->fd, (i64)(pPg->pgno-1)*pPager->pageSize, pPg->pData);
+}
+
+/*
+** Free all PgHdr objects stored in the Pager.pMmapFreelist list.
+*/
+static void pagerFreeMapHdrs(Pager *pPager){
+ PgHdr *p;
+ PgHdr *pNext;
+ for(p=pPager->pMmapFreelist; p; p=pNext){
+ pNext = p->pDirty;
+ sqlite3_free(p);
+ }
+}
+
+
+/*
** Shutdown the page cache. Free all memory and close all files.
**
** If a transaction was in progress when this routine is called, that
@@ -41209,6 +42287,7 @@ SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager){
assert( assert_pager_state(pPager) );
disable_simulated_io_errors();
sqlite3BeginBenignMalloc();
+ pagerFreeMapHdrs(pPager);
/* pPager->errCode = 0; */
pPager->exclusiveMode = 0;
#ifndef SQLITE_OMIT_WAL
@@ -41470,7 +42549,9 @@ static int pager_write_pagelist(Pager *pPager, PgHdr *pList){
** file size will be.
*/
assert( rc!=SQLITE_OK || isOpen(pPager->fd) );
- if( rc==SQLITE_OK && pPager->dbSize>pPager->dbHintSize ){
+ if( rc==SQLITE_OK
+ && (pList->pDirty ? pPager->dbSize : pList->pgno+1)>pPager->dbHintSize
+ ){
sqlite3_int64 szFile = pPager->pageSize * (sqlite3_int64)pPager->dbSize;
sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_SIZE_HINT, &szFile);
pPager->dbHintSize = pPager->dbSize;
@@ -42024,6 +43105,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
/* pPager->pBusyHandlerArg = 0; */
pPager->xReiniter = xReinit;
/* memset(pPager->aHash, 0, sizeof(pPager->aHash)); */
+ /* pPager->szMmap = SQLITE_DEFAULT_MMAP_SIZE // will be set by btree.c */
*ppPager = pPager;
return SQLITE_OK;
@@ -42315,9 +43397,11 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
);
}
- if( !pPager->tempFile
- && (pPager->pBackup || sqlite3PcachePagecount(pPager->pPCache)>0)
- ){
+ if( !pPager->tempFile && (
+ pPager->pBackup
+ || sqlite3PcachePagecount(pPager->pPCache)>0
+ || USEFETCH(pPager)
+ )){
/* The shared-lock has just been acquired on the database file
** and there are already pages in the cache (from a previous
** read or write transaction). Check to see if the database
@@ -42343,7 +43427,7 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
if( nPage>0 ){
IOTRACE(("CKVERS %p %d\n", pPager, sizeof(dbFileVers)));
rc = sqlite3OsRead(pPager->fd, &dbFileVers, sizeof(dbFileVers), 24);
- if( rc!=SQLITE_OK ){
+ if( rc!=SQLITE_OK && rc!=SQLITE_IOERR_SHORT_READ ){
goto failed;
}
}else{
@@ -42352,6 +43436,16 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
if( memcmp(pPager->dbFileVers, dbFileVers, sizeof(dbFileVers))!=0 ){
pager_reset(pPager);
+
+ /* Unmap the database file. It is possible that external processes
+ ** may have truncated the database file and then extended it back
+ ** to its original size while this process was not holding a lock.
+ ** In this case there may exist a Pager.pMap mapping that appears
+ ** to be the right size but is not actually valid. Avoid this
+ ** possibility by unmapping the db here. */
+ if( USEFETCH(pPager) ){
+ sqlite3OsUnfetch(pPager->fd, 0, 0);
+ }
}
}
@@ -42393,7 +43487,7 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
** nothing to rollback, so this routine is a no-op.
*/
static void pagerUnlockIfUnused(Pager *pPager){
- if( (sqlite3PcacheRefCount(pPager->pPCache)==0) ){
+ if( pPager->nMmapOut==0 && (sqlite3PcacheRefCount(pPager->pPCache)==0) ){
pagerUnlockAndRollback(pPager);
}
}
@@ -42452,13 +43546,27 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
Pager *pPager, /* The pager open on the database file */
Pgno pgno, /* Page number to fetch */
DbPage **ppPage, /* Write a pointer to the page here */
- int noContent /* Do not bother reading content from disk if true */
+ int flags /* PAGER_ACQUIRE_XXX flags */
){
- int rc;
- PgHdr *pPg;
+ int rc = SQLITE_OK;
+ PgHdr *pPg = 0;
+ u32 iFrame = 0; /* Frame to read from WAL file */
+ const int noContent = (flags & PAGER_ACQUIRE_NOCONTENT);
+
+ /* It is acceptable to use a read-only (mmap) page for any page except
+ ** page 1 if there is no write-transaction open or the ACQUIRE_READONLY
+ ** flag was specified by the caller. And so long as the db is not a
+ ** temporary or in-memory database. */
+ const int bMmapOk = (pgno!=1 && USEFETCH(pPager)
+ && (pPager->eState==PAGER_READER || (flags & PAGER_ACQUIRE_READONLY))
+#ifdef SQLITE_HAS_CODEC
+ && pPager->xCodec==0
+#endif
+ );
assert( pPager->eState>=PAGER_READER );
assert( assert_pager_state(pPager) );
+ assert( noContent==0 || bMmapOk==0 );
if( pgno==0 ){
return SQLITE_CORRUPT_BKPT;
@@ -42469,6 +43577,39 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
if( pPager->errCode!=SQLITE_OK ){
rc = pPager->errCode;
}else{
+
+ if( bMmapOk && pagerUseWal(pPager) ){
+ rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
+ if( rc!=SQLITE_OK ) goto pager_acquire_err;
+ }
+
+ if( iFrame==0 && bMmapOk ){
+ void *pData = 0;
+
+ rc = sqlite3OsFetch(pPager->fd,
+ (i64)(pgno-1) * pPager->pageSize, pPager->pageSize, &pData
+ );
+
+ if( rc==SQLITE_OK && pData ){
+ if( pPager->eState>PAGER_READER ){
+ (void)sqlite3PcacheFetch(pPager->pPCache, pgno, 0, &pPg);
+ }
+ if( pPg==0 ){
+ rc = pagerAcquireMapPage(pPager, pgno, pData, &pPg);
+ }else{
+ sqlite3OsUnfetch(pPager->fd, (i64)(pgno-1)*pPager->pageSize, pData);
+ }
+ if( pPg ){
+ assert( rc==SQLITE_OK );
+ *ppPage = pPg;
+ return SQLITE_OK;
+ }
+ }
+ if( rc!=SQLITE_OK ){
+ goto pager_acquire_err;
+ }
+ }
+
rc = sqlite3PcacheFetch(pPager->pPCache, pgno, 1, ppPage);
}
@@ -42527,9 +43668,13 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
memset(pPg->pData, 0, pPager->pageSize);
IOTRACE(("ZERO %p %d\n", pPager, pgno));
}else{
+ if( pagerUseWal(pPager) && bMmapOk==0 ){
+ rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
+ if( rc!=SQLITE_OK ) goto pager_acquire_err;
+ }
assert( pPg->pPager==pPager );
pPager->aStat[PAGER_STAT_MISS]++;
- rc = readDbPage(pPg);
+ rc = readDbPage(pPg, iFrame);
if( rc!=SQLITE_OK ){
goto pager_acquire_err;
}
@@ -42582,7 +43727,11 @@ SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){
SQLITE_PRIVATE void sqlite3PagerUnref(DbPage *pPg){
if( pPg ){
Pager *pPager = pPg->pPager;
- sqlite3PcacheRelease(pPg);
+ if( pPg->flags & PGHDR_MMAP ){
+ pagerReleaseMapPage(pPg);
+ }else{
+ sqlite3PcacheRelease(pPg);
+ }
pagerUnlockIfUnused(pPager);
}
}
@@ -42917,6 +44066,7 @@ SQLITE_PRIVATE int sqlite3PagerWrite(DbPage *pDbPage){
Pager *pPager = pPg->pPager;
Pgno nPagePerSector = (pPager->sectorSize/pPager->pageSize);
+ assert( (pPg->flags & PGHDR_MMAP)==0 );
assert( pPager->eState>=PAGER_WRITER_LOCKED );
assert( pPager->eState!=PAGER_ERROR );
assert( assert_pager_state(pPager) );
@@ -43116,6 +44266,11 @@ static int pager_incr_changecounter(Pager *pPager, int isDirectMode){
pPager->aStat[PAGER_STAT_WRITE]++;
}
if( rc==SQLITE_OK ){
+ /* Update the pager's copy of the change-counter. Otherwise, the
+ ** next time a read transaction is opened the cache will be
+ ** flushed (as the change-counter values will not match). */
+ const void *pCopy = (const void *)&((const char *)zBuf)[24];
+ memcpy(&pPager->dbFileVers, pCopy, sizeof(pPager->dbFileVers));
pPager->changeCountDone = 1;
}
}else{
@@ -43473,7 +44628,7 @@ SQLITE_PRIVATE int sqlite3PagerRollback(Pager *pPager){
}
assert( pPager->eState==PAGER_READER || rc!=SQLITE_OK );
- assert( rc==SQLITE_OK || rc==SQLITE_FULL
+ assert( rc==SQLITE_OK || rc==SQLITE_FULL || rc==SQLITE_CORRUPT
|| rc==SQLITE_NOMEM || (rc&0xFF)==SQLITE_IOERR );
/* If an error occurs during a ROLLBACK, we can no longer trust the pager
@@ -44207,11 +45362,12 @@ static int pagerOpenWal(Pager *pPager){
** (e.g. due to malloc() failure), return an error code.
*/
if( rc==SQLITE_OK ){
- rc = sqlite3WalOpen(pPager->pVfs,
+ rc = sqlite3WalOpen(pPager->pVfs,
pPager->fd, pPager->zWal, pPager->exclusiveMode,
pPager->journalSizeLimit, &pPager->pWal
);
}
+ pagerFixMaplimit(pPager);
return rc;
}
@@ -44302,6 +45458,7 @@ SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager){
rc = sqlite3WalClose(pPager->pWal, pPager->ckptSyncFlags,
pPager->pageSize, (u8*)pPager->pTmpSpace);
pPager->pWal = 0;
+ pagerFixMaplimit(pPager);
}
}
return rc;
@@ -45550,8 +46707,9 @@ finished:
** checkpointing the log file.
*/
if( pWal->hdr.nPage ){
- sqlite3_log(SQLITE_OK, "Recovered %d frames from WAL file %s",
- pWal->hdr.nPage, pWal->zWalName
+ sqlite3_log(SQLITE_NOTICE_RECOVER_WAL,
+ "recovered %d frames from WAL file %s",
+ pWal->hdr.mxFrame, pWal->zWalName
);
}
}
@@ -46065,8 +47223,8 @@ static int walCheckpoint(
rc = sqlite3OsSync(pWal->pWalFd, sync_flags);
}
- /* If the database file may grow as a result of this checkpoint, hint
- ** about the eventual size of the db file to the VFS layer.
+ /* If the database may grow as a result of this checkpoint, hint
+ ** about the eventual size of the db file to the VFS layer.
*/
if( rc==SQLITE_OK ){
i64 nReq = ((i64)mxPage * szPage);
@@ -46076,6 +47234,7 @@ static int walCheckpoint(
}
}
+
/* Iterate through the contents of the WAL, copying data to the db file. */
while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
i64 iOffset;
@@ -46630,19 +47789,17 @@ SQLITE_PRIVATE void sqlite3WalEndReadTransaction(Wal *pWal){
}
/*
-** Read a page from the WAL, if it is present in the WAL and if the
-** current read transaction is configured to use the WAL.
+** Search the wal file for page pgno. If found, set *piRead to the frame that
+** contains the page. Otherwise, if pgno is not in the wal file, set *piRead
+** to zero.
**
-** The *pInWal is set to 1 if the requested page is in the WAL and
-** has been loaded. Or *pInWal is set to 0 if the page was not in
-** the WAL and needs to be read out of the database.
+** Return SQLITE_OK if successful, or an error code if an error occurs. If an
+** error does occur, the final value of *piRead is undefined.
*/
-SQLITE_PRIVATE int sqlite3WalRead(
+SQLITE_PRIVATE int sqlite3WalFindFrame(
Wal *pWal, /* WAL handle */
Pgno pgno, /* Database page number to read data for */
- int *pInWal, /* OUT: True if data is read from WAL */
- int nOut, /* Size of buffer pOut in bytes */
- u8 *pOut /* Buffer to write page data to */
+ u32 *piRead /* OUT: Frame number (or zero) */
){
u32 iRead = 0; /* If !=0, WAL frame to return data from */
u32 iLast = pWal->hdr.mxFrame; /* Last page in WAL for this reader */
@@ -46658,7 +47815,7 @@ SQLITE_PRIVATE int sqlite3WalRead(
** WAL were empty.
*/
if( iLast==0 || pWal->readLock==0 ){
- *pInWal = 0;
+ *piRead = 0;
return SQLITE_OK;
}
@@ -46729,26 +47886,31 @@ SQLITE_PRIVATE int sqlite3WalRead(
}
#endif
- /* If iRead is non-zero, then it is the log frame number that contains the
- ** required page. Read and return data from the log file.
- */
- if( iRead ){
- int sz;
- i64 iOffset;
- sz = pWal->hdr.szPage;
- sz = (sz&0xfe00) + ((sz&0x0001)<<16);
- testcase( sz<=32768 );
- testcase( sz>=65536 );
- iOffset = walFrameOffset(iRead, sz) + WAL_FRAME_HDRSIZE;
- *pInWal = 1;
- /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL */
- return sqlite3OsRead(pWal->pWalFd, pOut, (nOut>sz ? sz : nOut), iOffset);
- }
-
- *pInWal = 0;
+ *piRead = iRead;
return SQLITE_OK;
}
+/*
+** Read the contents of frame iRead from the wal file into buffer pOut
+** (which is nOut bytes in size). Return SQLITE_OK if successful, or an
+** error code otherwise.
+*/
+SQLITE_PRIVATE int sqlite3WalReadFrame(
+ Wal *pWal, /* WAL handle */
+ u32 iRead, /* Frame to read */
+ int nOut, /* Size of buffer pOut in bytes */
+ u8 *pOut /* Buffer to write page data to */
+){
+ int sz;
+ i64 iOffset;
+ sz = pWal->hdr.szPage;
+ sz = (sz&0xfe00) + ((sz&0x0001)<<16);
+ testcase( sz<=32768 );
+ testcase( sz>=65536 );
+ iOffset = walFrameOffset(iRead, sz) + WAL_FRAME_HDRSIZE;
+ /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL */
+ return sqlite3OsRead(pWal->pWalFd, pOut, (nOut>sz ? sz : nOut), iOffset);
+}
/*
** Return the size of the database in pages (or zero, if unknown).
@@ -47295,6 +48457,9 @@ SQLITE_PRIVATE int sqlite3WalCheckpoint(
/* Read the wal-index header. */
if( rc==SQLITE_OK ){
rc = walIndexReadHdr(pWal, &isChanged);
+ if( isChanged && pWal->pDbFd->pMethods->iVersion>=3 ){
+ sqlite3OsUnfetch(pWal->pDbFd, 0, 0);
+ }
}
/* Copy data from the log to the database file. */
@@ -49966,13 +51131,17 @@ static int btreeGetPage(
BtShared *pBt, /* The btree */
Pgno pgno, /* Number of the page to fetch */
MemPage **ppPage, /* Return the page in this parameter */
- int noContent /* Do not load page content if true */
+ int noContent, /* Do not load page content if true */
+ int bReadonly /* True if a read-only (mmap) page is ok */
){
int rc;
DbPage *pDbPage;
+ int flags = (noContent ? PAGER_ACQUIRE_NOCONTENT : 0)
+ | (bReadonly ? PAGER_ACQUIRE_READONLY : 0);
+ assert( noContent==0 || bReadonly==0 );
assert( sqlite3_mutex_held(pBt->mutex) );
- rc = sqlite3PagerAcquire(pBt->pPager, pgno, (DbPage**)&pDbPage, noContent);
+ rc = sqlite3PagerAcquire(pBt->pPager, pgno, (DbPage**)&pDbPage, flags);
if( rc ) return rc;
*ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);
return SQLITE_OK;
@@ -50015,9 +51184,10 @@ SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree *p){
** may remain unchanged, or it may be set to an invalid value.
*/
static int getAndInitPage(
- BtShared *pBt, /* The database file */
- Pgno pgno, /* Number of the page to get */
- MemPage **ppPage /* Write the page pointer here */
+ BtShared *pBt, /* The database file */
+ Pgno pgno, /* Number of the page to get */
+ MemPage **ppPage, /* Write the page pointer here */
+ int bReadonly /* True if a read-only (mmap) page is ok */
){
int rc;
assert( sqlite3_mutex_held(pBt->mutex) );
@@ -50025,7 +51195,7 @@ static int getAndInitPage(
if( pgno>btreePagecount(pBt) ){
rc = SQLITE_CORRUPT_BKPT;
}else{
- rc = btreeGetPage(pBt, pgno, ppPage, 0);
+ rc = btreeGetPage(pBt, pgno, ppPage, 0, bReadonly);
if( rc==SQLITE_OK ){
rc = btreeInitPage(*ppPage);
if( rc!=SQLITE_OK ){
@@ -50256,6 +51426,7 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
rc = sqlite3PagerOpen(pVfs, &pBt->pPager, zFilename,
EXTRA_SIZE, flags, vfsFlags, pageReinit);
if( rc==SQLITE_OK ){
+ sqlite3PagerSetMmapLimit(pBt->pPager, db->szMmap);
rc = sqlite3PagerReadFileheader(pBt->pPager,sizeof(zDbHeader),zDbHeader);
}
if( rc!=SQLITE_OK ){
@@ -50523,6 +51694,19 @@ SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree *p, int mxPage){
}
/*
+** Change the limit on the amount of the database file that may be
+** memory mapped.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){
+ BtShared *pBt = p->pBt;
+ assert( sqlite3_mutex_held(p->db->mutex) );
+ sqlite3BtreeEnter(p);
+ sqlite3PagerSetMmapLimit(pBt->pPager, szMmap);
+ sqlite3BtreeLeave(p);
+ return SQLITE_OK;
+}
+
+/*
** Change the way data is synced to disk in order to increase or decrease
** how well the database resists damage due to OS crashes and power
** failures. Level 1 is the same as asynchronous (no syncs() occur and
@@ -50747,7 +51931,7 @@ static int lockBtree(BtShared *pBt){
assert( pBt->pPage1==0 );
rc = sqlite3PagerSharedLock(pBt->pPager);
if( rc!=SQLITE_OK ) return rc;
- rc = btreeGetPage(pBt, 1, &pPage1, 0);
+ rc = btreeGetPage(pBt, 1, &pPage1, 0, 0);
if( rc!=SQLITE_OK ) return rc;
/* Do some checking to help insure the file we opened really is
@@ -50883,6 +52067,29 @@ page1_init_failed:
return rc;
}
+#ifndef NDEBUG
+/*
+** Return the number of cursors open on pBt. This is for use
+** in assert() expressions, so it is only compiled if NDEBUG is not
+** defined.
+**
+** Only write cursors are counted if wrOnly is true. If wrOnly is
+** false then all cursors are counted.
+**
+** For the purposes of this routine, a cursor is any cursor that
+** is capable of reading or writing to the databse. Cursors that
+** have been tripped into the CURSOR_FAULT state are not counted.
+*/
+static int countValidCursors(BtShared *pBt, int wrOnly){
+ BtCursor *pCur;
+ int r = 0;
+ for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){
+ if( (wrOnly==0 || pCur->wrFlag) && pCur->eState!=CURSOR_FAULT ) r++;
+ }
+ return r;
+}
+#endif
+
/*
** If there are no outstanding cursors and we are not in the middle
** of a transaction but there is a read lock on the database, then
@@ -50893,7 +52100,7 @@ page1_init_failed:
*/
static void unlockBtreeIfUnused(BtShared *pBt){
assert( sqlite3_mutex_held(pBt->mutex) );
- assert( pBt->pCursor==0 || pBt->inTransaction>TRANS_NONE );
+ assert( countValidCursors(pBt,0)==0 || pBt->inTransaction>TRANS_NONE );
if( pBt->inTransaction==TRANS_NONE && pBt->pPage1!=0 ){
assert( pBt->pPage1->aData );
assert( sqlite3PagerRefcount(pBt->pPager)==1 );
@@ -51306,7 +52513,7 @@ static int relocatePage(
** iPtrPage.
*/
if( eType!=PTRMAP_ROOTPAGE ){
- rc = btreeGetPage(pBt, iPtrPage, &pPtrPage, 0);
+ rc = btreeGetPage(pBt, iPtrPage, &pPtrPage, 0, 0);
if( rc!=SQLITE_OK ){
return rc;
}
@@ -51390,7 +52597,7 @@ static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg, int bCommit){
u8 eMode = BTALLOC_ANY; /* Mode parameter for allocateBtreePage() */
Pgno iNear = 0; /* nearby parameter for allocateBtreePage() */
- rc = btreeGetPage(pBt, iLastPg, &pLastPg, 0);
+ rc = btreeGetPage(pBt, iLastPg, &pLastPg, 0, 0);
if( rc!=SQLITE_OK ){
return rc;
}
@@ -51482,8 +52689,11 @@ SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *p){
if( nOrig<nFin ){
rc = SQLITE_CORRUPT_BKPT;
}else if( nFree>0 ){
- invalidateAllOverflowCache(pBt);
- rc = incrVacuumStep(pBt, nFin, nOrig, 0);
+ rc = saveAllCursors(pBt, 0, 0);
+ if( rc==SQLITE_OK ){
+ invalidateAllOverflowCache(pBt);
+ rc = incrVacuumStep(pBt, nFin, nOrig, 0);
+ }
if( rc==SQLITE_OK ){
rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
put4byte(&pBt->pPage1->aData[28], pBt->nPage);
@@ -51531,7 +52741,9 @@ static int autoVacuumCommit(BtShared *pBt){
nFree = get4byte(&pBt->pPage1->aData[36]);
nFin = finalDbSize(pBt, nOrig, nFree);
if( nFin>nOrig ) return SQLITE_CORRUPT_BKPT;
-
+ if( nFin<nOrig ){
+ rc = saveAllCursors(pBt, 0, 0);
+ }
for(iFree=nOrig; iFree>nFin && rc==SQLITE_OK; iFree--){
rc = incrVacuumStep(pBt, nFin, iFree, 1);
}
@@ -51548,7 +52760,7 @@ static int autoVacuumCommit(BtShared *pBt){
}
}
- assert( nRef==sqlite3PagerRefcount(pPager) );
+ assert( nRef>=sqlite3PagerRefcount(pPager) );
return rc;
}
@@ -51616,7 +52828,6 @@ static void btreeEndTransaction(Btree *p){
#ifndef SQLITE_OMIT_AUTOVACUUM
pBt->bDoTruncate = 0;
#endif
- btreeClearHasContent(pBt);
if( p->inTrans>TRANS_NONE && p->db->activeVdbeCnt>1 ){
/* If there are other active statements that belong to this database
** handle, downgrade to a read-only transaction. The other statements
@@ -51691,6 +52902,7 @@ SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){
return rc;
}
pBt->inTransaction = TRANS_READ;
+ btreeClearHasContent(pBt);
}
btreeEndTransaction(p);
@@ -51712,27 +52924,6 @@ SQLITE_PRIVATE int sqlite3BtreeCommit(Btree *p){
return rc;
}
-#ifndef NDEBUG
-/*
-** Return the number of write-cursors open on this handle. This is for use
-** in assert() expressions, so it is only compiled if NDEBUG is not
-** defined.
-**
-** For the purposes of this routine, a write-cursor is any cursor that
-** is capable of writing to the databse. That means the cursor was
-** originally opened for writing and the cursor has not be disabled
-** by having its state changed to CURSOR_FAULT.
-*/
-static int countWriteCursors(BtShared *pBt){
- BtCursor *pCur;
- int r = 0;
- for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){
- if( pCur->wrFlag && pCur->eState!=CURSOR_FAULT ) r++;
- }
- return r;
-}
-#endif
-
/*
** This routine sets the state to CURSOR_FAULT and the error
** code to errCode for every cursor on BtShared that pBtree
@@ -51804,7 +52995,7 @@ SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p, int tripCode){
/* The rollback may have destroyed the pPage1->aData value. So
** call btreeGetPage() on page 1 again to make
** sure pPage1->aData is set correctly. */
- if( btreeGetPage(pBt, 1, &pPage1, 0)==SQLITE_OK ){
+ if( btreeGetPage(pBt, 1, &pPage1, 0, 0)==SQLITE_OK ){
int nPage = get4byte(28+(u8*)pPage1->aData);
testcase( nPage==0 );
if( nPage==0 ) sqlite3PagerPagecount(pBt->pPager, &nPage);
@@ -51812,8 +53003,9 @@ SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p, int tripCode){
pBt->nPage = nPage;
releasePage(pPage1);
}
- assert( countWriteCursors(pBt)==0 );
+ assert( countValidCursors(pBt, 1)==0 );
pBt->inTransaction = TRANS_READ;
+ btreeClearHasContent(pBt);
}
btreeEndTransaction(p);
@@ -52238,7 +53430,7 @@ static int getOverflowPage(
assert( next==0 || rc==SQLITE_DONE );
if( rc==SQLITE_OK ){
- rc = btreeGetPage(pBt, ovfl, &pPage, 0);
+ rc = btreeGetPage(pBt, ovfl, &pPage, 0, (ppPage==0));
assert( rc==SQLITE_OK || pPage==0 );
if( rc==SQLITE_OK ){
next = get4byte(pPage->aData);
@@ -52459,7 +53651,9 @@ static int accessPayload(
{
DbPage *pDbPage;
- rc = sqlite3PagerGet(pBt->pPager, nextPage, &pDbPage);
+ rc = sqlite3PagerAcquire(pBt->pPager, nextPage, &pDbPage,
+ (eOp==0 ? PAGER_ACQUIRE_READONLY : 0)
+ );
if( rc==SQLITE_OK ){
aPayload = sqlite3PagerGetData(pDbPage);
nextPage = get4byte(aPayload);
@@ -52638,10 +53832,11 @@ static int moveToChild(BtCursor *pCur, u32 newPgno){
assert( cursorHoldsMutex(pCur) );
assert( pCur->eState==CURSOR_VALID );
assert( pCur->iPage<BTCURSOR_MAX_DEPTH );
+ assert( pCur->iPage>=0 );
if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){
return SQLITE_CORRUPT_BKPT;
}
- rc = getAndInitPage(pBt, newPgno, &pNewPage);
+ rc = getAndInitPage(pBt, newPgno, &pNewPage, (pCur->wrFlag==0));
if( rc ) return rc;
pCur->apPage[i+1] = pNewPage;
pCur->aiIdx[i+1] = 0;
@@ -52758,7 +53953,7 @@ static int moveToRoot(BtCursor *pCur){
pCur->eState = CURSOR_INVALID;
return SQLITE_OK;
}else{
- rc = getAndInitPage(pBt, pCur->pgnoRoot, &pCur->apPage[0]);
+ rc = getAndInitPage(pBt, pCur->pgnoRoot, &pCur->apPage[0], pCur->wrFlag==0);
if( rc!=SQLITE_OK ){
pCur->eState = CURSOR_INVALID;
return rc;
@@ -53372,7 +54567,7 @@ static int allocateBtreePage(
if( iTrunk>mxPage ){
rc = SQLITE_CORRUPT_BKPT;
}else{
- rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0);
+ rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0, 0);
}
if( rc ){
pTrunk = 0;
@@ -53436,7 +54631,7 @@ static int allocateBtreePage(
goto end_allocate_page;
}
testcase( iNewTrunk==mxPage );
- rc = btreeGetPage(pBt, iNewTrunk, &pNewTrunk, 0);
+ rc = btreeGetPage(pBt, iNewTrunk, &pNewTrunk, 0, 0);
if( rc!=SQLITE_OK ){
goto end_allocate_page;
}
@@ -53516,7 +54711,7 @@ static int allocateBtreePage(
}
put4byte(&aData[4], k-1);
noContent = !btreeGetHasContent(pBt, *pPgno);
- rc = btreeGetPage(pBt, *pPgno, ppPage, noContent);
+ rc = btreeGetPage(pBt, *pPgno, ppPage, noContent, 0);
if( rc==SQLITE_OK ){
rc = sqlite3PagerWrite((*ppPage)->pDbPage);
if( rc!=SQLITE_OK ){
@@ -53564,7 +54759,7 @@ static int allocateBtreePage(
MemPage *pPg = 0;
TRACE(("ALLOCATE: %d from end of file (pointer-map page)\n", pBt->nPage));
assert( pBt->nPage!=PENDING_BYTE_PAGE(pBt) );
- rc = btreeGetPage(pBt, pBt->nPage, &pPg, bNoContent);
+ rc = btreeGetPage(pBt, pBt->nPage, &pPg, bNoContent, 0);
if( rc==SQLITE_OK ){
rc = sqlite3PagerWrite(pPg->pDbPage);
releasePage(pPg);
@@ -53578,7 +54773,7 @@ static int allocateBtreePage(
*pPgno = pBt->nPage;
assert( *pPgno!=PENDING_BYTE_PAGE(pBt) );
- rc = btreeGetPage(pBt, *pPgno, ppPage, bNoContent);
+ rc = btreeGetPage(pBt, *pPgno, ppPage, bNoContent, 0);
if( rc ) return rc;
rc = sqlite3PagerWrite((*ppPage)->pDbPage);
if( rc!=SQLITE_OK ){
@@ -53646,7 +54841,7 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
/* If the secure_delete option is enabled, then
** always fully overwrite deleted information with zeros.
*/
- if( (!pPage && ((rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0) )
+ if( (!pPage && ((rc = btreeGetPage(pBt, iPage, &pPage, 0, 0))!=0) )
|| ((rc = sqlite3PagerWrite(pPage->pDbPage))!=0)
){
goto freepage_out;
@@ -53673,7 +54868,7 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
u32 nLeaf; /* Initial number of leaf cells on trunk page */
iTrunk = get4byte(&pPage1->aData[32]);
- rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0);
+ rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0, 0);
if( rc!=SQLITE_OK ){
goto freepage_out;
}
@@ -53719,7 +54914,7 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
** first trunk in the free-list is full. Either way, the page being freed
** will become the new first trunk page in the free-list.
*/
- if( pPage==0 && SQLITE_OK!=(rc = btreeGetPage(pBt, iPage, &pPage, 0)) ){
+ if( pPage==0 && SQLITE_OK!=(rc = btreeGetPage(pBt, iPage, &pPage, 0, 0)) ){
goto freepage_out;
}
rc = sqlite3PagerWrite(pPage->pDbPage);
@@ -54520,7 +55715,7 @@ static int balance_nonroot(
}
pgno = get4byte(pRight);
while( 1 ){
- rc = getAndInitPage(pBt, pgno, &apOld[i]);
+ rc = getAndInitPage(pBt, pgno, &apOld[i], 0);
if( rc ){
memset(apOld, 0, (i+1)*sizeof(MemPage*));
goto balance_cleanup;
@@ -55608,10 +56803,17 @@ static int btreeCreateTable(Btree *p, int *piTable, int createTabFlags){
u8 eType = 0;
Pgno iPtrPage = 0;
+ /* Save the positions of any open cursors. This is required in
+ ** case they are holding a reference to an xFetch reference
+ ** corresponding to page pgnoRoot. */
+ rc = saveAllCursors(pBt, 0, 0);
releasePage(pPageMove);
+ if( rc!=SQLITE_OK ){
+ return rc;
+ }
/* Move the page currently at pgnoRoot to pgnoMove. */
- rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
+ rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0, 0);
if( rc!=SQLITE_OK ){
return rc;
}
@@ -55632,7 +56834,7 @@ static int btreeCreateTable(Btree *p, int *piTable, int createTabFlags){
if( rc!=SQLITE_OK ){
return rc;
}
- rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
+ rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0, 0);
if( rc!=SQLITE_OK ){
return rc;
}
@@ -55708,7 +56910,7 @@ static int clearDatabasePage(
return SQLITE_CORRUPT_BKPT;
}
- rc = getAndInitPage(pBt, pgno, &pPage);
+ rc = getAndInitPage(pBt, pgno, &pPage, 0);
if( rc ) return rc;
for(i=0; i<pPage->nCell; i++){
pCell = findCell(pPage, i);
@@ -55810,7 +57012,7 @@ static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
return SQLITE_LOCKED_SHAREDCACHE;
}
- rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
+ rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0, 0);
if( rc ) return rc;
rc = sqlite3BtreeClearTable(p, iTable, 0);
if( rc ){
@@ -55845,7 +57047,7 @@ static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
*/
MemPage *pMove;
releasePage(pPage);
- rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
+ rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0, 0);
if( rc!=SQLITE_OK ){
return rc;
}
@@ -55855,7 +57057,7 @@ static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
return rc;
}
pMove = 0;
- rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
+ rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0, 0);
freePage(pMove, &rc);
releasePage(pMove);
if( rc!=SQLITE_OK ){
@@ -56267,7 +57469,7 @@ static int checkTreePage(
usableSize = pBt->usableSize;
if( iPage==0 ) return 0;
if( checkRef(pCheck, iPage, zParentContext) ) return 0;
- if( (rc = btreeGetPage(pBt, (Pgno)iPage, &pPage, 0))!=0 ){
+ if( (rc = btreeGetPage(pBt, (Pgno)iPage, &pPage, 0, 0))!=0 ){
checkAppendMsg(pCheck, zContext,
"unable to get the page. error code=%d", rc);
return 0;
@@ -56739,6 +57941,17 @@ SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void
return SQLITE_ABORT;
}
+ /* Save the positions of all other cursors open on this table. This is
+ ** required in case any of them are holding references to an xFetch
+ ** version of the b-tree page modified by the accessPayload call below.
+ **
+ ** Note that pCsr must be open on a BTREE_INTKEY table and saveCursorPosition()
+ ** and hence saveAllCursors() cannot fail on a BTREE_INTKEY table, hence
+ ** saveAllCursors can only return SQLITE_OK.
+ */
+ VVA_ONLY(rc =) saveAllCursors(pCsr->pBt, pCsr->pgnoRoot, pCsr);
+ assert( rc==SQLITE_OK );
+
/* Check some assumptions:
** (a) the cursor is open for writing,
** (b) there is a read/write transaction open,
@@ -57220,7 +58433,8 @@ SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
const Pgno iSrcPg = p->iNext; /* Source page number */
if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){
DbPage *pSrcPg; /* Source page object */
- rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
+ rc = sqlite3PagerAcquire(pSrcPager, iSrcPg, &pSrcPg,
+ PAGER_ACQUIRE_READONLY);
if( rc==SQLITE_OK ){
rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg), 0);
sqlite3PagerUnref(pSrcPg);
@@ -62444,14 +63658,6 @@ end_of_step:
}
/*
-** The maximum number of times that a statement will try to reparse
-** itself before giving up and returning SQLITE_SCHEMA.
-*/
-#ifndef SQLITE_MAX_SCHEMA_RETRY
-# define SQLITE_MAX_SCHEMA_RETRY 5
-#endif
-
-/*
** This is the top-level implementation of sqlite3_step(). Call
** sqlite3Step() to do most of the work. If a schema error occurs,
** call sqlite3Reprepare() and try again.
@@ -63354,6 +64560,11 @@ static int findNextHostParameter(const char *zSql, int *pnToken){
** then the returned string holds a copy of zRawSql with "-- " prepended
** to each line of text.
**
+** If the SQLITE_TRACE_SIZE_LIMIT macro is defined to an integer, then
+** then long strings and blobs are truncated to that many bytes. This
+** can be used to prevent unreasonably large trace strings when dealing
+** with large (multi-megabyte) strings and blobs.
+**
** The calling function is responsible for making sure the memory returned
** is eventually freed.
**
@@ -63424,30 +64635,49 @@ SQLITE_PRIVATE char *sqlite3VdbeExpandSql(
}else if( pVar->flags & MEM_Real ){
sqlite3XPrintf(&out, "%!.15g", pVar->r);
}else if( pVar->flags & MEM_Str ){
+ int nOut; /* Number of bytes of the string text to include in output */
#ifndef SQLITE_OMIT_UTF16
u8 enc = ENC(db);
+ Mem utf8;
if( enc!=SQLITE_UTF8 ){
- Mem utf8;
memset(&utf8, 0, sizeof(utf8));
utf8.db = db;
sqlite3VdbeMemSetStr(&utf8, pVar->z, pVar->n, enc, SQLITE_STATIC);
sqlite3VdbeChangeEncoding(&utf8, SQLITE_UTF8);
- sqlite3XPrintf(&out, "'%.*q'", utf8.n, utf8.z);
- sqlite3VdbeMemRelease(&utf8);
- }else
+ pVar = &utf8;
+ }
#endif
- {
- sqlite3XPrintf(&out, "'%.*q'", pVar->n, pVar->z);
+ nOut = pVar->n;
+#ifdef SQLITE_TRACE_SIZE_LIMIT
+ if( nOut>SQLITE_TRACE_SIZE_LIMIT ){
+ nOut = SQLITE_TRACE_SIZE_LIMIT;
+ while( nOut<pVar->n && (pVar->z[nOut]&0xc0)==0x80 ){ nOut++; }
}
+#endif
+ sqlite3XPrintf(&out, "'%.*q'", nOut, pVar->z);
+#ifdef SQLITE_TRACE_SIZE_LIMIT
+ if( nOut<pVar->n ) sqlite3XPrintf(&out, "/*+%d bytes*/", pVar->n-nOut);
+#endif
+#ifndef SQLITE_OMIT_UTF16
+ if( enc!=SQLITE_UTF8 ) sqlite3VdbeMemRelease(&utf8);
+#endif
}else if( pVar->flags & MEM_Zero ){
sqlite3XPrintf(&out, "zeroblob(%d)", pVar->u.nZero);
}else{
+ int nOut; /* Number of bytes of the blob to include in output */
assert( pVar->flags & MEM_Blob );
sqlite3StrAccumAppend(&out, "x'", 2);
- for(i=0; i<pVar->n; i++){
+ nOut = pVar->n;
+#ifdef SQLITE_TRACE_SIZE_LIMIT
+ if( nOut>SQLITE_TRACE_SIZE_LIMIT ) nOut = SQLITE_TRACE_SIZE_LIMIT;
+#endif
+ for(i=0; i<nOut; i++){
sqlite3XPrintf(&out, "%02x", pVar->z[i]&0xff);
}
sqlite3StrAccumAppend(&out, "'", 1);
+#ifdef SQLITE_TRACE_SIZE_LIMIT
+ if( nOut<pVar->n ) sqlite3XPrintf(&out, "/*+%d bytes*/", pVar->n-nOut);
+#endif
}
}
}
@@ -67664,7 +68894,7 @@ case OP_SeekGt: { /* jump, in3 */
** u.bc.r.flags = 0;
** }
*/
- u.bc.r.flags = (u16)(UNPACKED_INCRKEY * (1 & (u.bc.oc - OP_SeekLt)));
+ u.bc.r.flags = (u8)(UNPACKED_INCRKEY * (1 & (u.bc.oc - OP_SeekLt)));
assert( u.bc.oc!=OP_SeekGt || u.bc.r.flags==UNPACKED_INCRKEY );
assert( u.bc.oc!=OP_SeekLe || u.bc.r.flags==UNPACKED_INCRKEY );
assert( u.bc.oc!=OP_SeekGe || u.bc.r.flags==0 );
@@ -70789,7 +72019,7 @@ SQLITE_API int sqlite3_blob_open(
}
sqlite3_bind_int64(pBlob->pStmt, 1, iRow);
rc = blobSeekToRow(pBlob, iRow, &zErr);
- } while( (++nAttempt)<5 && rc==SQLITE_SCHEMA );
+ } while( (++nAttempt)<SQLITE_MAX_SCHEMA_RETRY && rc==SQLITE_SCHEMA );
blob_open_out:
if( rc==SQLITE_OK && db->mallocFailed==0 ){
@@ -72474,7 +73704,9 @@ static const struct sqlite3_io_methods MemJournalMethods = {
0, /* xShmMap */
0, /* xShmLock */
0, /* xShmBarrier */
- 0 /* xShmUnlock */
+ 0, /* xShmUnmap */
+ 0, /* xFetch */
+ 0 /* xUnfetch */
};
/*
@@ -72618,7 +73850,9 @@ SQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker *pWalker, Select *p){
/*
** Call sqlite3WalkExpr() for every expression in Select statement p.
** Invoke sqlite3WalkSelect() for subqueries in the FROM clause and
-** on the compound select chain, p->pPrior.
+** on the compound select chain, p->pPrior. Invoke the xSelectCallback()
+** either before or after the walk of expressions and FROM clause, depending
+** on whether pWalker->bSelectDepthFirst is false or true, respectively.
**
** Return WRC_Continue under normal conditions. Return WRC_Abort if
** there is an abort request.
@@ -72632,14 +73866,23 @@ SQLITE_PRIVATE int sqlite3WalkSelect(Walker *pWalker, Select *p){
rc = WRC_Continue;
pWalker->walkerDepth++;
while( p ){
- rc = pWalker->xSelectCallback(pWalker, p);
- if( rc ) break;
+ if( !pWalker->bSelectDepthFirst ){
+ rc = pWalker->xSelectCallback(pWalker, p);
+ if( rc ) break;
+ }
if( sqlite3WalkSelectExpr(pWalker, p)
|| sqlite3WalkSelectFrom(pWalker, p)
){
pWalker->walkerDepth--;
return WRC_Abort;
}
+ if( pWalker->bSelectDepthFirst ){
+ rc = pWalker->xSelectCallback(pWalker, p);
+ /* Depth-first search is currently only used for
+ ** selectAddSubqueryTypeInfo() and that routine always returns
+ ** WRC_Continue (0). So the following branch is never taken. */
+ if( NEVER(rc) ) break;
+ }
p = p->pPrior;
}
pWalker->walkerDepth--;
@@ -73037,7 +74280,10 @@ static int lookupName(
** Note that the expression in the result set should have already been
** resolved by the time the WHERE clause is resolved.
*/
- if( cnt==0 && (pEList = pNC->pEList)!=0 && zTab==0 ){
+ if( (pEList = pNC->pEList)!=0
+ && zTab==0
+ && ((pNC->ncFlags & NC_AsMaybe)==0 || cnt==0)
+ ){
for(j=0; j<pEList->nExpr; j++){
char *zAs = pEList->a[j].zName;
if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){
@@ -73128,7 +74374,9 @@ static int lookupName(
lookupname_end:
if( cnt==1 ){
assert( pNC!=0 );
- sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList);
+ if( pExpr->op!=TK_AS ){
+ sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList);
+ }
/* Increment the nRef value on all name contexts from TopNC up to
** the point where the name matched. */
for(;;){
@@ -73803,11 +75051,10 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
** re-evaluated for each reference to it.
*/
sNC.pEList = p->pEList;
- if( sqlite3ResolveExprNames(&sNC, p->pWhere) ||
- sqlite3ResolveExprNames(&sNC, p->pHaving)
- ){
- return WRC_Abort;
- }
+ sNC.ncFlags |= NC_AsMaybe;
+ if( sqlite3ResolveExprNames(&sNC, p->pHaving) ) return WRC_Abort;
+ if( sqlite3ResolveExprNames(&sNC, p->pWhere) ) return WRC_Abort;
+ sNC.ncFlags &= ~NC_AsMaybe;
/* The ORDER BY and GROUP BY clauses may not refer to terms in
** outer queries
@@ -73928,6 +75175,7 @@ SQLITE_PRIVATE int sqlite3ResolveExprNames(
#endif
savedHasAgg = pNC->ncFlags & NC_HasAgg;
pNC->ncFlags &= ~NC_HasAgg;
+ memset(&w, 0, sizeof(w));
w.xExprCallback = resolveExprStep;
w.xSelectCallback = resolveSelectStep;
w.pParse = pNC->pParse;
@@ -73968,6 +75216,7 @@ SQLITE_PRIVATE void sqlite3ResolveSelectNames(
Walker w;
assert( p!=0 );
+ memset(&w, 0, sizeof(w));
w.xExprCallback = resolveExprStep;
w.xSelectCallback = resolveSelectStep;
w.pParse = pParse;
@@ -74094,12 +75343,7 @@ SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr){
}
assert( op!=TK_REGISTER || p->op2!=TK_COLLATE );
if( op==TK_COLLATE ){
- if( db->init.busy ){
- /* Do not report errors when parsing while the schema */
- pColl = sqlite3FindCollSeq(db, ENC(db), p->u.zToken, 0);
- }else{
- pColl = sqlite3GetCollSeq(pParse, ENC(db), 0, p->u.zToken);
- }
+ pColl = sqlite3GetCollSeq(pParse, ENC(db), 0, p->u.zToken);
break;
}
if( p->pTab!=0
@@ -75192,6 +76436,7 @@ static int selectNodeIsConstant(Walker *pWalker, Select *NotUsed){
}
static int exprIsConst(Expr *p, int initFlag){
Walker w;
+ memset(&w, 0, sizeof(w));
w.u.i = initFlag;
w.xExprCallback = exprNodeIsConstant;
w.xSelectCallback = selectNodeIsConstant;
@@ -77406,8 +78651,8 @@ SQLITE_PRIVATE void sqlite3ExprCodeConstants(Parse *pParse, Expr *pExpr){
Walker w;
if( pParse->cookieGoto ) return;
if( OptimizationDisabled(pParse->db, SQLITE_FactorOutConst) ) return;
+ memset(&w, 0, sizeof(w));
w.xExprCallback = evalConstExpr;
- w.xSelectCallback = 0;
w.pParse = pParse;
sqlite3WalkExpr(&w, pExpr);
}
@@ -83599,10 +84844,8 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
for(i=0; i<pList->nExpr; i++){
Expr *pExpr = pList->a[i].pExpr;
if( pExpr ){
- CollSeq *pColl = sqlite3ExprCollSeq(pParse, pExpr);
- if( pColl ){
- nExtra += (1 + sqlite3Strlen30(pColl->zName));
- }
+ assert( pExpr->op==TK_COLLATE );
+ nExtra += (1 + sqlite3Strlen30(pExpr->u.zToken));
}
}
@@ -83663,7 +84906,6 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
const char *zColName = pListItem->zName;
Column *pTabCol;
int requestedSortOrder;
- CollSeq *pColl; /* Collating sequence */
char *zColl; /* Collation sequence name */
for(j=0, pTabCol=pTab->aCol; j<pTab->nCol; j++, pTabCol++){
@@ -83676,11 +84918,10 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
goto exit_create_index;
}
pIndex->aiColumn[i] = j;
- if( pListItem->pExpr
- && (pColl = sqlite3ExprCollSeq(pParse, pListItem->pExpr))!=0
- ){
+ if( pListItem->pExpr ){
int nColl;
- zColl = pColl->zName;
+ assert( pListItem->pExpr->op==TK_COLLATE );
+ zColl = pListItem->pExpr->u.zToken;
nColl = sqlite3Strlen30(zColl) + 1;
assert( nExtra>=nColl );
memcpy(zExtra, zColl, nColl);
@@ -83689,9 +84930,7 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
nExtra -= nColl;
}else{
zColl = pTab->aCol[j].zColl;
- if( !zColl ){
- zColl = "BINARY";
- }
+ if( !zColl ) zColl = "BINARY";
}
if( !db->init.busy && !sqlite3LocateCollSeq(pParse, zColl) ){
goto exit_create_index;
@@ -86611,6 +87850,13 @@ static int patternCompare(
}
/*
+** The sqlite3_strglob() interface.
+*/
+SQLITE_API int sqlite3_strglob(const char *zGlobPattern, const char *zString){
+ return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, 0)==0;
+}
+
+/*
** Count the number of times that the LIKE operator (or GLOB which is
** just a variation of LIKE) gets called. This is used for testing
** only.
@@ -90810,7 +92056,6 @@ SQLITE_API int sqlite3_exec(
const char *zLeftover; /* Tail of unprocessed SQL */
sqlite3_stmt *pStmt = 0; /* The current SQL statement */
char **azCols = 0; /* Names of result columns */
- int nRetry = 0; /* Number of retry attempts */
int callbackIsInit; /* True if callback data is initialized */
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -90818,12 +92063,12 @@ SQLITE_API int sqlite3_exec(
sqlite3_mutex_enter(db->mutex);
sqlite3Error(db, SQLITE_OK, 0);
- while( (rc==SQLITE_OK || (rc==SQLITE_SCHEMA && (++nRetry)<2)) && zSql[0] ){
+ while( rc==SQLITE_OK && zSql[0] ){
int nCol;
char **azVals = 0;
pStmt = 0;
- rc = sqlite3_prepare(db, zSql, -1, &pStmt, &zLeftover);
+ rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover);
assert( rc==SQLITE_OK || pStmt==0 );
if( rc!=SQLITE_OK ){
continue;
@@ -90880,11 +92125,8 @@ SQLITE_API int sqlite3_exec(
if( rc!=SQLITE_ROW ){
rc = sqlite3VdbeFinalize((Vdbe *)pStmt);
pStmt = 0;
- if( rc!=SQLITE_SCHEMA ){
- nRetry = 0;
- zSql = zLeftover;
- while( sqlite3Isspace(zSql[0]) ) zSql++;
- }
+ zSql = zLeftover;
+ while( sqlite3Isspace(zSql[0]) ) zSql++;
break;
}
}
@@ -91408,8 +92650,17 @@ struct sqlite3_api_routines {
#define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
#endif /* SQLITE_CORE */
-#define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0;
-#define SQLITE_EXTENSION_INIT2(v) sqlite3_api = v;
+#ifndef SQLITE_CORE
+ /* This case when the file really is being compiled as a loadable
+ ** extension */
+# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
+# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
+#else
+ /* This case when the file is being statically linked into the
+ ** application */
+# define SQLITE_EXTENSION_INIT1 /*no-op*/
+# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
+#endif
#endif /* _SQLITE3EXT_H_ */
@@ -91812,8 +93063,23 @@ static int sqlite3LoadExtension(
void *handle;
int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
char *zErrmsg = 0;
+ const char *zEntry;
+ char *zAltEntry = 0;
void **aHandle;
int nMsg = 300 + sqlite3Strlen30(zFile);
+ int ii;
+
+ /* Shared library endings to try if zFile cannot be loaded as written */
+ static const char *azEndings[] = {
+#if SQLITE_OS_WIN
+ "dll"
+#elif defined(__APPLE__)
+ "dylib"
+#else
+ "so"
+#endif
+ };
+
if( pzErrMsg ) *pzErrMsg = 0;
@@ -91830,11 +93096,17 @@ static int sqlite3LoadExtension(
return SQLITE_ERROR;
}
- if( zProc==0 ){
- zProc = "sqlite3_extension_init";
- }
+ zEntry = zProc ? zProc : "sqlite3_extension_init";
handle = sqlite3OsDlOpen(pVfs, zFile);
+#if SQLITE_OS_UNIX || SQLITE_OS_WIN
+ for(ii=0; ii<ArraySize(azEndings) && handle==0; ii++){
+ char *zAltFile = sqlite3_mprintf("%s.%s", zFile, azEndings[ii]);
+ if( zAltFile==0 ) return SQLITE_NOMEM;
+ handle = sqlite3OsDlOpen(pVfs, zAltFile);
+ sqlite3_free(zAltFile);
+ }
+#endif
if( handle==0 ){
if( pzErrMsg ){
*pzErrMsg = zErrmsg = sqlite3_malloc(nMsg);
@@ -91847,20 +93119,57 @@ static int sqlite3LoadExtension(
return SQLITE_ERROR;
}
xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
- sqlite3OsDlSym(pVfs, handle, zProc);
+ sqlite3OsDlSym(pVfs, handle, zEntry);
+
+ /* If no entry point was specified and the default legacy
+ ** entry point name "sqlite3_extension_init" was not found, then
+ ** construct an entry point name "sqlite3_X_init" where the X is
+ ** replaced by the lowercase value of every ASCII alphabetic
+ ** character in the filename after the last "/" upto the first ".",
+ ** and eliding the first three characters if they are "lib".
+ ** Examples:
+ **
+ ** /usr/local/lib/libExample5.4.3.so ==> sqlite3_example_init
+ ** C:/lib/mathfuncs.dll ==> sqlite3_mathfuncs_init
+ */
+ if( xInit==0 && zProc==0 ){
+ int iFile, iEntry, c;
+ int ncFile = sqlite3Strlen30(zFile);
+ zAltEntry = sqlite3_malloc(ncFile+30);
+ if( zAltEntry==0 ){
+ sqlite3OsDlClose(pVfs, handle);
+ return SQLITE_NOMEM;
+ }
+ memcpy(zAltEntry, "sqlite3_", 8);
+ for(iFile=ncFile-1; iFile>=0 && zFile[iFile]!='/'; iFile--){}
+ iFile++;
+ if( sqlite3_strnicmp(zFile+iFile, "lib", 3)==0 ) iFile += 3;
+ for(iEntry=8; (c = zFile[iFile])!=0 && c!='.'; iFile++){
+ if( sqlite3Isalpha(c) ){
+ zAltEntry[iEntry++] = (char)sqlite3UpperToLower[(unsigned)c];
+ }
+ }
+ memcpy(zAltEntry+iEntry, "_init", 6);
+ zEntry = zAltEntry;
+ xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
+ sqlite3OsDlSym(pVfs, handle, zEntry);
+ }
if( xInit==0 ){
if( pzErrMsg ){
- nMsg += sqlite3Strlen30(zProc);
+ nMsg += sqlite3Strlen30(zEntry);
*pzErrMsg = zErrmsg = sqlite3_malloc(nMsg);
if( zErrmsg ){
sqlite3_snprintf(nMsg, zErrmsg,
- "no entry point [%s] in shared library [%s]", zProc,zFile);
+ "no entry point [%s] in shared library [%s]", zEntry, zFile);
sqlite3OsDlError(pVfs, nMsg-1, zErrmsg);
}
- sqlite3OsDlClose(pVfs, handle);
}
+ sqlite3OsDlClose(pVfs, handle);
+ sqlite3_free(zAltEntry);
return SQLITE_ERROR;
- }else if( xInit(db, &zErrmsg, &sqlite3Apis) ){
+ }
+ sqlite3_free(zAltEntry);
+ if( xInit(db, &zErrmsg, &sqlite3Apis) ){
if( pzErrMsg ){
*pzErrMsg = sqlite3_mprintf("error during initialization: %s", zErrmsg);
}
@@ -92389,7 +93698,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
int rc; /* return value form SQLITE_FCNTL_PRAGMA */
sqlite3 *db = pParse->db; /* The database connection */
Db *pDb; /* The specific database being pragmaed */
- Vdbe *v = pParse->pVdbe = sqlite3VdbeCreate(db); /* Prepared statement */
+ Vdbe *v = sqlite3GetVdbe(pParse); /* Prepared statement */
if( v==0 ) return;
sqlite3VdbeRunOnlyOnce(v);
@@ -92472,11 +93781,12 @@ SQLITE_PRIVATE void sqlite3Pragma(
static const VdbeOpList getCacheSize[] = {
{ OP_Transaction, 0, 0, 0}, /* 0 */
{ OP_ReadCookie, 0, 1, BTREE_DEFAULT_CACHE_SIZE}, /* 1 */
- { OP_IfPos, 1, 7, 0},
+ { OP_IfPos, 1, 8, 0},
{ OP_Integer, 0, 2, 0},
{ OP_Subtract, 1, 2, 1},
- { OP_IfPos, 1, 7, 0},
+ { OP_IfPos, 1, 8, 0},
{ OP_Integer, 0, 1, 0}, /* 6 */
+ { OP_Noop, 0, 0, 0},
{ OP_ResultRow, 1, 1, 0},
};
int addr;
@@ -92815,6 +94125,43 @@ SQLITE_PRIVATE void sqlite3Pragma(
}else
/*
+ ** PRAGMA [database.]mmap_size(N)
+ **
+ ** Used to set mapping size limit. The mapping size limit is
+ ** used to limit the aggregate size of all memory mapped regions of the
+ ** database file. If this parameter is set to zero, then memory mapping
+ ** is not used at all. If N is negative, then the default memory map
+ ** limit determined by sqlite3_config(SQLITE_CONFIG_MMAP_SIZE) is set.
+ ** The parameter N is measured in bytes.
+ **
+ ** This value is advisory. The underlying VFS is free to memory map
+ ** as little or as much as it wants. Except, if N is set to 0 then the
+ ** upper layers will never invoke the xFetch interfaces to the VFS.
+ */
+ if( sqlite3StrICmp(zLeft,"mmap_size")==0 ){
+ sqlite3_int64 sz;
+ assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+ if( zRight ){
+ int ii;
+ sqlite3Atoi64(zRight, &sz, 1000, SQLITE_UTF8);
+ if( sz<0 ) sz = sqlite3GlobalConfig.szMmap;
+ if( pId2->n==0 ) db->szMmap = sz;
+ for(ii=db->nDb-1; ii>=0; ii--){
+ if( db->aDb[ii].pBt && (ii==iDb || pId2->n==0) ){
+ sqlite3BtreeSetMmapLimit(db->aDb[ii].pBt, sz);
+ }
+ }
+ }
+ sz = -1;
+ if( sqlite3_file_control(db,zDb,SQLITE_FCNTL_MMAP_SIZE,&sz)==SQLITE_OK ){
+#if SQLITE_MAX_MMAP_SIZE==0
+ sz = 0;
+#endif
+ returnSingleInt(pParse, "mmap_size", sz);
+ }
+ }else
+
+ /*
** PRAGMA temp_store
** PRAGMA temp_store = "default"|"memory"|"file"
**
@@ -93599,6 +94946,11 @@ SQLITE_PRIVATE void sqlite3Pragma(
** PRAGMA [database.]user_version
** PRAGMA [database.]user_version = <integer>
**
+ ** PRAGMA [database.]freelist_count = <integer>
+ **
+ ** PRAGMA [database.]application_id
+ ** PRAGMA [database.]application_id = <integer>
+ **
** The pragma's schema_version and user_version are used to set or get
** the value of the schema-version and user-version, respectively. Both
** the schema-version and the user-version are 32-bit signed integers
@@ -93620,10 +94972,14 @@ SQLITE_PRIVATE void sqlite3Pragma(
if( sqlite3StrICmp(zLeft, "schema_version")==0
|| sqlite3StrICmp(zLeft, "user_version")==0
|| sqlite3StrICmp(zLeft, "freelist_count")==0
+ || sqlite3StrICmp(zLeft, "application_id")==0
){
int iCookie; /* Cookie index. 1 for schema-cookie, 6 for user-cookie. */
sqlite3VdbeUsesBtree(v, iDb);
switch( zLeft[0] ){
+ case 'a': case 'A':
+ iCookie = BTREE_APPLICATION_ID;
+ break;
case 'f': case 'F':
iCookie = BTREE_FREE_PAGE_COUNT;
break;
@@ -94504,7 +95860,6 @@ static int sqlite3Prepare(
}
#endif
- assert( db->init.busy==0 || saveSqlFlag==0 );
if( db->init.busy==0 ){
Vdbe *pVdbe = pParse->pVdbe;
sqlite3VdbeSetSql(pVdbe, zSql, (int)(pParse->zTail-zSql), saveSqlFlag);
@@ -97980,6 +99335,69 @@ SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *pParse, struct SrcList_item *pF
}
return SQLITE_OK;
}
+/*
+** Detect compound SELECT statements that use an ORDER BY clause with
+** an alternative collating sequence.
+**
+** SELECT ... FROM t1 EXCEPT SELECT ... FROM t2 ORDER BY .. COLLATE ...
+**
+** These are rewritten as a subquery:
+**
+** SELECT * FROM (SELECT ... FROM t1 EXCEPT SELECT ... FROM t2)
+** ORDER BY ... COLLATE ...
+**
+** This transformation is necessary because the multiSelectOrderBy() routine
+** above that generates the code for a compound SELECT with an ORDER BY clause
+** uses a merge algorithm that requires the same collating sequence on the
+** result columns as on the ORDER BY clause. See ticket
+** http://www.sqlite.org/src/info/6709574d2a
+**
+** This transformation is only needed for EXCEPT, INTERSECT, and UNION.
+** The UNION ALL operator works fine with multiSelectOrderBy() even when
+** there are COLLATE terms in the ORDER BY.
+*/
+static int convertCompoundSelectToSubquery(Walker *pWalker, Select *p){
+ int i;
+ Select *pNew;
+ Select *pX;
+ sqlite3 *db;
+ struct ExprList_item *a;
+ SrcList *pNewSrc;
+ Parse *pParse;
+ Token dummy;
+
+ if( p->pPrior==0 ) return WRC_Continue;
+ if( p->pOrderBy==0 ) return WRC_Continue;
+ for(pX=p; pX && (pX->op==TK_ALL || pX->op==TK_SELECT); pX=pX->pPrior){}
+ if( pX==0 ) return WRC_Continue;
+ a = p->pOrderBy->a;
+ for(i=p->pOrderBy->nExpr-1; i>=0; i--){
+ if( a[i].pExpr->flags & EP_Collate ) break;
+ }
+ if( i<0 ) return WRC_Continue;
+
+ /* If we reach this point, that means the transformation is required. */
+
+ pParse = pWalker->pParse;
+ db = pParse->db;
+ pNew = sqlite3DbMallocZero(db, sizeof(*pNew) );
+ if( pNew==0 ) return WRC_Abort;
+ memset(&dummy, 0, sizeof(dummy));
+ pNewSrc = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&dummy,pNew,0,0);
+ if( pNewSrc==0 ) return WRC_Abort;
+ *pNew = *p;
+ p->pSrc = pNewSrc;
+ p->pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db, TK_ALL, 0));
+ p->op = TK_SELECT;
+ p->pWhere = 0;
+ pNew->pGroupBy = 0;
+ pNew->pHaving = 0;
+ pNew->pOrderBy = 0;
+ p->pPrior = 0;
+ pNew->pLimit = 0;
+ pNew->pOffset = 0;
+ return WRC_Continue;
+}
/*
** This routine is a Walker callback for "expanding" a SELECT statement.
@@ -98296,10 +99714,13 @@ static int exprWalkNoop(Walker *NotUsed, Expr *NotUsed2){
*/
static void sqlite3SelectExpand(Parse *pParse, Select *pSelect){
Walker w;
- w.xSelectCallback = selectExpander;
+ memset(&w, 0, sizeof(w));
+ w.xSelectCallback = convertCompoundSelectToSubquery;
w.xExprCallback = exprWalkNoop;
w.pParse = pParse;
sqlite3WalkSelect(&w, pSelect);
+ w.xSelectCallback = selectExpander;
+ sqlite3WalkSelect(&w, pSelect);
}
@@ -98354,9 +99775,11 @@ static int selectAddSubqueryTypeInfo(Walker *pWalker, Select *p){
static void sqlite3SelectAddTypeInfo(Parse *pParse, Select *pSelect){
#ifndef SQLITE_OMIT_SUBQUERY
Walker w;
+ memset(&w, 0, sizeof(w));
w.xSelectCallback = selectAddSubqueryTypeInfo;
w.xExprCallback = exprWalkNoop;
w.pParse = pParse;
+ w.bSelectDepthFirst = 1;
sqlite3WalkSelect(&w, pSelect);
#endif
}
@@ -98767,7 +100190,7 @@ SQLITE_PRIVATE int sqlite3Select(
pItem->addrFillSub = topAddr+1;
VdbeNoopComment((v, "materialize %s", pItem->pTab->zName));
if( pItem->isCorrelated==0 ){
- /* If the subquery is no correlated and if we are not inside of
+ /* If the subquery is not correlated and if we are not inside of
** a trigger, then we only need to compute the value of the subquery
** once. */
onceAddr = sqlite3CodeOnce(pParse);
@@ -101033,6 +102456,7 @@ SQLITE_PRIVATE void sqlite3Update(
}
if( j>=pTab->nCol ){
if( sqlite3IsRowid(pChanges->a[i].zName) ){
+ j = -1;
chngRowid = 1;
pRowidExpr = pChanges->a[i].pExpr;
}else{
@@ -101045,7 +102469,8 @@ SQLITE_PRIVATE void sqlite3Update(
{
int rc;
rc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab->zName,
- pTab->aCol[j].zName, db->aDb[iDb].zName);
+ j<0 ? "ROWID" : pTab->aCol[j].zName,
+ db->aDb[iDb].zName);
if( rc==SQLITE_DENY ){
goto update_cleanup;
}else if( rc==SQLITE_IGNORE ){
@@ -101788,6 +103213,7 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
BTREE_DEFAULT_CACHE_SIZE, 0, /* Preserve the default page cache size */
BTREE_TEXT_ENCODING, 0, /* Preserve the text encoding */
BTREE_USER_VERSION, 0, /* Preserve the user version */
+ BTREE_APPLICATION_ID, 0, /* Preserve the application id */
};
assert( 1==sqlite3BtreeIsInTrans(pTemp) );
@@ -103655,7 +105081,7 @@ static WhereTerm *findTerm(
continue;
}
}
- if( pTerm->prereqRight==0 ){
+ if( pTerm->prereqRight==0 && (pTerm->eOperator&WO_EQ)!=0 ){
pResult = pTerm;
goto findTerm_success;
}else if( pResult==0 ){
@@ -105225,9 +106651,8 @@ static void bestVirtualIndex(WhereBestIdx *p){
struct sqlite3_index_constraint *pIdxCons;
struct sqlite3_index_constraint_usage *pUsage;
WhereTerm *pTerm;
- int i, j, k;
+ int i, j;
int nOrderBy;
- int sortOrder; /* Sort order for IN clauses */
int bAllowIN; /* Allow IN optimizations */
double rCost;
@@ -105326,7 +106751,6 @@ static void bestVirtualIndex(WhereBestIdx *p){
return;
}
- sortOrder = SQLITE_SO_ASC;
pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
for(i=0; i<pIdxInfo->nConstraint; i++, pIdxCons++){
if( pUsage[i].argvIndex>0 ){
@@ -105341,17 +106765,28 @@ static void bestVirtualIndex(WhereBestIdx *p){
** repeated in the output. */
break;
}
- for(k=0; k<pIdxInfo->nOrderBy; k++){
- if( pIdxInfo->aOrderBy[k].iColumn==pIdxCons->iColumn ){
- sortOrder = pIdxInfo->aOrderBy[k].desc;
- break;
- }
- }
+ /* A virtual table that is constrained by an IN clause may not
+ ** consume the ORDER BY clause because (1) the order of IN terms
+ ** is not necessarily related to the order of output terms and
+ ** (2) Multiple outputs from a single IN value will not merge
+ ** together. */
+ pIdxInfo->orderByConsumed = 0;
}
}
}
if( i>=pIdxInfo->nConstraint ) break;
}
+
+ /* The orderByConsumed signal is only valid if all outer loops collectively
+ ** generate just a single row of output.
+ */
+ if( pIdxInfo->orderByConsumed ){
+ for(i=0; i<p->i; i++){
+ if( (p->aLevel[i].plan.wsFlags & WHERE_UNIQUE)==0 ){
+ pIdxInfo->orderByConsumed = 0;
+ }
+ }
+ }
/* If there is an ORDER BY clause, and the selected virtual table index
** does not satisfy it, increase the cost of the scan accordingly. This
@@ -105376,8 +106811,7 @@ static void bestVirtualIndex(WhereBestIdx *p){
}
p->cost.plan.u.pVtabIdx = pIdxInfo;
if( pIdxInfo->orderByConsumed ){
- assert( sortOrder==0 || sortOrder==1 );
- p->cost.plan.wsFlags |= WHERE_ORDERED + sortOrder*WHERE_REVERSE;
+ p->cost.plan.wsFlags |= WHERE_ORDERED;
p->cost.plan.nOBSat = nOrderBy;
}else{
p->cost.plan.nOBSat = p->i ? p->aLevel[p->i-1].plan.nOBSat : 0;
@@ -107114,6 +108548,7 @@ static Bitmask codeOneLoopStart(
int addrCont; /* Jump here to continue with next cycle */
int iRowidReg = 0; /* Rowid is stored in this register, if not zero */
int iReleaseReg = 0; /* Temp register to free before returning */
+ Bitmask newNotReady; /* Return value */
pParse = pWInfo->pParse;
v = pParse->pVdbe;
@@ -107124,6 +108559,7 @@ static Bitmask codeOneLoopStart(
bRev = (pLevel->plan.wsFlags & WHERE_REVERSE)!=0;
omitTable = (pLevel->plan.wsFlags & WHERE_IDX_ONLY)!=0
&& (wctrlFlags & WHERE_FORCE_TABLE)==0;
+ VdbeNoopComment((v, "Begin Join Loop %d", iLevel));
/* Create labels for the "break" and "continue" instructions
** for the current loop. Jump to addrBrk to break out of a loop.
@@ -107666,6 +109102,10 @@ static Bitmask codeOneLoopStart(
** the "interesting" terms of z - terms that did not originate in the
** ON or USING clause of a LEFT JOIN, and terms that are usable as
** indices.
+ **
+ ** This optimization also only applies if the (x1 OR x2 OR ...) term
+ ** is not contained in the ON clause of a LEFT JOIN.
+ ** See ticket http://www.sqlite.org/src/info/f2369304e4
*/
if( pWC->nTerm>1 ){
int iTerm;
@@ -107687,7 +109127,7 @@ static Bitmask codeOneLoopStart(
if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
WhereInfo *pSubWInfo; /* Info for single OR-term scan */
Expr *pOrExpr = pOrTerm->pExpr;
- if( pAndExpr ){
+ if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
pAndExpr->pLeft = pOrExpr;
pOrExpr = pAndExpr;
}
@@ -107774,7 +109214,7 @@ static Bitmask codeOneLoopStart(
pLevel->p2 = 1 + sqlite3VdbeAddOp2(v, aStart[bRev], iCur, addrBrk);
pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;
}
- notReady &= ~getMask(pWC->pMaskSet, iCur);
+ newNotReady = notReady & ~getMask(pWC->pMaskSet, iCur);
/* Insert code to test every subexpression that can be completely
** computed using the current set of tables.
@@ -107788,7 +109228,7 @@ static Bitmask codeOneLoopStart(
testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* IMP: R-30575-11662 */
testcase( pTerm->wtFlags & TERM_CODED );
if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
- if( (pTerm->prereqAll & notReady)!=0 ){
+ if( (pTerm->prereqAll & newNotReady)!=0 ){
testcase( pWInfo->untestedTerms==0
&& (pWInfo->wctrlFlags & WHERE_ONETABLE_ONLY)!=0 );
pWInfo->untestedTerms = 1;
@@ -107803,6 +109243,33 @@ static Bitmask codeOneLoopStart(
pTerm->wtFlags |= TERM_CODED;
}
+ /* Insert code to test for implied constraints based on transitivity
+ ** of the "==" operator.
+ **
+ ** Example: If the WHERE clause contains "t1.a=t2.b" and "t2.b=123"
+ ** and we are coding the t1 loop and the t2 loop has not yet coded,
+ ** then we cannot use the "t1.a=t2.b" constraint, but we can code
+ ** the implied "t1.a=123" constraint.
+ */
+ for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){
+ Expr *pE;
+ WhereTerm *pAlt;
+ Expr sEq;
+ if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
+ if( pTerm->eOperator!=(WO_EQUIV|WO_EQ) ) continue;
+ if( pTerm->leftCursor!=iCur ) continue;
+ pE = pTerm->pExpr;
+ assert( !ExprHasProperty(pE, EP_FromJoin) );
+ assert( (pTerm->prereqRight & newNotReady)!=0 );
+ pAlt = findTerm(pWC, iCur, pTerm->u.leftColumn, notReady, WO_EQ|WO_IN, 0);
+ if( pAlt==0 ) continue;
+ if( pAlt->wtFlags & (TERM_CODED) ) continue;
+ VdbeNoopComment((v, "begin transitive constraint"));
+ sEq = *pAlt->pExpr;
+ sEq.pLeft = pE->pLeft;
+ sqlite3ExprIfFalse(pParse, &sEq, addrCont, SQLITE_JUMPIFNULL);
+ }
+
/* For a LEFT OUTER JOIN, generate code that will record the fact that
** at least one row of the right table has matched the left table.
*/
@@ -107815,7 +109282,7 @@ static Bitmask codeOneLoopStart(
testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* IMP: R-30575-11662 */
testcase( pTerm->wtFlags & TERM_CODED );
if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
- if( (pTerm->prereqAll & notReady)!=0 ){
+ if( (pTerm->prereqAll & newNotReady)!=0 ){
assert( pWInfo->untestedTerms );
continue;
}
@@ -107826,7 +109293,7 @@ static Bitmask codeOneLoopStart(
}
sqlite3ReleaseTempReg(pParse, iReleaseReg);
- return notReady;
+ return newNotReady;
}
#if defined(SQLITE_TEST)
@@ -111144,7 +112611,9 @@ static void yy_reduce(
struct SrcList_item *pOld = yymsp[-4].minor.yy347->a;
pNew->zName = pOld->zName;
pNew->zDatabase = pOld->zDatabase;
+ pNew->pSelect = pOld->pSelect;
pOld->zName = pOld->zDatabase = 0;
+ pOld->pSelect = 0;
}
sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy347);
}else{
@@ -113812,6 +115281,19 @@ SQLITE_API int sqlite3_config(int op, ...){
}
#endif
+ case SQLITE_CONFIG_MMAP_SIZE: {
+ sqlite3_int64 szMmap = va_arg(ap, sqlite3_int64);
+ sqlite3_int64 mxMmap = va_arg(ap, sqlite3_int64);
+ if( mxMmap<0 || mxMmap>SQLITE_MAX_MMAP_SIZE ){
+ mxMmap = SQLITE_MAX_MMAP_SIZE;
+ }
+ sqlite3GlobalConfig.mxMmap = mxMmap;
+ if( szMmap<0 ) szMmap = SQLITE_DEFAULT_MMAP_SIZE;
+ if( szMmap>mxMmap) szMmap = mxMmap;
+ sqlite3GlobalConfig.szMmap = szMmap;
+ break;
+ }
+
default: {
rc = SQLITE_ERROR;
break;
@@ -114205,6 +115687,12 @@ SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
** go ahead and free all resources.
*/
+ /* If a transaction is open, roll it back. This also ensures that if
+ ** any database schemas have been modified by an uncommitted transaction
+ ** they are reset. And that the required b-tree mutex is held to make
+ ** the pager rollback and schema reset an atomic operation. */
+ sqlite3RollbackAll(db, SQLITE_OK);
+
/* Free any outstanding Savepoint structures. */
sqlite3CloseSavepoints(db);
@@ -114305,6 +115793,15 @@ SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
int inTrans = 0;
assert( sqlite3_mutex_held(db->mutex) );
sqlite3BeginBenignMalloc();
+
+ /* Obtain all b-tree mutexes before making any calls to BtreeRollback().
+ ** This is important in case the transaction being rolled back has
+ ** modified the database schema. If the b-tree mutexes are not taken
+ ** here, then another shared-cache connection might sneak in between
+ ** the database rollback and schema reset, which can cause false
+ ** corruption reports in some cases. */
+ sqlite3BtreeEnterAll(db);
+
for(i=0; i<db->nDb; i++){
Btree *p = db->aDb[i].pBt;
if( p ){
@@ -114322,6 +115819,7 @@ SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
sqlite3ExpirePreparedStatements(db);
sqlite3ResetAllSchemasOfConnection(db);
}
+ sqlite3BtreeLeaveAll(db);
/* Any deferred constraint violations have now been resolved. */
db->nDeferredCons = 0;
@@ -114333,6 +115831,110 @@ SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
}
/*
+** Return a static string containing the name corresponding to the error code
+** specified in the argument.
+*/
+#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST) || \
+ defined(SQLITE_DEBUG_OS_TRACE)
+SQLITE_PRIVATE const char *sqlite3ErrName(int rc){
+ const char *zName = 0;
+ int i, origRc = rc;
+ for(i=0; i<2 && zName==0; i++, rc &= 0xff){
+ switch( rc ){
+ case SQLITE_OK: zName = "SQLITE_OK"; break;
+ case SQLITE_ERROR: zName = "SQLITE_ERROR"; break;
+ case SQLITE_INTERNAL: zName = "SQLITE_INTERNAL"; break;
+ case SQLITE_PERM: zName = "SQLITE_PERM"; break;
+ case SQLITE_ABORT: zName = "SQLITE_ABORT"; break;
+ case SQLITE_ABORT_ROLLBACK: zName = "SQLITE_ABORT_ROLLBACK"; break;
+ case SQLITE_BUSY: zName = "SQLITE_BUSY"; break;
+ case SQLITE_BUSY_RECOVERY: zName = "SQLITE_BUSY_RECOVERY"; break;
+ case SQLITE_LOCKED: zName = "SQLITE_LOCKED"; break;
+ case SQLITE_LOCKED_SHAREDCACHE: zName = "SQLITE_LOCKED_SHAREDCACHE";break;
+ case SQLITE_NOMEM: zName = "SQLITE_NOMEM"; break;
+ case SQLITE_READONLY: zName = "SQLITE_READONLY"; break;
+ case SQLITE_READONLY_RECOVERY: zName = "SQLITE_READONLY_RECOVERY"; break;
+ case SQLITE_READONLY_CANTLOCK: zName = "SQLITE_READONLY_CANTLOCK"; break;
+ case SQLITE_READONLY_ROLLBACK: zName = "SQLITE_READONLY_ROLLBACK"; break;
+ case SQLITE_INTERRUPT: zName = "SQLITE_INTERRUPT"; break;
+ case SQLITE_IOERR: zName = "SQLITE_IOERR"; break;
+ case SQLITE_IOERR_READ: zName = "SQLITE_IOERR_READ"; break;
+ case SQLITE_IOERR_SHORT_READ: zName = "SQLITE_IOERR_SHORT_READ"; break;
+ case SQLITE_IOERR_WRITE: zName = "SQLITE_IOERR_WRITE"; break;
+ case SQLITE_IOERR_FSYNC: zName = "SQLITE_IOERR_FSYNC"; break;
+ case SQLITE_IOERR_DIR_FSYNC: zName = "SQLITE_IOERR_DIR_FSYNC"; break;
+ case SQLITE_IOERR_TRUNCATE: zName = "SQLITE_IOERR_TRUNCATE"; break;
+ case SQLITE_IOERR_FSTAT: zName = "SQLITE_IOERR_FSTAT"; break;
+ case SQLITE_IOERR_UNLOCK: zName = "SQLITE_IOERR_UNLOCK"; break;
+ case SQLITE_IOERR_RDLOCK: zName = "SQLITE_IOERR_RDLOCK"; break;
+ case SQLITE_IOERR_DELETE: zName = "SQLITE_IOERR_DELETE"; break;
+ case SQLITE_IOERR_BLOCKED: zName = "SQLITE_IOERR_BLOCKED"; break;
+ case SQLITE_IOERR_NOMEM: zName = "SQLITE_IOERR_NOMEM"; break;
+ case SQLITE_IOERR_ACCESS: zName = "SQLITE_IOERR_ACCESS"; break;
+ case SQLITE_IOERR_CHECKRESERVEDLOCK:
+ zName = "SQLITE_IOERR_CHECKRESERVEDLOCK"; break;
+ case SQLITE_IOERR_LOCK: zName = "SQLITE_IOERR_LOCK"; break;
+ case SQLITE_IOERR_CLOSE: zName = "SQLITE_IOERR_CLOSE"; break;
+ case SQLITE_IOERR_DIR_CLOSE: zName = "SQLITE_IOERR_DIR_CLOSE"; break;
+ case SQLITE_IOERR_SHMOPEN: zName = "SQLITE_IOERR_SHMOPEN"; break;
+ case SQLITE_IOERR_SHMSIZE: zName = "SQLITE_IOERR_SHMSIZE"; break;
+ case SQLITE_IOERR_SHMLOCK: zName = "SQLITE_IOERR_SHMLOCK"; break;
+ case SQLITE_IOERR_SHMMAP: zName = "SQLITE_IOERR_SHMMAP"; break;
+ case SQLITE_IOERR_SEEK: zName = "SQLITE_IOERR_SEEK"; break;
+ case SQLITE_IOERR_DELETE_NOENT: zName = "SQLITE_IOERR_DELETE_NOENT";break;
+ case SQLITE_IOERR_MMAP: zName = "SQLITE_IOERR_MMAP"; break;
+ case SQLITE_CORRUPT: zName = "SQLITE_CORRUPT"; break;
+ case SQLITE_CORRUPT_VTAB: zName = "SQLITE_CORRUPT_VTAB"; break;
+ case SQLITE_NOTFOUND: zName = "SQLITE_NOTFOUND"; break;
+ case SQLITE_FULL: zName = "SQLITE_FULL"; break;
+ case SQLITE_CANTOPEN: zName = "SQLITE_CANTOPEN"; break;
+ case SQLITE_CANTOPEN_NOTEMPDIR: zName = "SQLITE_CANTOPEN_NOTEMPDIR";break;
+ case SQLITE_CANTOPEN_ISDIR: zName = "SQLITE_CANTOPEN_ISDIR"; break;
+ case SQLITE_CANTOPEN_FULLPATH: zName = "SQLITE_CANTOPEN_FULLPATH"; break;
+ case SQLITE_PROTOCOL: zName = "SQLITE_PROTOCOL"; break;
+ case SQLITE_EMPTY: zName = "SQLITE_EMPTY"; break;
+ case SQLITE_SCHEMA: zName = "SQLITE_SCHEMA"; break;
+ case SQLITE_TOOBIG: zName = "SQLITE_TOOBIG"; break;
+ case SQLITE_CONSTRAINT: zName = "SQLITE_CONSTRAINT"; break;
+ case SQLITE_CONSTRAINT_UNIQUE: zName = "SQLITE_CONSTRAINT_UNIQUE"; break;
+ case SQLITE_CONSTRAINT_TRIGGER: zName = "SQLITE_CONSTRAINT_TRIGGER";break;
+ case SQLITE_CONSTRAINT_FOREIGNKEY:
+ zName = "SQLITE_CONSTRAINT_FOREIGNKEY"; break;
+ case SQLITE_CONSTRAINT_CHECK: zName = "SQLITE_CONSTRAINT_CHECK"; break;
+ case SQLITE_CONSTRAINT_PRIMARYKEY:
+ zName = "SQLITE_CONSTRAINT_PRIMARYKEY"; break;
+ case SQLITE_CONSTRAINT_NOTNULL: zName = "SQLITE_CONSTRAINT_NOTNULL";break;
+ case SQLITE_CONSTRAINT_COMMITHOOK:
+ zName = "SQLITE_CONSTRAINT_COMMITHOOK"; break;
+ case SQLITE_CONSTRAINT_VTAB: zName = "SQLITE_CONSTRAINT_VTAB"; break;
+ case SQLITE_CONSTRAINT_FUNCTION:
+ zName = "SQLITE_CONSTRAINT_FUNCTION"; break;
+ case SQLITE_MISMATCH: zName = "SQLITE_MISMATCH"; break;
+ case SQLITE_MISUSE: zName = "SQLITE_MISUSE"; break;
+ case SQLITE_NOLFS: zName = "SQLITE_NOLFS"; break;
+ case SQLITE_AUTH: zName = "SQLITE_AUTH"; break;
+ case SQLITE_FORMAT: zName = "SQLITE_FORMAT"; break;
+ case SQLITE_RANGE: zName = "SQLITE_RANGE"; break;
+ case SQLITE_NOTADB: zName = "SQLITE_NOTADB"; break;
+ case SQLITE_ROW: zName = "SQLITE_ROW"; break;
+ case SQLITE_NOTICE: zName = "SQLITE_NOTICE"; break;
+ case SQLITE_NOTICE_RECOVER_WAL: zName = "SQLITE_NOTICE_RECOVER_WAL";break;
+ case SQLITE_NOTICE_RECOVER_ROLLBACK:
+ zName = "SQLITE_NOTICE_RECOVER_ROLLBACK"; break;
+ case SQLITE_WARNING: zName = "SQLITE_WARNING"; break;
+ case SQLITE_DONE: zName = "SQLITE_DONE"; break;
+ }
+ }
+ if( zName==0 ){
+ static char zBuf[50];
+ sqlite3_snprintf(sizeof(zBuf), zBuf, "SQLITE_UNKNOWN(%d)", origRc);
+ zName = zBuf;
+ }
+ return zName;
+}
+#endif
+
+/*
** Return a static string that describes the kind of error specified in the
** argument.
*/
@@ -115632,6 +117234,7 @@ static int openDatabase(
memcpy(db->aLimit, aHardLimit, sizeof(db->aLimit));
db->autoCommit = 1;
db->nextAutovac = -1;
+ db->szMmap = sqlite3GlobalConfig.szMmap;
db->nextPagesize = 0;
db->flags |= SQLITE_ShortColNames | SQLITE_AutoIndex | SQLITE_EnableTrigger
#if SQLITE_DEFAULT_FILE_FORMAT<4
@@ -117948,7 +119551,7 @@ SQLITE_PRIVATE void sqlite3Fts3Matchinfo(sqlite3_context *, Fts3Cursor *, const
/* fts3_expr.c */
SQLITE_PRIVATE int sqlite3Fts3ExprParse(sqlite3_tokenizer *, int,
- char **, int, int, int, const char *, int, Fts3Expr **
+ char **, int, int, int, const char *, int, Fts3Expr **, char **
);
SQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *);
#ifdef SQLITE_TEST
@@ -117973,6 +119576,9 @@ SQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist(Fts3Cursor *, Fts3Expr *, int iC
SQLITE_PRIVATE int sqlite3Fts3MsrOvfl(Fts3Cursor *, Fts3MultiSegReader *, int *);
SQLITE_PRIVATE int sqlite3Fts3MsrIncrRestart(Fts3MultiSegReader *pCsr);
+/* fts3_tokenize_vtab.c */
+SQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3*, Fts3Hash *);
+
/* fts3_unicode2.c (functions generated by parsing unicode text files) */
#ifdef SQLITE_ENABLE_FTS4_UNICODE61
SQLITE_PRIVATE int sqlite3FtsUnicodeFold(int, int);
@@ -120669,14 +122275,12 @@ static int fts3FilterMethod(
pCsr->iLangid = 0;
if( nVal==2 ) pCsr->iLangid = sqlite3_value_int(apVal[1]);
+ assert( p->base.zErrMsg==0 );
rc = sqlite3Fts3ExprParse(p->pTokenizer, pCsr->iLangid,
- p->azColumn, p->bFts4, p->nColumn, iCol, zQuery, -1, &pCsr->pExpr
+ p->azColumn, p->bFts4, p->nColumn, iCol, zQuery, -1, &pCsr->pExpr,
+ &p->base.zErrMsg
);
if( rc!=SQLITE_OK ){
- if( rc==SQLITE_ERROR ){
- static const char *zErr = "malformed MATCH expression: [%s]";
- p->base.zErrMsg = sqlite3_mprintf(zErr, zQuery);
- }
return rc;
}
@@ -121340,9 +122944,13 @@ SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){
db, "fts4", &fts3Module, (void *)pHash, 0
);
}
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts3InitTok(db, (void *)pHash);
+ }
return rc;
}
+
/* An error has occurred. Delete the hash table and return the error code. */
assert( rc!=SQLITE_OK );
if( pHash ){
@@ -123116,17 +124724,26 @@ static int fts3auxConnectMethod(
UNUSED_PARAMETER(pUnused);
- /* The user should specify a single argument - the name of an fts3 table. */
- if( argc!=4 ){
- *pzErr = sqlite3_mprintf(
- "wrong number of arguments to fts4aux constructor"
- );
- return SQLITE_ERROR;
- }
+ /* The user should invoke this in one of two forms:
+ **
+ ** CREATE VIRTUAL TABLE xxx USING fts4aux(fts4-table);
+ ** CREATE VIRTUAL TABLE xxx USING fts4aux(fts4-table-db, fts4-table);
+ */
+ if( argc!=4 && argc!=5 ) goto bad_args;
zDb = argv[1];
nDb = (int)strlen(zDb);
- zFts3 = argv[3];
+ if( argc==5 ){
+ if( nDb==4 && 0==sqlite3_strnicmp("temp", zDb, 4) ){
+ zDb = argv[3];
+ nDb = (int)strlen(zDb);
+ zFts3 = argv[4];
+ }else{
+ goto bad_args;
+ }
+ }else{
+ zFts3 = argv[3];
+ }
nFts3 = (int)strlen(zFts3);
rc = sqlite3_declare_vtab(db, FTS3_TERMS_SCHEMA);
@@ -123149,6 +124766,10 @@ static int fts3auxConnectMethod(
*ppVtab = (sqlite3_vtab *)p;
return SQLITE_OK;
+
+ bad_args:
+ *pzErr = sqlite3_mprintf("invalid arguments to fts4aux constructor");
+ return SQLITE_ERROR;
}
/*
@@ -124162,8 +125783,10 @@ static int fts3ExprParse(
}
pNot->eType = FTSQUERY_NOT;
pNot->pRight = p;
+ p->pParent = pNot;
if( pNotBranch ){
pNot->pLeft = pNotBranch;
+ pNotBranch->pParent = pNot;
}
pNotBranch = pNot;
p = pPrev;
@@ -124251,6 +125874,7 @@ static int fts3ExprParse(
pIter = pIter->pLeft;
}
pIter->pLeft = pRet;
+ pRet->pParent = pIter;
pRet = pNotBranch;
}
}
@@ -124268,30 +125892,184 @@ exprparse_out:
}
/*
-** Parameters z and n contain a pointer to and length of a buffer containing
-** an fts3 query expression, respectively. This function attempts to parse the
-** query expression and create a tree of Fts3Expr structures representing the
-** parsed expression. If successful, *ppExpr is set to point to the head
-** of the parsed expression tree and SQLITE_OK is returned. If an error
-** occurs, either SQLITE_NOMEM (out-of-memory error) or SQLITE_ERROR (parse
-** error) is returned and *ppExpr is set to 0.
+** Return SQLITE_ERROR if the maximum depth of the expression tree passed
+** as the only argument is more than nMaxDepth.
+*/
+static int fts3ExprCheckDepth(Fts3Expr *p, int nMaxDepth){
+ int rc = SQLITE_OK;
+ if( p ){
+ if( nMaxDepth<0 ){
+ rc = SQLITE_TOOBIG;
+ }else{
+ rc = fts3ExprCheckDepth(p->pLeft, nMaxDepth-1);
+ if( rc==SQLITE_OK ){
+ rc = fts3ExprCheckDepth(p->pRight, nMaxDepth-1);
+ }
+ }
+ }
+ return rc;
+}
+
+/*
+** This function attempts to transform the expression tree at (*pp) to
+** an equivalent but more balanced form. The tree is modified in place.
+** If successful, SQLITE_OK is returned and (*pp) set to point to the
+** new root expression node.
**
-** If parameter n is a negative number, then z is assumed to point to a
-** nul-terminated string and the length is determined using strlen().
+** nMaxDepth is the maximum allowable depth of the balanced sub-tree.
**
-** The first parameter, pTokenizer, is passed the fts3 tokenizer module to
-** use to normalize query tokens while parsing the expression. The azCol[]
-** array, which is assumed to contain nCol entries, should contain the names
-** of each column in the target fts3 table, in order from left to right.
-** Column names must be nul-terminated strings.
+** Otherwise, if an error occurs, an SQLite error code is returned and
+** expression (*pp) freed.
+*/
+static int fts3ExprBalance(Fts3Expr **pp, int nMaxDepth){
+ int rc = SQLITE_OK; /* Return code */
+ Fts3Expr *pRoot = *pp; /* Initial root node */
+ Fts3Expr *pFree = 0; /* List of free nodes. Linked by pParent. */
+ int eType = pRoot->eType; /* Type of node in this tree */
+
+ if( nMaxDepth==0 ){
+ rc = SQLITE_ERROR;
+ }
+
+ if( rc==SQLITE_OK && (eType==FTSQUERY_AND || eType==FTSQUERY_OR) ){
+ Fts3Expr **apLeaf;
+ apLeaf = (Fts3Expr **)sqlite3_malloc(sizeof(Fts3Expr *) * nMaxDepth);
+ if( 0==apLeaf ){
+ rc = SQLITE_NOMEM;
+ }else{
+ memset(apLeaf, 0, sizeof(Fts3Expr *) * nMaxDepth);
+ }
+
+ if( rc==SQLITE_OK ){
+ int i;
+ Fts3Expr *p;
+
+ /* Set $p to point to the left-most leaf in the tree of eType nodes. */
+ for(p=pRoot; p->eType==eType; p=p->pLeft){
+ assert( p->pParent==0 || p->pParent->pLeft==p );
+ assert( p->pLeft && p->pRight );
+ }
+
+ /* This loop runs once for each leaf in the tree of eType nodes. */
+ while( 1 ){
+ int iLvl;
+ Fts3Expr *pParent = p->pParent; /* Current parent of p */
+
+ assert( pParent==0 || pParent->pLeft==p );
+ p->pParent = 0;
+ if( pParent ){
+ pParent->pLeft = 0;
+ }else{
+ pRoot = 0;
+ }
+ rc = fts3ExprBalance(&p, nMaxDepth-1);
+ if( rc!=SQLITE_OK ) break;
+
+ for(iLvl=0; p && iLvl<nMaxDepth; iLvl++){
+ if( apLeaf[iLvl]==0 ){
+ apLeaf[iLvl] = p;
+ p = 0;
+ }else{
+ assert( pFree );
+ pFree->pLeft = apLeaf[iLvl];
+ pFree->pRight = p;
+ pFree->pLeft->pParent = pFree;
+ pFree->pRight->pParent = pFree;
+
+ p = pFree;
+ pFree = pFree->pParent;
+ p->pParent = 0;
+ apLeaf[iLvl] = 0;
+ }
+ }
+ if( p ){
+ sqlite3Fts3ExprFree(p);
+ rc = SQLITE_TOOBIG;
+ break;
+ }
+
+ /* If that was the last leaf node, break out of the loop */
+ if( pParent==0 ) break;
+
+ /* Set $p to point to the next leaf in the tree of eType nodes */
+ for(p=pParent->pRight; p->eType==eType; p=p->pLeft);
+
+ /* Remove pParent from the original tree. */
+ assert( pParent->pParent==0 || pParent->pParent->pLeft==pParent );
+ pParent->pRight->pParent = pParent->pParent;
+ if( pParent->pParent ){
+ pParent->pParent->pLeft = pParent->pRight;
+ }else{
+ assert( pParent==pRoot );
+ pRoot = pParent->pRight;
+ }
+
+ /* Link pParent into the free node list. It will be used as an
+ ** internal node of the new tree. */
+ pParent->pParent = pFree;
+ pFree = pParent;
+ }
+
+ if( rc==SQLITE_OK ){
+ p = 0;
+ for(i=0; i<nMaxDepth; i++){
+ if( apLeaf[i] ){
+ if( p==0 ){
+ p = apLeaf[i];
+ p->pParent = 0;
+ }else{
+ assert( pFree!=0 );
+ pFree->pRight = p;
+ pFree->pLeft = apLeaf[i];
+ pFree->pLeft->pParent = pFree;
+ pFree->pRight->pParent = pFree;
+
+ p = pFree;
+ pFree = pFree->pParent;
+ p->pParent = 0;
+ }
+ }
+ }
+ pRoot = p;
+ }else{
+ /* An error occurred. Delete the contents of the apLeaf[] array
+ ** and pFree list. Everything else is cleaned up by the call to
+ ** sqlite3Fts3ExprFree(pRoot) below. */
+ Fts3Expr *pDel;
+ for(i=0; i<nMaxDepth; i++){
+ sqlite3Fts3ExprFree(apLeaf[i]);
+ }
+ while( (pDel=pFree)!=0 ){
+ pFree = pDel->pParent;
+ sqlite3_free(pDel);
+ }
+ }
+
+ assert( pFree==0 );
+ sqlite3_free( apLeaf );
+ }
+ }
+
+ if( rc!=SQLITE_OK ){
+ sqlite3Fts3ExprFree(pRoot);
+ pRoot = 0;
+ }
+ *pp = pRoot;
+ return rc;
+}
+
+/*
+** This function is similar to sqlite3Fts3ExprParse(), with the following
+** differences:
**
-** The iDefaultCol parameter should be passed the index of the table column
-** that appears on the left-hand-side of the MATCH operator (the default
-** column to match against for tokens for which a column name is not explicitly
-** specified as part of the query string), or -1 if tokens may by default
-** match any table column.
+** 1. It does not do expression rebalancing.
+** 2. It does not check that the expression does not exceed the
+** maximum allowable depth.
+** 3. Even if it fails, *ppExpr may still be set to point to an
+** expression tree. It should be deleted using sqlite3Fts3ExprFree()
+** in this case.
*/
-SQLITE_PRIVATE int sqlite3Fts3ExprParse(
+static int fts3ExprParseUnbalanced(
sqlite3_tokenizer *pTokenizer, /* Tokenizer module */
int iLangid, /* Language id for tokenizer */
char **azCol, /* Array of column names for fts3 table */
@@ -124320,28 +126098,116 @@ SQLITE_PRIVATE int sqlite3Fts3ExprParse(
n = (int)strlen(z);
}
rc = fts3ExprParse(&sParse, z, n, ppExpr, &nParsed);
+ assert( rc==SQLITE_OK || *ppExpr==0 );
/* Check for mismatched parenthesis */
if( rc==SQLITE_OK && sParse.nNest ){
rc = SQLITE_ERROR;
+ }
+
+ return rc;
+}
+
+/*
+** Parameters z and n contain a pointer to and length of a buffer containing
+** an fts3 query expression, respectively. This function attempts to parse the
+** query expression and create a tree of Fts3Expr structures representing the
+** parsed expression. If successful, *ppExpr is set to point to the head
+** of the parsed expression tree and SQLITE_OK is returned. If an error
+** occurs, either SQLITE_NOMEM (out-of-memory error) or SQLITE_ERROR (parse
+** error) is returned and *ppExpr is set to 0.
+**
+** If parameter n is a negative number, then z is assumed to point to a
+** nul-terminated string and the length is determined using strlen().
+**
+** The first parameter, pTokenizer, is passed the fts3 tokenizer module to
+** use to normalize query tokens while parsing the expression. The azCol[]
+** array, which is assumed to contain nCol entries, should contain the names
+** of each column in the target fts3 table, in order from left to right.
+** Column names must be nul-terminated strings.
+**
+** The iDefaultCol parameter should be passed the index of the table column
+** that appears on the left-hand-side of the MATCH operator (the default
+** column to match against for tokens for which a column name is not explicitly
+** specified as part of the query string), or -1 if tokens may by default
+** match any table column.
+*/
+SQLITE_PRIVATE int sqlite3Fts3ExprParse(
+ sqlite3_tokenizer *pTokenizer, /* Tokenizer module */
+ int iLangid, /* Language id for tokenizer */
+ char **azCol, /* Array of column names for fts3 table */
+ int bFts4, /* True to allow FTS4-only syntax */
+ int nCol, /* Number of entries in azCol[] */
+ int iDefaultCol, /* Default column to query */
+ const char *z, int n, /* Text of MATCH query */
+ Fts3Expr **ppExpr, /* OUT: Parsed query structure */
+ char **pzErr /* OUT: Error message (sqlite3_malloc) */
+){
+ static const int MAX_EXPR_DEPTH = 12;
+ int rc = fts3ExprParseUnbalanced(
+ pTokenizer, iLangid, azCol, bFts4, nCol, iDefaultCol, z, n, ppExpr
+ );
+
+ /* Rebalance the expression. And check that its depth does not exceed
+ ** MAX_EXPR_DEPTH. */
+ if( rc==SQLITE_OK && *ppExpr ){
+ rc = fts3ExprBalance(ppExpr, MAX_EXPR_DEPTH);
+ if( rc==SQLITE_OK ){
+ rc = fts3ExprCheckDepth(*ppExpr, MAX_EXPR_DEPTH);
+ }
+ }
+
+ if( rc!=SQLITE_OK ){
sqlite3Fts3ExprFree(*ppExpr);
*ppExpr = 0;
+ if( rc==SQLITE_TOOBIG ){
+ *pzErr = sqlite3_mprintf(
+ "FTS expression tree is too large (maximum depth %d)", MAX_EXPR_DEPTH
+ );
+ rc = SQLITE_ERROR;
+ }else if( rc==SQLITE_ERROR ){
+ *pzErr = sqlite3_mprintf("malformed MATCH expression: [%s]", z);
+ }
}
return rc;
}
/*
+** Free a single node of an expression tree.
+*/
+static void fts3FreeExprNode(Fts3Expr *p){
+ assert( p->eType==FTSQUERY_PHRASE || p->pPhrase==0 );
+ sqlite3Fts3EvalPhraseCleanup(p->pPhrase);
+ sqlite3_free(p->aMI);
+ sqlite3_free(p);
+}
+
+/*
** Free a parsed fts3 query expression allocated by sqlite3Fts3ExprParse().
+**
+** This function would be simpler if it recursively called itself. But
+** that would mean passing a sufficiently large expression to ExprParse()
+** could cause a stack overflow.
*/
-SQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *p){
- if( p ){
- assert( p->eType==FTSQUERY_PHRASE || p->pPhrase==0 );
- sqlite3Fts3ExprFree(p->pLeft);
- sqlite3Fts3ExprFree(p->pRight);
- sqlite3Fts3EvalPhraseCleanup(p->pPhrase);
- sqlite3_free(p->aMI);
- sqlite3_free(p);
+SQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *pDel){
+ Fts3Expr *p;
+ assert( pDel==0 || pDel->pParent==0 );
+ for(p=pDel; p && (p->pLeft||p->pRight); p=(p->pLeft ? p->pLeft : p->pRight)){
+ assert( p->pParent==0 || p==p->pParent->pRight || p==p->pParent->pLeft );
+ }
+ while( p ){
+ Fts3Expr *pParent = p->pParent;
+ fts3FreeExprNode(p);
+ if( pParent && p==pParent->pLeft && pParent->pRight ){
+ p = pParent->pRight;
+ while( p && (p->pLeft || p->pRight) ){
+ assert( p==p->pParent->pRight || p==p->pParent->pLeft );
+ p = (p->pLeft ? p->pLeft : p->pRight);
+ }
+ }else{
+ p = pParent;
+ }
}
}
@@ -124393,6 +126259,9 @@ static int queryTestTokenizer(
** the returned expression text and then freed using sqlite3_free().
*/
static char *exprToString(Fts3Expr *pExpr, char *zBuf){
+ if( pExpr==0 ){
+ return sqlite3_mprintf("");
+ }
switch( pExpr->eType ){
case FTSQUERY_PHRASE: {
Fts3Phrase *pPhrase = pExpr->pPhrase;
@@ -124500,10 +126369,21 @@ static void fts3ExprTest(
azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]);
}
- rc = sqlite3Fts3ExprParse(
- pTokenizer, 0, azCol, 0, nCol, nCol, zExpr, nExpr, &pExpr
- );
+ if( sqlite3_user_data(context) ){
+ char *zDummy = 0;
+ rc = sqlite3Fts3ExprParse(
+ pTokenizer, 0, azCol, 0, nCol, nCol, zExpr, nExpr, &pExpr, &zDummy
+ );
+ assert( rc==SQLITE_OK || pExpr==0 );
+ sqlite3_free(zDummy);
+ }else{
+ rc = fts3ExprParseUnbalanced(
+ pTokenizer, 0, azCol, 0, nCol, nCol, zExpr, nExpr, &pExpr
+ );
+ }
+
if( rc!=SQLITE_OK && rc!=SQLITE_NOMEM ){
+ sqlite3Fts3ExprFree(pExpr);
sqlite3_result_error(context, "Error parsing expression", -1);
}else if( rc==SQLITE_NOMEM || !(zBuf = exprToString(pExpr, 0)) ){
sqlite3_result_error_nomem(context);
@@ -124526,9 +126406,15 @@ exprtest_out:
** with database connection db.
*/
SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3* db){
- return sqlite3_create_function(
+ int rc = sqlite3_create_function(
db, "fts3_exprtest", -1, SQLITE_UTF8, 0, fts3ExprTest, 0, 0
);
+ if( rc==SQLITE_OK ){
+ rc = sqlite3_create_function(db, "fts3_exprtest_rebalance",
+ -1, SQLITE_UTF8, (void *)1, fts3ExprTest, 0, 0
+ );
+ }
+ return rc;
}
#endif
@@ -126291,6 +128177,462 @@ SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
/************** End of fts3_tokenizer1.c *************************************/
+/************** Begin file fts3_tokenize_vtab.c ******************************/
+/*
+** 2013 Apr 22
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains code for the "fts3tokenize" virtual table module.
+** An fts3tokenize virtual table is created as follows:
+**
+** CREATE VIRTUAL TABLE <tbl> USING fts3tokenize(
+** <tokenizer-name>, <arg-1>, ...
+** );
+**
+** The table created has the following schema:
+**
+** CREATE TABLE <tbl>(input, token, start, end, position)
+**
+** When queried, the query must include a WHERE clause of type:
+**
+** input = <string>
+**
+** The virtual table module tokenizes this <string>, using the FTS3
+** tokenizer specified by the arguments to the CREATE VIRTUAL TABLE
+** statement and returns one row for each token in the result. With
+** fields set as follows:
+**
+** input: Always set to a copy of <string>
+** token: A token from the input.
+** start: Byte offset of the token within the input <string>.
+** end: Byte offset of the byte immediately following the end of the
+** token within the input string.
+** pos: Token offset of token within input.
+**
+*/
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+/* #include <string.h> */
+/* #include <assert.h> */
+
+typedef struct Fts3tokTable Fts3tokTable;
+typedef struct Fts3tokCursor Fts3tokCursor;
+
+/*
+** Virtual table structure.
+*/
+struct Fts3tokTable {
+ sqlite3_vtab base; /* Base class used by SQLite core */
+ const sqlite3_tokenizer_module *pMod;
+ sqlite3_tokenizer *pTok;
+};
+
+/*
+** Virtual table cursor structure.
+*/
+struct Fts3tokCursor {
+ sqlite3_vtab_cursor base; /* Base class used by SQLite core */
+ char *zInput; /* Input string */
+ sqlite3_tokenizer_cursor *pCsr; /* Cursor to iterate through zInput */
+ int iRowid; /* Current 'rowid' value */
+ const char *zToken; /* Current 'token' value */
+ int nToken; /* Size of zToken in bytes */
+ int iStart; /* Current 'start' value */
+ int iEnd; /* Current 'end' value */
+ int iPos; /* Current 'pos' value */
+};
+
+/*
+** Query FTS for the tokenizer implementation named zName.
+*/
+static int fts3tokQueryTokenizer(
+ Fts3Hash *pHash,
+ const char *zName,
+ const sqlite3_tokenizer_module **pp,
+ char **pzErr
+){
+ sqlite3_tokenizer_module *p;
+ int nName = (int)strlen(zName);
+
+ p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
+ if( !p ){
+ *pzErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
+ return SQLITE_ERROR;
+ }
+
+ *pp = p;
+ return SQLITE_OK;
+}
+
+/*
+** The second argument, argv[], is an array of pointers to nul-terminated
+** strings. This function makes a copy of the array and strings into a
+** single block of memory. It then dequotes any of the strings that appear
+** to be quoted.
+**
+** If successful, output parameter *pazDequote is set to point at the
+** array of dequoted strings and SQLITE_OK is returned. The caller is
+** responsible for eventually calling sqlite3_free() to free the array
+** in this case. Or, if an error occurs, an SQLite error code is returned.
+** The final value of *pazDequote is undefined in this case.
+*/
+static int fts3tokDequoteArray(
+ int argc, /* Number of elements in argv[] */
+ const char * const *argv, /* Input array */
+ char ***pazDequote /* Output array */
+){
+ int rc = SQLITE_OK; /* Return code */
+ if( argc==0 ){
+ *pazDequote = 0;
+ }else{
+ int i;
+ int nByte = 0;
+ char **azDequote;
+
+ for(i=0; i<argc; i++){
+ nByte += (int)(strlen(argv[i]) + 1);
+ }
+
+ *pazDequote = azDequote = sqlite3_malloc(sizeof(char *)*argc + nByte);
+ if( azDequote==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ char *pSpace = (char *)&azDequote[argc];
+ for(i=0; i<argc; i++){
+ int n = (int)strlen(argv[i]);
+ azDequote[i] = pSpace;
+ memcpy(pSpace, argv[i], n+1);
+ sqlite3Fts3Dequote(pSpace);
+ pSpace += (n+1);
+ }
+ }
+ }
+
+ return rc;
+}
+
+/*
+** Schema of the tokenizer table.
+*/
+#define FTS3_TOK_SCHEMA "CREATE TABLE x(input, token, start, end, position)"
+
+/*
+** This function does all the work for both the xConnect and xCreate methods.
+** These tables have no persistent representation of their own, so xConnect
+** and xCreate are identical operations.
+**
+** argv[0]: module name
+** argv[1]: database name
+** argv[2]: table name
+** argv[3]: first argument (tokenizer name)
+*/
+static int fts3tokConnectMethod(
+ sqlite3 *db, /* Database connection */
+ void *pHash, /* Hash table of tokenizers */
+ int argc, /* Number of elements in argv array */
+ const char * const *argv, /* xCreate/xConnect argument array */
+ sqlite3_vtab **ppVtab, /* OUT: New sqlite3_vtab object */
+ char **pzErr /* OUT: sqlite3_malloc'd error message */
+){
+ Fts3tokTable *pTab;
+ const sqlite3_tokenizer_module *pMod = 0;
+ sqlite3_tokenizer *pTok = 0;
+ int rc;
+ char **azDequote = 0;
+ int nDequote;
+
+ rc = sqlite3_declare_vtab(db, FTS3_TOK_SCHEMA);
+ if( rc!=SQLITE_OK ) return rc;
+
+ nDequote = argc-3;
+ rc = fts3tokDequoteArray(nDequote, &argv[3], &azDequote);
+
+ if( rc==SQLITE_OK ){
+ const char *zModule;
+ if( nDequote<1 ){
+ zModule = "simple";
+ }else{
+ zModule = azDequote[0];
+ }
+ rc = fts3tokQueryTokenizer((Fts3Hash*)pHash, zModule, &pMod, pzErr);
+ }
+
+ assert( (rc==SQLITE_OK)==(pMod!=0) );
+ if( rc==SQLITE_OK ){
+ const char * const *azArg = (const char * const *)&azDequote[1];
+ rc = pMod->xCreate((nDequote>1 ? nDequote-1 : 0), azArg, &pTok);
+ }
+
+ if( rc==SQLITE_OK ){
+ pTab = (Fts3tokTable *)sqlite3_malloc(sizeof(Fts3tokTable));
+ if( pTab==0 ){
+ rc = SQLITE_NOMEM;
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ memset(pTab, 0, sizeof(Fts3tokTable));
+ pTab->pMod = pMod;
+ pTab->pTok = pTok;
+ *ppVtab = &pTab->base;
+ }else{
+ if( pTok ){
+ pMod->xDestroy(pTok);
+ }
+ }
+
+ sqlite3_free(azDequote);
+ return rc;
+}
+
+/*
+** This function does the work for both the xDisconnect and xDestroy methods.
+** These tables have no persistent representation of their own, so xDisconnect
+** and xDestroy are identical operations.
+*/
+static int fts3tokDisconnectMethod(sqlite3_vtab *pVtab){
+ Fts3tokTable *pTab = (Fts3tokTable *)pVtab;
+
+ pTab->pMod->xDestroy(pTab->pTok);
+ sqlite3_free(pTab);
+ return SQLITE_OK;
+}
+
+/*
+** xBestIndex - Analyze a WHERE and ORDER BY clause.
+*/
+static int fts3tokBestIndexMethod(
+ sqlite3_vtab *pVTab,
+ sqlite3_index_info *pInfo
+){
+ int i;
+ UNUSED_PARAMETER(pVTab);
+
+ for(i=0; i<pInfo->nConstraint; i++){
+ if( pInfo->aConstraint[i].usable
+ && pInfo->aConstraint[i].iColumn==0
+ && pInfo->aConstraint[i].op==SQLITE_INDEX_CONSTRAINT_EQ
+ ){
+ pInfo->idxNum = 1;
+ pInfo->aConstraintUsage[i].argvIndex = 1;
+ pInfo->aConstraintUsage[i].omit = 1;
+ pInfo->estimatedCost = 1;
+ return SQLITE_OK;
+ }
+ }
+
+ pInfo->idxNum = 0;
+ assert( pInfo->estimatedCost>1000000.0 );
+
+ return SQLITE_OK;
+}
+
+/*
+** xOpen - Open a cursor.
+*/
+static int fts3tokOpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){
+ Fts3tokCursor *pCsr;
+ UNUSED_PARAMETER(pVTab);
+
+ pCsr = (Fts3tokCursor *)sqlite3_malloc(sizeof(Fts3tokCursor));
+ if( pCsr==0 ){
+ return SQLITE_NOMEM;
+ }
+ memset(pCsr, 0, sizeof(Fts3tokCursor));
+
+ *ppCsr = (sqlite3_vtab_cursor *)pCsr;
+ return SQLITE_OK;
+}
+
+/*
+** Reset the tokenizer cursor passed as the only argument. As if it had
+** just been returned by fts3tokOpenMethod().
+*/
+static void fts3tokResetCursor(Fts3tokCursor *pCsr){
+ if( pCsr->pCsr ){
+ Fts3tokTable *pTab = (Fts3tokTable *)(pCsr->base.pVtab);
+ pTab->pMod->xClose(pCsr->pCsr);
+ pCsr->pCsr = 0;
+ }
+ sqlite3_free(pCsr->zInput);
+ pCsr->zInput = 0;
+ pCsr->zToken = 0;
+ pCsr->nToken = 0;
+ pCsr->iStart = 0;
+ pCsr->iEnd = 0;
+ pCsr->iPos = 0;
+ pCsr->iRowid = 0;
+}
+
+/*
+** xClose - Close a cursor.
+*/
+static int fts3tokCloseMethod(sqlite3_vtab_cursor *pCursor){
+ Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;
+
+ fts3tokResetCursor(pCsr);
+ sqlite3_free(pCsr);
+ return SQLITE_OK;
+}
+
+/*
+** xNext - Advance the cursor to the next row, if any.
+*/
+static int fts3tokNextMethod(sqlite3_vtab_cursor *pCursor){
+ Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;
+ Fts3tokTable *pTab = (Fts3tokTable *)(pCursor->pVtab);
+ int rc; /* Return code */
+
+ pCsr->iRowid++;
+ rc = pTab->pMod->xNext(pCsr->pCsr,
+ &pCsr->zToken, &pCsr->nToken,
+ &pCsr->iStart, &pCsr->iEnd, &pCsr->iPos
+ );
+
+ if( rc!=SQLITE_OK ){
+ fts3tokResetCursor(pCsr);
+ if( rc==SQLITE_DONE ) rc = SQLITE_OK;
+ }
+
+ return rc;
+}
+
+/*
+** xFilter - Initialize a cursor to point at the start of its data.
+*/
+static int fts3tokFilterMethod(
+ sqlite3_vtab_cursor *pCursor, /* The cursor used for this query */
+ int idxNum, /* Strategy index */
+ const char *idxStr, /* Unused */
+ int nVal, /* Number of elements in apVal */
+ sqlite3_value **apVal /* Arguments for the indexing scheme */
+){
+ int rc = SQLITE_ERROR;
+ Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;
+ Fts3tokTable *pTab = (Fts3tokTable *)(pCursor->pVtab);
+ UNUSED_PARAMETER(idxStr);
+ UNUSED_PARAMETER(nVal);
+
+ fts3tokResetCursor(pCsr);
+ if( idxNum==1 ){
+ const char *zByte = (const char *)sqlite3_value_text(apVal[0]);
+ int nByte = sqlite3_value_bytes(apVal[0]);
+ pCsr->zInput = sqlite3_malloc(nByte+1);
+ if( pCsr->zInput==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ memcpy(pCsr->zInput, zByte, nByte);
+ pCsr->zInput[nByte] = 0;
+ rc = pTab->pMod->xOpen(pTab->pTok, pCsr->zInput, nByte, &pCsr->pCsr);
+ if( rc==SQLITE_OK ){
+ pCsr->pCsr->pTokenizer = pTab->pTok;
+ }
+ }
+ }
+
+ if( rc!=SQLITE_OK ) return rc;
+ return fts3tokNextMethod(pCursor);
+}
+
+/*
+** xEof - Return true if the cursor is at EOF, or false otherwise.
+*/
+static int fts3tokEofMethod(sqlite3_vtab_cursor *pCursor){
+ Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;
+ return (pCsr->zToken==0);
+}
+
+/*
+** xColumn - Return a column value.
+*/
+static int fts3tokColumnMethod(
+ sqlite3_vtab_cursor *pCursor, /* Cursor to retrieve value from */
+ sqlite3_context *pCtx, /* Context for sqlite3_result_xxx() calls */
+ int iCol /* Index of column to read value from */
+){
+ Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;
+
+ /* CREATE TABLE x(input, token, start, end, position) */
+ switch( iCol ){
+ case 0:
+ sqlite3_result_text(pCtx, pCsr->zInput, -1, SQLITE_TRANSIENT);
+ break;
+ case 1:
+ sqlite3_result_text(pCtx, pCsr->zToken, pCsr->nToken, SQLITE_TRANSIENT);
+ break;
+ case 2:
+ sqlite3_result_int(pCtx, pCsr->iStart);
+ break;
+ case 3:
+ sqlite3_result_int(pCtx, pCsr->iEnd);
+ break;
+ default:
+ assert( iCol==4 );
+ sqlite3_result_int(pCtx, pCsr->iPos);
+ break;
+ }
+ return SQLITE_OK;
+}
+
+/*
+** xRowid - Return the current rowid for the cursor.
+*/
+static int fts3tokRowidMethod(
+ sqlite3_vtab_cursor *pCursor, /* Cursor to retrieve value from */
+ sqlite_int64 *pRowid /* OUT: Rowid value */
+){
+ Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;
+ *pRowid = (sqlite3_int64)pCsr->iRowid;
+ return SQLITE_OK;
+}
+
+/*
+** Register the fts3tok module with database connection db. Return SQLITE_OK
+** if successful or an error code if sqlite3_create_module() fails.
+*/
+SQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3 *db, Fts3Hash *pHash){
+ static const sqlite3_module fts3tok_module = {
+ 0, /* iVersion */
+ fts3tokConnectMethod, /* xCreate */
+ fts3tokConnectMethod, /* xConnect */
+ fts3tokBestIndexMethod, /* xBestIndex */
+ fts3tokDisconnectMethod, /* xDisconnect */
+ fts3tokDisconnectMethod, /* xDestroy */
+ fts3tokOpenMethod, /* xOpen */
+ fts3tokCloseMethod, /* xClose */
+ fts3tokFilterMethod, /* xFilter */
+ fts3tokNextMethod, /* xNext */
+ fts3tokEofMethod, /* xEof */
+ fts3tokColumnMethod, /* xColumn */
+ fts3tokRowidMethod, /* xRowid */
+ 0, /* xUpdate */
+ 0, /* xBegin */
+ 0, /* xSync */
+ 0, /* xCommit */
+ 0, /* xRollback */
+ 0, /* xFindFunction */
+ 0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0 /* xRollbackTo */
+ };
+ int rc; /* Return code */
+
+ rc = sqlite3_create_module(db, "fts3tokenize", &fts3tok_module, (void*)pHash);
+ return rc;
+}
+
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
+
+/************** End of fts3_tokenize_vtab.c **********************************/
/************** Begin file fts3_write.c **************************************/
/*
** 2009 Oct 23
diff --git a/src/3rdparty/sqlite/sqlite3.h b/src/3rdparty/sqlite/sqlite3.h
index 69b4586a3f..e398838287 100644
--- a/src/3rdparty/sqlite/sqlite3.h
+++ b/src/3rdparty/sqlite/sqlite3.h
@@ -107,9 +107,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.7.16.2"
-#define SQLITE_VERSION_NUMBER 3007016
-#define SQLITE_SOURCE_ID "2013-04-12 11:52:43 cbea02d93865ce0e06789db95fd9168ebac970c7"
+#define SQLITE_VERSION "3.7.17"
+#define SQLITE_VERSION_NUMBER 3007017
+#define SQLITE_SOURCE_ID "2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -425,6 +425,8 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_FORMAT 24 /* Auxiliary database format error */
#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */
#define SQLITE_NOTADB 26 /* File opened that is not a database file */
+#define SQLITE_NOTICE 27 /* Notifications from sqlite3_log() */
+#define SQLITE_WARNING 28 /* Warnings from sqlite3_log() */
#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */
#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */
/* end-of-error-codes */
@@ -475,6 +477,7 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8))
#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8))
#define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8))
+#define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8))
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8))
@@ -494,6 +497,8 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8))
#define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<8))
#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8))
+#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8))
+#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
/*
** CAPI3REF: Flags For File Open Operations
@@ -733,6 +738,9 @@ struct sqlite3_io_methods {
void (*xShmBarrier)(sqlite3_file*);
int (*xShmUnmap)(sqlite3_file*, int deleteFlag);
/* Methods above are valid for version 2 */
+ int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp);
+ int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p);
+ /* Methods above are valid for version 3 */
/* Additional methods may be added in future releases */
};
@@ -869,7 +877,8 @@ struct sqlite3_io_methods {
** it is able to override built-in [PRAGMA] statements.
**
** <li>[[SQLITE_FCNTL_BUSYHANDLER]]
-** ^This file-control may be invoked by SQLite on the database file handle
+** ^The [SQLITE_FCNTL_BUSYHANDLER]
+** file-control may be invoked by SQLite on the database file handle
** shortly after it is opened in order to provide a custom VFS with access
** to the connections busy-handler callback. The argument is of type (void **)
** - an array of two (void *) values. The first (void *) actually points
@@ -880,13 +889,24 @@ struct sqlite3_io_methods {
** current operation.
**
** <li>[[SQLITE_FCNTL_TEMPFILENAME]]
-** ^Application can invoke this file-control to have SQLite generate a
+** ^Application can invoke the [SQLITE_FCNTL_TEMPFILENAME] file-control
+** to have SQLite generate a
** temporary filename using the same algorithm that is followed to generate
** temporary filenames for TEMP tables and other internal uses. The
** argument should be a char** which will be filled with the filename
** written into memory obtained from [sqlite3_malloc()]. The caller should
** invoke [sqlite3_free()] on the result to avoid a memory leak.
**
+** <li>[[SQLITE_FCNTL_MMAP_SIZE]]
+** The [SQLITE_FCNTL_MMAP_SIZE] file control is used to query or set the
+** maximum number of bytes that will be used for memory-mapped I/O.
+** The argument is a pointer to a value of type sqlite3_int64 that
+** is an advisory maximum number of bytes in the file to memory map. The
+** pointer is overwritten with the old value. The limit is not changed if
+** the value originally pointed to is negative, and so the current limit
+** can be queried by passing in a pointer to a negative number. This
+** file-control is used internally to implement [PRAGMA mmap_size].
+**
** </ul>
*/
#define SQLITE_FCNTL_LOCKSTATE 1
@@ -905,6 +925,7 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_PRAGMA 14
#define SQLITE_FCNTL_BUSYHANDLER 15
#define SQLITE_FCNTL_TEMPFILENAME 16
+#define SQLITE_FCNTL_MMAP_SIZE 18
/*
** CAPI3REF: Mutex Handle
@@ -1571,7 +1592,9 @@ struct sqlite3_mem_methods {
** page cache implementation into that object.)^ </dd>
**
** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt>
-** <dd> ^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a
+** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite
+** global [error log].
+** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a
** function with a call signature of void(*)(void*,int,const char*),
** and a pointer to void. ^If the function pointer is not NULL, it is
** invoked by [sqlite3_log()] to process each logging event. ^If the
@@ -1617,12 +1640,12 @@ struct sqlite3_mem_methods {
** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE
** <dd> These options are obsolete and should not be used by new code.
** They are retained for backwards compatibility but are now no-ops.
-** </dl>
+** </dd>
**
** [[SQLITE_CONFIG_SQLLOG]]
** <dt>SQLITE_CONFIG_SQLLOG
** <dd>This option is only available if sqlite is compiled with the
-** SQLITE_ENABLE_SQLLOG pre-processor macro defined. The first argument should
+** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should
** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).
** The second should be of type (void*). The callback is invoked by the library
** in three separate circumstances, identified by the value passed as the
@@ -1632,7 +1655,23 @@ struct sqlite3_mem_methods {
** fourth parameter is 1, then the SQL statement that the third parameter
** points to has just been executed. Or, if the fourth parameter is 2, then
** the connection being passed as the second parameter is being closed. The
-** third parameter is passed NULL In this case.
+** third parameter is passed NULL In this case. An example of using this
+** configuration option can be seen in the "test_sqllog.c" source file in
+** the canonical SQLite source tree.</dd>
+**
+** [[SQLITE_CONFIG_MMAP_SIZE]]
+** <dt>SQLITE_CONFIG_MMAP_SIZE
+** <dd>SQLITE_CONFIG_MMAP_SIZE takes two 64-bit integer (sqlite3_int64) values
+** that are the default mmap size limit (the default setting for
+** [PRAGMA mmap_size]) and the maximum allowed mmap size limit.
+** The default setting can be overridden by each database connection using
+** either the [PRAGMA mmap_size] command, or by using the
+** [SQLITE_FCNTL_MMAP_SIZE] file control. The maximum allowed mmap size
+** cannot be changed at run-time. Nor may the maximum allowed mmap size
+** exceed the compile-time maximum mmap size set by the
+** [SQLITE_MAX_MMAP_SIZE] compile-time option.
+** If either argument to this option is negative, then that argument is
+** changed to its compile-time default.
** </dl>
*/
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
@@ -1656,6 +1695,7 @@ struct sqlite3_mem_methods {
#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */
#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */
+#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */
/*
** CAPI3REF: Database Connection Configuration Options
@@ -2489,6 +2529,9 @@ SQLITE_API int sqlite3_set_authorizer(
** as each triggered subprogram is entered. The callbacks for triggers
** contain a UTF-8 SQL comment that identifies the trigger.)^
**
+** The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit
+** the length of [bound parameter] expansion in the output of sqlite3_trace().
+**
** ^The callback function registered by sqlite3_profile() is invoked
** as each SQL statement finishes. ^The profile callback contains
** the original statement text and an estimate of wall-clock time
@@ -3027,7 +3070,8 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
** <li>
** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it
** always used to do, [sqlite3_step()] will automatically recompile the SQL
-** statement and try to run it again.
+** statement and try to run it again. As many as [SQLITE_MAX_SCHEMA_RETRY]
+** retries will occur before sqlite3_step() gives up and returns an error.
** </li>
**
** <li>
@@ -3231,6 +3275,9 @@ typedef struct sqlite3_context sqlite3_context;
** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).
**
** ^The third argument is the value to bind to the parameter.
+** ^If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16()
+** or sqlite3_bind_blob() is a NULL pointer then the fourth parameter
+** is ignored and the end result is the same as sqlite3_bind_null().
**
** ^(In those routines that have a fourth argument, its value is the
** number of bytes in the parameter. To be clear: the value is the
@@ -4187,7 +4234,7 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi
** the content before returning.
**
** The typedef is necessary to work around problems in certain
-** C++ compilers. See ticket #2191.
+** C++ compilers.
*/
typedef void (*sqlite3_destructor_type)(void*);
#define SQLITE_STATIC ((sqlite3_destructor_type)0)
@@ -4986,11 +5033,20 @@ SQLITE_API int sqlite3_table_column_metadata(
** ^This interface loads an SQLite extension library from the named file.
**
** ^The sqlite3_load_extension() interface attempts to load an
-** SQLite extension library contained in the file zFile.
+** [SQLite extension] library contained in the file zFile. If
+** the file cannot be loaded directly, attempts are made to load
+** with various operating-system specific extensions added.
+** So for example, if "samplelib" cannot be loaded, then names like
+** "samplelib.so" or "samplelib.dylib" or "samplelib.dll" might
+** be tried also.
**
** ^The entry point is zProc.
-** ^zProc may be 0, in which case the name of the entry point
-** defaults to "sqlite3_extension_init".
+** ^(zProc may be 0, in which case SQLite will try to come up with an
+** entry point name on its own. It first tries "sqlite3_extension_init".
+** If that does not work, it constructs a name "sqlite3_X_init" where the
+** X is consists of the lower-case equivalent of all ASCII alphabetic
+** characters in the filename from the last "/" to the first following
+** "." and omitting any initial "lib".)^
** ^The sqlite3_load_extension() interface returns
** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
** ^If an error occurs and pzErrMsg is not 0, then the
@@ -5016,11 +5072,11 @@ SQLITE_API int sqlite3_load_extension(
** CAPI3REF: Enable Or Disable Extension Loading
**
** ^So as not to open security holes in older applications that are
-** unprepared to deal with extension loading, and as a means of disabling
-** extension loading while evaluating user-entered SQL, the following API
+** unprepared to deal with [extension loading], and as a means of disabling
+** [extension loading] while evaluating user-entered SQL, the following API
** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
**
-** ^Extension loading is off by default. See ticket #1863.
+** ^Extension loading is off by default.
** ^Call the sqlite3_enable_load_extension() routine with onoff==1
** to turn extension loading on and call it with onoff==0 to turn
** it back off again.
@@ -5032,7 +5088,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
**
** ^This interface causes the xEntryPoint() function to be invoked for
** each new [database connection] that is created. The idea here is that
-** xEntryPoint() is the entry point for a statically linked SQLite extension
+** xEntryPoint() is the entry point for a statically linked [SQLite extension]
** that is to be automatically loaded into all new database connections.
**
** ^(Even though the function prototype shows that xEntryPoint() takes
@@ -6813,9 +6869,24 @@ SQLITE_API int sqlite3_stricmp(const char *, const char *);
SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
/*
+** CAPI3REF: String Globbing
+*
+** ^The [sqlite3_strglob(P,X)] interface returns zero if string X matches
+** the glob pattern P, and it returns non-zero if string X does not match
+** the glob pattern P. ^The definition of glob pattern matching used in
+** [sqlite3_strglob(P,X)] is the same as for the "X GLOB P" operator in the
+** SQL dialect used by SQLite. ^The sqlite3_strglob(P,X) function is case
+** sensitive.
+**
+** Note that this routine returns zero on a match and non-zero if the strings
+** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
+*/
+SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
+
+/*
** CAPI3REF: Error Logging Interface
**
-** ^The [sqlite3_log()] interface writes a message into the error log
+** ^The [sqlite3_log()] interface writes a message into the [error log]
** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].
** ^If logging is enabled, the zFormat string and subsequent arguments are
** used with [sqlite3_snprintf()] to generate the final output string.
diff --git a/src/3rdparty/xcb/README b/src/3rdparty/xcb/README
index 0a66dafd03..4d275ef5a8 100644
--- a/src/3rdparty/xcb/README
+++ b/src/3rdparty/xcb/README
@@ -1,6 +1,7 @@
Contains the header and sources files from selected xcb libraries:
libxcb-1.5 together with xcb-proto-1.6 (sync, xfixes, randr sources)
+ libxcb-1.8.1 together with xcb-proto-1.8 (xkb sources)
libxcb-util-image-0.3.9
libxcb-util-keysyms-0.3.9
libxcb-util-renderutil-0.3.8
diff --git a/src/3rdparty/xcb/include/xcb/xkb.h b/src/3rdparty/xcb/include/xcb/xkb.h
new file mode 100644
index 0000000000..44b0a8d1ae
--- /dev/null
+++ b/src/3rdparty/xcb/include/xcb/xkb.h
@@ -0,0 +1,14871 @@
+/*
+ * This file generated automatically from xkb.xml by c_client.py.
+ * Edit at your peril.
+ */
+
+/**
+ * @defgroup XCB_xkb_API XCB xkb API
+ * @brief xkb XCB Protocol Implementation.
+ * @{
+ **/
+
+#ifndef __XKB_H
+#define __XKB_H
+
+#include "xcb.h"
+#include "xproto.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define XCB_XKB_MAJOR_VERSION 1
+#define XCB_XKB_MINOR_VERSION 0
+
+extern xcb_extension_t xcb_xkb_id;
+
+typedef enum xcb_xkb_const_t {
+ XCB_XKB_CONST_MAX_LEGAL_KEY_CODE = 255,
+ XCB_XKB_CONST_PER_KEY_BIT_ARRAY_SIZE = 32,
+ XCB_XKB_CONST_KEY_NAME_LENGTH = 4
+} xcb_xkb_const_t;
+
+typedef enum xcb_xkb_event_type_t {
+ XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY = 1,
+ XCB_XKB_EVENT_TYPE_MAP_NOTIFY = 2,
+ XCB_XKB_EVENT_TYPE_STATE_NOTIFY = 4,
+ XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY = 8,
+ XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY = 16,
+ XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY = 32,
+ XCB_XKB_EVENT_TYPE_NAMES_NOTIFY = 64,
+ XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY = 128,
+ XCB_XKB_EVENT_TYPE_BELL_NOTIFY = 256,
+ XCB_XKB_EVENT_TYPE_ACTION_MESSAGE = 512,
+ XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY = 1024,
+ XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY = 2048
+} xcb_xkb_event_type_t;
+
+typedef enum xcb_xkb_nkn_detail_t {
+ XCB_XKB_NKN_DETAIL_KEYCODES = 1,
+ XCB_XKB_NKN_DETAIL_GEOMETRY = 2,
+ XCB_XKB_NKN_DETAIL_DEVICE_ID = 4
+} xcb_xkb_nkn_detail_t;
+
+typedef enum xcb_xkb_axn_detail_t {
+ XCB_XKB_AXN_DETAIL_SK_PRESS = 1,
+ XCB_XKB_AXN_DETAIL_SK_ACCEPT = 2,
+ XCB_XKB_AXN_DETAIL_SK_REJECT = 4,
+ XCB_XKB_AXN_DETAIL_SK_RELEASE = 8,
+ XCB_XKB_AXN_DETAIL_BK_ACCEPT = 16,
+ XCB_XKB_AXN_DETAIL_BK_REJECT = 32,
+ XCB_XKB_AXN_DETAIL_AXK_WARNING = 64
+} xcb_xkb_axn_detail_t;
+
+typedef enum xcb_xkb_map_part_t {
+ XCB_XKB_MAP_PART_KEY_TYPES = 1,
+ XCB_XKB_MAP_PART_KEY_SYMS = 2,
+ XCB_XKB_MAP_PART_MODIFIER_MAP = 4,
+ XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS = 8,
+ XCB_XKB_MAP_PART_KEY_ACTIONS = 16,
+ XCB_XKB_MAP_PART_KEY_BEHAVIORS = 32,
+ XCB_XKB_MAP_PART_VIRTUAL_MODS = 64,
+ XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP = 128
+} xcb_xkb_map_part_t;
+
+typedef enum xcb_xkb_set_map_flags_t {
+ XCB_XKB_SET_MAP_FLAGS_RESIZE_TYPES = 1,
+ XCB_XKB_SET_MAP_FLAGS_RECOMPUTE_ACTIONS = 2
+} xcb_xkb_set_map_flags_t;
+
+typedef enum xcb_xkb_state_part_t {
+ XCB_XKB_STATE_PART_MODIFIER_STATE = 1,
+ XCB_XKB_STATE_PART_MODIFIER_BASE = 2,
+ XCB_XKB_STATE_PART_MODIFIER_LATCH = 4,
+ XCB_XKB_STATE_PART_MODIFIER_LOCK = 8,
+ XCB_XKB_STATE_PART_GROUP_STATE = 16,
+ XCB_XKB_STATE_PART_GROUP_BASE = 32,
+ XCB_XKB_STATE_PART_GROUP_LATCH = 64,
+ XCB_XKB_STATE_PART_GROUP_LOCK = 128,
+ XCB_XKB_STATE_PART_COMPAT_STATE = 256,
+ XCB_XKB_STATE_PART_GRAB_MODS = 512,
+ XCB_XKB_STATE_PART_COMPAT_GRAB_MODS = 1024,
+ XCB_XKB_STATE_PART_LOOKUP_MODS = 2048,
+ XCB_XKB_STATE_PART_COMPAT_LOOKUP_MODS = 4096,
+ XCB_XKB_STATE_PART_POINTER_BUTTONS = 8192
+} xcb_xkb_state_part_t;
+
+typedef enum xcb_xkb_bool_ctrl_t {
+ XCB_XKB_BOOL_CTRL_REPEAT_KEYS = 1,
+ XCB_XKB_BOOL_CTRL_SLOW_KEYS = 2,
+ XCB_XKB_BOOL_CTRL_BOUNCE_KEYS = 4,
+ XCB_XKB_BOOL_CTRL_STICKY_KEYS = 8,
+ XCB_XKB_BOOL_CTRL_MOUSE_KEYS = 16,
+ XCB_XKB_BOOL_CTRL_MOUSE_KEYS_ACCEL = 32,
+ XCB_XKB_BOOL_CTRL_ACCESS_X_KEYS = 64,
+ XCB_XKB_BOOL_CTRL_ACCESS_X_TIMEOUT_MASK = 128,
+ XCB_XKB_BOOL_CTRL_ACCESS_X_FEEDBACK_MASK = 256,
+ XCB_XKB_BOOL_CTRL_AUDIBLE_BELL_MASK = 512,
+ XCB_XKB_BOOL_CTRL_OVERLAY_1_MASK = 1024,
+ XCB_XKB_BOOL_CTRL_OVERLAY_2_MASK = 2048,
+ XCB_XKB_BOOL_CTRL_IGNORE_GROUP_LOCK_MASK = 4096
+} xcb_xkb_bool_ctrl_t;
+
+typedef enum xcb_xkb_control_t {
+ XCB_XKB_CONTROL_GROUPS_WRAP = 134217728,
+ XCB_XKB_CONTROL_INTERNAL_MODS = 268435456,
+ XCB_XKB_CONTROL_IGNORE_LOCK_MODS = 536870912,
+ XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824,
+ XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648
+} xcb_xkb_control_t;
+
+typedef enum xcb_xkb_axfb_opt_t {
+ XCB_XKB_AXFB_OPT_SK_PRESS_FB = 1,
+ XCB_XKB_AXFB_OPT_SK_ACCEPT_FB = 2,
+ XCB_XKB_AXFB_OPT_FEATURE_FB = 4,
+ XCB_XKB_AXFB_OPT_SLOW_WARN_FB = 8,
+ XCB_XKB_AXFB_OPT_INDICATOR_FB = 16,
+ XCB_XKB_AXFB_OPT_STICKY_KEYS_FB = 32,
+ XCB_XKB_AXFB_OPT_SK_RELEASE_FB = 64,
+ XCB_XKB_AXFB_OPT_SK_REJECT_FB = 128,
+ XCB_XKB_AXFB_OPT_BK_REJECT_FB = 256,
+ XCB_XKB_AXFB_OPT_DUMB_BELL = 512
+} xcb_xkb_axfb_opt_t;
+
+typedef enum xcb_xkb_axsk_opt_t {
+ XCB_XKB_AXSK_OPT_TWO_KEYS = 64,
+ XCB_XKB_AXSK_OPT_LATCH_TO_LOCK = 128
+} xcb_xkb_axsk_opt_t;
+
+/**
+ * @brief xcb_xkb_ax_option_t
+ **/
+typedef union xcb_xkb_ax_option_t {
+ uint16_t fbopt; /**< */
+ uint16_t skopt; /**< */
+} xcb_xkb_ax_option_t;
+
+/**
+ * @brief xcb_xkb_ax_option_iterator_t
+ **/
+typedef struct xcb_xkb_ax_option_iterator_t {
+ xcb_xkb_ax_option_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_ax_option_iterator_t;
+
+typedef uint16_t xcb_xkb_device_spec_t;
+
+/**
+ * @brief xcb_xkb_device_spec_iterator_t
+ **/
+typedef struct xcb_xkb_device_spec_iterator_t {
+ xcb_xkb_device_spec_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_device_spec_iterator_t;
+
+typedef enum xcb_xkb_led_class_result_t {
+ XCB_XKB_LED_CLASS_RESULT_KBD_FEEDBACK_CLASS = 0,
+ XCB_XKB_LED_CLASS_RESULT_LED_FEEDBACK_CLASS = 4
+} xcb_xkb_led_class_result_t;
+
+typedef enum xcb_xkb_led_class_t {
+ XCB_XKB_LED_CLASS_DFLT_XI_CLASS = 768,
+ XCB_XKB_LED_CLASS_ALL_XI_CLASSES = 1280
+} xcb_xkb_led_class_t;
+
+typedef uint16_t xcb_xkb_led_class_spec_t;
+
+/**
+ * @brief xcb_xkb_led_class_spec_iterator_t
+ **/
+typedef struct xcb_xkb_led_class_spec_iterator_t {
+ xcb_xkb_led_class_spec_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_led_class_spec_iterator_t;
+
+typedef enum xcb_xkb_bell_class_result_t {
+ XCB_XKB_BELL_CLASS_RESULT_KBD_FEEDBACK_CLASS = 0,
+ XCB_XKB_BELL_CLASS_RESULT_BELL_FEEDBACK_CLASS = 5
+} xcb_xkb_bell_class_result_t;
+
+typedef enum xcb_xkb_bell_class_t {
+ XCB_XKB_BELL_CLASS_DFLT_XI_CLASS = 768
+} xcb_xkb_bell_class_t;
+
+typedef uint16_t xcb_xkb_bell_class_spec_t;
+
+/**
+ * @brief xcb_xkb_bell_class_spec_iterator_t
+ **/
+typedef struct xcb_xkb_bell_class_spec_iterator_t {
+ xcb_xkb_bell_class_spec_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_bell_class_spec_iterator_t;
+
+typedef enum xcb_xkb_id_t {
+ XCB_XKB_ID_USE_CORE_KBD = 256,
+ XCB_XKB_ID_USE_CORE_PTR = 512,
+ XCB_XKB_ID_DFLT_XI_CLASS = 768,
+ XCB_XKB_ID_DFLT_XI_ID = 1024,
+ XCB_XKB_ID_ALL_XI_CLASS = 1280,
+ XCB_XKB_ID_ALL_XI_ID = 1536,
+ XCB_XKB_ID_XI_NONE = 65280
+} xcb_xkb_id_t;
+
+typedef uint16_t xcb_xkb_id_spec_t;
+
+/**
+ * @brief xcb_xkb_id_spec_iterator_t
+ **/
+typedef struct xcb_xkb_id_spec_iterator_t {
+ xcb_xkb_id_spec_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_id_spec_iterator_t;
+
+typedef enum xcb_xkb_group_t {
+ XCB_XKB_GROUP_1 = 0,
+ XCB_XKB_GROUP_2 = 1,
+ XCB_XKB_GROUP_3 = 2,
+ XCB_XKB_GROUP_4 = 3
+} xcb_xkb_group_t;
+
+typedef enum xcb_xkb_groups_t {
+ XCB_XKB_GROUPS_ANY = 254,
+ XCB_XKB_GROUPS_ALL = 255
+} xcb_xkb_groups_t;
+
+typedef enum xcb_xkb_set_of_group_t {
+ XCB_XKB_SET_OF_GROUP_GROUP_1 = 1,
+ XCB_XKB_SET_OF_GROUP_GROUP_2 = 2,
+ XCB_XKB_SET_OF_GROUP_GROUP_3 = 4,
+ XCB_XKB_SET_OF_GROUP_GROUP_4 = 8
+} xcb_xkb_set_of_group_t;
+
+typedef enum xcb_xkb_set_of_groups_t {
+ XCB_XKB_SET_OF_GROUPS_ANY = 128
+} xcb_xkb_set_of_groups_t;
+
+typedef enum xcb_xkb_groups_wrap_t {
+ XCB_XKB_GROUPS_WRAP_WRAP_INTO_RANGE = 0,
+ XCB_XKB_GROUPS_WRAP_CLAMP_INTO_RANGE = 64,
+ XCB_XKB_GROUPS_WRAP_REDIRECT_INTO_RANGE = 128
+} xcb_xkb_groups_wrap_t;
+
+typedef enum xcb_xkb_v_mods_high_t {
+ XCB_XKB_V_MODS_HIGH_15 = 128,
+ XCB_XKB_V_MODS_HIGH_14 = 64,
+ XCB_XKB_V_MODS_HIGH_13 = 32,
+ XCB_XKB_V_MODS_HIGH_12 = 16,
+ XCB_XKB_V_MODS_HIGH_11 = 8,
+ XCB_XKB_V_MODS_HIGH_10 = 4,
+ XCB_XKB_V_MODS_HIGH_9 = 2,
+ XCB_XKB_V_MODS_HIGH_8 = 1
+} xcb_xkb_v_mods_high_t;
+
+typedef enum xcb_xkb_v_mods_low_t {
+ XCB_XKB_V_MODS_LOW_7 = 128,
+ XCB_XKB_V_MODS_LOW_6 = 64,
+ XCB_XKB_V_MODS_LOW_5 = 32,
+ XCB_XKB_V_MODS_LOW_4 = 16,
+ XCB_XKB_V_MODS_LOW_3 = 8,
+ XCB_XKB_V_MODS_LOW_2 = 4,
+ XCB_XKB_V_MODS_LOW_1 = 2,
+ XCB_XKB_V_MODS_LOW_0 = 1
+} xcb_xkb_v_mods_low_t;
+
+typedef enum xcb_xkb_v_mod_t {
+ XCB_XKB_V_MOD_15 = 32768,
+ XCB_XKB_V_MOD_14 = 16384,
+ XCB_XKB_V_MOD_13 = 8192,
+ XCB_XKB_V_MOD_12 = 4096,
+ XCB_XKB_V_MOD_11 = 2048,
+ XCB_XKB_V_MOD_10 = 1024,
+ XCB_XKB_V_MOD_9 = 512,
+ XCB_XKB_V_MOD_8 = 256,
+ XCB_XKB_V_MOD_7 = 128,
+ XCB_XKB_V_MOD_6 = 64,
+ XCB_XKB_V_MOD_5 = 32,
+ XCB_XKB_V_MOD_4 = 16,
+ XCB_XKB_V_MOD_3 = 8,
+ XCB_XKB_V_MOD_2 = 4,
+ XCB_XKB_V_MOD_1 = 2,
+ XCB_XKB_V_MOD_0 = 1
+} xcb_xkb_v_mod_t;
+
+typedef enum xcb_xkb_explicit_t {
+ XCB_XKB_EXPLICIT_V_MOD_MAP = 128,
+ XCB_XKB_EXPLICIT_BEHAVIOR = 64,
+ XCB_XKB_EXPLICIT_AUTO_REPEAT = 32,
+ XCB_XKB_EXPLICIT_INTERPRET = 16,
+ XCB_XKB_EXPLICIT_KEY_TYPE_4 = 8,
+ XCB_XKB_EXPLICIT_KEY_TYPE_3 = 4,
+ XCB_XKB_EXPLICIT_KEY_TYPE_2 = 2,
+ XCB_XKB_EXPLICIT_KEY_TYPE_1 = 1
+} xcb_xkb_explicit_t;
+
+typedef enum xcb_xkb_sym_interpret_t {
+ XCB_XKB_SYM_INTERPRET_NONE_OF = 0,
+ XCB_XKB_SYM_INTERPRET_ANY_OF_OR_NONE = 1,
+ XCB_XKB_SYM_INTERPRET_ANY_OF = 2,
+ XCB_XKB_SYM_INTERPRET_ALL_OF = 3,
+ XCB_XKB_SYM_INTERPRET_EXACTLY = 4
+} xcb_xkb_sym_interpret_t;
+
+typedef enum xcb_xkb_sym_interp_match_t {
+ XCB_XKB_SYM_INTERP_MATCH_LEVEL_ONE_ONLY = 128,
+ XCB_XKB_SYM_INTERP_MATCH_OP_MASK = 127
+} xcb_xkb_sym_interp_match_t;
+
+typedef enum xcb_xkb_im_flag_t {
+ XCB_XKB_IM_FLAG_NO_EXPLICIT = 128,
+ XCB_XKB_IM_FLAG_NO_AUTOMATIC = 64,
+ XCB_XKB_IM_FLAG_LED_DRIVES_KB = 32
+} xcb_xkb_im_flag_t;
+
+typedef enum xcb_xkb_im_mods_which_t {
+ XCB_XKB_IM_MODS_WHICH_USE_COMPAT = 16,
+ XCB_XKB_IM_MODS_WHICH_USE_EFFECTIVE = 8,
+ XCB_XKB_IM_MODS_WHICH_USE_LOCKED = 4,
+ XCB_XKB_IM_MODS_WHICH_USE_LATCHED = 2,
+ XCB_XKB_IM_MODS_WHICH_USE_BASE = 1
+} xcb_xkb_im_mods_which_t;
+
+typedef enum xcb_xkb_im_groups_which_t {
+ XCB_XKB_IM_GROUPS_WHICH_USE_COMPAT = 16,
+ XCB_XKB_IM_GROUPS_WHICH_USE_EFFECTIVE = 8,
+ XCB_XKB_IM_GROUPS_WHICH_USE_LOCKED = 4,
+ XCB_XKB_IM_GROUPS_WHICH_USE_LATCHED = 2,
+ XCB_XKB_IM_GROUPS_WHICH_USE_BASE = 1
+} xcb_xkb_im_groups_which_t;
+
+/**
+ * @brief xcb_xkb_indicator_map_t
+ **/
+typedef struct xcb_xkb_indicator_map_t {
+ uint8_t flags; /**< */
+ uint8_t whichGroups; /**< */
+ uint8_t groups; /**< */
+ uint8_t whichMods; /**< */
+ uint8_t mods; /**< */
+ uint8_t realMods; /**< */
+ uint16_t vmods; /**< */
+ uint32_t ctrls; /**< */
+} xcb_xkb_indicator_map_t;
+
+/**
+ * @brief xcb_xkb_indicator_map_iterator_t
+ **/
+typedef struct xcb_xkb_indicator_map_iterator_t {
+ xcb_xkb_indicator_map_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_indicator_map_iterator_t;
+
+typedef enum xcb_xkb_cm_detail_t {
+ XCB_XKB_CM_DETAIL_SYM_INTERP = 1,
+ XCB_XKB_CM_DETAIL_GROUP_COMPAT = 2
+} xcb_xkb_cm_detail_t;
+
+typedef enum xcb_xkb_name_detail_t {
+ XCB_XKB_NAME_DETAIL_KEYCODES = 1,
+ XCB_XKB_NAME_DETAIL_GEOMETRY = 2,
+ XCB_XKB_NAME_DETAIL_SYMBOLS = 4,
+ XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS = 8,
+ XCB_XKB_NAME_DETAIL_TYPES = 16,
+ XCB_XKB_NAME_DETAIL_COMPAT = 32,
+ XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES = 64,
+ XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES = 128,
+ XCB_XKB_NAME_DETAIL_INDICATOR_NAMES = 256,
+ XCB_XKB_NAME_DETAIL_KEY_NAMES = 512,
+ XCB_XKB_NAME_DETAIL_KEY_ALIASES = 1024,
+ XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES = 2048,
+ XCB_XKB_NAME_DETAIL_GROUP_NAMES = 4096,
+ XCB_XKB_NAME_DETAIL_RG_NAMES = 8192
+} xcb_xkb_name_detail_t;
+
+typedef enum xcb_xkb_gbn_detail_t {
+ XCB_XKB_GBN_DETAIL_TYPES = 1,
+ XCB_XKB_GBN_DETAIL_COMPAT_MAP = 2,
+ XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS = 4,
+ XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS = 8,
+ XCB_XKB_GBN_DETAIL_INDICATOR_MAPS = 16,
+ XCB_XKB_GBN_DETAIL_KEY_NAMES = 32,
+ XCB_XKB_GBN_DETAIL_GEOMETRY = 64,
+ XCB_XKB_GBN_DETAIL_OTHER_NAMES = 128
+} xcb_xkb_gbn_detail_t;
+
+typedef enum xcb_xkb_xi_feature_t {
+ XCB_XKB_XI_FEATURE_KEYBOARDS = 1,
+ XCB_XKB_XI_FEATURE_BUTTON_ACTIONS = 2,
+ XCB_XKB_XI_FEATURE_INDICATOR_NAMES = 4,
+ XCB_XKB_XI_FEATURE_INDICATOR_MAPS = 8,
+ XCB_XKB_XI_FEATURE_INDICATOR_STATE = 16
+} xcb_xkb_xi_feature_t;
+
+typedef enum xcb_xkb_per_client_flag_t {
+ XCB_XKB_PER_CLIENT_FLAG_DETECTABLE_AUTO_REPEAT = 1,
+ XCB_XKB_PER_CLIENT_FLAG_GRABS_USE_XKB_STATE = 2,
+ XCB_XKB_PER_CLIENT_FLAG_AUTO_RESET_CONTROLS = 4,
+ XCB_XKB_PER_CLIENT_FLAG_LOOKUP_STATE_WHEN_GRABBED = 8,
+ XCB_XKB_PER_CLIENT_FLAG_SEND_EVENT_USES_XKB_STATE = 16
+} xcb_xkb_per_client_flag_t;
+
+/**
+ * @brief xcb_xkb_mod_def_t
+ **/
+typedef struct xcb_xkb_mod_def_t {
+ uint8_t mask; /**< */
+ uint8_t realMods; /**< */
+ uint16_t vmods; /**< */
+} xcb_xkb_mod_def_t;
+
+/**
+ * @brief xcb_xkb_mod_def_iterator_t
+ **/
+typedef struct xcb_xkb_mod_def_iterator_t {
+ xcb_xkb_mod_def_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_mod_def_iterator_t;
+
+/**
+ * @brief xcb_xkb_key_name_t
+ **/
+typedef struct xcb_xkb_key_name_t {
+ uint8_t name[4]; /**< */
+} xcb_xkb_key_name_t;
+
+/**
+ * @brief xcb_xkb_key_name_iterator_t
+ **/
+typedef struct xcb_xkb_key_name_iterator_t {
+ xcb_xkb_key_name_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_key_name_iterator_t;
+
+/**
+ * @brief xcb_xkb_key_alias_t
+ **/
+typedef struct xcb_xkb_key_alias_t {
+ uint8_t real[4]; /**< */
+ uint8_t alias[4]; /**< */
+} xcb_xkb_key_alias_t;
+
+/**
+ * @brief xcb_xkb_key_alias_iterator_t
+ **/
+typedef struct xcb_xkb_key_alias_iterator_t {
+ xcb_xkb_key_alias_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_key_alias_iterator_t;
+
+/**
+ * @brief xcb_xkb_counted_string_8_t
+ **/
+typedef struct xcb_xkb_counted_string_8_t {
+ uint8_t length; /**< */
+} xcb_xkb_counted_string_8_t;
+
+/**
+ * @brief xcb_xkb_counted_string_8_iterator_t
+ **/
+typedef struct xcb_xkb_counted_string_8_iterator_t {
+ xcb_xkb_counted_string_8_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_counted_string_8_iterator_t;
+
+/**
+ * @brief xcb_xkb_counted_string_16_t
+ **/
+typedef struct xcb_xkb_counted_string_16_t {
+ uint16_t length; /**< */
+ uint8_t pad0; /**< */
+} xcb_xkb_counted_string_16_t;
+
+/**
+ * @brief xcb_xkb_counted_string_16_iterator_t
+ **/
+typedef struct xcb_xkb_counted_string_16_iterator_t {
+ xcb_xkb_counted_string_16_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_counted_string_16_iterator_t;
+
+/**
+ * @brief xcb_xkb_kt_map_entry_t
+ **/
+typedef struct xcb_xkb_kt_map_entry_t {
+ uint8_t active; /**< */
+ uint8_t level; /**< */
+ uint8_t mods_mask; /**< */
+ uint8_t mods_mods; /**< */
+ uint16_t mods_vmods; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_kt_map_entry_t;
+
+/**
+ * @brief xcb_xkb_kt_map_entry_iterator_t
+ **/
+typedef struct xcb_xkb_kt_map_entry_iterator_t {
+ xcb_xkb_kt_map_entry_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_kt_map_entry_iterator_t;
+
+/**
+ * @brief xcb_xkb_key_type_t
+ **/
+typedef struct xcb_xkb_key_type_t {
+ uint8_t mods_mask; /**< */
+ uint8_t mods_mods; /**< */
+ uint16_t mods_vmods; /**< */
+ uint8_t numLevels; /**< */
+ uint8_t nMapEntries; /**< */
+ uint8_t hasPreserve; /**< */
+ uint8_t pad0; /**< */
+} xcb_xkb_key_type_t;
+
+/**
+ * @brief xcb_xkb_key_type_iterator_t
+ **/
+typedef struct xcb_xkb_key_type_iterator_t {
+ xcb_xkb_key_type_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_key_type_iterator_t;
+
+/**
+ * @brief xcb_xkb_key_sym_map_t
+ **/
+typedef struct xcb_xkb_key_sym_map_t {
+ uint8_t kt_index[4]; /**< */
+ uint8_t groupInfo; /**< */
+ uint8_t width; /**< */
+ uint16_t nSyms; /**< */
+} xcb_xkb_key_sym_map_t;
+
+/**
+ * @brief xcb_xkb_key_sym_map_iterator_t
+ **/
+typedef struct xcb_xkb_key_sym_map_iterator_t {
+ xcb_xkb_key_sym_map_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_key_sym_map_iterator_t;
+
+/**
+ * @brief xcb_xkb_common_behavior_t
+ **/
+typedef struct xcb_xkb_common_behavior_t {
+ uint8_t type; /**< */
+ uint8_t data; /**< */
+} xcb_xkb_common_behavior_t;
+
+/**
+ * @brief xcb_xkb_common_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_common_behavior_iterator_t {
+ xcb_xkb_common_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_common_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_default_behavior_t
+ **/
+typedef struct xcb_xkb_default_behavior_t {
+ uint8_t type; /**< */
+ uint8_t pad0; /**< */
+} xcb_xkb_default_behavior_t;
+
+/**
+ * @brief xcb_xkb_default_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_default_behavior_iterator_t {
+ xcb_xkb_default_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_default_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_lock_behavior_t
+ **/
+typedef struct xcb_xkb_lock_behavior_t {
+ uint8_t type; /**< */
+ uint8_t pad0; /**< */
+} xcb_xkb_lock_behavior_t;
+
+/**
+ * @brief xcb_xkb_lock_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_lock_behavior_iterator_t {
+ xcb_xkb_lock_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_lock_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_radio_group_behavior_t
+ **/
+typedef struct xcb_xkb_radio_group_behavior_t {
+ uint8_t type; /**< */
+ uint8_t group; /**< */
+} xcb_xkb_radio_group_behavior_t;
+
+/**
+ * @brief xcb_xkb_radio_group_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_radio_group_behavior_iterator_t {
+ xcb_xkb_radio_group_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_radio_group_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_overlay_1_behavior_t
+ **/
+typedef struct xcb_xkb_overlay_1_behavior_t {
+ uint8_t type; /**< */
+ xcb_keycode_t key; /**< */
+} xcb_xkb_overlay_1_behavior_t;
+
+/**
+ * @brief xcb_xkb_overlay_1_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_overlay_1_behavior_iterator_t {
+ xcb_xkb_overlay_1_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_overlay_1_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_overlay_2_behavior_t
+ **/
+typedef struct xcb_xkb_overlay_2_behavior_t {
+ uint8_t type; /**< */
+ uint8_t key; /**< */
+} xcb_xkb_overlay_2_behavior_t;
+
+/**
+ * @brief xcb_xkb_overlay_2_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_overlay_2_behavior_iterator_t {
+ xcb_xkb_overlay_2_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_overlay_2_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_permament_lock_behavior_t
+ **/
+typedef struct xcb_xkb_permament_lock_behavior_t {
+ uint8_t type; /**< */
+ uint8_t pad0; /**< */
+} xcb_xkb_permament_lock_behavior_t;
+
+/**
+ * @brief xcb_xkb_permament_lock_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_permament_lock_behavior_iterator_t {
+ xcb_xkb_permament_lock_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_permament_lock_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_permament_radio_group_behavior_t
+ **/
+typedef struct xcb_xkb_permament_radio_group_behavior_t {
+ uint8_t type; /**< */
+ uint8_t group; /**< */
+} xcb_xkb_permament_radio_group_behavior_t;
+
+/**
+ * @brief xcb_xkb_permament_radio_group_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_permament_radio_group_behavior_iterator_t {
+ xcb_xkb_permament_radio_group_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_permament_radio_group_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_permament_overlay_1_behavior_t
+ **/
+typedef struct xcb_xkb_permament_overlay_1_behavior_t {
+ uint8_t type; /**< */
+ xcb_keycode_t key; /**< */
+} xcb_xkb_permament_overlay_1_behavior_t;
+
+/**
+ * @brief xcb_xkb_permament_overlay_1_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_permament_overlay_1_behavior_iterator_t {
+ xcb_xkb_permament_overlay_1_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_permament_overlay_1_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_permament_overlay_2_behavior_t
+ **/
+typedef struct xcb_xkb_permament_overlay_2_behavior_t {
+ uint8_t type; /**< */
+ uint8_t key; /**< */
+} xcb_xkb_permament_overlay_2_behavior_t;
+
+/**
+ * @brief xcb_xkb_permament_overlay_2_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_permament_overlay_2_behavior_iterator_t {
+ xcb_xkb_permament_overlay_2_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_permament_overlay_2_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_behavior_t
+ **/
+typedef union xcb_xkb_behavior_t {
+ xcb_xkb_common_behavior_t common; /**< */
+ xcb_xkb_default_behavior_t _default; /**< */
+ xcb_xkb_lock_behavior_t lock; /**< */
+ xcb_xkb_radio_group_behavior_t radioGroup; /**< */
+ xcb_xkb_overlay_1_behavior_t overlay1; /**< */
+ xcb_xkb_overlay_2_behavior_t overlay2; /**< */
+ xcb_xkb_permament_lock_behavior_t permamentLock; /**< */
+ xcb_xkb_permament_radio_group_behavior_t permamentRadioGroup; /**< */
+ xcb_xkb_permament_overlay_1_behavior_t permamentOverlay1; /**< */
+ xcb_xkb_permament_overlay_2_behavior_t permamentOverlay2; /**< */
+ uint8_t type; /**< */
+} xcb_xkb_behavior_t;
+
+/**
+ * @brief xcb_xkb_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_behavior_iterator_t {
+ xcb_xkb_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_behavior_iterator_t;
+
+typedef enum xcb_xkb_behavior_type_t {
+ XCB_XKB_BEHAVIOR_TYPE_DEFAULT = 0,
+ XCB_XKB_BEHAVIOR_TYPE_LOCK = 1,
+ XCB_XKB_BEHAVIOR_TYPE_RADIO_GROUP = 2,
+ XCB_XKB_BEHAVIOR_TYPE_OVERLAY_1 = 3,
+ XCB_XKB_BEHAVIOR_TYPE_OVERLAY_2 = 4,
+ XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_LOCK = 129,
+ XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_RADIO_GROUP = 130,
+ XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_1 = 131,
+ XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_2 = 132
+} xcb_xkb_behavior_type_t;
+
+/**
+ * @brief xcb_xkb_set_behavior_t
+ **/
+typedef struct xcb_xkb_set_behavior_t {
+ xcb_keycode_t keycode; /**< */
+ xcb_xkb_behavior_t behavior; /**< */
+ uint8_t pad0; /**< */
+} xcb_xkb_set_behavior_t;
+
+/**
+ * @brief xcb_xkb_set_behavior_iterator_t
+ **/
+typedef struct xcb_xkb_set_behavior_iterator_t {
+ xcb_xkb_set_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_set_behavior_iterator_t;
+
+/**
+ * @brief xcb_xkb_set_explicit_t
+ **/
+typedef struct xcb_xkb_set_explicit_t {
+ xcb_keycode_t keycode; /**< */
+ uint8_t explicit; /**< */
+} xcb_xkb_set_explicit_t;
+
+/**
+ * @brief xcb_xkb_set_explicit_iterator_t
+ **/
+typedef struct xcb_xkb_set_explicit_iterator_t {
+ xcb_xkb_set_explicit_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_set_explicit_iterator_t;
+
+/**
+ * @brief xcb_xkb_key_mod_map_t
+ **/
+typedef struct xcb_xkb_key_mod_map_t {
+ xcb_keycode_t keycode; /**< */
+ uint8_t mods; /**< */
+} xcb_xkb_key_mod_map_t;
+
+/**
+ * @brief xcb_xkb_key_mod_map_iterator_t
+ **/
+typedef struct xcb_xkb_key_mod_map_iterator_t {
+ xcb_xkb_key_mod_map_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_key_mod_map_iterator_t;
+
+/**
+ * @brief xcb_xkb_key_v_mod_map_t
+ **/
+typedef struct xcb_xkb_key_v_mod_map_t {
+ xcb_keycode_t keycode; /**< */
+ uint8_t pad0; /**< */
+ uint16_t vmods; /**< */
+} xcb_xkb_key_v_mod_map_t;
+
+/**
+ * @brief xcb_xkb_key_v_mod_map_iterator_t
+ **/
+typedef struct xcb_xkb_key_v_mod_map_iterator_t {
+ xcb_xkb_key_v_mod_map_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_key_v_mod_map_iterator_t;
+
+/**
+ * @brief xcb_xkb_kt_set_map_entry_t
+ **/
+typedef struct xcb_xkb_kt_set_map_entry_t {
+ uint8_t level; /**< */
+ uint8_t realMods; /**< */
+ uint16_t virtualMods; /**< */
+} xcb_xkb_kt_set_map_entry_t;
+
+/**
+ * @brief xcb_xkb_kt_set_map_entry_iterator_t
+ **/
+typedef struct xcb_xkb_kt_set_map_entry_iterator_t {
+ xcb_xkb_kt_set_map_entry_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_kt_set_map_entry_iterator_t;
+
+/**
+ * @brief xcb_xkb_set_key_type_t
+ **/
+typedef struct xcb_xkb_set_key_type_t {
+ uint8_t mask; /**< */
+ uint8_t realMods; /**< */
+ uint16_t virtualMods; /**< */
+ uint8_t numLevels; /**< */
+ uint8_t nMapEntries; /**< */
+ uint8_t preserve; /**< */
+ uint8_t pad0; /**< */
+} xcb_xkb_set_key_type_t;
+
+/**
+ * @brief xcb_xkb_set_key_type_iterator_t
+ **/
+typedef struct xcb_xkb_set_key_type_iterator_t {
+ xcb_xkb_set_key_type_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_set_key_type_iterator_t;
+
+typedef char xcb_xkb_string8_t;
+
+/**
+ * @brief xcb_xkb_string8_iterator_t
+ **/
+typedef struct xcb_xkb_string8_iterator_t {
+ xcb_xkb_string8_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_string8_iterator_t;
+
+/**
+ * @brief xcb_xkb_property_t
+ **/
+typedef struct xcb_xkb_property_t {
+ uint16_t nameLength; /**< */
+ uint16_t valueLength; /**< */
+} xcb_xkb_property_t;
+
+/**
+ * @brief xcb_xkb_property_iterator_t
+ **/
+typedef struct xcb_xkb_property_iterator_t {
+ xcb_xkb_property_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_property_iterator_t;
+
+/**
+ * @brief xcb_xkb_outline_t
+ **/
+typedef struct xcb_xkb_outline_t {
+ uint8_t nPoints; /**< */
+ uint8_t cornerRadius; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_outline_t;
+
+/**
+ * @brief xcb_xkb_outline_iterator_t
+ **/
+typedef struct xcb_xkb_outline_iterator_t {
+ xcb_xkb_outline_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_outline_iterator_t;
+
+/**
+ * @brief xcb_xkb_shape_t
+ **/
+typedef struct xcb_xkb_shape_t {
+ xcb_atom_t name; /**< */
+ uint8_t nOutlines; /**< */
+ uint8_t primaryNdx; /**< */
+ uint8_t approxNdx; /**< */
+ uint8_t pad0; /**< */
+} xcb_xkb_shape_t;
+
+/**
+ * @brief xcb_xkb_shape_iterator_t
+ **/
+typedef struct xcb_xkb_shape_iterator_t {
+ xcb_xkb_shape_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_shape_iterator_t;
+
+/**
+ * @brief xcb_xkb_key_t
+ **/
+typedef struct xcb_xkb_key_t {
+ xcb_xkb_string8_t name[4]; /**< */
+ int16_t gap; /**< */
+ uint8_t shapeNdx; /**< */
+ uint8_t colorNdx; /**< */
+} xcb_xkb_key_t;
+
+/**
+ * @brief xcb_xkb_key_iterator_t
+ **/
+typedef struct xcb_xkb_key_iterator_t {
+ xcb_xkb_key_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_key_iterator_t;
+
+/**
+ * @brief xcb_xkb_overlay_key_t
+ **/
+typedef struct xcb_xkb_overlay_key_t {
+ xcb_xkb_string8_t over[4]; /**< */
+ xcb_xkb_string8_t under[4]; /**< */
+} xcb_xkb_overlay_key_t;
+
+/**
+ * @brief xcb_xkb_overlay_key_iterator_t
+ **/
+typedef struct xcb_xkb_overlay_key_iterator_t {
+ xcb_xkb_overlay_key_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_overlay_key_iterator_t;
+
+/**
+ * @brief xcb_xkb_overlay_row_t
+ **/
+typedef struct xcb_xkb_overlay_row_t {
+ uint8_t rowUnder; /**< */
+ uint8_t nKeys; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_overlay_row_t;
+
+/**
+ * @brief xcb_xkb_overlay_row_iterator_t
+ **/
+typedef struct xcb_xkb_overlay_row_iterator_t {
+ xcb_xkb_overlay_row_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_overlay_row_iterator_t;
+
+/**
+ * @brief xcb_xkb_overlay_t
+ **/
+typedef struct xcb_xkb_overlay_t {
+ xcb_atom_t name; /**< */
+ uint8_t nRows; /**< */
+ uint8_t pad0[3]; /**< */
+} xcb_xkb_overlay_t;
+
+/**
+ * @brief xcb_xkb_overlay_iterator_t
+ **/
+typedef struct xcb_xkb_overlay_iterator_t {
+ xcb_xkb_overlay_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_overlay_iterator_t;
+
+/**
+ * @brief xcb_xkb_row_t
+ **/
+typedef struct xcb_xkb_row_t {
+ int16_t top; /**< */
+ int16_t left; /**< */
+ uint8_t nKeys; /**< */
+ uint8_t vertical; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_row_t;
+
+/**
+ * @brief xcb_xkb_row_iterator_t
+ **/
+typedef struct xcb_xkb_row_iterator_t {
+ xcb_xkb_row_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_row_iterator_t;
+
+typedef enum xcb_xkb_doodad_type_t {
+ XCB_XKB_DOODAD_TYPE_OUTLINE = 1,
+ XCB_XKB_DOODAD_TYPE_SOLID = 2,
+ XCB_XKB_DOODAD_TYPE_TEXT = 3,
+ XCB_XKB_DOODAD_TYPE_INDICATOR = 4,
+ XCB_XKB_DOODAD_TYPE_LOGO = 5
+} xcb_xkb_doodad_type_t;
+
+/**
+ * @brief xcb_xkb_common_doodad_t
+ **/
+typedef struct xcb_xkb_common_doodad_t {
+ xcb_atom_t name; /**< */
+ uint8_t type; /**< */
+ uint8_t priority; /**< */
+ int16_t top; /**< */
+ int16_t left; /**< */
+ int16_t angle; /**< */
+} xcb_xkb_common_doodad_t;
+
+/**
+ * @brief xcb_xkb_common_doodad_iterator_t
+ **/
+typedef struct xcb_xkb_common_doodad_iterator_t {
+ xcb_xkb_common_doodad_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_common_doodad_iterator_t;
+
+/**
+ * @brief xcb_xkb_shape_doodad_t
+ **/
+typedef struct xcb_xkb_shape_doodad_t {
+ xcb_atom_t name; /**< */
+ uint8_t type; /**< */
+ uint8_t priority; /**< */
+ int16_t top; /**< */
+ int16_t left; /**< */
+ int16_t angle; /**< */
+ uint8_t colorNdx; /**< */
+ uint8_t shapeNdx; /**< */
+ uint8_t pad0[6]; /**< */
+} xcb_xkb_shape_doodad_t;
+
+/**
+ * @brief xcb_xkb_shape_doodad_iterator_t
+ **/
+typedef struct xcb_xkb_shape_doodad_iterator_t {
+ xcb_xkb_shape_doodad_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_shape_doodad_iterator_t;
+
+/**
+ * @brief xcb_xkb_text_doodad_t
+ **/
+typedef struct xcb_xkb_text_doodad_t {
+ xcb_atom_t name; /**< */
+ uint8_t type; /**< */
+ uint8_t priority; /**< */
+ int16_t top; /**< */
+ int16_t left; /**< */
+ int16_t angle; /**< */
+ uint16_t width; /**< */
+ uint16_t height; /**< */
+ uint8_t colorNdx; /**< */
+ uint8_t pad0[3]; /**< */
+} xcb_xkb_text_doodad_t;
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_text_doodad_text
+ **
+ ** @param const xcb_xkb_text_doodad_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_text_doodad_text (const xcb_xkb_text_doodad_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_text_doodad_font
+ **
+ ** @param const xcb_xkb_text_doodad_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_text_doodad_font (const xcb_xkb_text_doodad_t *R /**< */);
+
+/**
+ * @brief xcb_xkb_text_doodad_iterator_t
+ **/
+typedef struct xcb_xkb_text_doodad_iterator_t {
+ xcb_xkb_text_doodad_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_text_doodad_iterator_t;
+
+/**
+ * @brief xcb_xkb_indicator_doodad_t
+ **/
+typedef struct xcb_xkb_indicator_doodad_t {
+ xcb_atom_t name; /**< */
+ uint8_t type; /**< */
+ uint8_t priority; /**< */
+ int16_t top; /**< */
+ int16_t left; /**< */
+ int16_t angle; /**< */
+ uint8_t shapeNdx; /**< */
+ uint8_t onColorNdx; /**< */
+ uint8_t offColorNdx; /**< */
+ uint8_t pad0[5]; /**< */
+} xcb_xkb_indicator_doodad_t;
+
+/**
+ * @brief xcb_xkb_indicator_doodad_iterator_t
+ **/
+typedef struct xcb_xkb_indicator_doodad_iterator_t {
+ xcb_xkb_indicator_doodad_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_indicator_doodad_iterator_t;
+
+/**
+ * @brief xcb_xkb_logo_doodad_t
+ **/
+typedef struct xcb_xkb_logo_doodad_t {
+ xcb_atom_t name; /**< */
+ uint8_t type; /**< */
+ uint8_t priority; /**< */
+ int16_t top; /**< */
+ int16_t left; /**< */
+ int16_t angle; /**< */
+ uint8_t colorNdx; /**< */
+ uint8_t shapeNdx; /**< */
+ uint8_t pad0[6]; /**< */
+} xcb_xkb_logo_doodad_t;
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_logo_doodad_logo_name
+ **
+ ** @param const xcb_xkb_logo_doodad_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_logo_doodad_logo_name (const xcb_xkb_logo_doodad_t *R /**< */);
+
+/**
+ * @brief xcb_xkb_logo_doodad_iterator_t
+ **/
+typedef struct xcb_xkb_logo_doodad_iterator_t {
+ xcb_xkb_logo_doodad_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_logo_doodad_iterator_t;
+
+/**
+ * @brief xcb_xkb_doodad_t
+ **/
+typedef union xcb_xkb_doodad_t {
+ xcb_xkb_common_doodad_t common; /**< */
+ xcb_xkb_shape_doodad_t shape; /**< */
+ xcb_xkb_text_doodad_t *text; /**< */
+ xcb_xkb_indicator_doodad_t indicator; /**< */
+ xcb_xkb_logo_doodad_t *logo; /**< */
+} xcb_xkb_doodad_t;
+
+/**
+ * @brief xcb_xkb_doodad_iterator_t
+ **/
+typedef struct xcb_xkb_doodad_iterator_t {
+ xcb_xkb_doodad_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_doodad_iterator_t;
+
+/**
+ * @brief xcb_xkb_section_t
+ **/
+typedef struct xcb_xkb_section_t {
+ xcb_atom_t name; /**< */
+ int16_t top; /**< */
+ int16_t left; /**< */
+ uint16_t width; /**< */
+ uint16_t height; /**< */
+ int16_t angle; /**< */
+ uint8_t priority; /**< */
+ uint8_t nRows; /**< */
+ uint8_t nDoodads; /**< */
+ uint8_t nOverlays; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_section_t;
+
+/**
+ * @brief xcb_xkb_section_iterator_t
+ **/
+typedef struct xcb_xkb_section_iterator_t {
+ xcb_xkb_section_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_section_iterator_t;
+
+/**
+ * @brief xcb_xkb_listing_t
+ **/
+typedef struct xcb_xkb_listing_t {
+ uint16_t flags; /**< */
+ uint16_t length; /**< */
+} xcb_xkb_listing_t;
+
+/**
+ * @brief xcb_xkb_listing_iterator_t
+ **/
+typedef struct xcb_xkb_listing_iterator_t {
+ xcb_xkb_listing_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_listing_iterator_t;
+
+/**
+ * @brief xcb_xkb_device_led_info_t
+ **/
+typedef struct xcb_xkb_device_led_info_t {
+ xcb_xkb_led_class_spec_t ledClass; /**< */
+ xcb_xkb_id_spec_t ledID; /**< */
+ uint32_t namesPresent; /**< */
+ uint32_t mapsPresent; /**< */
+ uint32_t physIndicators; /**< */
+ uint32_t state; /**< */
+} xcb_xkb_device_led_info_t;
+
+/**
+ * @brief xcb_xkb_device_led_info_iterator_t
+ **/
+typedef struct xcb_xkb_device_led_info_iterator_t {
+ xcb_xkb_device_led_info_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_device_led_info_iterator_t;
+
+typedef enum xcb_xkb_error_t {
+ XCB_XKB_ERROR_BAD_DEVICE = 255,
+ XCB_XKB_ERROR_BAD_CLASS = 254,
+ XCB_XKB_ERROR_BAD_ID = 253
+} xcb_xkb_error_t;
+
+/** Opcode for xcb_xkb_keyboard. */
+#define XCB_XKB_KEYBOARD 0
+
+/**
+ * @brief xcb_xkb_keyboard_error_t
+ **/
+typedef struct xcb_xkb_keyboard_error_t {
+ uint8_t response_type; /**< */
+ uint8_t error_code; /**< */
+ uint16_t sequence; /**< */
+ uint32_t value; /**< */
+ uint16_t minorOpcode; /**< */
+ uint8_t majorOpcode; /**< */
+ uint8_t pad0[21]; /**< */
+} xcb_xkb_keyboard_error_t;
+
+typedef enum xcb_xkb_sa_t {
+ XCB_XKB_SA_CLEAR_LOCKS = 1,
+ XCB_XKB_SA_LATCH_TO_LOCK = 2,
+ XCB_XKB_SA_USE_MOD_MAP_MODS = 4,
+ XCB_XKB_SA_GROUP_ABSOLUTE = 4
+} xcb_xkb_sa_t;
+
+typedef enum xcb_xkb_sa_type_t {
+ XCB_XKB_SA_TYPE_NO_ACTION = 0,
+ XCB_XKB_SA_TYPE_SET_MODS = 1,
+ XCB_XKB_SA_TYPE_LATCH_MODS = 2,
+ XCB_XKB_SA_TYPE_LOCK_MODS = 3,
+ XCB_XKB_SA_TYPE_SET_GROUP = 4,
+ XCB_XKB_SA_TYPE_LATCH_GROUP = 5,
+ XCB_XKB_SA_TYPE_LOCK_GROUP = 6,
+ XCB_XKB_SA_TYPE_MOVE_PTR = 7,
+ XCB_XKB_SA_TYPE_PTR_BTN = 8,
+ XCB_XKB_SA_TYPE_LOCK_PTR_BTN = 9,
+ XCB_XKB_SA_TYPE_SET_PTR_DFLT = 10,
+ XCB_XKB_SA_TYPE_ISO_LOCK = 11,
+ XCB_XKB_SA_TYPE_TERMINATE = 12,
+ XCB_XKB_SA_TYPE_SWITCH_SCREEN = 13,
+ XCB_XKB_SA_TYPE_SET_CONTROLS = 14,
+ XCB_XKB_SA_TYPE_LOCK_CONTROLS = 15,
+ XCB_XKB_SA_TYPE_ACTION_MESSAGE = 16,
+ XCB_XKB_SA_TYPE_REDIRECT_KEY = 17,
+ XCB_XKB_SA_TYPE_DEVICE_BTN = 18,
+ XCB_XKB_SA_TYPE_LOCK_DEVICE_BTN = 19,
+ XCB_XKB_SA_TYPE_DEVICE_VALUATOR = 20
+} xcb_xkb_sa_type_t;
+
+/**
+ * @brief xcb_xkb_sa_no_action_t
+ **/
+typedef struct xcb_xkb_sa_no_action_t {
+ uint8_t type; /**< */
+ uint8_t pad0[7]; /**< */
+} xcb_xkb_sa_no_action_t;
+
+/**
+ * @brief xcb_xkb_sa_no_action_iterator_t
+ **/
+typedef struct xcb_xkb_sa_no_action_iterator_t {
+ xcb_xkb_sa_no_action_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_no_action_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_set_mods_t
+ **/
+typedef struct xcb_xkb_sa_set_mods_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t mask; /**< */
+ uint8_t realMods; /**< */
+ uint8_t vmodsHigh; /**< */
+ uint8_t vmodsLow; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_sa_set_mods_t;
+
+/**
+ * @brief xcb_xkb_sa_set_mods_iterator_t
+ **/
+typedef struct xcb_xkb_sa_set_mods_iterator_t {
+ xcb_xkb_sa_set_mods_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_set_mods_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_latch_mods_t
+ **/
+typedef struct xcb_xkb_sa_latch_mods_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t mask; /**< */
+ uint8_t realMods; /**< */
+ uint8_t vmodsHigh; /**< */
+ uint8_t vmodsLow; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_sa_latch_mods_t;
+
+/**
+ * @brief xcb_xkb_sa_latch_mods_iterator_t
+ **/
+typedef struct xcb_xkb_sa_latch_mods_iterator_t {
+ xcb_xkb_sa_latch_mods_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_latch_mods_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_mods_t
+ **/
+typedef struct xcb_xkb_sa_lock_mods_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t mask; /**< */
+ uint8_t realMods; /**< */
+ uint8_t vmodsHigh; /**< */
+ uint8_t vmodsLow; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_sa_lock_mods_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_mods_iterator_t
+ **/
+typedef struct xcb_xkb_sa_lock_mods_iterator_t {
+ xcb_xkb_sa_lock_mods_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_lock_mods_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_set_group_t
+ **/
+typedef struct xcb_xkb_sa_set_group_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ int8_t group; /**< */
+ uint8_t pad0[5]; /**< */
+} xcb_xkb_sa_set_group_t;
+
+/**
+ * @brief xcb_xkb_sa_set_group_iterator_t
+ **/
+typedef struct xcb_xkb_sa_set_group_iterator_t {
+ xcb_xkb_sa_set_group_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_set_group_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_latch_group_t
+ **/
+typedef struct xcb_xkb_sa_latch_group_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ int8_t group; /**< */
+ uint8_t pad0[5]; /**< */
+} xcb_xkb_sa_latch_group_t;
+
+/**
+ * @brief xcb_xkb_sa_latch_group_iterator_t
+ **/
+typedef struct xcb_xkb_sa_latch_group_iterator_t {
+ xcb_xkb_sa_latch_group_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_latch_group_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_group_t
+ **/
+typedef struct xcb_xkb_sa_lock_group_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ int8_t group; /**< */
+ uint8_t pad0[5]; /**< */
+} xcb_xkb_sa_lock_group_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_group_iterator_t
+ **/
+typedef struct xcb_xkb_sa_lock_group_iterator_t {
+ xcb_xkb_sa_lock_group_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_lock_group_iterator_t;
+
+typedef enum xcb_xkb_sa_move_ptr_flag_t {
+ XCB_XKB_SA_MOVE_PTR_FLAG_NO_ACCELERATION = 1,
+ XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_X = 2,
+ XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_Y = 4
+} xcb_xkb_sa_move_ptr_flag_t;
+
+/**
+ * @brief xcb_xkb_sa_move_ptr_t
+ **/
+typedef struct xcb_xkb_sa_move_ptr_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ int8_t xHigh; /**< */
+ uint8_t xLow; /**< */
+ int8_t yHigh; /**< */
+ uint8_t yLow; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_sa_move_ptr_t;
+
+/**
+ * @brief xcb_xkb_sa_move_ptr_iterator_t
+ **/
+typedef struct xcb_xkb_sa_move_ptr_iterator_t {
+ xcb_xkb_sa_move_ptr_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_move_ptr_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_ptr_btn_t
+ **/
+typedef struct xcb_xkb_sa_ptr_btn_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t count; /**< */
+ uint8_t button; /**< */
+ uint8_t pad0[4]; /**< */
+} xcb_xkb_sa_ptr_btn_t;
+
+/**
+ * @brief xcb_xkb_sa_ptr_btn_iterator_t
+ **/
+typedef struct xcb_xkb_sa_ptr_btn_iterator_t {
+ xcb_xkb_sa_ptr_btn_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_ptr_btn_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_ptr_btn_t
+ **/
+typedef struct xcb_xkb_sa_lock_ptr_btn_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t pad0; /**< */
+ uint8_t button; /**< */
+ uint8_t pad1[4]; /**< */
+} xcb_xkb_sa_lock_ptr_btn_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_ptr_btn_iterator_t
+ **/
+typedef struct xcb_xkb_sa_lock_ptr_btn_iterator_t {
+ xcb_xkb_sa_lock_ptr_btn_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_lock_ptr_btn_iterator_t;
+
+typedef enum xcb_xkb_sa_set_ptr_dflt_flag_t {
+ XCB_XKB_SA_SET_PTR_DFLT_FLAG_DFLT_BTN_ABSOLUTE = 2,
+ XCB_XKB_SA_SET_PTR_DFLT_FLAG_AFFECT_DFLT_BUTTON = 1
+} xcb_xkb_sa_set_ptr_dflt_flag_t;
+
+/**
+ * @brief xcb_xkb_sa_set_ptr_dflt_t
+ **/
+typedef struct xcb_xkb_sa_set_ptr_dflt_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t affect; /**< */
+ int8_t value; /**< */
+ uint8_t pad0[4]; /**< */
+} xcb_xkb_sa_set_ptr_dflt_t;
+
+/**
+ * @brief xcb_xkb_sa_set_ptr_dflt_iterator_t
+ **/
+typedef struct xcb_xkb_sa_set_ptr_dflt_iterator_t {
+ xcb_xkb_sa_set_ptr_dflt_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_set_ptr_dflt_iterator_t;
+
+typedef enum xcb_xkb_sa_iso_lock_flag_t {
+ XCB_XKB_SA_ISO_LOCK_FLAG_NO_LOCK = 1,
+ XCB_XKB_SA_ISO_LOCK_FLAG_NO_UNLOCK = 2,
+ XCB_XKB_SA_ISO_LOCK_FLAG_USE_MOD_MAP_MODS = 4,
+ XCB_XKB_SA_ISO_LOCK_FLAG_GROUP_ABSOLUTE = 4,
+ XCB_XKB_SA_ISO_LOCK_FLAG_ISO_DFLT_IS_GROUP = 8
+} xcb_xkb_sa_iso_lock_flag_t;
+
+typedef enum xcb_xkb_sa_iso_lock_no_affect_t {
+ XCB_XKB_SA_ISO_LOCK_NO_AFFECT_CTRLS = 8,
+ XCB_XKB_SA_ISO_LOCK_NO_AFFECT_PTR = 16,
+ XCB_XKB_SA_ISO_LOCK_NO_AFFECT_GROUP = 32,
+ XCB_XKB_SA_ISO_LOCK_NO_AFFECT_MODS = 64
+} xcb_xkb_sa_iso_lock_no_affect_t;
+
+/**
+ * @brief xcb_xkb_sa_iso_lock_t
+ **/
+typedef struct xcb_xkb_sa_iso_lock_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t mask; /**< */
+ uint8_t realMods; /**< */
+ int8_t group; /**< */
+ uint8_t affect; /**< */
+ uint8_t vmodsHigh; /**< */
+ uint8_t vmodsLow; /**< */
+} xcb_xkb_sa_iso_lock_t;
+
+/**
+ * @brief xcb_xkb_sa_iso_lock_iterator_t
+ **/
+typedef struct xcb_xkb_sa_iso_lock_iterator_t {
+ xcb_xkb_sa_iso_lock_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_iso_lock_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_terminate_t
+ **/
+typedef struct xcb_xkb_sa_terminate_t {
+ uint8_t type; /**< */
+ uint8_t pad0[7]; /**< */
+} xcb_xkb_sa_terminate_t;
+
+/**
+ * @brief xcb_xkb_sa_terminate_iterator_t
+ **/
+typedef struct xcb_xkb_sa_terminate_iterator_t {
+ xcb_xkb_sa_terminate_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_terminate_iterator_t;
+
+typedef enum xcb_xkb_switch_screen_flag_t {
+ XCB_XKB_SWITCH_SCREEN_FLAG_APPLICATION = 1,
+ XCB_XKB_SWITCH_SCREEN_FLAG_ABSOLUTE = 4
+} xcb_xkb_switch_screen_flag_t;
+
+/**
+ * @brief xcb_xkb_sa_switch_screen_t
+ **/
+typedef struct xcb_xkb_sa_switch_screen_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ int8_t newScreen; /**< */
+ uint8_t pad0[5]; /**< */
+} xcb_xkb_sa_switch_screen_t;
+
+/**
+ * @brief xcb_xkb_sa_switch_screen_iterator_t
+ **/
+typedef struct xcb_xkb_sa_switch_screen_iterator_t {
+ xcb_xkb_sa_switch_screen_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_switch_screen_iterator_t;
+
+typedef enum xcb_xkb_bool_ctrls_high_t {
+ XCB_XKB_BOOL_CTRLS_HIGH_ACCESS_X_FEEDBACK = 1,
+ XCB_XKB_BOOL_CTRLS_HIGH_AUDIBLE_BELL = 2,
+ XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_1 = 4,
+ XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_2 = 8,
+ XCB_XKB_BOOL_CTRLS_HIGH_IGNORE_GROUP_LOCK = 16
+} xcb_xkb_bool_ctrls_high_t;
+
+typedef enum xcb_xkb_bool_ctrls_low_t {
+ XCB_XKB_BOOL_CTRLS_LOW_REPEAT_KEYS = 1,
+ XCB_XKB_BOOL_CTRLS_LOW_SLOW_KEYS = 2,
+ XCB_XKB_BOOL_CTRLS_LOW_BOUNCE_KEYS = 4,
+ XCB_XKB_BOOL_CTRLS_LOW_STICKY_KEYS = 8,
+ XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS = 16,
+ XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS_ACCEL = 32,
+ XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_KEYS = 64,
+ XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_TIMEOUT = 128
+} xcb_xkb_bool_ctrls_low_t;
+
+/**
+ * @brief xcb_xkb_sa_set_controls_t
+ **/
+typedef struct xcb_xkb_sa_set_controls_t {
+ uint8_t type; /**< */
+ uint8_t pad0[3]; /**< */
+ uint8_t boolCtrlsHigh; /**< */
+ uint8_t boolCtrlsLow; /**< */
+ uint8_t pad1[2]; /**< */
+} xcb_xkb_sa_set_controls_t;
+
+/**
+ * @brief xcb_xkb_sa_set_controls_iterator_t
+ **/
+typedef struct xcb_xkb_sa_set_controls_iterator_t {
+ xcb_xkb_sa_set_controls_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_set_controls_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_controls_t
+ **/
+typedef struct xcb_xkb_sa_lock_controls_t {
+ uint8_t type; /**< */
+ uint8_t pad0[3]; /**< */
+ uint8_t boolCtrlsHigh; /**< */
+ uint8_t boolCtrlsLow; /**< */
+ uint8_t pad1[2]; /**< */
+} xcb_xkb_sa_lock_controls_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_controls_iterator_t
+ **/
+typedef struct xcb_xkb_sa_lock_controls_iterator_t {
+ xcb_xkb_sa_lock_controls_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_lock_controls_iterator_t;
+
+typedef enum xcb_xkb_action_message_flag_t {
+ XCB_XKB_ACTION_MESSAGE_FLAG_ON_PRESS = 1,
+ XCB_XKB_ACTION_MESSAGE_FLAG_ON_RELEASE = 2,
+ XCB_XKB_ACTION_MESSAGE_FLAG_GEN_KEY_EVENT = 4
+} xcb_xkb_action_message_flag_t;
+
+/**
+ * @brief xcb_xkb_sa_action_message_t
+ **/
+typedef struct xcb_xkb_sa_action_message_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t message[6]; /**< */
+} xcb_xkb_sa_action_message_t;
+
+/**
+ * @brief xcb_xkb_sa_action_message_iterator_t
+ **/
+typedef struct xcb_xkb_sa_action_message_iterator_t {
+ xcb_xkb_sa_action_message_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_action_message_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_redirect_key_t
+ **/
+typedef struct xcb_xkb_sa_redirect_key_t {
+ uint8_t type; /**< */
+ xcb_keycode_t newkey; /**< */
+ uint8_t mask; /**< */
+ uint8_t realModifiers; /**< */
+ uint8_t vmodsMaskHigh; /**< */
+ uint8_t vmodsMaskLow; /**< */
+ uint8_t vmodsHigh; /**< */
+ uint8_t vmodsLow; /**< */
+} xcb_xkb_sa_redirect_key_t;
+
+/**
+ * @brief xcb_xkb_sa_redirect_key_iterator_t
+ **/
+typedef struct xcb_xkb_sa_redirect_key_iterator_t {
+ xcb_xkb_sa_redirect_key_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_redirect_key_iterator_t;
+
+/**
+ * @brief xcb_xkb_sa_device_btn_t
+ **/
+typedef struct xcb_xkb_sa_device_btn_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t count; /**< */
+ uint8_t button; /**< */
+ uint8_t device; /**< */
+ uint8_t pad0[3]; /**< */
+} xcb_xkb_sa_device_btn_t;
+
+/**
+ * @brief xcb_xkb_sa_device_btn_iterator_t
+ **/
+typedef struct xcb_xkb_sa_device_btn_iterator_t {
+ xcb_xkb_sa_device_btn_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_device_btn_iterator_t;
+
+typedef enum xcb_xkb_lock_device_flags_t {
+ XCB_XKB_LOCK_DEVICE_FLAGS_NO_LOCK = 1,
+ XCB_XKB_LOCK_DEVICE_FLAGS_NO_UNLOCK = 2
+} xcb_xkb_lock_device_flags_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_device_btn_t
+ **/
+typedef struct xcb_xkb_sa_lock_device_btn_t {
+ uint8_t type; /**< */
+ uint8_t flags; /**< */
+ uint8_t pad0; /**< */
+ uint8_t button; /**< */
+ uint8_t device; /**< */
+} xcb_xkb_sa_lock_device_btn_t;
+
+/**
+ * @brief xcb_xkb_sa_lock_device_btn_iterator_t
+ **/
+typedef struct xcb_xkb_sa_lock_device_btn_iterator_t {
+ xcb_xkb_sa_lock_device_btn_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_lock_device_btn_iterator_t;
+
+typedef enum xcb_xkb_sa_val_what_t {
+ XCB_XKB_SA_VAL_WHAT_IGNORE_VAL = 0,
+ XCB_XKB_SA_VAL_WHAT_SET_VAL_MIN = 1,
+ XCB_XKB_SA_VAL_WHAT_SET_VAL_CENTER = 2,
+ XCB_XKB_SA_VAL_WHAT_SET_VAL_MAX = 3,
+ XCB_XKB_SA_VAL_WHAT_SET_VAL_RELATIVE = 4,
+ XCB_XKB_SA_VAL_WHAT_SET_VAL_ABSOLUTE = 5
+} xcb_xkb_sa_val_what_t;
+
+/**
+ * @brief xcb_xkb_sa_device_valuator_t
+ **/
+typedef struct xcb_xkb_sa_device_valuator_t {
+ uint8_t type; /**< */
+ uint8_t device; /**< */
+ uint8_t val1what; /**< */
+ uint8_t val1index; /**< */
+ uint8_t val1value; /**< */
+ uint8_t val2what; /**< */
+ uint8_t val2index; /**< */
+ uint8_t val2value; /**< */
+} xcb_xkb_sa_device_valuator_t;
+
+/**
+ * @brief xcb_xkb_sa_device_valuator_iterator_t
+ **/
+typedef struct xcb_xkb_sa_device_valuator_iterator_t {
+ xcb_xkb_sa_device_valuator_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sa_device_valuator_iterator_t;
+
+/**
+ * @brief xcb_xkb_action_t
+ **/
+typedef union xcb_xkb_action_t {
+ xcb_xkb_sa_no_action_t noaction; /**< */
+ xcb_xkb_sa_set_mods_t setmods; /**< */
+ xcb_xkb_sa_latch_mods_t latchmods; /**< */
+ xcb_xkb_sa_lock_mods_t lockmods; /**< */
+ xcb_xkb_sa_set_group_t setgroup; /**< */
+ xcb_xkb_sa_latch_group_t latchgroup; /**< */
+ xcb_xkb_sa_lock_group_t lockgroup; /**< */
+ xcb_xkb_sa_move_ptr_t moveptr; /**< */
+ xcb_xkb_sa_ptr_btn_t ptrbtn; /**< */
+ xcb_xkb_sa_lock_ptr_btn_t lockptrbtn; /**< */
+ xcb_xkb_sa_set_ptr_dflt_t setptrdflt; /**< */
+ xcb_xkb_sa_iso_lock_t isolock; /**< */
+ xcb_xkb_sa_terminate_t terminate; /**< */
+ xcb_xkb_sa_switch_screen_t switchscreen; /**< */
+ xcb_xkb_sa_set_controls_t setcontrols; /**< */
+ xcb_xkb_sa_lock_controls_t lockcontrols; /**< */
+ xcb_xkb_sa_action_message_t message; /**< */
+ xcb_xkb_sa_redirect_key_t redirect; /**< */
+ xcb_xkb_sa_device_btn_t devbtn; /**< */
+ xcb_xkb_sa_lock_device_btn_t lockdevbtn; /**< */
+ xcb_xkb_sa_device_valuator_t devval; /**< */
+ uint8_t type; /**< */
+} xcb_xkb_action_t;
+
+/**
+ * @brief xcb_xkb_action_iterator_t
+ **/
+typedef struct xcb_xkb_action_iterator_t {
+ xcb_xkb_action_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_action_iterator_t;
+
+/**
+ * @brief xcb_xkb_use_extension_cookie_t
+ **/
+typedef struct xcb_xkb_use_extension_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_use_extension_cookie_t;
+
+/** Opcode for xcb_xkb_use_extension. */
+#define XCB_XKB_USE_EXTENSION 0
+
+/**
+ * @brief xcb_xkb_use_extension_request_t
+ **/
+typedef struct xcb_xkb_use_extension_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ uint16_t wantedMajor; /**< */
+ uint16_t wantedMinor; /**< */
+} xcb_xkb_use_extension_request_t;
+
+/**
+ * @brief xcb_xkb_use_extension_reply_t
+ **/
+typedef struct xcb_xkb_use_extension_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t supported; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint16_t serverMajor; /**< */
+ uint16_t serverMinor; /**< */
+ uint8_t pad0[20]; /**< */
+} xcb_xkb_use_extension_reply_t;
+
+/**
+ * @brief xcb_xkb_select_events_details_t
+ **/
+typedef struct xcb_xkb_select_events_details_t {
+ uint16_t affectNewKeyboard; /**< */
+ uint16_t newKeyboardDetails; /**< */
+ uint16_t affectState; /**< */
+ uint16_t stateDetails; /**< */
+ uint32_t affectCtrls; /**< */
+ uint32_t ctrlDetails; /**< */
+ uint32_t affectIndicatorState; /**< */
+ uint32_t indicatorStateDetails; /**< */
+ uint32_t affectIndicatorMap; /**< */
+ uint32_t indicatorMapDetails; /**< */
+ uint16_t affectNames; /**< */
+ uint16_t namesDetails; /**< */
+ uint8_t affectCompat; /**< */
+ uint8_t compatDetails; /**< */
+ uint8_t affectBell; /**< */
+ uint8_t bellDetails; /**< */
+ uint8_t affectMsgDetails; /**< */
+ uint8_t msgDetails; /**< */
+ uint16_t affectAccessX; /**< */
+ uint16_t accessXDetails; /**< */
+ uint16_t affectExtDev; /**< */
+ uint16_t extdevDetails; /**< */
+} xcb_xkb_select_events_details_t;
+
+/** Opcode for xcb_xkb_select_events. */
+#define XCB_XKB_SELECT_EVENTS 1
+
+/**
+ * @brief xcb_xkb_select_events_request_t
+ **/
+typedef struct xcb_xkb_select_events_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint16_t affectWhich; /**< */
+ uint16_t clear; /**< */
+ uint16_t selectAll; /**< */
+ uint16_t affectMap; /**< */
+ uint16_t map; /**< */
+} xcb_xkb_select_events_request_t;
+
+/** Opcode for xcb_xkb_bell. */
+#define XCB_XKB_BELL 3
+
+/**
+ * @brief xcb_xkb_bell_request_t
+ **/
+typedef struct xcb_xkb_bell_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ xcb_xkb_bell_class_spec_t bellClass; /**< */
+ xcb_xkb_id_spec_t bellID; /**< */
+ int8_t percent; /**< */
+ uint8_t forceSound; /**< */
+ uint8_t eventOnly; /**< */
+ uint8_t pad0; /**< */
+ int16_t pitch; /**< */
+ int16_t duration; /**< */
+ uint8_t pad1[2]; /**< */
+ xcb_atom_t name; /**< */
+ xcb_window_t window; /**< */
+} xcb_xkb_bell_request_t;
+
+/**
+ * @brief xcb_xkb_get_state_cookie_t
+ **/
+typedef struct xcb_xkb_get_state_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_state_cookie_t;
+
+/** Opcode for xcb_xkb_get_state. */
+#define XCB_XKB_GET_STATE 4
+
+/**
+ * @brief xcb_xkb_get_state_request_t
+ **/
+typedef struct xcb_xkb_get_state_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_get_state_request_t;
+
+/**
+ * @brief xcb_xkb_get_state_reply_t
+ **/
+typedef struct xcb_xkb_get_state_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint8_t mods; /**< */
+ uint8_t baseMods; /**< */
+ uint8_t latchedMods; /**< */
+ uint8_t lockedMods; /**< */
+ uint8_t group; /**< */
+ uint8_t lockedGroup; /**< */
+ int16_t baseGroup; /**< */
+ int16_t latchedGroup; /**< */
+ uint8_t compatState; /**< */
+ uint8_t grabMods; /**< */
+ uint8_t compatGrabMods; /**< */
+ uint8_t lookupMods; /**< */
+ uint8_t compatLookupMods; /**< */
+ uint8_t pad0; /**< */
+ uint16_t ptrBtnState; /**< */
+ uint8_t pad1[6]; /**< */
+} xcb_xkb_get_state_reply_t;
+
+/** Opcode for xcb_xkb_latch_lock_state. */
+#define XCB_XKB_LATCH_LOCK_STATE 5
+
+/**
+ * @brief xcb_xkb_latch_lock_state_request_t
+ **/
+typedef struct xcb_xkb_latch_lock_state_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t affectModLocks; /**< */
+ uint8_t modLocks; /**< */
+ uint8_t lockGroup; /**< */
+ uint8_t groupLock; /**< */
+ uint8_t affectModLatches; /**< */
+ uint8_t pad0; /**< */
+ uint8_t latchGroup; /**< */
+ uint16_t groupLatch; /**< */
+} xcb_xkb_latch_lock_state_request_t;
+
+/**
+ * @brief xcb_xkb_get_controls_cookie_t
+ **/
+typedef struct xcb_xkb_get_controls_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_controls_cookie_t;
+
+/** Opcode for xcb_xkb_get_controls. */
+#define XCB_XKB_GET_CONTROLS 6
+
+/**
+ * @brief xcb_xkb_get_controls_request_t
+ **/
+typedef struct xcb_xkb_get_controls_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_get_controls_request_t;
+
+/**
+ * @brief xcb_xkb_get_controls_reply_t
+ **/
+typedef struct xcb_xkb_get_controls_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint8_t mouseKeysDfltBtn; /**< */
+ uint8_t numGroups; /**< */
+ uint8_t groupsWrap; /**< */
+ uint8_t internalModsMask; /**< */
+ uint8_t ignoreLockModsMask; /**< */
+ uint8_t internalModsRealMods; /**< */
+ uint8_t ignoreLockModsRealMods; /**< */
+ uint8_t pad0; /**< */
+ uint16_t internalModsVmods; /**< */
+ uint16_t ignoreLockModsVmods; /**< */
+ uint16_t repeatDelay; /**< */
+ uint16_t repeatInterval; /**< */
+ uint16_t slowKeysDelay; /**< */
+ uint16_t debounceDelay; /**< */
+ uint16_t mouseKeysDelay; /**< */
+ uint16_t mouseKeysInterval; /**< */
+ uint16_t mouseKeysTimeToMax; /**< */
+ uint16_t mouseKeysMaxSpeed; /**< */
+ int16_t mouseKeysCurve; /**< */
+ xcb_xkb_ax_option_t accessXOption; /**< */
+ uint16_t accessXTimeout; /**< */
+ xcb_xkb_ax_option_t accessXTimeoutOptionsMask; /**< */
+ xcb_xkb_ax_option_t accessXTimeoutOptionsValues; /**< */
+ uint8_t pad1[2]; /**< */
+ uint32_t accessXTimeoutMask; /**< */
+ uint32_t accessXTimeoutValues; /**< */
+ uint32_t enabledControls; /**< */
+ uint8_t perKeyRepeat[32]; /**< */
+} xcb_xkb_get_controls_reply_t;
+
+/** Opcode for xcb_xkb_set_controls. */
+#define XCB_XKB_SET_CONTROLS 7
+
+/**
+ * @brief xcb_xkb_set_controls_request_t
+ **/
+typedef struct xcb_xkb_set_controls_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t affectInternalRealMods; /**< */
+ uint8_t internalRealMods; /**< */
+ uint8_t affectIgnoreLockRealMods; /**< */
+ uint8_t ignoreLockRealMods; /**< */
+ uint16_t affectInternalVirtualMods; /**< */
+ uint16_t internalVirtualMods; /**< */
+ uint16_t affectIgnoreLockVirtualMods; /**< */
+ uint16_t ignoreLockVirtualMods; /**< */
+ uint8_t mouseKeysDfltBtn; /**< */
+ uint8_t groupsWrap; /**< */
+ xcb_xkb_ax_option_t accessXOptions; /**< */
+ uint8_t pad0[2]; /**< */
+ uint32_t affectEnabledControls; /**< */
+ uint32_t enabledControls; /**< */
+ uint32_t changeControls; /**< */
+ uint16_t repeatDelay; /**< */
+ uint16_t repeatInterval; /**< */
+ uint16_t slowKeysDelay; /**< */
+ uint16_t debounceDelay; /**< */
+ uint16_t mouseKeysDelay; /**< */
+ uint16_t mouseKeysInterval; /**< */
+ uint16_t mouseKeysTimeToMax; /**< */
+ uint16_t mouseKeysMaxSpeed; /**< */
+ int16_t mouseKeysCurve; /**< */
+ uint16_t accessXTimeout; /**< */
+ uint32_t accessXTimeoutMask; /**< */
+ uint32_t accessXTimeoutValues; /**< */
+ xcb_xkb_ax_option_t accessXTimeoutOptionsMask; /**< */
+ xcb_xkb_ax_option_t accessXTimeoutOptionsValues; /**< */
+ uint8_t perKeyRepeat[32]; /**< */
+} xcb_xkb_set_controls_request_t;
+
+/**
+ * @brief xcb_xkb_get_map_cookie_t
+ **/
+typedef struct xcb_xkb_get_map_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_map_cookie_t;
+
+/** Opcode for xcb_xkb_get_map. */
+#define XCB_XKB_GET_MAP 8
+
+/**
+ * @brief xcb_xkb_get_map_request_t
+ **/
+typedef struct xcb_xkb_get_map_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint16_t full; /**< */
+ uint16_t partial; /**< */
+ uint8_t firstType; /**< */
+ uint8_t nTypes; /**< */
+ xcb_keycode_t firstKeySym; /**< */
+ uint8_t nKeySyms; /**< */
+ xcb_keycode_t firstKeyAction; /**< */
+ uint8_t nKeyActions; /**< */
+ xcb_keycode_t firstKeyBehavior; /**< */
+ uint8_t nKeyBehaviors; /**< */
+ uint16_t virtualMods; /**< */
+ xcb_keycode_t firstKeyExplicit; /**< */
+ uint8_t nKeyExplicit; /**< */
+ xcb_keycode_t firstModMapKey; /**< */
+ uint8_t nModMapKeys; /**< */
+ xcb_keycode_t firstVModMapKey; /**< */
+ uint8_t nVModMapKeys; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_get_map_request_t;
+
+/**
+ * @brief xcb_xkb_get_map_map_t
+ **/
+typedef struct xcb_xkb_get_map_map_t {
+ xcb_xkb_key_type_t *types_rtrn; /**< */
+ xcb_xkb_key_sym_map_t *syms_rtrn; /**< */
+ uint8_t *acts_rtrn_count; /**< */
+ xcb_xkb_action_t *acts_rtrn_acts; /**< */
+ xcb_xkb_set_behavior_t *behaviors_rtrn; /**< */
+ uint8_t *vmods_rtrn; /**< */
+ xcb_xkb_set_explicit_t *explicit_rtrn; /**< */
+ xcb_xkb_key_mod_map_t *modmap_rtrn; /**< */
+ xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; /**< */
+} xcb_xkb_get_map_map_t;
+
+/**
+ * @brief xcb_xkb_get_map_reply_t
+ **/
+typedef struct xcb_xkb_get_map_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint8_t pad0[2]; /**< */
+ xcb_keycode_t minKeyCode; /**< */
+ xcb_keycode_t maxKeyCode; /**< */
+ uint16_t present; /**< */
+ uint8_t firstType; /**< */
+ uint8_t nTypes; /**< */
+ uint8_t totalTypes; /**< */
+ xcb_keycode_t firstKeySym; /**< */
+ uint16_t totalSyms; /**< */
+ uint8_t nKeySyms; /**< */
+ xcb_keycode_t firstKeyAction; /**< */
+ uint16_t totalActions; /**< */
+ uint8_t nKeyActions; /**< */
+ xcb_keycode_t firstKeyBehavior; /**< */
+ uint8_t nKeyBehaviors; /**< */
+ uint8_t totalKeyBehaviors; /**< */
+ xcb_keycode_t firstKeyExplicit; /**< */
+ uint8_t nKeyExplicit; /**< */
+ uint8_t totalKeyExplicit; /**< */
+ xcb_keycode_t firstModMapKey; /**< */
+ uint8_t nModMapKeys; /**< */
+ uint8_t totalModMapKeys; /**< */
+ xcb_keycode_t firstVModMapKey; /**< */
+ uint8_t nVModMapKeys; /**< */
+ uint8_t totalVModMapKeys; /**< */
+ uint8_t pad1; /**< */
+ uint16_t virtualMods; /**< */
+} xcb_xkb_get_map_reply_t;
+
+/**
+ * @brief xcb_xkb_set_map_values_t
+ **/
+typedef struct xcb_xkb_set_map_values_t {
+ xcb_xkb_set_key_type_t *types; /**< */
+ xcb_xkb_key_sym_map_t *syms; /**< */
+ uint8_t *actionsCount; /**< */
+ xcb_xkb_action_t *actions; /**< */
+ xcb_xkb_set_behavior_t *behaviors; /**< */
+ uint8_t *vmods; /**< */
+ xcb_xkb_set_explicit_t *explicit; /**< */
+ xcb_xkb_key_mod_map_t *modmap; /**< */
+ xcb_xkb_key_v_mod_map_t *vmodmap; /**< */
+} xcb_xkb_set_map_values_t;
+
+/** Opcode for xcb_xkb_set_map. */
+#define XCB_XKB_SET_MAP 9
+
+/**
+ * @brief xcb_xkb_set_map_request_t
+ **/
+typedef struct xcb_xkb_set_map_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint16_t present; /**< */
+ uint16_t flags; /**< */
+ xcb_keycode_t minKeyCode; /**< */
+ xcb_keycode_t maxKeyCode; /**< */
+ uint8_t firstType; /**< */
+ uint8_t nTypes; /**< */
+ xcb_keycode_t firstKeySym; /**< */
+ uint8_t nKeySyms; /**< */
+ uint16_t totalSyms; /**< */
+ xcb_keycode_t firstKeyAction; /**< */
+ uint8_t nKeyActions; /**< */
+ uint16_t totalActions; /**< */
+ xcb_keycode_t firstKeyBehavior; /**< */
+ uint8_t nKeyBehaviors; /**< */
+ uint8_t totalKeyBehaviors; /**< */
+ xcb_keycode_t firstKeyExplicit; /**< */
+ uint8_t nKeyExplicit; /**< */
+ uint8_t totalKeyExplicit; /**< */
+ xcb_keycode_t firstModMapKey; /**< */
+ uint8_t nModMapKeys; /**< */
+ uint8_t totalModMapKeys; /**< */
+ xcb_keycode_t firstVModMapKey; /**< */
+ uint8_t nVModMapKeys; /**< */
+ uint8_t totalVModMapKeys; /**< */
+ uint16_t virtualMods; /**< */
+} xcb_xkb_set_map_request_t;
+
+/**
+ * @brief xcb_xkb_get_compat_map_cookie_t
+ **/
+typedef struct xcb_xkb_get_compat_map_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_compat_map_cookie_t;
+
+/** Opcode for xcb_xkb_get_compat_map. */
+#define XCB_XKB_GET_COMPAT_MAP 10
+
+/**
+ * @brief xcb_xkb_get_compat_map_request_t
+ **/
+typedef struct xcb_xkb_get_compat_map_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t groups; /**< */
+ uint8_t getAllSI; /**< */
+ uint16_t firstSI; /**< */
+ uint16_t nSI; /**< */
+} xcb_xkb_get_compat_map_request_t;
+
+/**
+ * @brief xcb_xkb_get_compat_map_reply_t
+ **/
+typedef struct xcb_xkb_get_compat_map_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint8_t groupsRtrn; /**< */
+ uint8_t pad0; /**< */
+ uint16_t firstSIRtrn; /**< */
+ uint16_t nSIRtrn; /**< */
+ uint16_t nTotalSI; /**< */
+ uint8_t pad1[16]; /**< */
+} xcb_xkb_get_compat_map_reply_t;
+
+/** Opcode for xcb_xkb_set_compat_map. */
+#define XCB_XKB_SET_COMPAT_MAP 11
+
+/**
+ * @brief xcb_xkb_set_compat_map_request_t
+ **/
+typedef struct xcb_xkb_set_compat_map_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t pad0; /**< */
+ uint8_t recomputeActions; /**< */
+ uint8_t truncateSI; /**< */
+ uint8_t groups; /**< */
+ uint16_t firstSI; /**< */
+ uint16_t nSI; /**< */
+ uint8_t pad1[2]; /**< */
+} xcb_xkb_set_compat_map_request_t;
+
+/**
+ * @brief xcb_xkb_get_indicator_state_cookie_t
+ **/
+typedef struct xcb_xkb_get_indicator_state_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_indicator_state_cookie_t;
+
+/** Opcode for xcb_xkb_get_indicator_state. */
+#define XCB_XKB_GET_INDICATOR_STATE 12
+
+/**
+ * @brief xcb_xkb_get_indicator_state_request_t
+ **/
+typedef struct xcb_xkb_get_indicator_state_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_get_indicator_state_request_t;
+
+/**
+ * @brief xcb_xkb_get_indicator_state_reply_t
+ **/
+typedef struct xcb_xkb_get_indicator_state_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint32_t state; /**< */
+ uint8_t pad0[20]; /**< */
+} xcb_xkb_get_indicator_state_reply_t;
+
+/**
+ * @brief xcb_xkb_get_indicator_map_cookie_t
+ **/
+typedef struct xcb_xkb_get_indicator_map_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_indicator_map_cookie_t;
+
+/** Opcode for xcb_xkb_get_indicator_map. */
+#define XCB_XKB_GET_INDICATOR_MAP 13
+
+/**
+ * @brief xcb_xkb_get_indicator_map_request_t
+ **/
+typedef struct xcb_xkb_get_indicator_map_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t pad0[2]; /**< */
+ uint32_t which; /**< */
+} xcb_xkb_get_indicator_map_request_t;
+
+/**
+ * @brief xcb_xkb_get_indicator_map_reply_t
+ **/
+typedef struct xcb_xkb_get_indicator_map_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint32_t which; /**< */
+ uint32_t realIndicators; /**< */
+ uint8_t nIndicators; /**< */
+ uint8_t pad0[15]; /**< */
+} xcb_xkb_get_indicator_map_reply_t;
+
+/** Opcode for xcb_xkb_set_indicator_map. */
+#define XCB_XKB_SET_INDICATOR_MAP 14
+
+/**
+ * @brief xcb_xkb_set_indicator_map_request_t
+ **/
+typedef struct xcb_xkb_set_indicator_map_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t pad0[2]; /**< */
+ uint32_t which; /**< */
+} xcb_xkb_set_indicator_map_request_t;
+
+/**
+ * @brief xcb_xkb_get_named_indicator_cookie_t
+ **/
+typedef struct xcb_xkb_get_named_indicator_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_named_indicator_cookie_t;
+
+/** Opcode for xcb_xkb_get_named_indicator. */
+#define XCB_XKB_GET_NAMED_INDICATOR 15
+
+/**
+ * @brief xcb_xkb_get_named_indicator_request_t
+ **/
+typedef struct xcb_xkb_get_named_indicator_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ xcb_xkb_led_class_spec_t ledClass; /**< */
+ xcb_xkb_id_spec_t ledID; /**< */
+ uint8_t pad0[2]; /**< */
+ xcb_atom_t indicator; /**< */
+} xcb_xkb_get_named_indicator_request_t;
+
+/**
+ * @brief xcb_xkb_get_named_indicator_reply_t
+ **/
+typedef struct xcb_xkb_get_named_indicator_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ xcb_atom_t indicator; /**< */
+ uint8_t found; /**< */
+ uint8_t on; /**< */
+ uint8_t realIndicator; /**< */
+ uint8_t ndx; /**< */
+ uint8_t map_flags; /**< */
+ uint8_t map_whichGroups; /**< */
+ uint8_t map_groups; /**< */
+ uint8_t map_whichMods; /**< */
+ uint8_t map_mods; /**< */
+ uint8_t map_realMods; /**< */
+ uint16_t map_vmod; /**< */
+ uint32_t map_ctrls; /**< */
+ uint8_t pad0[3]; /**< */
+} xcb_xkb_get_named_indicator_reply_t;
+
+/** Opcode for xcb_xkb_set_named_indicator. */
+#define XCB_XKB_SET_NAMED_INDICATOR 16
+
+/**
+ * @brief xcb_xkb_set_named_indicator_request_t
+ **/
+typedef struct xcb_xkb_set_named_indicator_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ xcb_xkb_led_class_spec_t ledClass; /**< */
+ xcb_xkb_id_spec_t ledID; /**< */
+ uint8_t pad0[2]; /**< */
+ xcb_atom_t indicator; /**< */
+ uint8_t setState; /**< */
+ uint8_t on; /**< */
+ uint8_t setMap; /**< */
+ uint8_t createMap; /**< */
+ uint8_t pad1; /**< */
+ uint8_t map_flags; /**< */
+ uint8_t map_whichGroups; /**< */
+ uint8_t map_groups; /**< */
+ uint8_t map_whichMods; /**< */
+ uint8_t map_realMods; /**< */
+ uint16_t map_vmods; /**< */
+ uint32_t map_ctrls; /**< */
+} xcb_xkb_set_named_indicator_request_t;
+
+/**
+ * @brief xcb_xkb_get_names_cookie_t
+ **/
+typedef struct xcb_xkb_get_names_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_names_cookie_t;
+
+/** Opcode for xcb_xkb_get_names. */
+#define XCB_XKB_GET_NAMES 17
+
+/**
+ * @brief xcb_xkb_get_names_request_t
+ **/
+typedef struct xcb_xkb_get_names_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t pad0[2]; /**< */
+ uint32_t which; /**< */
+} xcb_xkb_get_names_request_t;
+
+/**
+ * @brief xcb_xkb_get_names_value_list_t
+ **/
+typedef struct xcb_xkb_get_names_value_list_t {
+ xcb_atom_t keycodesName; /**< */
+ xcb_atom_t geometryName; /**< */
+ xcb_atom_t symbolsName; /**< */
+ xcb_atom_t physSymbolsName; /**< */
+ xcb_atom_t typesName; /**< */
+ xcb_atom_t compatName; /**< */
+ xcb_atom_t *typeNames; /**< */
+ uint8_t *nLevelsPerType; /**< */
+ xcb_atom_t *ktLevelNames; /**< */
+ xcb_atom_t *indicatorNames; /**< */
+ xcb_atom_t *virtualModNames; /**< */
+ xcb_atom_t *groups; /**< */
+ xcb_xkb_key_name_t *keyNames; /**< */
+ xcb_xkb_key_alias_t *keyAliases; /**< */
+ xcb_atom_t *radioGroupNames; /**< */
+} xcb_xkb_get_names_value_list_t;
+
+/**
+ * @brief xcb_xkb_get_names_reply_t
+ **/
+typedef struct xcb_xkb_get_names_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint32_t which; /**< */
+ xcb_keycode_t minKeyCode; /**< */
+ xcb_keycode_t maxKeyCode; /**< */
+ uint8_t nTypes; /**< */
+ uint8_t groupNames; /**< */
+ uint16_t virtualMods; /**< */
+ xcb_keycode_t firstKey; /**< */
+ uint8_t nKeys; /**< */
+ uint32_t indicators; /**< */
+ uint8_t nRadioGroups; /**< */
+ uint8_t nKeyAliases; /**< */
+ uint16_t nKTLevels; /**< */
+ uint8_t pad0[4]; /**< */
+} xcb_xkb_get_names_reply_t;
+
+/**
+ * @brief xcb_xkb_set_names_values_t
+ **/
+typedef struct xcb_xkb_set_names_values_t {
+ xcb_atom_t keycodesName; /**< */
+ xcb_atom_t geometryName; /**< */
+ xcb_atom_t symbolsName; /**< */
+ xcb_atom_t physSymbolsName; /**< */
+ xcb_atom_t typesName; /**< */
+ xcb_atom_t compatName; /**< */
+ xcb_atom_t *typeNames; /**< */
+ uint8_t *nLevelsPerType; /**< */
+ xcb_atom_t *ktLevelNames; /**< */
+ xcb_atom_t *indicatorNames; /**< */
+ xcb_atom_t *virtualModNames; /**< */
+ xcb_atom_t *groups; /**< */
+ xcb_xkb_key_name_t *keyNames; /**< */
+ xcb_xkb_key_alias_t *keyAliases; /**< */
+ xcb_atom_t *radioGroupNames; /**< */
+} xcb_xkb_set_names_values_t;
+
+/** Opcode for xcb_xkb_set_names. */
+#define XCB_XKB_SET_NAMES 18
+
+/**
+ * @brief xcb_xkb_set_names_request_t
+ **/
+typedef struct xcb_xkb_set_names_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint16_t virtualMods; /**< */
+ uint32_t which; /**< */
+ uint8_t firstType; /**< */
+ uint8_t nTypes; /**< */
+ uint8_t firstKTLevelt; /**< */
+ uint8_t nKTLevels; /**< */
+ uint32_t indicators; /**< */
+ uint8_t groupNames; /**< */
+ uint8_t nRadioGroups; /**< */
+ xcb_keycode_t firstKey; /**< */
+ uint8_t nKeys; /**< */
+ uint8_t nKeyAliases; /**< */
+ uint8_t pad0; /**< */
+ uint16_t totalKTLevelNames; /**< */
+} xcb_xkb_set_names_request_t;
+
+/**
+ * @brief xcb_xkb_get_geometry_cookie_t
+ **/
+typedef struct xcb_xkb_get_geometry_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_geometry_cookie_t;
+
+/** Opcode for xcb_xkb_get_geometry. */
+#define XCB_XKB_GET_GEOMETRY 19
+
+/**
+ * @brief xcb_xkb_get_geometry_request_t
+ **/
+typedef struct xcb_xkb_get_geometry_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t pad0[2]; /**< */
+ xcb_atom_t name; /**< */
+} xcb_xkb_get_geometry_request_t;
+
+/**
+ * @brief xcb_xkb_get_geometry_reply_t
+ **/
+typedef struct xcb_xkb_get_geometry_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ xcb_atom_t name; /**< */
+ uint8_t found; /**< */
+ uint8_t pad0; /**< */
+ uint16_t widthMM; /**< */
+ uint16_t heightMM; /**< */
+ uint16_t nProperties; /**< */
+ uint16_t nColors; /**< */
+ uint16_t nShapes; /**< */
+ uint16_t nSections; /**< */
+ uint16_t nDoodads; /**< */
+ uint16_t nKeyAliases; /**< */
+ uint8_t baseColorNdx; /**< */
+ uint8_t labelColorNdx; /**< */
+} xcb_xkb_get_geometry_reply_t;
+
+/** Opcode for xcb_xkb_set_geometry. */
+#define XCB_XKB_SET_GEOMETRY 20
+
+/**
+ * @brief xcb_xkb_set_geometry_request_t
+ **/
+typedef struct xcb_xkb_set_geometry_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t nShapes; /**< */
+ uint8_t nSections; /**< */
+ xcb_atom_t name; /**< */
+ uint16_t widthMM; /**< */
+ uint16_t heightMM; /**< */
+ uint16_t nProperties; /**< */
+ uint16_t nColors; /**< */
+ uint16_t nDoodads; /**< */
+ uint16_t nKeyAliases; /**< */
+ uint8_t baseColorNdx; /**< */
+ uint8_t labelColorNdx; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_set_geometry_request_t;
+
+/**
+ * @brief xcb_xkb_per_client_flags_cookie_t
+ **/
+typedef struct xcb_xkb_per_client_flags_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_per_client_flags_cookie_t;
+
+/** Opcode for xcb_xkb_per_client_flags. */
+#define XCB_XKB_PER_CLIENT_FLAGS 21
+
+/**
+ * @brief xcb_xkb_per_client_flags_request_t
+ **/
+typedef struct xcb_xkb_per_client_flags_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t pad0[2]; /**< */
+ uint32_t change; /**< */
+ uint32_t value; /**< */
+ uint32_t ctrlsToChange; /**< */
+ uint32_t autoCtrls; /**< */
+ uint32_t autoCtrlsValues; /**< */
+} xcb_xkb_per_client_flags_request_t;
+
+/**
+ * @brief xcb_xkb_per_client_flags_reply_t
+ **/
+typedef struct xcb_xkb_per_client_flags_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint32_t supported; /**< */
+ uint32_t value; /**< */
+ uint32_t autoCtrls; /**< */
+ uint32_t autoCtrlsValues; /**< */
+ uint8_t pad0[8]; /**< */
+} xcb_xkb_per_client_flags_reply_t;
+
+/**
+ * @brief xcb_xkb_list_components_cookie_t
+ **/
+typedef struct xcb_xkb_list_components_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_list_components_cookie_t;
+
+/** Opcode for xcb_xkb_list_components. */
+#define XCB_XKB_LIST_COMPONENTS 22
+
+/**
+ * @brief xcb_xkb_list_components_request_t
+ **/
+typedef struct xcb_xkb_list_components_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint16_t maxNames; /**< */
+ uint8_t keymapsSpecLen; /**< */
+ uint8_t keycodesSpecLen; /**< */
+ uint8_t typesSpecLen; /**< */
+ uint8_t compatMapSpecLen; /**< */
+ uint8_t symbolsSpecLen; /**< */
+ uint8_t geometrySpecLen; /**< */
+} xcb_xkb_list_components_request_t;
+
+/**
+ * @brief xcb_xkb_list_components_reply_t
+ **/
+typedef struct xcb_xkb_list_components_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint16_t nKeymaps; /**< */
+ uint16_t nKeycodes; /**< */
+ uint16_t nTypes; /**< */
+ uint16_t nCompatMaps; /**< */
+ uint16_t nSymbols; /**< */
+ uint16_t nGeometries; /**< */
+ uint16_t extra; /**< */
+ uint8_t pad0[10]; /**< */
+} xcb_xkb_list_components_reply_t;
+
+/**
+ * @brief xcb_xkb_get_kbd_by_name_cookie_t
+ **/
+typedef struct xcb_xkb_get_kbd_by_name_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_kbd_by_name_cookie_t;
+
+/** Opcode for xcb_xkb_get_kbd_by_name. */
+#define XCB_XKB_GET_KBD_BY_NAME 23
+
+/**
+ * @brief xcb_xkb_get_kbd_by_name_request_t
+ **/
+typedef struct xcb_xkb_get_kbd_by_name_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint16_t need; /**< */
+ uint16_t want; /**< */
+ uint8_t load; /**< */
+ uint8_t pad0; /**< */
+ uint8_t keymapsSpecLen; /**< */
+ uint8_t keycodesSpecLen; /**< */
+ uint8_t typesSpecLen; /**< */
+ uint8_t compatMapSpecLen; /**< */
+ uint8_t symbolsSpecLen; /**< */
+ uint8_t geometrySpecLen; /**< */
+} xcb_xkb_get_kbd_by_name_request_t;
+
+/**
+ * @brief xcb_xkb_get_kbd_by_name_replies_types_map_t
+ **/
+typedef struct xcb_xkb_get_kbd_by_name_replies_types_map_t {
+ xcb_xkb_key_type_t *types_rtrn; /**< */
+ xcb_xkb_key_sym_map_t *syms_rtrn; /**< */
+ uint8_t *acts_rtrn_count; /**< */
+ xcb_xkb_action_t *acts_rtrn_acts; /**< */
+ xcb_xkb_set_behavior_t *behaviors_rtrn; /**< */
+ uint8_t *vmods_rtrn; /**< */
+ xcb_xkb_set_explicit_t *explicit_rtrn; /**< */
+ xcb_xkb_key_mod_map_t *modmap_rtrn; /**< */
+ xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; /**< */
+} xcb_xkb_get_kbd_by_name_replies_types_map_t;
+
+/**
+ * @brief xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t
+ **/
+typedef struct xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t {
+ xcb_xkb_key_type_t *types_rtrn; /**< */
+ xcb_xkb_key_sym_map_t *syms_rtrn; /**< */
+ uint8_t *acts_rtrn_count; /**< */
+ xcb_xkb_action_t *acts_rtrn_acts; /**< */
+ xcb_xkb_set_behavior_t *behaviors_rtrn; /**< */
+ uint8_t *vmods_rtrn; /**< */
+ xcb_xkb_set_explicit_t *explicit_rtrn; /**< */
+ xcb_xkb_key_mod_map_t *modmap_rtrn; /**< */
+ xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; /**< */
+} xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t;
+
+/**
+ * @brief xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t
+ **/
+typedef struct xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t {
+ xcb_xkb_key_type_t *types_rtrn; /**< */
+ xcb_xkb_key_sym_map_t *syms_rtrn; /**< */
+ uint8_t *acts_rtrn_count; /**< */
+ xcb_xkb_action_t *acts_rtrn_acts; /**< */
+ xcb_xkb_set_behavior_t *behaviors_rtrn; /**< */
+ uint8_t *vmods_rtrn; /**< */
+ xcb_xkb_set_explicit_t *explicit_rtrn; /**< */
+ xcb_xkb_key_mod_map_t *modmap_rtrn; /**< */
+ xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; /**< */
+} xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t;
+
+/**
+ * @brief xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t
+ **/
+typedef struct xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t {
+ xcb_atom_t keycodesName; /**< */
+ xcb_atom_t geometryName; /**< */
+ xcb_atom_t symbolsName; /**< */
+ xcb_atom_t physSymbolsName; /**< */
+ xcb_atom_t typesName; /**< */
+ xcb_atom_t compatName; /**< */
+ xcb_atom_t *typeNames; /**< */
+ uint8_t *nLevelsPerType; /**< */
+ xcb_atom_t *ktLevelNames; /**< */
+ xcb_atom_t *indicatorNames; /**< */
+ xcb_atom_t *virtualModNames; /**< */
+ xcb_atom_t *groups; /**< */
+ xcb_xkb_key_name_t *keyNames; /**< */
+ xcb_xkb_key_alias_t *keyAliases; /**< */
+ xcb_atom_t *radioGroupNames; /**< */
+} xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t;
+
+/**
+ * @brief xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t
+ **/
+typedef struct xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t {
+ xcb_atom_t keycodesName; /**< */
+ xcb_atom_t geometryName; /**< */
+ xcb_atom_t symbolsName; /**< */
+ xcb_atom_t physSymbolsName; /**< */
+ xcb_atom_t typesName; /**< */
+ xcb_atom_t compatName; /**< */
+ xcb_atom_t *typeNames; /**< */
+ uint8_t *nLevelsPerType; /**< */
+ xcb_atom_t *ktLevelNames; /**< */
+ xcb_atom_t *indicatorNames; /**< */
+ xcb_atom_t *virtualModNames; /**< */
+ xcb_atom_t *groups; /**< */
+ xcb_xkb_key_name_t *keyNames; /**< */
+ xcb_xkb_key_alias_t *keyAliases; /**< */
+ xcb_atom_t *radioGroupNames; /**< */
+} xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t;
+
+/**
+ * @brief xcb_xkb_get_kbd_by_name_replies_t
+ **/
+typedef struct xcb_xkb_get_kbd_by_name_replies_t {
+ struct _types {
+ uint8_t getmap_type; /**< */
+ uint8_t typeDeviceID; /**< */
+ uint16_t getmap_sequence; /**< */
+ uint32_t getmap_length; /**< */
+ uint8_t pad0[2]; /**< */
+ xcb_keycode_t typeMinKeyCode; /**< */
+ xcb_keycode_t typeMaxKeyCode; /**< */
+ uint16_t present; /**< */
+ uint8_t firstType; /**< */
+ uint8_t nTypes; /**< */
+ uint8_t totalTypes; /**< */
+ xcb_keycode_t firstKeySym; /**< */
+ uint16_t totalSyms; /**< */
+ uint8_t nKeySyms; /**< */
+ xcb_keycode_t firstKeyAction; /**< */
+ uint16_t totalActions; /**< */
+ uint8_t nKeyActions; /**< */
+ xcb_keycode_t firstKeyBehavior; /**< */
+ uint8_t nKeyBehaviors; /**< */
+ uint8_t totalKeyBehaviors; /**< */
+ xcb_keycode_t firstKeyExplicit; /**< */
+ uint8_t nKeyExplicit; /**< */
+ uint8_t totalKeyExplicit; /**< */
+ xcb_keycode_t firstModMapKey; /**< */
+ uint8_t nModMapKeys; /**< */
+ uint8_t totalModMapKeys; /**< */
+ xcb_keycode_t firstVModMapKey; /**< */
+ uint8_t nVModMapKeys; /**< */
+ uint8_t totalVModMapKeys; /**< */
+ uint8_t pad1; /**< */
+ uint16_t virtualMods; /**< */
+ xcb_xkb_get_kbd_by_name_replies_types_map_t map; /**< */
+ } types;
+ struct _compat_map {
+ uint8_t compatDeviceID; /**< */
+ uint8_t groupsRtrn; /**< */
+ uint8_t pad0; /**< */
+ uint16_t firstSIRtrn; /**< */
+ uint16_t nSIRtrn; /**< */
+ uint16_t nTotalSI; /**< */
+ uint8_t pad1[16]; /**< */
+ uint8_t *si_rtrn; /**< */
+ xcb_xkb_mod_def_t *group_rtrn; /**< */
+ } compat_map;
+ struct _client_symbols {
+ uint8_t clientDeviceID; /**< */
+ uint8_t pad0[2]; /**< */
+ xcb_keycode_t clientMinKeyCode; /**< */
+ xcb_keycode_t clientMaxKeyCode; /**< */
+ uint16_t present; /**< */
+ uint8_t firstType; /**< */
+ uint8_t nTypes; /**< */
+ uint8_t totalTypes; /**< */
+ xcb_keycode_t firstKeySym; /**< */
+ uint16_t totalSyms; /**< */
+ uint8_t nKeySyms; /**< */
+ xcb_keycode_t firstKeyAction; /**< */
+ uint16_t totalActions; /**< */
+ uint8_t nKeyActions; /**< */
+ xcb_keycode_t firstKeyBehavior; /**< */
+ uint8_t nKeyBehaviors; /**< */
+ uint8_t totalKeyBehaviors; /**< */
+ xcb_keycode_t firstKeyExplicit; /**< */
+ uint8_t nKeyExplicit; /**< */
+ uint8_t totalKeyExplicit; /**< */
+ xcb_keycode_t firstModMapKey; /**< */
+ uint8_t nModMapKeys; /**< */
+ uint8_t totalModMapKeys; /**< */
+ xcb_keycode_t firstVModMapKey; /**< */
+ uint8_t nVModMapKeys; /**< */
+ uint8_t totalVModMapKeys; /**< */
+ uint8_t pad1; /**< */
+ uint16_t virtualMods; /**< */
+ xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t map; /**< */
+ } client_symbols;
+ struct _server_symbols {
+ uint8_t serverDeviceID; /**< */
+ uint8_t pad0[2]; /**< */
+ xcb_keycode_t serverMinKeyCode; /**< */
+ xcb_keycode_t serverMaxKeyCode; /**< */
+ uint16_t present; /**< */
+ uint8_t firstType; /**< */
+ uint8_t nTypes; /**< */
+ uint8_t totalTypes; /**< */
+ xcb_keycode_t firstKeySym; /**< */
+ uint16_t totalSyms; /**< */
+ uint8_t nKeySyms; /**< */
+ xcb_keycode_t firstKeyAction; /**< */
+ uint16_t totalActions; /**< */
+ uint8_t nKeyActions; /**< */
+ xcb_keycode_t firstKeyBehavior; /**< */
+ uint8_t nKeyBehaviors; /**< */
+ uint8_t totalKeyBehaviors; /**< */
+ xcb_keycode_t firstKeyExplicit; /**< */
+ uint8_t nKeyExplicit; /**< */
+ uint8_t totalKeyExplicit; /**< */
+ xcb_keycode_t firstModMapKey; /**< */
+ uint8_t nModMapKeys; /**< */
+ uint8_t totalModMapKeys; /**< */
+ xcb_keycode_t firstVModMapKey; /**< */
+ uint8_t nVModMapKeys; /**< */
+ uint8_t totalVModMapKeys; /**< */
+ uint8_t pad1; /**< */
+ uint16_t virtualMods; /**< */
+ xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t map; /**< */
+ } server_symbols;
+ struct _indicator_maps {
+ uint8_t indicatorDeviceID; /**< */
+ uint32_t which; /**< */
+ uint32_t realIndicators; /**< */
+ uint8_t nIndicators; /**< */
+ uint8_t pad0[15]; /**< */
+ xcb_xkb_indicator_map_t *maps; /**< */
+ } indicator_maps;
+ struct _key_names {
+ uint8_t keyDeviceID; /**< */
+ uint32_t which; /**< */
+ xcb_keycode_t keyMinKeyCode; /**< */
+ xcb_keycode_t keyMaxKeyCode; /**< */
+ uint8_t nTypes; /**< */
+ uint8_t groupNames; /**< */
+ uint16_t virtualMods; /**< */
+ xcb_keycode_t firstKey; /**< */
+ uint8_t nKeys; /**< */
+ uint32_t indicators; /**< */
+ uint8_t nRadioGroups; /**< */
+ uint8_t nKeyAliases; /**< */
+ uint16_t nKTLevels; /**< */
+ uint8_t pad0[4]; /**< */
+ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t valueList; /**< */
+ } key_names;
+ struct _other_names {
+ uint8_t otherDeviceID; /**< */
+ uint32_t which; /**< */
+ xcb_keycode_t otherMinKeyCode; /**< */
+ xcb_keycode_t otherMaxKeyCode; /**< */
+ uint8_t nTypes; /**< */
+ uint8_t groupNames; /**< */
+ uint16_t virtualMods; /**< */
+ xcb_keycode_t firstKey; /**< */
+ uint8_t nKeys; /**< */
+ uint32_t indicators; /**< */
+ uint8_t nRadioGroups; /**< */
+ uint8_t nKeyAliases; /**< */
+ uint16_t nKTLevels; /**< */
+ uint8_t pad0[4]; /**< */
+ xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t valueList; /**< */
+ } other_names;
+ struct _geometry {
+ uint8_t geometryDeviceID; /**< */
+ xcb_atom_t name; /**< */
+ uint8_t geometryFound; /**< */
+ uint8_t pad0; /**< */
+ uint16_t widthMM; /**< */
+ uint16_t heightMM; /**< */
+ uint16_t nProperties; /**< */
+ uint16_t nColors; /**< */
+ uint16_t nShapes; /**< */
+ uint16_t nSections; /**< */
+ uint16_t nDoodads; /**< */
+ uint16_t nKeyAliases; /**< */
+ uint8_t baseColorNdx; /**< */
+ uint8_t labelColorNdx; /**< */
+ xcb_xkb_counted_string_16_t *labelFont; /**< */
+ xcb_xkb_property_t *properties; /**< */
+ xcb_xkb_counted_string_16_t *colors; /**< */
+ xcb_xkb_shape_t *shapes; /**< */
+ xcb_xkb_section_t *sections; /**< */
+ xcb_xkb_doodad_t *doodads; /**< */
+ xcb_xkb_key_alias_t *keyAliases; /**< */
+ } geometry;
+} xcb_xkb_get_kbd_by_name_replies_t;
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_types_map_t * xcb_xkb_get_kbd_by_name_replies_types_map
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_types_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_types_map_t *
+xcb_xkb_get_kbd_by_name_replies_types_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */);
+
+/**
+ * @brief xcb_xkb_get_kbd_by_name_reply_t
+ **/
+typedef struct xcb_xkb_get_kbd_by_name_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ xcb_keycode_t minKeyCode; /**< */
+ xcb_keycode_t maxKeyCode; /**< */
+ uint8_t loaded; /**< */
+ uint8_t newKeyboard; /**< */
+ uint16_t found; /**< */
+ uint16_t reported; /**< */
+ uint8_t pad0[16]; /**< */
+} xcb_xkb_get_kbd_by_name_reply_t;
+
+/**
+ * @brief xcb_xkb_get_device_info_cookie_t
+ **/
+typedef struct xcb_xkb_get_device_info_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_get_device_info_cookie_t;
+
+/** Opcode for xcb_xkb_get_device_info. */
+#define XCB_XKB_GET_DEVICE_INFO 24
+
+/**
+ * @brief xcb_xkb_get_device_info_request_t
+ **/
+typedef struct xcb_xkb_get_device_info_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint16_t wanted; /**< */
+ uint8_t allButtons; /**< */
+ uint8_t firstButton; /**< */
+ uint8_t nButtons; /**< */
+ uint8_t pad0; /**< */
+ xcb_xkb_led_class_spec_t ledClass; /**< */
+ xcb_xkb_id_spec_t ledID; /**< */
+} xcb_xkb_get_device_info_request_t;
+
+/**
+ * @brief xcb_xkb_get_device_info_reply_t
+ **/
+typedef struct xcb_xkb_get_device_info_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t deviceID; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint16_t present; /**< */
+ uint16_t supported; /**< */
+ uint16_t unsupported; /**< */
+ uint16_t nDeviceLedFBs; /**< */
+ uint8_t firstBtnWanted; /**< */
+ uint8_t nBtnsWanted; /**< */
+ uint8_t firstBtnRtrn; /**< */
+ uint8_t nBtnsRtrn; /**< */
+ uint8_t totalBtns; /**< */
+ uint8_t hasOwnState; /**< */
+ uint16_t dfltKbdFB; /**< */
+ uint16_t dfltLedFB; /**< */
+ uint8_t pad0[2]; /**< */
+ xcb_atom_t devType; /**< */
+ uint16_t nameLen; /**< */
+} xcb_xkb_get_device_info_reply_t;
+
+/** Opcode for xcb_xkb_set_device_info. */
+#define XCB_XKB_SET_DEVICE_INFO 25
+
+/**
+ * @brief xcb_xkb_set_device_info_request_t
+ **/
+typedef struct xcb_xkb_set_device_info_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ xcb_xkb_device_spec_t deviceSpec; /**< */
+ uint8_t firstBtn; /**< */
+ uint8_t nBtns; /**< */
+ uint16_t change; /**< */
+ uint16_t nDeviceLedFBs; /**< */
+} xcb_xkb_set_device_info_request_t;
+
+/**
+ * @brief xcb_xkb_set_debugging_flags_cookie_t
+ **/
+typedef struct xcb_xkb_set_debugging_flags_cookie_t {
+ unsigned int sequence; /**< */
+} xcb_xkb_set_debugging_flags_cookie_t;
+
+/** Opcode for xcb_xkb_set_debugging_flags. */
+#define XCB_XKB_SET_DEBUGGING_FLAGS 101
+
+/**
+ * @brief xcb_xkb_set_debugging_flags_request_t
+ **/
+typedef struct xcb_xkb_set_debugging_flags_request_t {
+ uint8_t major_opcode; /**< */
+ uint8_t minor_opcode; /**< */
+ uint16_t length; /**< */
+ uint16_t msgLength; /**< */
+ uint8_t pad0[2]; /**< */
+ uint32_t affectFlags; /**< */
+ uint32_t flags; /**< */
+ uint32_t affectCtrls; /**< */
+ uint32_t ctrls; /**< */
+} xcb_xkb_set_debugging_flags_request_t;
+
+/**
+ * @brief xcb_xkb_set_debugging_flags_reply_t
+ **/
+typedef struct xcb_xkb_set_debugging_flags_reply_t {
+ uint8_t response_type; /**< */
+ uint8_t pad0; /**< */
+ uint16_t sequence; /**< */
+ uint32_t length; /**< */
+ uint32_t currentFlags; /**< */
+ uint32_t currentCtrls; /**< */
+ uint32_t supportedFlags; /**< */
+ uint32_t supportedCtrls; /**< */
+ uint8_t pad1[8]; /**< */
+} xcb_xkb_set_debugging_flags_reply_t;
+
+/** Opcode for xcb_xkb_new_keyboard_notify. */
+#define XCB_XKB_NEW_KEYBOARD_NOTIFY 0
+
+/**
+ * @brief xcb_xkb_new_keyboard_notify_event_t
+ **/
+typedef struct xcb_xkb_new_keyboard_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t oldDeviceID; /**< */
+ xcb_keycode_t minKeyCode; /**< */
+ xcb_keycode_t maxKeyCode; /**< */
+ xcb_keycode_t oldMinKeyCode; /**< */
+ xcb_keycode_t oldMaxKeyCode; /**< */
+ uint8_t requestMajor; /**< */
+ uint8_t requestMinor; /**< */
+ uint16_t changed; /**< */
+ uint8_t pad0[14]; /**< */
+} xcb_xkb_new_keyboard_notify_event_t;
+
+/** Opcode for xcb_xkb_map_notify. */
+#define XCB_XKB_MAP_NOTIFY 1
+
+/**
+ * @brief xcb_xkb_map_notify_event_t
+ **/
+typedef struct xcb_xkb_map_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t ptrBtnActions; /**< */
+ uint16_t changed; /**< */
+ xcb_keycode_t minKeyCode; /**< */
+ xcb_keycode_t maxKeyCode; /**< */
+ uint8_t firstType; /**< */
+ uint8_t nTypes; /**< */
+ xcb_keycode_t firstKeySym; /**< */
+ uint8_t nKeySyms; /**< */
+ xcb_keycode_t firstKeyAct; /**< */
+ uint8_t nKeyActs; /**< */
+ xcb_keycode_t firstKeyBehavior; /**< */
+ uint8_t nKeyBehavior; /**< */
+ xcb_keycode_t firstKeyExplicit; /**< */
+ uint8_t nKeyExplicit; /**< */
+ xcb_keycode_t firstModMapKey; /**< */
+ uint8_t nModMapKeys; /**< */
+ xcb_keycode_t firstVModMapKey; /**< */
+ uint8_t nVModMapKeys; /**< */
+ uint16_t virtualMods; /**< */
+ uint8_t pad0[2]; /**< */
+} xcb_xkb_map_notify_event_t;
+
+/** Opcode for xcb_xkb_state_notify. */
+#define XCB_XKB_STATE_NOTIFY 2
+
+/**
+ * @brief xcb_xkb_state_notify_event_t
+ **/
+typedef struct xcb_xkb_state_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t mods; /**< */
+ uint8_t baseMods; /**< */
+ uint8_t latchedMods; /**< */
+ uint8_t lockedMods; /**< */
+ uint8_t group; /**< */
+ int16_t baseGroup; /**< */
+ int16_t latchedGroup; /**< */
+ uint8_t lockedGroup; /**< */
+ uint8_t compatState; /**< */
+ uint8_t grabMods; /**< */
+ uint8_t compatGrabMods; /**< */
+ uint8_t lookupMods; /**< */
+ uint8_t compatLoockupMods; /**< */
+ uint16_t ptrBtnState; /**< */
+ uint16_t changed; /**< */
+ xcb_keycode_t keycode; /**< */
+ uint8_t eventType; /**< */
+ uint8_t requestMajor; /**< */
+ uint8_t requestMinor; /**< */
+} xcb_xkb_state_notify_event_t;
+
+/** Opcode for xcb_xkb_controls_notify. */
+#define XCB_XKB_CONTROLS_NOTIFY 3
+
+/**
+ * @brief xcb_xkb_controls_notify_event_t
+ **/
+typedef struct xcb_xkb_controls_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t numGroups; /**< */
+ uint8_t pad0[2]; /**< */
+ uint32_t changedControls; /**< */
+ uint32_t enabledControls; /**< */
+ uint32_t enabledControlChanges; /**< */
+ xcb_keycode_t keycode; /**< */
+ uint8_t eventType; /**< */
+ uint8_t requestMajor; /**< */
+ uint8_t requestMinor; /**< */
+ uint8_t pad1[4]; /**< */
+} xcb_xkb_controls_notify_event_t;
+
+/** Opcode for xcb_xkb_indicator_state_notify. */
+#define XCB_XKB_INDICATOR_STATE_NOTIFY 4
+
+/**
+ * @brief xcb_xkb_indicator_state_notify_event_t
+ **/
+typedef struct xcb_xkb_indicator_state_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t pad0[3]; /**< */
+ uint32_t state; /**< */
+ uint32_t stateChanged; /**< */
+ uint8_t pad1[12]; /**< */
+} xcb_xkb_indicator_state_notify_event_t;
+
+/** Opcode for xcb_xkb_indicator_map_notify. */
+#define XCB_XKB_INDICATOR_MAP_NOTIFY 5
+
+/**
+ * @brief xcb_xkb_indicator_map_notify_event_t
+ **/
+typedef struct xcb_xkb_indicator_map_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t pad0[3]; /**< */
+ uint32_t state; /**< */
+ uint32_t mapChanged; /**< */
+ uint8_t pad1[12]; /**< */
+} xcb_xkb_indicator_map_notify_event_t;
+
+/** Opcode for xcb_xkb_names_notify. */
+#define XCB_XKB_NAMES_NOTIFY 6
+
+/**
+ * @brief xcb_xkb_names_notify_event_t
+ **/
+typedef struct xcb_xkb_names_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t pad0; /**< */
+ uint16_t changed; /**< */
+ uint8_t firstType; /**< */
+ uint8_t nTypes; /**< */
+ uint8_t firstLevelName; /**< */
+ uint8_t nLevelNames; /**< */
+ uint8_t pad1; /**< */
+ uint8_t nRadioGroups; /**< */
+ uint8_t nKeyAliases; /**< */
+ uint8_t changedGroupNames; /**< */
+ uint16_t changedVirtualMods; /**< */
+ xcb_keycode_t firstKey; /**< */
+ uint8_t nKeys; /**< */
+ uint32_t changedIndicators; /**< */
+ uint8_t pad2[4]; /**< */
+} xcb_xkb_names_notify_event_t;
+
+/** Opcode for xcb_xkb_compat_map_notify. */
+#define XCB_XKB_COMPAT_MAP_NOTIFY 7
+
+/**
+ * @brief xcb_xkb_compat_map_notify_event_t
+ **/
+typedef struct xcb_xkb_compat_map_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t changedGroups; /**< */
+ uint16_t firstSI; /**< */
+ uint16_t nSI; /**< */
+ uint16_t nTotalSI; /**< */
+ uint8_t pad0[16]; /**< */
+} xcb_xkb_compat_map_notify_event_t;
+
+/** Opcode for xcb_xkb_bell_notify. */
+#define XCB_XKB_BELL_NOTIFY 8
+
+/**
+ * @brief xcb_xkb_bell_notify_event_t
+ **/
+typedef struct xcb_xkb_bell_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t bellClass; /**< */
+ uint8_t bellID; /**< */
+ uint8_t percent; /**< */
+ uint16_t pitch; /**< */
+ uint16_t duration; /**< */
+ xcb_atom_t name; /**< */
+ xcb_window_t window; /**< */
+ uint8_t eventOnly; /**< */
+ uint8_t pad0[7]; /**< */
+} xcb_xkb_bell_notify_event_t;
+
+/** Opcode for xcb_xkb_action_message. */
+#define XCB_XKB_ACTION_MESSAGE 9
+
+/**
+ * @brief xcb_xkb_action_message_event_t
+ **/
+typedef struct xcb_xkb_action_message_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ xcb_keycode_t keycode; /**< */
+ uint8_t press; /**< */
+ uint8_t keyEventFollows; /**< */
+ uint8_t mods; /**< */
+ uint8_t group; /**< */
+ xcb_xkb_string8_t message[8]; /**< */
+ uint8_t pad0[10]; /**< */
+} xcb_xkb_action_message_event_t;
+
+/** Opcode for xcb_xkb_access_x_notify. */
+#define XCB_XKB_ACCESS_X_NOTIFY 10
+
+/**
+ * @brief xcb_xkb_access_x_notify_event_t
+ **/
+typedef struct xcb_xkb_access_x_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ xcb_keycode_t keycode; /**< */
+ uint16_t detailt; /**< */
+ uint16_t slowKeysDelay; /**< */
+ uint16_t debounceDelay; /**< */
+ uint8_t pad0[16]; /**< */
+} xcb_xkb_access_x_notify_event_t;
+
+/** Opcode for xcb_xkb_extension_device_notify. */
+#define XCB_XKB_EXTENSION_DEVICE_NOTIFY 11
+
+/**
+ * @brief xcb_xkb_extension_device_notify_event_t
+ **/
+typedef struct xcb_xkb_extension_device_notify_event_t {
+ uint8_t response_type; /**< */
+ uint8_t xkbType; /**< */
+ uint16_t sequence; /**< */
+ xcb_timestamp_t time; /**< */
+ uint8_t deviceID; /**< */
+ uint8_t pad0; /**< */
+ uint16_t reason; /**< */
+ uint16_t ledClass; /**< */
+ uint8_t ledID; /**< */
+ uint32_t ledsDefined; /**< */
+ uint32_t ledState; /**< */
+ uint8_t firstButton; /**< */
+ uint8_t nButtons; /**< */
+ uint16_t supported; /**< */
+ uint16_t unsupported; /**< */
+ uint8_t pad1[2]; /**< */
+} xcb_xkb_extension_device_notify_event_t;
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_ax_option_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_ax_option_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_ax_option_next
+ **
+ ** @param xcb_xkb_ax_option_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_ax_option_next (xcb_xkb_ax_option_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_ax_option_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_ax_option_end
+ **
+ ** @param xcb_xkb_ax_option_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_ax_option_end (xcb_xkb_ax_option_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_device_spec_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_device_spec_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_device_spec_next
+ **
+ ** @param xcb_xkb_device_spec_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_device_spec_next (xcb_xkb_device_spec_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_device_spec_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_device_spec_end
+ **
+ ** @param xcb_xkb_device_spec_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_device_spec_end (xcb_xkb_device_spec_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_led_class_spec_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_led_class_spec_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_led_class_spec_next
+ **
+ ** @param xcb_xkb_led_class_spec_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_led_class_spec_next (xcb_xkb_led_class_spec_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_led_class_spec_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_led_class_spec_end
+ **
+ ** @param xcb_xkb_led_class_spec_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_led_class_spec_end (xcb_xkb_led_class_spec_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_bell_class_spec_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_bell_class_spec_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_bell_class_spec_next
+ **
+ ** @param xcb_xkb_bell_class_spec_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_bell_class_spec_next (xcb_xkb_bell_class_spec_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_bell_class_spec_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_bell_class_spec_end
+ **
+ ** @param xcb_xkb_bell_class_spec_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_bell_class_spec_end (xcb_xkb_bell_class_spec_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_id_spec_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_id_spec_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_id_spec_next
+ **
+ ** @param xcb_xkb_id_spec_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_id_spec_next (xcb_xkb_id_spec_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_id_spec_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_id_spec_end
+ **
+ ** @param xcb_xkb_id_spec_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_id_spec_end (xcb_xkb_id_spec_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_indicator_map_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_indicator_map_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_indicator_map_next
+ **
+ ** @param xcb_xkb_indicator_map_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_indicator_map_next (xcb_xkb_indicator_map_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_indicator_map_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_indicator_map_end
+ **
+ ** @param xcb_xkb_indicator_map_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_indicator_map_end (xcb_xkb_indicator_map_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_mod_def_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_mod_def_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_mod_def_next
+ **
+ ** @param xcb_xkb_mod_def_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_mod_def_next (xcb_xkb_mod_def_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_mod_def_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_mod_def_end
+ **
+ ** @param xcb_xkb_mod_def_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_mod_def_end (xcb_xkb_mod_def_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_key_name_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_key_name_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_name_next
+ **
+ ** @param xcb_xkb_key_name_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_name_next (xcb_xkb_key_name_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_key_name_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_name_end
+ **
+ ** @param xcb_xkb_key_name_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_name_end (xcb_xkb_key_name_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_key_alias_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_key_alias_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_alias_next
+ **
+ ** @param xcb_xkb_key_alias_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_alias_next (xcb_xkb_key_alias_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_key_alias_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_alias_end
+ **
+ ** @param xcb_xkb_key_alias_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_alias_end (xcb_xkb_key_alias_iterator_t i /**< */);
+
+int
+xcb_xkb_counted_string_8_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_counted_string_8_string
+ **
+ ** @param const xcb_xkb_counted_string_8_t *R
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_counted_string_8_string (const xcb_xkb_counted_string_8_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_counted_string_8_string_length
+ **
+ ** @param const xcb_xkb_counted_string_8_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_counted_string_8_string_length (const xcb_xkb_counted_string_8_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_8_string_end
+ **
+ ** @param const xcb_xkb_counted_string_8_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_counted_string_8_string_end (const xcb_xkb_counted_string_8_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_counted_string_8_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_counted_string_8_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_counted_string_8_next
+ **
+ ** @param xcb_xkb_counted_string_8_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_counted_string_8_next (xcb_xkb_counted_string_8_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_counted_string_8_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_8_end
+ **
+ ** @param xcb_xkb_counted_string_8_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_counted_string_8_end (xcb_xkb_counted_string_8_iterator_t i /**< */);
+
+int
+xcb_xkb_counted_string_16_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_counted_string_16_string
+ **
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_counted_string_16_string_length
+ **
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end
+ **
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_counted_string_16_string_end (const xcb_xkb_counted_string_16_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_counted_string_16_pad_0
+ **
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_counted_string_16_pad_0 (const xcb_xkb_counted_string_16_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_counted_string_16_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_counted_string_16_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_counted_string_16_next
+ **
+ ** @param xcb_xkb_counted_string_16_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_counted_string_16_next (xcb_xkb_counted_string_16_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_counted_string_16_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_16_end
+ **
+ ** @param xcb_xkb_counted_string_16_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_counted_string_16_end (xcb_xkb_counted_string_16_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_kt_map_entry_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_kt_map_entry_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_kt_map_entry_next
+ **
+ ** @param xcb_xkb_kt_map_entry_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_kt_map_entry_next (xcb_xkb_kt_map_entry_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_kt_map_entry_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_kt_map_entry_end
+ **
+ ** @param xcb_xkb_kt_map_entry_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_kt_map_entry_end (xcb_xkb_kt_map_entry_iterator_t i /**< */);
+
+int
+xcb_xkb_key_type_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_map_entry_t * xcb_xkb_key_type_map
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns xcb_xkb_kt_map_entry_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_map_entry_t *
+xcb_xkb_key_type_map (const xcb_xkb_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_key_type_map_length
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_key_type_map_length (const xcb_xkb_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_map_entry_iterator_t xcb_xkb_key_type_map_iterator
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns xcb_xkb_kt_map_entry_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_map_entry_iterator_t
+xcb_xkb_key_type_map_iterator (const xcb_xkb_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_t * xcb_xkb_key_type_preserve
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns xcb_xkb_mod_def_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_t *
+xcb_xkb_key_type_preserve (const xcb_xkb_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_key_type_preserve_length
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_key_type_preserve_length (const xcb_xkb_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_iterator_t xcb_xkb_key_type_preserve_iterator
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns xcb_xkb_mod_def_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_iterator_t
+xcb_xkb_key_type_preserve_iterator (const xcb_xkb_key_type_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_key_type_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_key_type_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_type_next
+ **
+ ** @param xcb_xkb_key_type_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_type_next (xcb_xkb_key_type_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_key_type_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_type_end
+ **
+ ** @param xcb_xkb_key_type_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_type_end (xcb_xkb_key_type_iterator_t i /**< */);
+
+int
+xcb_xkb_key_sym_map_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_keysym_t * xcb_xkb_key_sym_map_syms
+ **
+ ** @param const xcb_xkb_key_sym_map_t *R
+ ** @returns xcb_keysym_t *
+ **
+ *****************************************************************************/
+
+xcb_keysym_t *
+xcb_xkb_key_sym_map_syms (const xcb_xkb_key_sym_map_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_key_sym_map_syms_length
+ **
+ ** @param const xcb_xkb_key_sym_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_key_sym_map_syms_length (const xcb_xkb_key_sym_map_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_sym_map_syms_end
+ **
+ ** @param const xcb_xkb_key_sym_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_sym_map_syms_end (const xcb_xkb_key_sym_map_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_key_sym_map_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_key_sym_map_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_sym_map_next
+ **
+ ** @param xcb_xkb_key_sym_map_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_sym_map_next (xcb_xkb_key_sym_map_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_key_sym_map_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_sym_map_end
+ **
+ ** @param xcb_xkb_key_sym_map_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_sym_map_end (xcb_xkb_key_sym_map_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_common_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_common_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_common_behavior_next
+ **
+ ** @param xcb_xkb_common_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_common_behavior_next (xcb_xkb_common_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_common_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_common_behavior_end
+ **
+ ** @param xcb_xkb_common_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_common_behavior_end (xcb_xkb_common_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_default_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_default_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_default_behavior_next
+ **
+ ** @param xcb_xkb_default_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_default_behavior_next (xcb_xkb_default_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_default_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_default_behavior_end
+ **
+ ** @param xcb_xkb_default_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_default_behavior_end (xcb_xkb_default_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_lock_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_lock_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_lock_behavior_next
+ **
+ ** @param xcb_xkb_lock_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_lock_behavior_next (xcb_xkb_lock_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_lock_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_lock_behavior_end
+ **
+ ** @param xcb_xkb_lock_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_lock_behavior_end (xcb_xkb_lock_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_radio_group_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_radio_group_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_radio_group_behavior_next
+ **
+ ** @param xcb_xkb_radio_group_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_radio_group_behavior_next (xcb_xkb_radio_group_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_radio_group_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_radio_group_behavior_end
+ **
+ ** @param xcb_xkb_radio_group_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_radio_group_behavior_end (xcb_xkb_radio_group_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_overlay_1_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_overlay_1_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_1_behavior_next
+ **
+ ** @param xcb_xkb_overlay_1_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_1_behavior_next (xcb_xkb_overlay_1_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_overlay_1_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_1_behavior_end
+ **
+ ** @param xcb_xkb_overlay_1_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_1_behavior_end (xcb_xkb_overlay_1_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_overlay_2_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_overlay_2_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_2_behavior_next
+ **
+ ** @param xcb_xkb_overlay_2_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_2_behavior_next (xcb_xkb_overlay_2_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_overlay_2_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_2_behavior_end
+ **
+ ** @param xcb_xkb_overlay_2_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_2_behavior_end (xcb_xkb_overlay_2_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_permament_lock_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_permament_lock_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_permament_lock_behavior_next
+ **
+ ** @param xcb_xkb_permament_lock_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_permament_lock_behavior_next (xcb_xkb_permament_lock_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_permament_lock_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_permament_lock_behavior_end
+ **
+ ** @param xcb_xkb_permament_lock_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_permament_lock_behavior_end (xcb_xkb_permament_lock_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_permament_radio_group_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_permament_radio_group_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_permament_radio_group_behavior_next
+ **
+ ** @param xcb_xkb_permament_radio_group_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_permament_radio_group_behavior_next (xcb_xkb_permament_radio_group_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_permament_radio_group_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_permament_radio_group_behavior_end
+ **
+ ** @param xcb_xkb_permament_radio_group_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_permament_overlay_1_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_permament_overlay_1_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_permament_overlay_1_behavior_next
+ **
+ ** @param xcb_xkb_permament_overlay_1_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_permament_overlay_1_behavior_next (xcb_xkb_permament_overlay_1_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_permament_overlay_1_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_permament_overlay_1_behavior_end
+ **
+ ** @param xcb_xkb_permament_overlay_1_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_permament_overlay_1_behavior_end (xcb_xkb_permament_overlay_1_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_permament_overlay_2_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_permament_overlay_2_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_permament_overlay_2_behavior_next
+ **
+ ** @param xcb_xkb_permament_overlay_2_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_permament_overlay_2_behavior_next (xcb_xkb_permament_overlay_2_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_permament_overlay_2_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_permament_overlay_2_behavior_end
+ **
+ ** @param xcb_xkb_permament_overlay_2_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_permament_overlay_2_behavior_end (xcb_xkb_permament_overlay_2_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_behavior_next
+ **
+ ** @param xcb_xkb_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_behavior_next (xcb_xkb_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_behavior_end
+ **
+ ** @param xcb_xkb_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_behavior_end (xcb_xkb_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_set_behavior_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_set_behavior_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_set_behavior_next
+ **
+ ** @param xcb_xkb_set_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_set_behavior_next (xcb_xkb_set_behavior_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_set_behavior_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_behavior_end
+ **
+ ** @param xcb_xkb_set_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_behavior_end (xcb_xkb_set_behavior_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_set_explicit_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_set_explicit_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_set_explicit_next
+ **
+ ** @param xcb_xkb_set_explicit_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_set_explicit_next (xcb_xkb_set_explicit_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_set_explicit_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_explicit_end
+ **
+ ** @param xcb_xkb_set_explicit_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_explicit_end (xcb_xkb_set_explicit_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_key_mod_map_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_key_mod_map_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_mod_map_next
+ **
+ ** @param xcb_xkb_key_mod_map_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_mod_map_next (xcb_xkb_key_mod_map_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_key_mod_map_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_mod_map_end
+ **
+ ** @param xcb_xkb_key_mod_map_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_mod_map_end (xcb_xkb_key_mod_map_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_key_v_mod_map_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_key_v_mod_map_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_v_mod_map_next
+ **
+ ** @param xcb_xkb_key_v_mod_map_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_v_mod_map_next (xcb_xkb_key_v_mod_map_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_key_v_mod_map_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_v_mod_map_end
+ **
+ ** @param xcb_xkb_key_v_mod_map_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_v_mod_map_end (xcb_xkb_key_v_mod_map_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_kt_set_map_entry_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_kt_set_map_entry_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_kt_set_map_entry_next
+ **
+ ** @param xcb_xkb_kt_set_map_entry_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_kt_set_map_entry_next (xcb_xkb_kt_set_map_entry_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_kt_set_map_entry_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_kt_set_map_entry_end
+ **
+ ** @param xcb_xkb_kt_set_map_entry_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_kt_set_map_entry_end (xcb_xkb_kt_set_map_entry_iterator_t i /**< */);
+
+int
+xcb_xkb_set_key_type_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_entries
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns xcb_xkb_kt_set_map_entry_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_set_map_entry_t *
+xcb_xkb_set_key_type_entries (const xcb_xkb_set_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_key_type_entries_length
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_key_type_entries_length (const xcb_xkb_set_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_entries_iterator
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns xcb_xkb_kt_set_map_entry_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_set_map_entry_iterator_t
+xcb_xkb_set_key_type_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_preserve_entries
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns xcb_xkb_kt_set_map_entry_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_set_map_entry_t *
+xcb_xkb_set_key_type_preserve_entries (const xcb_xkb_set_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_key_type_preserve_entries_length
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_key_type_preserve_entries_length (const xcb_xkb_set_key_type_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_preserve_entries_iterator
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns xcb_xkb_kt_set_map_entry_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_set_map_entry_iterator_t
+xcb_xkb_set_key_type_preserve_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_set_key_type_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_set_key_type_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_set_key_type_next
+ **
+ ** @param xcb_xkb_set_key_type_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_set_key_type_next (xcb_xkb_set_key_type_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_set_key_type_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_key_type_end
+ **
+ ** @param xcb_xkb_set_key_type_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_key_type_end (xcb_xkb_set_key_type_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_string8_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_string8_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_string8_next
+ **
+ ** @param xcb_xkb_string8_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_string8_next (xcb_xkb_string8_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_string8_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_string8_end
+ **
+ ** @param xcb_xkb_string8_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_string8_end (xcb_xkb_string8_iterator_t i /**< */);
+
+int
+xcb_xkb_property_serialize (void **_buffer /**< */,
+ const xcb_xkb_property_t *_aux /**< */,
+ const xcb_xkb_string8_t *name /**< */,
+ const xcb_xkb_string8_t *value /**< */);
+
+int
+xcb_xkb_property_unserialize (const void *_buffer /**< */,
+ xcb_xkb_property_t **_aux /**< */);
+
+int
+xcb_xkb_property_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_string8_t * xcb_xkb_property_name
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns xcb_xkb_string8_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_string8_t *
+xcb_xkb_property_name (const xcb_xkb_property_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_property_name_length
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_property_name_length (const xcb_xkb_property_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_property_name_end
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_property_name_end (const xcb_xkb_property_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_string8_t * xcb_xkb_property_value
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns xcb_xkb_string8_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_string8_t *
+xcb_xkb_property_value (const xcb_xkb_property_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_property_value_length
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_property_value_length (const xcb_xkb_property_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_property_value_end
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_property_value_end (const xcb_xkb_property_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_property_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_property_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_property_next
+ **
+ ** @param xcb_xkb_property_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_property_next (xcb_xkb_property_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_property_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_property_end
+ **
+ ** @param xcb_xkb_property_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_property_end (xcb_xkb_property_iterator_t i /**< */);
+
+int
+xcb_xkb_outline_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_point_t * xcb_xkb_outline_points
+ **
+ ** @param const xcb_xkb_outline_t *R
+ ** @returns xcb_point_t *
+ **
+ *****************************************************************************/
+
+xcb_point_t *
+xcb_xkb_outline_points (const xcb_xkb_outline_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_outline_points_length
+ **
+ ** @param const xcb_xkb_outline_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_outline_points_length (const xcb_xkb_outline_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_point_iterator_t xcb_xkb_outline_points_iterator
+ **
+ ** @param const xcb_xkb_outline_t *R
+ ** @returns xcb_point_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_point_iterator_t
+xcb_xkb_outline_points_iterator (const xcb_xkb_outline_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_outline_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_outline_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_outline_next
+ **
+ ** @param xcb_xkb_outline_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_outline_next (xcb_xkb_outline_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_outline_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_outline_end
+ **
+ ** @param xcb_xkb_outline_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_outline_end (xcb_xkb_outline_iterator_t i /**< */);
+
+int
+xcb_xkb_shape_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_shape_outlines_length
+ **
+ ** @param const xcb_xkb_shape_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_shape_outlines_length (const xcb_xkb_shape_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_outline_iterator_t xcb_xkb_shape_outlines_iterator
+ **
+ ** @param const xcb_xkb_shape_t *R
+ ** @returns xcb_xkb_outline_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_outline_iterator_t
+xcb_xkb_shape_outlines_iterator (const xcb_xkb_shape_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_shape_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_shape_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_shape_next
+ **
+ ** @param xcb_xkb_shape_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_shape_next (xcb_xkb_shape_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_shape_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_shape_end
+ **
+ ** @param xcb_xkb_shape_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_shape_end (xcb_xkb_shape_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_key_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_key_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_next
+ **
+ ** @param xcb_xkb_key_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_next (xcb_xkb_key_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_key_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_end
+ **
+ ** @param xcb_xkb_key_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_end (xcb_xkb_key_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_overlay_key_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_overlay_key_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_key_next
+ **
+ ** @param xcb_xkb_overlay_key_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_key_next (xcb_xkb_overlay_key_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_overlay_key_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_key_end
+ **
+ ** @param xcb_xkb_overlay_key_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_key_end (xcb_xkb_overlay_key_iterator_t i /**< */);
+
+int
+xcb_xkb_overlay_row_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_overlay_key_t * xcb_xkb_overlay_row_keys
+ **
+ ** @param const xcb_xkb_overlay_row_t *R
+ ** @returns xcb_xkb_overlay_key_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_overlay_key_t *
+xcb_xkb_overlay_row_keys (const xcb_xkb_overlay_row_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_overlay_row_keys_length
+ **
+ ** @param const xcb_xkb_overlay_row_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_overlay_row_keys_length (const xcb_xkb_overlay_row_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_overlay_key_iterator_t xcb_xkb_overlay_row_keys_iterator
+ **
+ ** @param const xcb_xkb_overlay_row_t *R
+ ** @returns xcb_xkb_overlay_key_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_overlay_key_iterator_t
+xcb_xkb_overlay_row_keys_iterator (const xcb_xkb_overlay_row_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_overlay_row_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_overlay_row_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_row_next
+ **
+ ** @param xcb_xkb_overlay_row_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_row_next (xcb_xkb_overlay_row_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_overlay_row_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_row_end
+ **
+ ** @param xcb_xkb_overlay_row_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_row_end (xcb_xkb_overlay_row_iterator_t i /**< */);
+
+int
+xcb_xkb_overlay_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_overlay_rows_length
+ **
+ ** @param const xcb_xkb_overlay_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_overlay_rows_length (const xcb_xkb_overlay_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_overlay_row_iterator_t xcb_xkb_overlay_rows_iterator
+ **
+ ** @param const xcb_xkb_overlay_t *R
+ ** @returns xcb_xkb_overlay_row_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_overlay_row_iterator_t
+xcb_xkb_overlay_rows_iterator (const xcb_xkb_overlay_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_overlay_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_overlay_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_next
+ **
+ ** @param xcb_xkb_overlay_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_next (xcb_xkb_overlay_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_overlay_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_end
+ **
+ ** @param xcb_xkb_overlay_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_end (xcb_xkb_overlay_iterator_t i /**< */);
+
+int
+xcb_xkb_row_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_t * xcb_xkb_row_keys
+ **
+ ** @param const xcb_xkb_row_t *R
+ ** @returns xcb_xkb_key_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_t *
+xcb_xkb_row_keys (const xcb_xkb_row_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_row_keys_length
+ **
+ ** @param const xcb_xkb_row_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_row_keys_length (const xcb_xkb_row_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_iterator_t xcb_xkb_row_keys_iterator
+ **
+ ** @param const xcb_xkb_row_t *R
+ ** @returns xcb_xkb_key_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_iterator_t
+xcb_xkb_row_keys_iterator (const xcb_xkb_row_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_row_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_row_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_row_next
+ **
+ ** @param xcb_xkb_row_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_row_next (xcb_xkb_row_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_row_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_row_end
+ **
+ ** @param xcb_xkb_row_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_row_end (xcb_xkb_row_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_common_doodad_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_common_doodad_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_common_doodad_next
+ **
+ ** @param xcb_xkb_common_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_common_doodad_next (xcb_xkb_common_doodad_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_common_doodad_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_common_doodad_end
+ **
+ ** @param xcb_xkb_common_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_common_doodad_end (xcb_xkb_common_doodad_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_shape_doodad_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_shape_doodad_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_shape_doodad_next
+ **
+ ** @param xcb_xkb_shape_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_shape_doodad_next (xcb_xkb_shape_doodad_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_shape_doodad_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_shape_doodad_end
+ **
+ ** @param xcb_xkb_shape_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_shape_doodad_end (xcb_xkb_shape_doodad_iterator_t i /**< */);
+
+int
+xcb_xkb_text_doodad_sizeof (const void *_buffer /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_text_doodad_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_text_doodad_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_text_doodad_next
+ **
+ ** @param xcb_xkb_text_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_text_doodad_next (xcb_xkb_text_doodad_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_text_doodad_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_text_doodad_end
+ **
+ ** @param xcb_xkb_text_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_text_doodad_end (xcb_xkb_text_doodad_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_indicator_doodad_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_indicator_doodad_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_indicator_doodad_next
+ **
+ ** @param xcb_xkb_indicator_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_indicator_doodad_next (xcb_xkb_indicator_doodad_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_indicator_doodad_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_indicator_doodad_end
+ **
+ ** @param xcb_xkb_indicator_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_indicator_doodad_end (xcb_xkb_indicator_doodad_iterator_t i /**< */);
+
+int
+xcb_xkb_logo_doodad_sizeof (const void *_buffer /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_logo_doodad_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_logo_doodad_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_logo_doodad_next
+ **
+ ** @param xcb_xkb_logo_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_logo_doodad_next (xcb_xkb_logo_doodad_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_logo_doodad_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_logo_doodad_end
+ **
+ ** @param xcb_xkb_logo_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_logo_doodad_end (xcb_xkb_logo_doodad_iterator_t i /**< */);
+
+int
+xcb_xkb_doodad_sizeof (const void *_buffer /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_doodad_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_doodad_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_doodad_next
+ **
+ ** @param xcb_xkb_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_doodad_next (xcb_xkb_doodad_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_doodad_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_doodad_end
+ **
+ ** @param xcb_xkb_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_doodad_end (xcb_xkb_doodad_iterator_t i /**< */);
+
+int
+xcb_xkb_section_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_section_rows_length
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_section_rows_length (const xcb_xkb_section_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_row_iterator_t xcb_xkb_section_rows_iterator
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns xcb_xkb_row_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_row_iterator_t
+xcb_xkb_section_rows_iterator (const xcb_xkb_section_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_section_doodads_length
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_section_doodads_length (const xcb_xkb_section_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_doodad_iterator_t xcb_xkb_section_doodads_iterator
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns xcb_xkb_doodad_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_doodad_iterator_t
+xcb_xkb_section_doodads_iterator (const xcb_xkb_section_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_section_overlays_length
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_section_overlays_length (const xcb_xkb_section_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_overlay_iterator_t xcb_xkb_section_overlays_iterator
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns xcb_xkb_overlay_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_overlay_iterator_t
+xcb_xkb_section_overlays_iterator (const xcb_xkb_section_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_section_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_section_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_section_next
+ **
+ ** @param xcb_xkb_section_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_section_next (xcb_xkb_section_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_section_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_section_end
+ **
+ ** @param xcb_xkb_section_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_section_end (xcb_xkb_section_iterator_t i /**< */);
+
+int
+xcb_xkb_listing_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_string8_t * xcb_xkb_listing_string
+ **
+ ** @param const xcb_xkb_listing_t *R
+ ** @returns xcb_xkb_string8_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_string8_t *
+xcb_xkb_listing_string (const xcb_xkb_listing_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_listing_string_length
+ **
+ ** @param const xcb_xkb_listing_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_listing_string_length (const xcb_xkb_listing_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_listing_string_end
+ **
+ ** @param const xcb_xkb_listing_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_listing_string_end (const xcb_xkb_listing_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_listing_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_listing_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_listing_next
+ **
+ ** @param xcb_xkb_listing_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_listing_next (xcb_xkb_listing_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_listing_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_listing_end
+ **
+ ** @param xcb_xkb_listing_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_listing_end (xcb_xkb_listing_iterator_t i /**< */);
+
+int
+xcb_xkb_device_led_info_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_device_led_info_names
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_device_led_info_names (const xcb_xkb_device_led_info_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_device_led_info_names_length
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_device_led_info_names_length (const xcb_xkb_device_led_info_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_device_led_info_names_end
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_device_led_info_names_end (const xcb_xkb_device_led_info_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_t * xcb_xkb_device_led_info_maps
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns xcb_xkb_indicator_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_t *
+xcb_xkb_device_led_info_maps (const xcb_xkb_device_led_info_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_device_led_info_maps_length
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_device_led_info_maps_length (const xcb_xkb_device_led_info_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_iterator_t xcb_xkb_device_led_info_maps_iterator
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns xcb_xkb_indicator_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_iterator_t
+xcb_xkb_device_led_info_maps_iterator (const xcb_xkb_device_led_info_t *R /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_device_led_info_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_device_led_info_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_device_led_info_next
+ **
+ ** @param xcb_xkb_device_led_info_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_device_led_info_next (xcb_xkb_device_led_info_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_device_led_info_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_device_led_info_end
+ **
+ ** @param xcb_xkb_device_led_info_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_device_led_info_end (xcb_xkb_device_led_info_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_no_action_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_no_action_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_no_action_next
+ **
+ ** @param xcb_xkb_sa_no_action_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_no_action_next (xcb_xkb_sa_no_action_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_no_action_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_no_action_end
+ **
+ ** @param xcb_xkb_sa_no_action_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_no_action_end (xcb_xkb_sa_no_action_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_set_mods_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_set_mods_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_set_mods_next
+ **
+ ** @param xcb_xkb_sa_set_mods_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_set_mods_next (xcb_xkb_sa_set_mods_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_set_mods_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_set_mods_end
+ **
+ ** @param xcb_xkb_sa_set_mods_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_set_mods_end (xcb_xkb_sa_set_mods_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_latch_mods_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_latch_mods_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_latch_mods_next
+ **
+ ** @param xcb_xkb_sa_latch_mods_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_latch_mods_next (xcb_xkb_sa_latch_mods_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_latch_mods_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_latch_mods_end
+ **
+ ** @param xcb_xkb_sa_latch_mods_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_latch_mods_end (xcb_xkb_sa_latch_mods_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_lock_mods_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_lock_mods_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_mods_next
+ **
+ ** @param xcb_xkb_sa_lock_mods_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_mods_next (xcb_xkb_sa_lock_mods_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_lock_mods_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_mods_end
+ **
+ ** @param xcb_xkb_sa_lock_mods_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_mods_end (xcb_xkb_sa_lock_mods_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_set_group_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_set_group_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_set_group_next
+ **
+ ** @param xcb_xkb_sa_set_group_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_set_group_next (xcb_xkb_sa_set_group_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_set_group_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_set_group_end
+ **
+ ** @param xcb_xkb_sa_set_group_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_set_group_end (xcb_xkb_sa_set_group_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_latch_group_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_latch_group_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_latch_group_next
+ **
+ ** @param xcb_xkb_sa_latch_group_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_latch_group_next (xcb_xkb_sa_latch_group_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_latch_group_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_latch_group_end
+ **
+ ** @param xcb_xkb_sa_latch_group_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_latch_group_end (xcb_xkb_sa_latch_group_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_lock_group_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_lock_group_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_group_next
+ **
+ ** @param xcb_xkb_sa_lock_group_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_group_next (xcb_xkb_sa_lock_group_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_lock_group_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_group_end
+ **
+ ** @param xcb_xkb_sa_lock_group_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_group_end (xcb_xkb_sa_lock_group_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_move_ptr_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_move_ptr_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_move_ptr_next
+ **
+ ** @param xcb_xkb_sa_move_ptr_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_move_ptr_next (xcb_xkb_sa_move_ptr_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_move_ptr_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_move_ptr_end
+ **
+ ** @param xcb_xkb_sa_move_ptr_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_move_ptr_end (xcb_xkb_sa_move_ptr_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_ptr_btn_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_ptr_btn_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_ptr_btn_next
+ **
+ ** @param xcb_xkb_sa_ptr_btn_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_ptr_btn_next (xcb_xkb_sa_ptr_btn_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_ptr_btn_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_ptr_btn_end
+ **
+ ** @param xcb_xkb_sa_ptr_btn_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_ptr_btn_end (xcb_xkb_sa_ptr_btn_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_lock_ptr_btn_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_lock_ptr_btn_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_ptr_btn_next
+ **
+ ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_ptr_btn_next (xcb_xkb_sa_lock_ptr_btn_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_lock_ptr_btn_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_ptr_btn_end
+ **
+ ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_ptr_btn_end (xcb_xkb_sa_lock_ptr_btn_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_set_ptr_dflt_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_set_ptr_dflt_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_set_ptr_dflt_next
+ **
+ ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_set_ptr_dflt_next (xcb_xkb_sa_set_ptr_dflt_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_set_ptr_dflt_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_set_ptr_dflt_end
+ **
+ ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_set_ptr_dflt_end (xcb_xkb_sa_set_ptr_dflt_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_iso_lock_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_iso_lock_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_iso_lock_next
+ **
+ ** @param xcb_xkb_sa_iso_lock_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_iso_lock_next (xcb_xkb_sa_iso_lock_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_iso_lock_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_iso_lock_end
+ **
+ ** @param xcb_xkb_sa_iso_lock_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_iso_lock_end (xcb_xkb_sa_iso_lock_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_terminate_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_terminate_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_terminate_next
+ **
+ ** @param xcb_xkb_sa_terminate_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_terminate_next (xcb_xkb_sa_terminate_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_terminate_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_terminate_end
+ **
+ ** @param xcb_xkb_sa_terminate_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_terminate_end (xcb_xkb_sa_terminate_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_switch_screen_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_switch_screen_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_switch_screen_next
+ **
+ ** @param xcb_xkb_sa_switch_screen_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_switch_screen_next (xcb_xkb_sa_switch_screen_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_switch_screen_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_switch_screen_end
+ **
+ ** @param xcb_xkb_sa_switch_screen_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_switch_screen_end (xcb_xkb_sa_switch_screen_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_set_controls_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_set_controls_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_set_controls_next
+ **
+ ** @param xcb_xkb_sa_set_controls_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_set_controls_next (xcb_xkb_sa_set_controls_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_set_controls_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_set_controls_end
+ **
+ ** @param xcb_xkb_sa_set_controls_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_set_controls_end (xcb_xkb_sa_set_controls_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_lock_controls_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_lock_controls_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_controls_next
+ **
+ ** @param xcb_xkb_sa_lock_controls_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_controls_next (xcb_xkb_sa_lock_controls_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_lock_controls_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_controls_end
+ **
+ ** @param xcb_xkb_sa_lock_controls_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_controls_end (xcb_xkb_sa_lock_controls_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_action_message_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_action_message_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_action_message_next
+ **
+ ** @param xcb_xkb_sa_action_message_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_action_message_next (xcb_xkb_sa_action_message_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_action_message_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_action_message_end
+ **
+ ** @param xcb_xkb_sa_action_message_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_action_message_end (xcb_xkb_sa_action_message_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_redirect_key_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_redirect_key_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_redirect_key_next
+ **
+ ** @param xcb_xkb_sa_redirect_key_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_redirect_key_next (xcb_xkb_sa_redirect_key_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_redirect_key_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_redirect_key_end
+ **
+ ** @param xcb_xkb_sa_redirect_key_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_redirect_key_end (xcb_xkb_sa_redirect_key_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_device_btn_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_device_btn_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_device_btn_next
+ **
+ ** @param xcb_xkb_sa_device_btn_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_device_btn_next (xcb_xkb_sa_device_btn_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_device_btn_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_device_btn_end
+ **
+ ** @param xcb_xkb_sa_device_btn_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_device_btn_end (xcb_xkb_sa_device_btn_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_lock_device_btn_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_lock_device_btn_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_device_btn_next
+ **
+ ** @param xcb_xkb_sa_lock_device_btn_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_device_btn_next (xcb_xkb_sa_lock_device_btn_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_lock_device_btn_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_device_btn_end
+ **
+ ** @param xcb_xkb_sa_lock_device_btn_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_device_btn_end (xcb_xkb_sa_lock_device_btn_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sa_device_valuator_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_sa_device_valuator_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_device_valuator_next
+ **
+ ** @param xcb_xkb_sa_device_valuator_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_device_valuator_next (xcb_xkb_sa_device_valuator_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sa_device_valuator_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_device_valuator_end
+ **
+ ** @param xcb_xkb_sa_device_valuator_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_device_valuator_end (xcb_xkb_sa_device_valuator_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_action_iterator_t
+ *
+ * Get the next element in the iterator. The member rem is
+ * decreased by one. The member data points to the next
+ * element. The member index is increased by sizeof(xcb_xkb_action_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_action_next
+ **
+ ** @param xcb_xkb_action_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_action_next (xcb_xkb_action_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_action_iterator_t
+ * @return The iterator pointing to the last element
+ *
+ * Set the current element in the iterator to the last element.
+ * The member rem is set to 0. The member data points to the
+ * last element.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_action_end
+ **
+ ** @param xcb_xkb_action_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_action_end (xcb_xkb_action_iterator_t i /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint16_t wantedMajor
+ ** @param uint16_t wantedMinor
+ ** @returns xcb_xkb_use_extension_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_use_extension_cookie_t
+xcb_xkb_use_extension (xcb_connection_t *c /**< */,
+ uint16_t wantedMajor /**< */,
+ uint16_t wantedMinor /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint16_t wantedMajor
+ ** @param uint16_t wantedMinor
+ ** @returns xcb_xkb_use_extension_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_use_extension_cookie_t
+xcb_xkb_use_extension_unchecked (xcb_connection_t *c /**< */,
+ uint16_t wantedMajor /**< */,
+ uint16_t wantedMinor /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_use_extension_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_use_extension_reply_t * xcb_xkb_use_extension_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_use_extension_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_use_extension_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_use_extension_reply_t *
+xcb_xkb_use_extension_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_use_extension_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_xkb_select_events_details_serialize (void **_buffer /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ const xcb_xkb_select_events_details_t *_aux /**< */);
+
+int
+xcb_xkb_select_events_details_unpack (const void *_buffer /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ xcb_xkb_select_events_details_t *_aux /**< */);
+
+int
+xcb_xkb_select_events_details_sizeof (const void *_buffer /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_select_events_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t affectWhich
+ ** @param uint16_t clear
+ ** @param uint16_t selectAll
+ ** @param uint16_t affectMap
+ ** @param uint16_t map
+ ** @param const void *details
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_select_events_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ uint16_t affectMap /**< */,
+ uint16_t map /**< */,
+ const void *details /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_select_events
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t affectWhich
+ ** @param uint16_t clear
+ ** @param uint16_t selectAll
+ ** @param uint16_t affectMap
+ ** @param uint16_t map
+ ** @param const void *details
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_select_events (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ uint16_t affectMap /**< */,
+ uint16_t map /**< */,
+ const void *details /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_select_events_aux_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t affectWhich
+ ** @param uint16_t clear
+ ** @param uint16_t selectAll
+ ** @param uint16_t affectMap
+ ** @param uint16_t map
+ ** @param const xcb_xkb_select_events_details_t *details
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_select_events_aux_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ uint16_t affectMap /**< */,
+ uint16_t map /**< */,
+ const xcb_xkb_select_events_details_t *details /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_select_events_aux
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t affectWhich
+ ** @param uint16_t clear
+ ** @param uint16_t selectAll
+ ** @param uint16_t affectMap
+ ** @param uint16_t map
+ ** @param const xcb_xkb_select_events_details_t *details
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_select_events_aux (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ uint16_t affectMap /**< */,
+ uint16_t map /**< */,
+ const xcb_xkb_select_events_details_t *details /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_bell_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_bell_class_spec_t bellClass
+ ** @param xcb_xkb_id_spec_t bellID
+ ** @param int8_t percent
+ ** @param uint8_t forceSound
+ ** @param uint8_t eventOnly
+ ** @param int16_t pitch
+ ** @param int16_t duration
+ ** @param xcb_atom_t name
+ ** @param xcb_window_t window
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_bell_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_bell_class_spec_t bellClass /**< */,
+ xcb_xkb_id_spec_t bellID /**< */,
+ int8_t percent /**< */,
+ uint8_t forceSound /**< */,
+ uint8_t eventOnly /**< */,
+ int16_t pitch /**< */,
+ int16_t duration /**< */,
+ xcb_atom_t name /**< */,
+ xcb_window_t window /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_bell
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_bell_class_spec_t bellClass
+ ** @param xcb_xkb_id_spec_t bellID
+ ** @param int8_t percent
+ ** @param uint8_t forceSound
+ ** @param uint8_t eventOnly
+ ** @param int16_t pitch
+ ** @param int16_t duration
+ ** @param xcb_atom_t name
+ ** @param xcb_window_t window
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_bell (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_bell_class_spec_t bellClass /**< */,
+ xcb_xkb_id_spec_t bellID /**< */,
+ int8_t percent /**< */,
+ uint8_t forceSound /**< */,
+ uint8_t eventOnly /**< */,
+ int16_t pitch /**< */,
+ int16_t duration /**< */,
+ xcb_atom_t name /**< */,
+ xcb_window_t window /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_state_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_state_cookie_t
+xcb_xkb_get_state (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_state_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_state_cookie_t
+xcb_xkb_get_state_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_state_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_state_reply_t * xcb_xkb_get_state_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_state_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_state_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_state_reply_t *
+xcb_xkb_get_state_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_state_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_latch_lock_state_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t affectModLocks
+ ** @param uint8_t modLocks
+ ** @param uint8_t lockGroup
+ ** @param uint8_t groupLock
+ ** @param uint8_t affectModLatches
+ ** @param uint8_t latchGroup
+ ** @param uint16_t groupLatch
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_latch_lock_state_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t affectModLocks /**< */,
+ uint8_t modLocks /**< */,
+ uint8_t lockGroup /**< */,
+ uint8_t groupLock /**< */,
+ uint8_t affectModLatches /**< */,
+ uint8_t latchGroup /**< */,
+ uint16_t groupLatch /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_latch_lock_state
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t affectModLocks
+ ** @param uint8_t modLocks
+ ** @param uint8_t lockGroup
+ ** @param uint8_t groupLock
+ ** @param uint8_t affectModLatches
+ ** @param uint8_t latchGroup
+ ** @param uint16_t groupLatch
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_latch_lock_state (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t affectModLocks /**< */,
+ uint8_t modLocks /**< */,
+ uint8_t lockGroup /**< */,
+ uint8_t groupLock /**< */,
+ uint8_t affectModLatches /**< */,
+ uint8_t latchGroup /**< */,
+ uint16_t groupLatch /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_controls_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_controls_cookie_t
+xcb_xkb_get_controls (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_controls_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_controls_cookie_t
+xcb_xkb_get_controls_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_controls_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_controls_reply_t * xcb_xkb_get_controls_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_controls_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_controls_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_controls_reply_t *
+xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_controls_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_controls_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t affectInternalRealMods
+ ** @param uint8_t internalRealMods
+ ** @param uint8_t affectIgnoreLockRealMods
+ ** @param uint8_t ignoreLockRealMods
+ ** @param uint16_t affectInternalVirtualMods
+ ** @param uint16_t internalVirtualMods
+ ** @param uint16_t affectIgnoreLockVirtualMods
+ ** @param uint16_t ignoreLockVirtualMods
+ ** @param uint8_t mouseKeysDfltBtn
+ ** @param uint8_t groupsWrap
+ ** @param xcb_xkb_ax_option_t accessXOptions
+ ** @param uint32_t affectEnabledControls
+ ** @param uint32_t enabledControls
+ ** @param uint32_t changeControls
+ ** @param uint16_t repeatDelay
+ ** @param uint16_t repeatInterval
+ ** @param uint16_t slowKeysDelay
+ ** @param uint16_t debounceDelay
+ ** @param uint16_t mouseKeysDelay
+ ** @param uint16_t mouseKeysInterval
+ ** @param uint16_t mouseKeysTimeToMax
+ ** @param uint16_t mouseKeysMaxSpeed
+ ** @param int16_t mouseKeysCurve
+ ** @param uint16_t accessXTimeout
+ ** @param uint32_t accessXTimeoutMask
+ ** @param uint32_t accessXTimeoutValues
+ ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsMask
+ ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsValues
+ ** @param const uint8_t *perKeyRepeat
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t affectInternalRealMods /**< */,
+ uint8_t internalRealMods /**< */,
+ uint8_t affectIgnoreLockRealMods /**< */,
+ uint8_t ignoreLockRealMods /**< */,
+ uint16_t affectInternalVirtualMods /**< */,
+ uint16_t internalVirtualMods /**< */,
+ uint16_t affectIgnoreLockVirtualMods /**< */,
+ uint16_t ignoreLockVirtualMods /**< */,
+ uint8_t mouseKeysDfltBtn /**< */,
+ uint8_t groupsWrap /**< */,
+ xcb_xkb_ax_option_t accessXOptions /**< */,
+ uint32_t affectEnabledControls /**< */,
+ uint32_t enabledControls /**< */,
+ uint32_t changeControls /**< */,
+ uint16_t repeatDelay /**< */,
+ uint16_t repeatInterval /**< */,
+ uint16_t slowKeysDelay /**< */,
+ uint16_t debounceDelay /**< */,
+ uint16_t mouseKeysDelay /**< */,
+ uint16_t mouseKeysInterval /**< */,
+ uint16_t mouseKeysTimeToMax /**< */,
+ uint16_t mouseKeysMaxSpeed /**< */,
+ int16_t mouseKeysCurve /**< */,
+ uint16_t accessXTimeout /**< */,
+ uint32_t accessXTimeoutMask /**< */,
+ uint32_t accessXTimeoutValues /**< */,
+ xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */,
+ xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */,
+ const uint8_t *perKeyRepeat /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_controls
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t affectInternalRealMods
+ ** @param uint8_t internalRealMods
+ ** @param uint8_t affectIgnoreLockRealMods
+ ** @param uint8_t ignoreLockRealMods
+ ** @param uint16_t affectInternalVirtualMods
+ ** @param uint16_t internalVirtualMods
+ ** @param uint16_t affectIgnoreLockVirtualMods
+ ** @param uint16_t ignoreLockVirtualMods
+ ** @param uint8_t mouseKeysDfltBtn
+ ** @param uint8_t groupsWrap
+ ** @param xcb_xkb_ax_option_t accessXOptions
+ ** @param uint32_t affectEnabledControls
+ ** @param uint32_t enabledControls
+ ** @param uint32_t changeControls
+ ** @param uint16_t repeatDelay
+ ** @param uint16_t repeatInterval
+ ** @param uint16_t slowKeysDelay
+ ** @param uint16_t debounceDelay
+ ** @param uint16_t mouseKeysDelay
+ ** @param uint16_t mouseKeysInterval
+ ** @param uint16_t mouseKeysTimeToMax
+ ** @param uint16_t mouseKeysMaxSpeed
+ ** @param int16_t mouseKeysCurve
+ ** @param uint16_t accessXTimeout
+ ** @param uint32_t accessXTimeoutMask
+ ** @param uint32_t accessXTimeoutValues
+ ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsMask
+ ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsValues
+ ** @param const uint8_t *perKeyRepeat
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_controls (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t affectInternalRealMods /**< */,
+ uint8_t internalRealMods /**< */,
+ uint8_t affectIgnoreLockRealMods /**< */,
+ uint8_t ignoreLockRealMods /**< */,
+ uint16_t affectInternalVirtualMods /**< */,
+ uint16_t internalVirtualMods /**< */,
+ uint16_t affectIgnoreLockVirtualMods /**< */,
+ uint16_t ignoreLockVirtualMods /**< */,
+ uint8_t mouseKeysDfltBtn /**< */,
+ uint8_t groupsWrap /**< */,
+ xcb_xkb_ax_option_t accessXOptions /**< */,
+ uint32_t affectEnabledControls /**< */,
+ uint32_t enabledControls /**< */,
+ uint32_t changeControls /**< */,
+ uint16_t repeatDelay /**< */,
+ uint16_t repeatInterval /**< */,
+ uint16_t slowKeysDelay /**< */,
+ uint16_t debounceDelay /**< */,
+ uint16_t mouseKeysDelay /**< */,
+ uint16_t mouseKeysInterval /**< */,
+ uint16_t mouseKeysTimeToMax /**< */,
+ uint16_t mouseKeysMaxSpeed /**< */,
+ int16_t mouseKeysCurve /**< */,
+ uint16_t accessXTimeout /**< */,
+ uint32_t accessXTimeoutMask /**< */,
+ uint32_t accessXTimeoutValues /**< */,
+ xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */,
+ xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */,
+ const uint8_t *perKeyRepeat /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_types_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_types_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_type_iterator_t xcb_xkb_get_map_map_types_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_type_iterator_t
+xcb_xkb_get_map_map_types_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_syms_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_syms_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_map_map_syms_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_get_map_map_syms_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_map_map_acts_rtrn_count
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_map_map_acts_rtrn_count (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_acts_rtrn_count_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_acts_rtrn_count_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_map_map_acts_rtrn_count_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_map_map_acts_rtrn_acts
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_map_map_acts_rtrn_acts (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_acts_rtrn_acts_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_acts_rtrn_acts_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_map_map_acts_rtrn_acts_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_map_map_acts_rtrn_acts_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_get_map_map_behaviors_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_get_map_map_behaviors_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_behaviors_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_behaviors_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_map_map_behaviors_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_get_map_map_behaviors_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_map_map_vmods_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_map_map_vmods_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_vmods_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_vmods_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_map_map_vmods_rtrn_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_vmods_rtrn_end (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_get_map_map_explicit_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_get_map_map_explicit_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_explicit_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_explicit_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_map_map_explicit_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_get_map_map_modmap_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_get_map_map_modmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_modmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_modmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_map_map_modmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_map_map_vmodmap_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_get_map_map_vmodmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_vmodmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_vmodmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_map_map_vmodmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_get_map_map_vmodmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */);
+
+int
+xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_get_map_map_t *_aux /**< */);
+
+int
+xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_get_map_map_t *_aux /**< */);
+
+int
+xcb_xkb_get_map_map_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t full
+ ** @param uint16_t partial
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint16_t virtualMods
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @returns xcb_xkb_get_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_map_cookie_t
+xcb_xkb_get_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t full /**< */,
+ uint16_t partial /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint16_t virtualMods /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t full
+ ** @param uint16_t partial
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint16_t virtualMods
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @returns xcb_xkb_get_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_map_cookie_t
+xcb_xkb_get_map_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t full /**< */,
+ uint16_t partial /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint16_t virtualMods /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_map_map_t * xcb_xkb_get_map_map
+ **
+ ** @param const xcb_xkb_get_map_reply_t *R
+ ** @returns xcb_xkb_get_map_map_t *
+ **
+ *****************************************************************************/
+
+void *
+xcb_xkb_get_map_map (const xcb_xkb_get_map_reply_t *R /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_map_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_map_reply_t * xcb_xkb_get_map_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_map_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_map_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_map_reply_t *
+xcb_xkb_get_map_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_map_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_types_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_types_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_key_type_iterator_t xcb_xkb_set_map_values_types_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_set_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_key_type_iterator_t
+xcb_xkb_set_map_values_types_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_syms_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_syms_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_set_map_values_syms_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_set_map_values_syms_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_set_map_values_actions_count
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_set_map_values_actions_count (const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_actions_count_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_actions_count_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_map_values_actions_count_end
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_map_values_actions_count_end (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_set_map_values_actions
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_set_map_values_actions (const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_actions_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_actions_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_set_map_values_actions_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_set_map_values_actions_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_set_map_values_behaviors
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_set_map_values_behaviors (const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_behaviors_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_behaviors_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_set_map_values_behaviors_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_set_map_values_behaviors_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_set_map_values_vmods
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_set_map_values_vmods (const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_vmods_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_vmods_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_map_values_vmods_end
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_map_values_vmods_end (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_set_map_values_explicit
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_set_map_values_explicit (const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_explicit_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_explicit_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_set_map_values_explicit_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_set_map_values_explicit_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_set_map_values_modmap
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_set_map_values_modmap (const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_modmap_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_modmap_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_set_map_values_modmap_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_set_map_values_modmap_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_set_map_values_vmodmap
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_set_map_values_vmodmap (const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_vmodmap_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_vmodmap_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_set_map_values_vmodmap_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_set_map_values_vmodmap_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */);
+
+int
+xcb_xkb_set_map_values_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_set_map_values_t *_aux /**< */);
+
+int
+xcb_xkb_set_map_values_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_set_map_values_t *_aux /**< */);
+
+int
+xcb_xkb_set_map_values_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_map_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t present
+ ** @param uint16_t flags
+ ** @param xcb_keycode_t minKeyCode
+ ** @param xcb_keycode_t maxKeyCode
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param uint16_t totalSyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param uint16_t totalActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint8_t totalKeyBehaviors
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param uint8_t totalKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param uint8_t totalModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @param uint8_t totalVModMapKeys
+ ** @param uint16_t virtualMods
+ ** @param const void *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_map_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t present /**< */,
+ uint16_t flags /**< */,
+ xcb_keycode_t minKeyCode /**< */,
+ xcb_keycode_t maxKeyCode /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ uint16_t totalSyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ uint8_t totalModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
+ const void *values /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t present
+ ** @param uint16_t flags
+ ** @param xcb_keycode_t minKeyCode
+ ** @param xcb_keycode_t maxKeyCode
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param uint16_t totalSyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param uint16_t totalActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint8_t totalKeyBehaviors
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param uint8_t totalKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param uint8_t totalModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @param uint8_t totalVModMapKeys
+ ** @param uint16_t virtualMods
+ ** @param const void *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t present /**< */,
+ uint16_t flags /**< */,
+ xcb_keycode_t minKeyCode /**< */,
+ xcb_keycode_t maxKeyCode /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ uint16_t totalSyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ uint8_t totalModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
+ const void *values /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_map_aux_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t present
+ ** @param uint16_t flags
+ ** @param xcb_keycode_t minKeyCode
+ ** @param xcb_keycode_t maxKeyCode
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param uint16_t totalSyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param uint16_t totalActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint8_t totalKeyBehaviors
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param uint8_t totalKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param uint8_t totalModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @param uint8_t totalVModMapKeys
+ ** @param uint16_t virtualMods
+ ** @param const xcb_xkb_set_map_values_t *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_map_aux_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t present /**< */,
+ uint16_t flags /**< */,
+ xcb_keycode_t minKeyCode /**< */,
+ xcb_keycode_t maxKeyCode /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ uint16_t totalSyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ uint8_t totalModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
+ const xcb_xkb_set_map_values_t *values /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_map_aux
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t present
+ ** @param uint16_t flags
+ ** @param xcb_keycode_t minKeyCode
+ ** @param xcb_keycode_t maxKeyCode
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param uint16_t totalSyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param uint16_t totalActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint8_t totalKeyBehaviors
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param uint8_t totalKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param uint8_t totalModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @param uint8_t totalVModMapKeys
+ ** @param uint16_t virtualMods
+ ** @param const xcb_xkb_set_map_values_t *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_map_aux (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t present /**< */,
+ uint16_t flags /**< */,
+ xcb_keycode_t minKeyCode /**< */,
+ xcb_keycode_t maxKeyCode /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ uint16_t totalSyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ uint8_t totalModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
+ const xcb_xkb_set_map_values_t *values /**< */);
+
+int
+xcb_xkb_get_compat_map_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t groups
+ ** @param uint8_t getAllSI
+ ** @param uint16_t firstSI
+ ** @param uint16_t nSI
+ ** @returns xcb_xkb_get_compat_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_compat_map_cookie_t
+xcb_xkb_get_compat_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t groups /**< */,
+ uint8_t getAllSI /**< */,
+ uint16_t firstSI /**< */,
+ uint16_t nSI /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t groups
+ ** @param uint8_t getAllSI
+ ** @param uint16_t firstSI
+ ** @param uint16_t nSI
+ ** @returns xcb_xkb_get_compat_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_compat_map_cookie_t
+xcb_xkb_get_compat_map_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t groups /**< */,
+ uint8_t getAllSI /**< */,
+ uint16_t firstSI /**< */,
+ uint16_t nSI /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_compat_map_si_rtrn
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_compat_map_si_rtrn_length
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_compat_map_si_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_compat_map_si_rtrn_end
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_compat_map_si_rtrn_end (const xcb_xkb_get_compat_map_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_t * xcb_xkb_get_compat_map_group_rtrn
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns xcb_xkb_mod_def_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_t *
+xcb_xkb_get_compat_map_group_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_compat_map_group_rtrn_length
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_compat_map_group_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_compat_map_group_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns xcb_xkb_mod_def_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_iterator_t
+xcb_xkb_get_compat_map_group_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_compat_map_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_compat_map_reply_t * xcb_xkb_get_compat_map_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_compat_map_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_compat_map_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_compat_map_reply_t *
+xcb_xkb_get_compat_map_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_compat_map_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_xkb_set_compat_map_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_compat_map_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t recomputeActions
+ ** @param uint8_t truncateSI
+ ** @param uint8_t groups
+ ** @param uint16_t firstSI
+ ** @param uint16_t nSI
+ ** @param const uint8_t *si
+ ** @param const xcb_xkb_mod_def_t *groupMaps
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_compat_map_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t recomputeActions /**< */,
+ uint8_t truncateSI /**< */,
+ uint8_t groups /**< */,
+ uint16_t firstSI /**< */,
+ uint16_t nSI /**< */,
+ const uint8_t *si /**< */,
+ const xcb_xkb_mod_def_t *groupMaps /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_compat_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t recomputeActions
+ ** @param uint8_t truncateSI
+ ** @param uint8_t groups
+ ** @param uint16_t firstSI
+ ** @param uint16_t nSI
+ ** @param const uint8_t *si
+ ** @param const xcb_xkb_mod_def_t *groupMaps
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_compat_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t recomputeActions /**< */,
+ uint8_t truncateSI /**< */,
+ uint8_t groups /**< */,
+ uint16_t firstSI /**< */,
+ uint16_t nSI /**< */,
+ const uint8_t *si /**< */,
+ const xcb_xkb_mod_def_t *groupMaps /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_indicator_state_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_state_cookie_t
+xcb_xkb_get_indicator_state (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_indicator_state_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_state_cookie_t
+xcb_xkb_get_indicator_state_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_indicator_state_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_state_reply_t * xcb_xkb_get_indicator_state_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_indicator_state_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_indicator_state_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_state_reply_t *
+xcb_xkb_get_indicator_state_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_indicator_state_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_xkb_get_indicator_map_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @returns xcb_xkb_get_indicator_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_map_cookie_t
+xcb_xkb_get_indicator_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @returns xcb_xkb_get_indicator_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_map_cookie_t
+xcb_xkb_get_indicator_map_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_t * xcb_xkb_get_indicator_map_maps
+ **
+ ** @param const xcb_xkb_get_indicator_map_reply_t *R
+ ** @returns xcb_xkb_indicator_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_t *
+xcb_xkb_get_indicator_map_maps (const xcb_xkb_get_indicator_map_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_indicator_map_maps_length
+ **
+ ** @param const xcb_xkb_get_indicator_map_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_indicator_map_maps_length (const xcb_xkb_get_indicator_map_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_indicator_map_maps_iterator
+ **
+ ** @param const xcb_xkb_get_indicator_map_reply_t *R
+ ** @returns xcb_xkb_indicator_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_iterator_t
+xcb_xkb_get_indicator_map_maps_iterator (const xcb_xkb_get_indicator_map_reply_t *R /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_indicator_map_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_map_reply_t * xcb_xkb_get_indicator_map_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_indicator_map_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_indicator_map_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_map_reply_t *
+xcb_xkb_get_indicator_map_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_indicator_map_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_xkb_set_indicator_map_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_indicator_map_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @param const xcb_xkb_indicator_map_t *maps
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_indicator_map_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_indicator_map_t *maps /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_indicator_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @param const xcb_xkb_indicator_map_t *maps
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_indicator_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_indicator_map_t *maps /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @param xcb_atom_t indicator
+ ** @returns xcb_xkb_get_named_indicator_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_named_indicator_cookie_t
+xcb_xkb_get_named_indicator (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */,
+ xcb_atom_t indicator /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @param xcb_atom_t indicator
+ ** @returns xcb_xkb_get_named_indicator_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_named_indicator_cookie_t
+xcb_xkb_get_named_indicator_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */,
+ xcb_atom_t indicator /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_named_indicator_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_named_indicator_reply_t * xcb_xkb_get_named_indicator_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_named_indicator_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_named_indicator_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_named_indicator_reply_t *
+xcb_xkb_get_named_indicator_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_named_indicator_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_named_indicator_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @param xcb_atom_t indicator
+ ** @param uint8_t setState
+ ** @param uint8_t on
+ ** @param uint8_t setMap
+ ** @param uint8_t createMap
+ ** @param uint8_t map_flags
+ ** @param uint8_t map_whichGroups
+ ** @param uint8_t map_groups
+ ** @param uint8_t map_whichMods
+ ** @param uint8_t map_realMods
+ ** @param uint16_t map_vmods
+ ** @param uint32_t map_ctrls
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_named_indicator_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */,
+ xcb_atom_t indicator /**< */,
+ uint8_t setState /**< */,
+ uint8_t on /**< */,
+ uint8_t setMap /**< */,
+ uint8_t createMap /**< */,
+ uint8_t map_flags /**< */,
+ uint8_t map_whichGroups /**< */,
+ uint8_t map_groups /**< */,
+ uint8_t map_whichMods /**< */,
+ uint8_t map_realMods /**< */,
+ uint16_t map_vmods /**< */,
+ uint32_t map_ctrls /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_named_indicator
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @param xcb_atom_t indicator
+ ** @param uint8_t setState
+ ** @param uint8_t on
+ ** @param uint8_t setMap
+ ** @param uint8_t createMap
+ ** @param uint8_t map_flags
+ ** @param uint8_t map_whichGroups
+ ** @param uint8_t map_groups
+ ** @param uint8_t map_whichMods
+ ** @param uint8_t map_realMods
+ ** @param uint16_t map_vmods
+ ** @param uint32_t map_ctrls
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_named_indicator (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */,
+ xcb_atom_t indicator /**< */,
+ uint8_t setState /**< */,
+ uint8_t on /**< */,
+ uint8_t setMap /**< */,
+ uint8_t createMap /**< */,
+ uint8_t map_flags /**< */,
+ uint8_t map_whichGroups /**< */,
+ uint8_t map_groups /**< */,
+ uint8_t map_whichMods /**< */,
+ uint8_t map_realMods /**< */,
+ uint16_t map_vmods /**< */,
+ uint32_t map_ctrls /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_type_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_type_names (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_type_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_type_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_type_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_type_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_names_value_list_n_levels_per_type
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_names_value_list_n_levels_per_type (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_n_levels_per_type_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_n_levels_per_type_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_n_levels_per_type_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_kt_level_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_kt_level_names (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_kt_level_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_kt_level_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_kt_level_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_kt_level_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_indicator_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_indicator_names (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_indicator_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_indicator_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_indicator_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_indicator_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_virtual_mod_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_virtual_mod_names (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_virtual_mod_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_virtual_mod_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_virtual_mod_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_virtual_mod_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_groups
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_groups (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_groups_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_groups_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_groups_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_groups_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_t * xcb_xkb_get_names_value_list_key_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_xkb_key_name_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_t *
+xcb_xkb_get_names_value_list_key_names (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_key_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_key_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_iterator_t xcb_xkb_get_names_value_list_key_names_iterator
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_xkb_key_name_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_iterator_t
+xcb_xkb_get_names_value_list_key_names_iterator (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_names_value_list_key_aliases
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_names_value_list_key_aliases (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_key_aliases_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_names_value_list_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_names_value_list_key_aliases_iterator (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_radio_group_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_radio_group_names (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_radio_group_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_radio_group_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_radio_group_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_radio_group_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */);
+
+int
+xcb_xkb_get_names_value_list_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_get_names_value_list_t *_aux /**< */);
+
+int
+xcb_xkb_get_names_value_list_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ xcb_xkb_get_names_value_list_t *_aux /**< */);
+
+int
+xcb_xkb_get_names_value_list_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @returns xcb_xkb_get_names_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_names_cookie_t
+xcb_xkb_get_names (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @returns xcb_xkb_get_names_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_names_cookie_t
+xcb_xkb_get_names_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_names_value_list_t * xcb_xkb_get_names_value_list
+ **
+ ** @param const xcb_xkb_get_names_reply_t *R
+ ** @returns xcb_xkb_get_names_value_list_t *
+ **
+ *****************************************************************************/
+
+void *
+xcb_xkb_get_names_value_list (const xcb_xkb_get_names_reply_t *R /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_names_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_names_reply_t * xcb_xkb_get_names_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_names_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_names_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_names_reply_t *
+xcb_xkb_get_names_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_names_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_type_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_type_names (const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_type_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_type_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_type_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_type_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_set_names_values_n_levels_per_type
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_set_names_values_n_levels_per_type (const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_n_levels_per_type_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_n_levels_per_type_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_n_levels_per_type_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_n_levels_per_type_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_kt_level_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_kt_level_names (const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_kt_level_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_kt_level_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_kt_level_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_kt_level_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_indicator_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_indicator_names (const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_indicator_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_indicator_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_indicator_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_indicator_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_virtual_mod_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_virtual_mod_names (const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_virtual_mod_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_virtual_mod_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_virtual_mod_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_virtual_mod_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_groups
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_groups (const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_groups_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_groups_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_groups_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_groups_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_t * xcb_xkb_set_names_values_key_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_xkb_key_name_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_t *
+xcb_xkb_set_names_values_key_names (const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_key_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_key_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_iterator_t xcb_xkb_set_names_values_key_names_iterator
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_xkb_key_name_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_iterator_t
+xcb_xkb_set_names_values_key_names_iterator (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_set_names_values_key_aliases
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_set_names_values_key_aliases (const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_key_aliases_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_key_aliases_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_set_names_values_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_set_names_values_key_aliases_iterator (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_radio_group_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_radio_group_names (const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_radio_group_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_radio_group_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_radio_group_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_radio_group_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */);
+
+int
+xcb_xkb_set_names_values_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_set_names_values_t *_aux /**< */);
+
+int
+xcb_xkb_set_names_values_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ xcb_xkb_set_names_values_t *_aux /**< */);
+
+int
+xcb_xkb_set_names_values_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_names_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t virtualMods
+ ** @param uint32_t which
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param uint8_t firstKTLevelt
+ ** @param uint8_t nKTLevels
+ ** @param uint32_t indicators
+ ** @param uint8_t groupNames
+ ** @param uint8_t nRadioGroups
+ ** @param xcb_keycode_t firstKey
+ ** @param uint8_t nKeys
+ ** @param uint8_t nKeyAliases
+ ** @param uint16_t totalKTLevelNames
+ ** @param const void *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_names_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t virtualMods /**< */,
+ uint32_t which /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t firstKTLevelt /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nRadioGroups /**< */,
+ xcb_keycode_t firstKey /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint16_t totalKTLevelNames /**< */,
+ const void *values /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_names
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t virtualMods
+ ** @param uint32_t which
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param uint8_t firstKTLevelt
+ ** @param uint8_t nKTLevels
+ ** @param uint32_t indicators
+ ** @param uint8_t groupNames
+ ** @param uint8_t nRadioGroups
+ ** @param xcb_keycode_t firstKey
+ ** @param uint8_t nKeys
+ ** @param uint8_t nKeyAliases
+ ** @param uint16_t totalKTLevelNames
+ ** @param const void *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_names (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t virtualMods /**< */,
+ uint32_t which /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t firstKTLevelt /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nRadioGroups /**< */,
+ xcb_keycode_t firstKey /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint16_t totalKTLevelNames /**< */,
+ const void *values /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_names_aux_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t virtualMods
+ ** @param uint32_t which
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param uint8_t firstKTLevelt
+ ** @param uint8_t nKTLevels
+ ** @param uint32_t indicators
+ ** @param uint8_t groupNames
+ ** @param uint8_t nRadioGroups
+ ** @param xcb_keycode_t firstKey
+ ** @param uint8_t nKeys
+ ** @param uint8_t nKeyAliases
+ ** @param uint16_t totalKTLevelNames
+ ** @param const xcb_xkb_set_names_values_t *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_names_aux_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t virtualMods /**< */,
+ uint32_t which /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t firstKTLevelt /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nRadioGroups /**< */,
+ xcb_keycode_t firstKey /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint16_t totalKTLevelNames /**< */,
+ const xcb_xkb_set_names_values_t *values /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_names_aux
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t virtualMods
+ ** @param uint32_t which
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param uint8_t firstKTLevelt
+ ** @param uint8_t nKTLevels
+ ** @param uint32_t indicators
+ ** @param uint8_t groupNames
+ ** @param uint8_t nRadioGroups
+ ** @param xcb_keycode_t firstKey
+ ** @param uint8_t nKeys
+ ** @param uint8_t nKeyAliases
+ ** @param uint16_t totalKTLevelNames
+ ** @param const xcb_xkb_set_names_values_t *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_names_aux (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t virtualMods /**< */,
+ uint32_t which /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t firstKTLevelt /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nRadioGroups /**< */,
+ xcb_keycode_t firstKey /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint16_t totalKTLevelNames /**< */,
+ const xcb_xkb_set_names_values_t *values /**< */);
+
+int
+xcb_xkb_get_geometry_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_geometry_cookie_t xcb_xkb_get_geometry
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_atom_t name
+ ** @returns xcb_xkb_get_geometry_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_geometry_cookie_t
+xcb_xkb_get_geometry (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_atom_t name /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_geometry_cookie_t xcb_xkb_get_geometry_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_atom_t name
+ ** @returns xcb_xkb_get_geometry_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_geometry_cookie_t
+xcb_xkb_get_geometry_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_atom_t name /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_get_geometry_label_font
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_get_geometry_label_font (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_properties_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_properties_length (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_property_iterator_t xcb_xkb_get_geometry_properties_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_property_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_property_iterator_t
+xcb_xkb_get_geometry_properties_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_colors_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_colors_length (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_iterator_t xcb_xkb_get_geometry_colors_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_counted_string_16_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_iterator_t
+xcb_xkb_get_geometry_colors_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_shapes_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_shapes_length (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_shape_iterator_t xcb_xkb_get_geometry_shapes_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_shape_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_shape_iterator_t
+xcb_xkb_get_geometry_shapes_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_sections_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_sections_length (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_section_iterator_t xcb_xkb_get_geometry_sections_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_section_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_section_iterator_t
+xcb_xkb_get_geometry_sections_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_doodads_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_doodads_length (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_doodad_iterator_t xcb_xkb_get_geometry_doodads_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_doodad_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_doodad_iterator_t
+xcb_xkb_get_geometry_doodads_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_geometry_key_aliases
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_geometry_key_aliases (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_key_aliases_length (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_geometry_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_geometry_key_aliases_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_geometry_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_geometry_reply_t * xcb_xkb_get_geometry_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_geometry_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_geometry_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_geometry_reply_t *
+xcb_xkb_get_geometry_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_geometry_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_xkb_set_geometry_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_geometry_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t nShapes
+ ** @param uint8_t nSections
+ ** @param xcb_atom_t name
+ ** @param uint16_t widthMM
+ ** @param uint16_t heightMM
+ ** @param uint16_t nProperties
+ ** @param uint16_t nColors
+ ** @param uint16_t nDoodads
+ ** @param uint16_t nKeyAliases
+ ** @param uint8_t baseColorNdx
+ ** @param uint8_t labelColorNdx
+ ** @param xcb_xkb_counted_string_16_t *labelFont
+ ** @param const xcb_xkb_property_t *properties
+ ** @param const xcb_xkb_counted_string_16_t *colors
+ ** @param const xcb_xkb_shape_t *shapes
+ ** @param const xcb_xkb_section_t *sections
+ ** @param const xcb_xkb_doodad_t *doodads
+ ** @param const xcb_xkb_key_alias_t *keyAliases
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_geometry_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t nShapes /**< */,
+ uint8_t nSections /**< */,
+ xcb_atom_t name /**< */,
+ uint16_t widthMM /**< */,
+ uint16_t heightMM /**< */,
+ uint16_t nProperties /**< */,
+ uint16_t nColors /**< */,
+ uint16_t nDoodads /**< */,
+ uint16_t nKeyAliases /**< */,
+ uint8_t baseColorNdx /**< */,
+ uint8_t labelColorNdx /**< */,
+ xcb_xkb_counted_string_16_t *labelFont /**< */,
+ const xcb_xkb_property_t *properties /**< */,
+ const xcb_xkb_counted_string_16_t *colors /**< */,
+ const xcb_xkb_shape_t *shapes /**< */,
+ const xcb_xkb_section_t *sections /**< */,
+ const xcb_xkb_doodad_t *doodads /**< */,
+ const xcb_xkb_key_alias_t *keyAliases /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_geometry
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t nShapes
+ ** @param uint8_t nSections
+ ** @param xcb_atom_t name
+ ** @param uint16_t widthMM
+ ** @param uint16_t heightMM
+ ** @param uint16_t nProperties
+ ** @param uint16_t nColors
+ ** @param uint16_t nDoodads
+ ** @param uint16_t nKeyAliases
+ ** @param uint8_t baseColorNdx
+ ** @param uint8_t labelColorNdx
+ ** @param xcb_xkb_counted_string_16_t *labelFont
+ ** @param const xcb_xkb_property_t *properties
+ ** @param const xcb_xkb_counted_string_16_t *colors
+ ** @param const xcb_xkb_shape_t *shapes
+ ** @param const xcb_xkb_section_t *sections
+ ** @param const xcb_xkb_doodad_t *doodads
+ ** @param const xcb_xkb_key_alias_t *keyAliases
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_geometry (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t nShapes /**< */,
+ uint8_t nSections /**< */,
+ xcb_atom_t name /**< */,
+ uint16_t widthMM /**< */,
+ uint16_t heightMM /**< */,
+ uint16_t nProperties /**< */,
+ uint16_t nColors /**< */,
+ uint16_t nDoodads /**< */,
+ uint16_t nKeyAliases /**< */,
+ uint8_t baseColorNdx /**< */,
+ uint8_t labelColorNdx /**< */,
+ xcb_xkb_counted_string_16_t *labelFont /**< */,
+ const xcb_xkb_property_t *properties /**< */,
+ const xcb_xkb_counted_string_16_t *colors /**< */,
+ const xcb_xkb_shape_t *shapes /**< */,
+ const xcb_xkb_section_t *sections /**< */,
+ const xcb_xkb_doodad_t *doodads /**< */,
+ const xcb_xkb_key_alias_t *keyAliases /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t change
+ ** @param uint32_t value
+ ** @param uint32_t ctrlsToChange
+ ** @param uint32_t autoCtrls
+ ** @param uint32_t autoCtrlsValues
+ ** @returns xcb_xkb_per_client_flags_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_per_client_flags_cookie_t
+xcb_xkb_per_client_flags (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t change /**< */,
+ uint32_t value /**< */,
+ uint32_t ctrlsToChange /**< */,
+ uint32_t autoCtrls /**< */,
+ uint32_t autoCtrlsValues /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t change
+ ** @param uint32_t value
+ ** @param uint32_t ctrlsToChange
+ ** @param uint32_t autoCtrls
+ ** @param uint32_t autoCtrlsValues
+ ** @returns xcb_xkb_per_client_flags_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_per_client_flags_cookie_t
+xcb_xkb_per_client_flags_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t change /**< */,
+ uint32_t value /**< */,
+ uint32_t ctrlsToChange /**< */,
+ uint32_t autoCtrls /**< */,
+ uint32_t autoCtrlsValues /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_per_client_flags_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_per_client_flags_reply_t * xcb_xkb_per_client_flags_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_per_client_flags_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_per_client_flags_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_per_client_flags_reply_t *
+xcb_xkb_per_client_flags_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_per_client_flags_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_xkb_list_components_serialize (void **_buffer /**< */,
+ const xcb_xkb_list_components_request_t *_aux /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */);
+
+int
+xcb_xkb_list_components_unserialize (const void *_buffer /**< */,
+ xcb_xkb_list_components_request_t **_aux /**< */);
+
+int
+xcb_xkb_list_components_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t maxNames
+ ** @param uint8_t keymapsSpecLen
+ ** @param const xcb_xkb_string8_t *keymapsSpec
+ ** @param uint8_t keycodesSpecLen
+ ** @param const xcb_xkb_string8_t *keycodesSpec
+ ** @param uint8_t typesSpecLen
+ ** @param const xcb_xkb_string8_t *typesSpec
+ ** @param uint8_t compatMapSpecLen
+ ** @param const xcb_xkb_string8_t *compatMapSpec
+ ** @param uint8_t symbolsSpecLen
+ ** @param const xcb_xkb_string8_t *symbolsSpec
+ ** @param uint8_t geometrySpecLen
+ ** @param const xcb_xkb_string8_t *geometrySpec
+ ** @returns xcb_xkb_list_components_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_list_components_cookie_t
+xcb_xkb_list_components (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t maxNames /**< */,
+ uint8_t keymapsSpecLen /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ uint8_t keycodesSpecLen /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ uint8_t typesSpecLen /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ uint8_t compatMapSpecLen /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ uint8_t symbolsSpecLen /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ uint8_t geometrySpecLen /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t maxNames
+ ** @param uint8_t keymapsSpecLen
+ ** @param const xcb_xkb_string8_t *keymapsSpec
+ ** @param uint8_t keycodesSpecLen
+ ** @param const xcb_xkb_string8_t *keycodesSpec
+ ** @param uint8_t typesSpecLen
+ ** @param const xcb_xkb_string8_t *typesSpec
+ ** @param uint8_t compatMapSpecLen
+ ** @param const xcb_xkb_string8_t *compatMapSpec
+ ** @param uint8_t symbolsSpecLen
+ ** @param const xcb_xkb_string8_t *symbolsSpec
+ ** @param uint8_t geometrySpecLen
+ ** @param const xcb_xkb_string8_t *geometrySpec
+ ** @returns xcb_xkb_list_components_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_list_components_cookie_t
+xcb_xkb_list_components_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t maxNames /**< */,
+ uint8_t keymapsSpecLen /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ uint8_t keycodesSpecLen /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ uint8_t typesSpecLen /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ uint8_t compatMapSpecLen /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ uint8_t symbolsSpecLen /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ uint8_t geometrySpecLen /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_keymaps_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_keymaps_length (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keymaps_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_keymaps_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_keycodes_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_keycodes_length (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keycodes_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_keycodes_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_types_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_types_length (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_types_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_types_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_compat_maps_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_compat_maps_length (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_compat_maps_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_compat_maps_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_symbols_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_symbols_length (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_symbols_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_symbols_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_geometries_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_geometries_length (const xcb_xkb_list_components_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_geometries_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_geometries_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_list_components_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_list_components_reply_t * xcb_xkb_list_components_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_list_components_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_list_components_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_list_components_reply_t *
+xcb_xkb_list_components_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_list_components_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_serialize (void **_buffer /**< */,
+ const xcb_xkb_get_kbd_by_name_request_t *_aux /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_unserialize (const void *_buffer /**< */,
+ xcb_xkb_get_kbd_by_name_request_t **_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_sizeof (const void *_buffer /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_type_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_type_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_type_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_name_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_xkb_key_name_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_name_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_xkb_key_name_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */);
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_t * xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_mod_def_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_t *
+xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_mod_def_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_iterator_t
+xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_t * xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_indicator_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_t *
+xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_indicator_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_get_kbd_by_name_replies_geometry_label_font
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_get_kbd_by_name_replies_geometry_label_font (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_properties_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_properties_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_property_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_properties_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_property_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_property_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_properties_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_colors_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_colors_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_colors_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_counted_string_16_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_colors_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_shapes_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_shapes_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_shape_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_shapes_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_shape_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_shape_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_shapes_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_sections_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_sections_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_section_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_sections_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_section_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_section_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_sections_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_doodads_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_doodads_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_doodad_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_doodads_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_doodad_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_doodad_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_doodads_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_serialize (void **_buffer /**< */,
+ uint16_t reported /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buffer /**< */,
+ uint16_t reported /**< */,
+ xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */);
+
+int
+xcb_xkb_get_kbd_by_name_replies_sizeof (const void *_buffer /**< */,
+ uint16_t reported /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t need
+ ** @param uint16_t want
+ ** @param uint8_t load
+ ** @param uint8_t keymapsSpecLen
+ ** @param const xcb_xkb_string8_t *keymapsSpec
+ ** @param uint8_t keycodesSpecLen
+ ** @param const xcb_xkb_string8_t *keycodesSpec
+ ** @param uint8_t typesSpecLen
+ ** @param const xcb_xkb_string8_t *typesSpec
+ ** @param uint8_t compatMapSpecLen
+ ** @param const xcb_xkb_string8_t *compatMapSpec
+ ** @param uint8_t symbolsSpecLen
+ ** @param const xcb_xkb_string8_t *symbolsSpec
+ ** @param uint8_t geometrySpecLen
+ ** @param const xcb_xkb_string8_t *geometrySpec
+ ** @returns xcb_xkb_get_kbd_by_name_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_cookie_t
+xcb_xkb_get_kbd_by_name (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t need /**< */,
+ uint16_t want /**< */,
+ uint8_t load /**< */,
+ uint8_t keymapsSpecLen /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ uint8_t keycodesSpecLen /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ uint8_t typesSpecLen /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ uint8_t compatMapSpecLen /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ uint8_t symbolsSpecLen /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ uint8_t geometrySpecLen /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t need
+ ** @param uint16_t want
+ ** @param uint8_t load
+ ** @param uint8_t keymapsSpecLen
+ ** @param const xcb_xkb_string8_t *keymapsSpec
+ ** @param uint8_t keycodesSpecLen
+ ** @param const xcb_xkb_string8_t *keycodesSpec
+ ** @param uint8_t typesSpecLen
+ ** @param const xcb_xkb_string8_t *typesSpec
+ ** @param uint8_t compatMapSpecLen
+ ** @param const xcb_xkb_string8_t *compatMapSpec
+ ** @param uint8_t symbolsSpecLen
+ ** @param const xcb_xkb_string8_t *symbolsSpec
+ ** @param uint8_t geometrySpecLen
+ ** @param const xcb_xkb_string8_t *geometrySpec
+ ** @returns xcb_xkb_get_kbd_by_name_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_cookie_t
+xcb_xkb_get_kbd_by_name_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t need /**< */,
+ uint16_t want /**< */,
+ uint8_t load /**< */,
+ uint8_t keymapsSpecLen /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ uint8_t keycodesSpecLen /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ uint8_t typesSpecLen /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ uint8_t compatMapSpecLen /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ uint8_t symbolsSpecLen /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ uint8_t geometrySpecLen /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_t * xcb_xkb_get_kbd_by_name_replies
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_reply_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_t *
+ **
+ *****************************************************************************/
+
+void *
+xcb_xkb_get_kbd_by_name_replies (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_kbd_by_name_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_reply_t * xcb_xkb_get_kbd_by_name_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_kbd_by_name_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_kbd_by_name_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_reply_t *
+xcb_xkb_get_kbd_by_name_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_kbd_by_name_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_xkb_get_device_info_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t wanted
+ ** @param uint8_t allButtons
+ ** @param uint8_t firstButton
+ ** @param uint8_t nButtons
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @returns xcb_xkb_get_device_info_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_device_info_cookie_t
+xcb_xkb_get_device_info (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t wanted /**< */,
+ uint8_t allButtons /**< */,
+ uint8_t firstButton /**< */,
+ uint8_t nButtons /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t wanted
+ ** @param uint8_t allButtons
+ ** @param uint8_t firstButton
+ ** @param uint8_t nButtons
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @returns xcb_xkb_get_device_info_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_device_info_cookie_t
+xcb_xkb_get_device_info_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t wanted /**< */,
+ uint8_t allButtons /**< */,
+ uint8_t firstButton /**< */,
+ uint8_t nButtons /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_string8_t * xcb_xkb_get_device_info_name
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_xkb_string8_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_string8_t *
+xcb_xkb_get_device_info_name (const xcb_xkb_get_device_info_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_device_info_name_length
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_device_info_name_length (const xcb_xkb_get_device_info_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_device_info_name_end
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_device_info_name_end (const xcb_xkb_get_device_info_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_device_info_btn_actions
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_device_info_btn_actions (const xcb_xkb_get_device_info_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_device_info_btn_actions_length
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_device_info_btn_actions_length (const xcb_xkb_get_device_info_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_device_info_btn_actions_iterator
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_device_info_btn_actions_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_device_info_leds_length
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_device_info_leds_length (const xcb_xkb_get_device_info_reply_t *R /**< */);
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_device_led_info_iterator_t xcb_xkb_get_device_info_leds_iterator
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_xkb_device_led_info_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_device_led_info_iterator_t
+xcb_xkb_get_device_info_leds_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_get_device_info_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_device_info_reply_t * xcb_xkb_get_device_info_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_device_info_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_device_info_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_device_info_reply_t *
+xcb_xkb_get_device_info_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_device_info_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+int
+xcb_xkb_set_device_info_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will not cause
+ * a reply to be generated. Any returned error will be
+ * saved for handling by xcb_request_check().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_device_info_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t firstBtn
+ ** @param uint8_t nBtns
+ ** @param uint16_t change
+ ** @param uint16_t nDeviceLedFBs
+ ** @param const xcb_xkb_action_t *btnActions
+ ** @param const xcb_xkb_device_led_info_t *leds
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_device_info_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t firstBtn /**< */,
+ uint8_t nBtns /**< */,
+ uint16_t change /**< */,
+ uint16_t nDeviceLedFBs /**< */,
+ const xcb_xkb_action_t *btnActions /**< */,
+ const xcb_xkb_device_led_info_t *leds /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_device_info
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t firstBtn
+ ** @param uint8_t nBtns
+ ** @param uint16_t change
+ ** @param uint16_t nDeviceLedFBs
+ ** @param const xcb_xkb_action_t *btnActions
+ ** @param const xcb_xkb_device_led_info_t *leds
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_device_info (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t firstBtn /**< */,
+ uint8_t nBtns /**< */,
+ uint16_t change /**< */,
+ uint16_t nDeviceLedFBs /**< */,
+ const xcb_xkb_action_t *btnActions /**< */,
+ const xcb_xkb_device_led_info_t *leds /**< */);
+
+int
+xcb_xkb_set_debugging_flags_sizeof (const void *_buffer /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint16_t msgLength
+ ** @param uint32_t affectFlags
+ ** @param uint32_t flags
+ ** @param uint32_t affectCtrls
+ ** @param uint32_t ctrls
+ ** @param const xcb_xkb_string8_t *message
+ ** @returns xcb_xkb_set_debugging_flags_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_debugging_flags_cookie_t
+xcb_xkb_set_debugging_flags (xcb_connection_t *c /**< */,
+ uint16_t msgLength /**< */,
+ uint32_t affectFlags /**< */,
+ uint32_t flags /**< */,
+ uint32_t affectCtrls /**< */,
+ uint32_t ctrls /**< */,
+ const xcb_xkb_string8_t *message /**< */);
+
+/**
+ * Delivers a request to the X server
+ * @param c The connection
+ * @return A cookie
+ *
+ * Delivers a request to the X server.
+ *
+ * This form can be used only if the request will cause
+ * a reply to be generated. Any returned error will be
+ * placed in the event queue.
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint16_t msgLength
+ ** @param uint32_t affectFlags
+ ** @param uint32_t flags
+ ** @param uint32_t affectCtrls
+ ** @param uint32_t ctrls
+ ** @param const xcb_xkb_string8_t *message
+ ** @returns xcb_xkb_set_debugging_flags_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_debugging_flags_cookie_t
+xcb_xkb_set_debugging_flags_unchecked (xcb_connection_t *c /**< */,
+ uint16_t msgLength /**< */,
+ uint32_t affectFlags /**< */,
+ uint32_t flags /**< */,
+ uint32_t affectCtrls /**< */,
+ uint32_t ctrls /**< */,
+ const xcb_xkb_string8_t *message /**< */);
+
+/**
+ * Return the reply
+ * @param c The connection
+ * @param cookie The cookie
+ * @param e The xcb_generic_error_t supplied
+ *
+ * Returns the reply of the request asked by
+ *
+ * The parameter @p e supplied to this function must be NULL if
+ * xcb_xkb_set_debugging_flags_unchecked(). is used.
+ * Otherwise, it stores the error if any.
+ *
+ * The returned value must be freed by the caller using free().
+ */
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_debugging_flags_reply_t * xcb_xkb_set_debugging_flags_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_set_debugging_flags_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_set_debugging_flags_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_debugging_flags_reply_t *
+xcb_xkb_set_debugging_flags_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_set_debugging_flags_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/src/3rdparty/xcb/libxcb/xkb.c b/src/3rdparty/xcb/libxcb/xkb.c
new file mode 100644
index 0000000000..3e07d6df84
--- /dev/null
+++ b/src/3rdparty/xcb/libxcb/xkb.c
@@ -0,0 +1,22021 @@
+/*
+ * This file generated automatically from xkb.xml by c_client.py.
+ * Edit at your peril.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <stddef.h> /* for offsetof() */
+#include "xcbext.h"
+#include "xkb.h"
+
+#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
+#include "xproto.h"
+
+xcb_extension_t xcb_xkb_id = { "XKEYBOARD", 0 };
+
+int qt_xcb_sumof(uint8_t *list, int len)
+{
+ int i, s = 0;
+ for(i=0; i<len; i++) {
+ s += *list;
+ list++;
+ }
+ return s;
+}
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_ax_option_next
+ **
+ ** @param xcb_xkb_ax_option_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_ax_option_next (xcb_xkb_ax_option_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_ax_option_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_ax_option_end
+ **
+ ** @param xcb_xkb_ax_option_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_ax_option_end (xcb_xkb_ax_option_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_device_spec_next
+ **
+ ** @param xcb_xkb_device_spec_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_device_spec_next (xcb_xkb_device_spec_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_device_spec_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_device_spec_end
+ **
+ ** @param xcb_xkb_device_spec_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_device_spec_end (xcb_xkb_device_spec_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_led_class_spec_next
+ **
+ ** @param xcb_xkb_led_class_spec_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_led_class_spec_next (xcb_xkb_led_class_spec_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_led_class_spec_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_led_class_spec_end
+ **
+ ** @param xcb_xkb_led_class_spec_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_led_class_spec_end (xcb_xkb_led_class_spec_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_bell_class_spec_next
+ **
+ ** @param xcb_xkb_bell_class_spec_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_bell_class_spec_next (xcb_xkb_bell_class_spec_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_bell_class_spec_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_bell_class_spec_end
+ **
+ ** @param xcb_xkb_bell_class_spec_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_bell_class_spec_end (xcb_xkb_bell_class_spec_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_id_spec_next
+ **
+ ** @param xcb_xkb_id_spec_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_id_spec_next (xcb_xkb_id_spec_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_id_spec_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_id_spec_end
+ **
+ ** @param xcb_xkb_id_spec_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_id_spec_end (xcb_xkb_id_spec_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_indicator_map_next
+ **
+ ** @param xcb_xkb_indicator_map_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_indicator_map_next (xcb_xkb_indicator_map_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_indicator_map_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_indicator_map_end
+ **
+ ** @param xcb_xkb_indicator_map_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_indicator_map_end (xcb_xkb_indicator_map_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_mod_def_next
+ **
+ ** @param xcb_xkb_mod_def_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_mod_def_next (xcb_xkb_mod_def_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_mod_def_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_mod_def_end
+ **
+ ** @param xcb_xkb_mod_def_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_mod_def_end (xcb_xkb_mod_def_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_name_next
+ **
+ ** @param xcb_xkb_key_name_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_name_next (xcb_xkb_key_name_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_key_name_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_name_end
+ **
+ ** @param xcb_xkb_key_name_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_name_end (xcb_xkb_key_name_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_alias_next
+ **
+ ** @param xcb_xkb_key_alias_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_alias_next (xcb_xkb_key_alias_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_key_alias_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_alias_end
+ **
+ ** @param xcb_xkb_key_alias_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_alias_end (xcb_xkb_key_alias_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+int
+xcb_xkb_counted_string_8_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_counted_string_8_t *_aux = (xcb_xkb_counted_string_8_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_counted_string_8_t);
+ xcb_tmp += xcb_block_len;
+ /* string */
+ xcb_block_len += _aux->length * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_counted_string_8_string
+ **
+ ** @param const xcb_xkb_counted_string_8_t *R
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_counted_string_8_string (const xcb_xkb_counted_string_8_t *R /**< */)
+{
+ return (uint8_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_counted_string_8_string_length
+ **
+ ** @param const xcb_xkb_counted_string_8_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_counted_string_8_string_length (const xcb_xkb_counted_string_8_t *R /**< */)
+{
+ return R->length;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_8_string_end
+ **
+ ** @param const xcb_xkb_counted_string_8_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_counted_string_8_string_end (const xcb_xkb_counted_string_8_t *R /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint8_t *) (R + 1)) + (R->length);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_counted_string_8_next
+ **
+ ** @param xcb_xkb_counted_string_8_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_counted_string_8_next (xcb_xkb_counted_string_8_iterator_t *i /**< */)
+{
+ xcb_xkb_counted_string_8_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_counted_string_8_t *)(((char *)R) + xcb_xkb_counted_string_8_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_counted_string_8_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_8_end
+ **
+ ** @param xcb_xkb_counted_string_8_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_counted_string_8_end (xcb_xkb_counted_string_8_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_counted_string_8_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_counted_string_16_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_counted_string_16_t *_aux = (xcb_xkb_counted_string_16_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_counted_string_16_t);
+ xcb_tmp += xcb_block_len;
+ /* string */
+ xcb_block_len += _aux->length * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_counted_string_16_string
+ **
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */)
+{
+ return (uint8_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_counted_string_16_string_length
+ **
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R /**< */)
+{
+ return R->length;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end
+ **
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_counted_string_16_string_end (const xcb_xkb_counted_string_16_t *R /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint8_t *) (R + 1)) + (R->length);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_counted_string_16_pad_0
+ **
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_counted_string_16_pad_0 (const xcb_xkb_counted_string_16_t *R /**< */)
+{
+ xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_string_end(R);
+ return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0);
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_counted_string_16_next
+ **
+ ** @param xcb_xkb_counted_string_16_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_counted_string_16_next (xcb_xkb_counted_string_16_iterator_t *i /**< */)
+{
+ xcb_xkb_counted_string_16_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_counted_string_16_t *)(((char *)R) + xcb_xkb_counted_string_16_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_counted_string_16_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_16_end
+ **
+ ** @param xcb_xkb_counted_string_16_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_counted_string_16_end (xcb_xkb_counted_string_16_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_counted_string_16_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_kt_map_entry_next
+ **
+ ** @param xcb_xkb_kt_map_entry_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_kt_map_entry_next (xcb_xkb_kt_map_entry_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_kt_map_entry_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_kt_map_entry_end
+ **
+ ** @param xcb_xkb_kt_map_entry_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_kt_map_entry_end (xcb_xkb_kt_map_entry_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+int
+xcb_xkb_key_type_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_key_type_t *_aux = (xcb_xkb_key_type_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_key_type_t);
+ xcb_tmp += xcb_block_len;
+ /* map */
+ xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_map_entry_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_kt_map_entry_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* preserve */
+ xcb_block_len += (_aux->hasPreserve * _aux->nMapEntries) * sizeof(xcb_xkb_mod_def_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_map_entry_t * xcb_xkb_key_type_map
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns xcb_xkb_kt_map_entry_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_map_entry_t *
+xcb_xkb_key_type_map (const xcb_xkb_key_type_t *R /**< */)
+{
+ return (xcb_xkb_kt_map_entry_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_key_type_map_length
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_key_type_map_length (const xcb_xkb_key_type_t *R /**< */)
+{
+ return R->nMapEntries;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_map_entry_iterator_t xcb_xkb_key_type_map_iterator
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns xcb_xkb_kt_map_entry_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_map_entry_iterator_t
+xcb_xkb_key_type_map_iterator (const xcb_xkb_key_type_t *R /**< */)
+{
+ xcb_xkb_kt_map_entry_iterator_t i;
+ i.data = (xcb_xkb_kt_map_entry_t *) (R + 1);
+ i.rem = R->nMapEntries;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_t * xcb_xkb_key_type_preserve
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns xcb_xkb_mod_def_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_t *
+xcb_xkb_key_type_preserve (const xcb_xkb_key_type_t *R /**< */)
+{
+ xcb_generic_iterator_t prev = xcb_xkb_kt_map_entry_end(xcb_xkb_key_type_map_iterator(R));
+ return (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index) + 0);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_key_type_preserve_length
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_key_type_preserve_length (const xcb_xkb_key_type_t *R /**< */)
+{
+ return (R->hasPreserve * R->nMapEntries);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_iterator_t xcb_xkb_key_type_preserve_iterator
+ **
+ ** @param const xcb_xkb_key_type_t *R
+ ** @returns xcb_xkb_mod_def_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_iterator_t
+xcb_xkb_key_type_preserve_iterator (const xcb_xkb_key_type_t *R /**< */)
+{
+ xcb_xkb_mod_def_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_kt_map_entry_end(xcb_xkb_key_type_map_iterator(R));
+ i.data = (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index));
+ i.rem = (R->hasPreserve * R->nMapEntries);
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_type_next
+ **
+ ** @param xcb_xkb_key_type_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_type_next (xcb_xkb_key_type_iterator_t *i /**< */)
+{
+ xcb_xkb_key_type_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_key_type_t *)(((char *)R) + xcb_xkb_key_type_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_key_type_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_type_end
+ **
+ ** @param xcb_xkb_key_type_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_type_end (xcb_xkb_key_type_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_key_type_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_key_sym_map_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_key_sym_map_t *_aux = (xcb_xkb_key_sym_map_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_key_sym_map_t);
+ xcb_tmp += xcb_block_len;
+ /* syms */
+ xcb_block_len += _aux->nSyms * sizeof(xcb_keysym_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_keysym_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_keysym_t * xcb_xkb_key_sym_map_syms
+ **
+ ** @param const xcb_xkb_key_sym_map_t *R
+ ** @returns xcb_keysym_t *
+ **
+ *****************************************************************************/
+
+xcb_keysym_t *
+xcb_xkb_key_sym_map_syms (const xcb_xkb_key_sym_map_t *R /**< */)
+{
+ return (xcb_keysym_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_key_sym_map_syms_length
+ **
+ ** @param const xcb_xkb_key_sym_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_key_sym_map_syms_length (const xcb_xkb_key_sym_map_t *R /**< */)
+{
+ return R->nSyms;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_sym_map_syms_end
+ **
+ ** @param const xcb_xkb_key_sym_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_sym_map_syms_end (const xcb_xkb_key_sym_map_t *R /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_keysym_t *) (R + 1)) + (R->nSyms);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_sym_map_next
+ **
+ ** @param xcb_xkb_key_sym_map_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_sym_map_next (xcb_xkb_key_sym_map_iterator_t *i /**< */)
+{
+ xcb_xkb_key_sym_map_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_key_sym_map_t *)(((char *)R) + xcb_xkb_key_sym_map_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_key_sym_map_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_sym_map_end
+ **
+ ** @param xcb_xkb_key_sym_map_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_sym_map_end (xcb_xkb_key_sym_map_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_key_sym_map_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_common_behavior_next
+ **
+ ** @param xcb_xkb_common_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_common_behavior_next (xcb_xkb_common_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_common_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_common_behavior_end
+ **
+ ** @param xcb_xkb_common_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_common_behavior_end (xcb_xkb_common_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_default_behavior_next
+ **
+ ** @param xcb_xkb_default_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_default_behavior_next (xcb_xkb_default_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_default_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_default_behavior_end
+ **
+ ** @param xcb_xkb_default_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_default_behavior_end (xcb_xkb_default_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_lock_behavior_next
+ **
+ ** @param xcb_xkb_lock_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_lock_behavior_next (xcb_xkb_lock_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_lock_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_lock_behavior_end
+ **
+ ** @param xcb_xkb_lock_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_lock_behavior_end (xcb_xkb_lock_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_radio_group_behavior_next
+ **
+ ** @param xcb_xkb_radio_group_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_radio_group_behavior_next (xcb_xkb_radio_group_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_radio_group_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_radio_group_behavior_end
+ **
+ ** @param xcb_xkb_radio_group_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_radio_group_behavior_end (xcb_xkb_radio_group_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_1_behavior_next
+ **
+ ** @param xcb_xkb_overlay_1_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_1_behavior_next (xcb_xkb_overlay_1_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_overlay_1_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_1_behavior_end
+ **
+ ** @param xcb_xkb_overlay_1_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_1_behavior_end (xcb_xkb_overlay_1_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_2_behavior_next
+ **
+ ** @param xcb_xkb_overlay_2_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_2_behavior_next (xcb_xkb_overlay_2_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_overlay_2_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_2_behavior_end
+ **
+ ** @param xcb_xkb_overlay_2_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_2_behavior_end (xcb_xkb_overlay_2_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_permament_lock_behavior_next
+ **
+ ** @param xcb_xkb_permament_lock_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_permament_lock_behavior_next (xcb_xkb_permament_lock_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_permament_lock_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_permament_lock_behavior_end
+ **
+ ** @param xcb_xkb_permament_lock_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_permament_lock_behavior_end (xcb_xkb_permament_lock_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_permament_radio_group_behavior_next
+ **
+ ** @param xcb_xkb_permament_radio_group_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_permament_radio_group_behavior_next (xcb_xkb_permament_radio_group_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_permament_radio_group_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_permament_radio_group_behavior_end
+ **
+ ** @param xcb_xkb_permament_radio_group_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_permament_overlay_1_behavior_next
+ **
+ ** @param xcb_xkb_permament_overlay_1_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_permament_overlay_1_behavior_next (xcb_xkb_permament_overlay_1_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_permament_overlay_1_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_permament_overlay_1_behavior_end
+ **
+ ** @param xcb_xkb_permament_overlay_1_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_permament_overlay_1_behavior_end (xcb_xkb_permament_overlay_1_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_permament_overlay_2_behavior_next
+ **
+ ** @param xcb_xkb_permament_overlay_2_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_permament_overlay_2_behavior_next (xcb_xkb_permament_overlay_2_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_permament_overlay_2_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_permament_overlay_2_behavior_end
+ **
+ ** @param xcb_xkb_permament_overlay_2_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_permament_overlay_2_behavior_end (xcb_xkb_permament_overlay_2_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_behavior_next
+ **
+ ** @param xcb_xkb_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_behavior_next (xcb_xkb_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_behavior_end
+ **
+ ** @param xcb_xkb_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_behavior_end (xcb_xkb_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_set_behavior_next
+ **
+ ** @param xcb_xkb_set_behavior_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_set_behavior_next (xcb_xkb_set_behavior_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_set_behavior_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_behavior_end
+ **
+ ** @param xcb_xkb_set_behavior_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_behavior_end (xcb_xkb_set_behavior_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_set_explicit_next
+ **
+ ** @param xcb_xkb_set_explicit_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_set_explicit_next (xcb_xkb_set_explicit_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_set_explicit_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_explicit_end
+ **
+ ** @param xcb_xkb_set_explicit_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_explicit_end (xcb_xkb_set_explicit_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_mod_map_next
+ **
+ ** @param xcb_xkb_key_mod_map_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_mod_map_next (xcb_xkb_key_mod_map_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_key_mod_map_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_mod_map_end
+ **
+ ** @param xcb_xkb_key_mod_map_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_mod_map_end (xcb_xkb_key_mod_map_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_v_mod_map_next
+ **
+ ** @param xcb_xkb_key_v_mod_map_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_v_mod_map_next (xcb_xkb_key_v_mod_map_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_key_v_mod_map_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_v_mod_map_end
+ **
+ ** @param xcb_xkb_key_v_mod_map_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_v_mod_map_end (xcb_xkb_key_v_mod_map_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_kt_set_map_entry_next
+ **
+ ** @param xcb_xkb_kt_set_map_entry_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_kt_set_map_entry_next (xcb_xkb_kt_set_map_entry_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_kt_set_map_entry_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_kt_set_map_entry_end
+ **
+ ** @param xcb_xkb_kt_set_map_entry_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_kt_set_map_entry_end (xcb_xkb_kt_set_map_entry_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+int
+xcb_xkb_set_key_type_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_set_key_type_t *_aux = (xcb_xkb_set_key_type_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_set_key_type_t);
+ xcb_tmp += xcb_block_len;
+ /* entries */
+ xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_set_map_entry_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_kt_set_map_entry_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* preserve_entries */
+ xcb_block_len += (_aux->preserve * _aux->nMapEntries) * sizeof(xcb_xkb_kt_set_map_entry_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_kt_set_map_entry_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_entries
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns xcb_xkb_kt_set_map_entry_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_set_map_entry_t *
+xcb_xkb_set_key_type_entries (const xcb_xkb_set_key_type_t *R /**< */)
+{
+ return (xcb_xkb_kt_set_map_entry_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_key_type_entries_length
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_key_type_entries_length (const xcb_xkb_set_key_type_t *R /**< */)
+{
+ return R->nMapEntries;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_entries_iterator
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns xcb_xkb_kt_set_map_entry_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_set_map_entry_iterator_t
+xcb_xkb_set_key_type_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */)
+{
+ xcb_xkb_kt_set_map_entry_iterator_t i;
+ i.data = (xcb_xkb_kt_set_map_entry_t *) (R + 1);
+ i.rem = R->nMapEntries;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_preserve_entries
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns xcb_xkb_kt_set_map_entry_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_set_map_entry_t *
+xcb_xkb_set_key_type_preserve_entries (const xcb_xkb_set_key_type_t *R /**< */)
+{
+ xcb_generic_iterator_t prev = xcb_xkb_kt_set_map_entry_end(xcb_xkb_set_key_type_entries_iterator(R));
+ return (xcb_xkb_kt_set_map_entry_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_kt_set_map_entry_t, prev.index) + 0);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_key_type_preserve_entries_length
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_key_type_preserve_entries_length (const xcb_xkb_set_key_type_t *R /**< */)
+{
+ return (R->preserve * R->nMapEntries);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_preserve_entries_iterator
+ **
+ ** @param const xcb_xkb_set_key_type_t *R
+ ** @returns xcb_xkb_kt_set_map_entry_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_kt_set_map_entry_iterator_t
+xcb_xkb_set_key_type_preserve_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */)
+{
+ xcb_xkb_kt_set_map_entry_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_kt_set_map_entry_end(xcb_xkb_set_key_type_entries_iterator(R));
+ i.data = (xcb_xkb_kt_set_map_entry_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_kt_set_map_entry_t, prev.index));
+ i.rem = (R->preserve * R->nMapEntries);
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_set_key_type_next
+ **
+ ** @param xcb_xkb_set_key_type_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_set_key_type_next (xcb_xkb_set_key_type_iterator_t *i /**< */)
+{
+ xcb_xkb_set_key_type_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_set_key_type_t *)(((char *)R) + xcb_xkb_set_key_type_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_set_key_type_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_key_type_end
+ **
+ ** @param xcb_xkb_set_key_type_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_key_type_end (xcb_xkb_set_key_type_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_set_key_type_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_string8_next
+ **
+ ** @param xcb_xkb_string8_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_string8_next (xcb_xkb_string8_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_string8_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_string8_end
+ **
+ ** @param xcb_xkb_string8_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_string8_end (xcb_xkb_string8_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+int
+xcb_xkb_property_serialize (void **_buffer /**< */,
+ const xcb_xkb_property_t *_aux /**< */,
+ const xcb_xkb_string8_t *name /**< */,
+ const xcb_xkb_string8_t *value /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[5];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ /* xcb_xkb_property_t.nameLength */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->nameLength;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* name */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) name;
+ xcb_block_len += _aux->nameLength * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->nameLength * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_property_t.valueLength */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valueLength;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* value */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) value;
+ xcb_block_len += _aux->valueLength * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->valueLength * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_property_unserialize (const void *_buffer /**< */,
+ xcb_xkb_property_t **_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ xcb_xkb_property_t xcb_out;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ xcb_xkb_string8_t *name;
+ int name_len;
+ xcb_xkb_string8_t *value;
+ int value_len;
+
+ /* xcb_xkb_property_t.nameLength */
+ xcb_out.nameLength = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* name */
+ name = (xcb_xkb_string8_t *)xcb_tmp;
+ name_len = xcb_out.nameLength * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += name_len;
+ xcb_tmp += name_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_property_t.valueLength */
+ xcb_out.valueLength = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* value */
+ value = (xcb_xkb_string8_t *)xcb_tmp;
+ value_len = xcb_out.valueLength * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += value_len;
+ xcb_tmp += value_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == _aux)
+ return xcb_buffer_len;
+
+ if (NULL == *_aux) {
+ /* allocate memory */
+ *_aux = malloc(xcb_buffer_len);
+ }
+
+ xcb_tmp = ((char *)*_aux)+xcb_buffer_len;
+ xcb_tmp -= value_len;
+ memmove(xcb_tmp, value, value_len);
+ xcb_tmp -= name_len;
+ memmove(xcb_tmp, name, name_len);
+ **_aux = xcb_out;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_property_sizeof (const void *_buffer /**< */)
+{
+ return xcb_xkb_property_unserialize(_buffer, NULL);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_string8_t * xcb_xkb_property_name
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns xcb_xkb_string8_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_string8_t *
+xcb_xkb_property_name (const xcb_xkb_property_t *R /**< */)
+{
+ return (xcb_xkb_string8_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_property_name_length
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_property_name_length (const xcb_xkb_property_t *R /**< */)
+{
+ return R->nameLength;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_property_name_end
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_property_name_end (const xcb_xkb_property_t *R /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->nameLength);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_string8_t * xcb_xkb_property_value
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns xcb_xkb_string8_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_string8_t *
+xcb_xkb_property_value (const xcb_xkb_property_t *R /**< */)
+{
+ xcb_generic_iterator_t prev = xcb_xkb_property_name_end(R);
+ return (xcb_xkb_string8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 2);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_property_value_length
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_property_value_length (const xcb_xkb_property_t *R /**< */)
+{
+ return R->valueLength;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_property_value_end
+ **
+ ** @param const xcb_xkb_property_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_property_value_end (const xcb_xkb_property_t *R /**< */)
+{
+ xcb_generic_iterator_t i;
+ xcb_generic_iterator_t child = xcb_xkb_property_name_end(R);
+ i.data = ((xcb_xkb_string8_t *) child.data) + (R->valueLength);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_property_next
+ **
+ ** @param xcb_xkb_property_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_property_next (xcb_xkb_property_iterator_t *i /**< */)
+{
+ xcb_xkb_property_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_property_t *)(((char *)R) + xcb_xkb_property_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_property_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_property_end
+ **
+ ** @param xcb_xkb_property_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_property_end (xcb_xkb_property_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_property_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_outline_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_outline_t *_aux = (xcb_xkb_outline_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_outline_t);
+ xcb_tmp += xcb_block_len;
+ /* points */
+ xcb_block_len += _aux->nPoints * sizeof(xcb_point_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_point_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_point_t * xcb_xkb_outline_points
+ **
+ ** @param const xcb_xkb_outline_t *R
+ ** @returns xcb_point_t *
+ **
+ *****************************************************************************/
+
+xcb_point_t *
+xcb_xkb_outline_points (const xcb_xkb_outline_t *R /**< */)
+{
+ return (xcb_point_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_outline_points_length
+ **
+ ** @param const xcb_xkb_outline_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_outline_points_length (const xcb_xkb_outline_t *R /**< */)
+{
+ return R->nPoints;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_point_iterator_t xcb_xkb_outline_points_iterator
+ **
+ ** @param const xcb_xkb_outline_t *R
+ ** @returns xcb_point_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_point_iterator_t
+xcb_xkb_outline_points_iterator (const xcb_xkb_outline_t *R /**< */)
+{
+ xcb_point_iterator_t i;
+ i.data = (xcb_point_t *) (R + 1);
+ i.rem = R->nPoints;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_outline_next
+ **
+ ** @param xcb_xkb_outline_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_outline_next (xcb_xkb_outline_iterator_t *i /**< */)
+{
+ xcb_xkb_outline_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_outline_t *)(((char *)R) + xcb_xkb_outline_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_outline_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_outline_end
+ **
+ ** @param xcb_xkb_outline_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_outline_end (xcb_xkb_outline_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_outline_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_shape_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_shape_t *_aux = (xcb_xkb_shape_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_xkb_shape_t);
+ xcb_tmp += xcb_block_len;
+ /* outlines */
+ for(i=0; i<_aux->nOutlines; i++) {
+ xcb_tmp_len = xcb_xkb_outline_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_outline_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_shape_outlines_length
+ **
+ ** @param const xcb_xkb_shape_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_shape_outlines_length (const xcb_xkb_shape_t *R /**< */)
+{
+ return R->nOutlines;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_outline_iterator_t xcb_xkb_shape_outlines_iterator
+ **
+ ** @param const xcb_xkb_shape_t *R
+ ** @returns xcb_xkb_outline_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_outline_iterator_t
+xcb_xkb_shape_outlines_iterator (const xcb_xkb_shape_t *R /**< */)
+{
+ xcb_xkb_outline_iterator_t i;
+ i.data = (xcb_xkb_outline_t *) (R + 1);
+ i.rem = R->nOutlines;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_shape_next
+ **
+ ** @param xcb_xkb_shape_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_shape_next (xcb_xkb_shape_iterator_t *i /**< */)
+{
+ xcb_xkb_shape_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_shape_t *)(((char *)R) + xcb_xkb_shape_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_shape_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_shape_end
+ **
+ ** @param xcb_xkb_shape_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_shape_end (xcb_xkb_shape_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_shape_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_key_next
+ **
+ ** @param xcb_xkb_key_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_key_next (xcb_xkb_key_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_key_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_key_end
+ **
+ ** @param xcb_xkb_key_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_key_end (xcb_xkb_key_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_key_next
+ **
+ ** @param xcb_xkb_overlay_key_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_key_next (xcb_xkb_overlay_key_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_overlay_key_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_key_end
+ **
+ ** @param xcb_xkb_overlay_key_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_key_end (xcb_xkb_overlay_key_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+int
+xcb_xkb_overlay_row_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_overlay_row_t *_aux = (xcb_xkb_overlay_row_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_overlay_row_t);
+ xcb_tmp += xcb_block_len;
+ /* keys */
+ xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_overlay_key_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_overlay_key_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_overlay_key_t * xcb_xkb_overlay_row_keys
+ **
+ ** @param const xcb_xkb_overlay_row_t *R
+ ** @returns xcb_xkb_overlay_key_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_overlay_key_t *
+xcb_xkb_overlay_row_keys (const xcb_xkb_overlay_row_t *R /**< */)
+{
+ return (xcb_xkb_overlay_key_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_overlay_row_keys_length
+ **
+ ** @param const xcb_xkb_overlay_row_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_overlay_row_keys_length (const xcb_xkb_overlay_row_t *R /**< */)
+{
+ return R->nKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_overlay_key_iterator_t xcb_xkb_overlay_row_keys_iterator
+ **
+ ** @param const xcb_xkb_overlay_row_t *R
+ ** @returns xcb_xkb_overlay_key_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_overlay_key_iterator_t
+xcb_xkb_overlay_row_keys_iterator (const xcb_xkb_overlay_row_t *R /**< */)
+{
+ xcb_xkb_overlay_key_iterator_t i;
+ i.data = (xcb_xkb_overlay_key_t *) (R + 1);
+ i.rem = R->nKeys;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_row_next
+ **
+ ** @param xcb_xkb_overlay_row_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_row_next (xcb_xkb_overlay_row_iterator_t *i /**< */)
+{
+ xcb_xkb_overlay_row_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_overlay_row_t *)(((char *)R) + xcb_xkb_overlay_row_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_overlay_row_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_row_end
+ **
+ ** @param xcb_xkb_overlay_row_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_row_end (xcb_xkb_overlay_row_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_overlay_row_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_overlay_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_overlay_t *_aux = (xcb_xkb_overlay_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_xkb_overlay_t);
+ xcb_tmp += xcb_block_len;
+ /* rows */
+ for(i=0; i<_aux->nRows; i++) {
+ xcb_tmp_len = xcb_xkb_overlay_row_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_overlay_row_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_overlay_rows_length
+ **
+ ** @param const xcb_xkb_overlay_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_overlay_rows_length (const xcb_xkb_overlay_t *R /**< */)
+{
+ return R->nRows;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_overlay_row_iterator_t xcb_xkb_overlay_rows_iterator
+ **
+ ** @param const xcb_xkb_overlay_t *R
+ ** @returns xcb_xkb_overlay_row_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_overlay_row_iterator_t
+xcb_xkb_overlay_rows_iterator (const xcb_xkb_overlay_t *R /**< */)
+{
+ xcb_xkb_overlay_row_iterator_t i;
+ i.data = (xcb_xkb_overlay_row_t *) (R + 1);
+ i.rem = R->nRows;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_overlay_next
+ **
+ ** @param xcb_xkb_overlay_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_overlay_next (xcb_xkb_overlay_iterator_t *i /**< */)
+{
+ xcb_xkb_overlay_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_overlay_t *)(((char *)R) + xcb_xkb_overlay_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_overlay_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_overlay_end
+ **
+ ** @param xcb_xkb_overlay_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_overlay_end (xcb_xkb_overlay_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_overlay_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_row_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_row_t *_aux = (xcb_xkb_row_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_row_t);
+ xcb_tmp += xcb_block_len;
+ /* keys */
+ xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_key_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_t * xcb_xkb_row_keys
+ **
+ ** @param const xcb_xkb_row_t *R
+ ** @returns xcb_xkb_key_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_t *
+xcb_xkb_row_keys (const xcb_xkb_row_t *R /**< */)
+{
+ return (xcb_xkb_key_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_row_keys_length
+ **
+ ** @param const xcb_xkb_row_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_row_keys_length (const xcb_xkb_row_t *R /**< */)
+{
+ return R->nKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_iterator_t xcb_xkb_row_keys_iterator
+ **
+ ** @param const xcb_xkb_row_t *R
+ ** @returns xcb_xkb_key_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_iterator_t
+xcb_xkb_row_keys_iterator (const xcb_xkb_row_t *R /**< */)
+{
+ xcb_xkb_key_iterator_t i;
+ i.data = (xcb_xkb_key_t *) (R + 1);
+ i.rem = R->nKeys;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_row_next
+ **
+ ** @param xcb_xkb_row_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_row_next (xcb_xkb_row_iterator_t *i /**< */)
+{
+ xcb_xkb_row_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_row_t *)(((char *)R) + xcb_xkb_row_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_row_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_row_end
+ **
+ ** @param xcb_xkb_row_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_row_end (xcb_xkb_row_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_row_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_common_doodad_next
+ **
+ ** @param xcb_xkb_common_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_common_doodad_next (xcb_xkb_common_doodad_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_common_doodad_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_common_doodad_end
+ **
+ ** @param xcb_xkb_common_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_common_doodad_end (xcb_xkb_common_doodad_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_shape_doodad_next
+ **
+ ** @param xcb_xkb_shape_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_shape_doodad_next (xcb_xkb_shape_doodad_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_shape_doodad_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_shape_doodad_end
+ **
+ ** @param xcb_xkb_shape_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_shape_doodad_end (xcb_xkb_shape_doodad_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+int
+xcb_xkb_text_doodad_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_text_doodad_t);
+ xcb_tmp += xcb_block_len;
+ /* text */
+ xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* font */
+ xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_text_doodad_text
+ **
+ ** @param const xcb_xkb_text_doodad_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_text_doodad_text (const xcb_xkb_text_doodad_t *R /**< */)
+{
+ return (xcb_xkb_counted_string_16_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_text_doodad_font
+ **
+ ** @param const xcb_xkb_text_doodad_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_text_doodad_font (const xcb_xkb_text_doodad_t *R /**< */)
+{
+ xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_string_end(xcb_xkb_text_doodad_text(R));
+ return (xcb_xkb_counted_string_16_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_counted_string_16_t, prev.index) + 0);
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_text_doodad_next
+ **
+ ** @param xcb_xkb_text_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_text_doodad_next (xcb_xkb_text_doodad_iterator_t *i /**< */)
+{
+ xcb_xkb_text_doodad_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_text_doodad_t *)(((char *)R) + xcb_xkb_text_doodad_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_text_doodad_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_text_doodad_end
+ **
+ ** @param xcb_xkb_text_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_text_doodad_end (xcb_xkb_text_doodad_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_text_doodad_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_indicator_doodad_next
+ **
+ ** @param xcb_xkb_indicator_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_indicator_doodad_next (xcb_xkb_indicator_doodad_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_indicator_doodad_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_indicator_doodad_end
+ **
+ ** @param xcb_xkb_indicator_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_indicator_doodad_end (xcb_xkb_indicator_doodad_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+int
+xcb_xkb_logo_doodad_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_logo_doodad_t);
+ xcb_tmp += xcb_block_len;
+ /* logoName */
+ xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_logo_doodad_logo_name
+ **
+ ** @param const xcb_xkb_logo_doodad_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_logo_doodad_logo_name (const xcb_xkb_logo_doodad_t *R /**< */)
+{
+ return (xcb_xkb_counted_string_16_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_logo_doodad_next
+ **
+ ** @param xcb_xkb_logo_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_logo_doodad_next (xcb_xkb_logo_doodad_iterator_t *i /**< */)
+{
+ xcb_xkb_logo_doodad_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_logo_doodad_t *)(((char *)R) + xcb_xkb_logo_doodad_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_logo_doodad_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_logo_doodad_end
+ **
+ ** @param xcb_xkb_logo_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_logo_doodad_end (xcb_xkb_logo_doodad_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_logo_doodad_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_doodad_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_doodad_t);
+ xcb_tmp += xcb_block_len;
+ /* text */
+ xcb_block_len += xcb_xkb_text_doodad_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_text_doodad_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* logo */
+ xcb_block_len += xcb_xkb_logo_doodad_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_logo_doodad_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_doodad_next
+ **
+ ** @param xcb_xkb_doodad_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_doodad_next (xcb_xkb_doodad_iterator_t *i /**< */)
+{
+ xcb_xkb_doodad_t *R = i->data;
+ /* FIXME - determine the size of the union xcb_xkb_doodad_t */
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_doodad_end
+ **
+ ** @param xcb_xkb_doodad_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_doodad_end (xcb_xkb_doodad_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_doodad_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_section_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_section_t *_aux = (xcb_xkb_section_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_xkb_section_t);
+ xcb_tmp += xcb_block_len;
+ /* rows */
+ for(i=0; i<_aux->nRows; i++) {
+ xcb_tmp_len = xcb_xkb_row_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_row_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* doodads */
+ for(i=0; i<_aux->nDoodads; i++) {
+ xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_doodad_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* overlays */
+ for(i=0; i<_aux->nOverlays; i++) {
+ xcb_tmp_len = xcb_xkb_overlay_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_overlay_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_section_rows_length
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_section_rows_length (const xcb_xkb_section_t *R /**< */)
+{
+ return R->nRows;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_row_iterator_t xcb_xkb_section_rows_iterator
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns xcb_xkb_row_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_row_iterator_t
+xcb_xkb_section_rows_iterator (const xcb_xkb_section_t *R /**< */)
+{
+ xcb_xkb_row_iterator_t i;
+ i.data = (xcb_xkb_row_t *) (R + 1);
+ i.rem = R->nRows;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_section_doodads_length
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_section_doodads_length (const xcb_xkb_section_t *R /**< */)
+{
+ return R->nDoodads;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_doodad_iterator_t xcb_xkb_section_doodads_iterator
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns xcb_xkb_doodad_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_doodad_iterator_t
+xcb_xkb_section_doodads_iterator (const xcb_xkb_section_t *R /**< */)
+{
+ xcb_xkb_doodad_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_row_end(xcb_xkb_section_rows_iterator(R));
+ i.data = (xcb_xkb_doodad_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_doodad_t, prev.index));
+ i.rem = R->nDoodads;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_section_overlays_length
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_section_overlays_length (const xcb_xkb_section_t *R /**< */)
+{
+ return R->nOverlays;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_overlay_iterator_t xcb_xkb_section_overlays_iterator
+ **
+ ** @param const xcb_xkb_section_t *R
+ ** @returns xcb_xkb_overlay_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_overlay_iterator_t
+xcb_xkb_section_overlays_iterator (const xcb_xkb_section_t *R /**< */)
+{
+ xcb_xkb_overlay_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_doodad_end(xcb_xkb_section_doodads_iterator(R));
+ i.data = (xcb_xkb_overlay_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_overlay_t, prev.index));
+ i.rem = R->nOverlays;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_section_next
+ **
+ ** @param xcb_xkb_section_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_section_next (xcb_xkb_section_iterator_t *i /**< */)
+{
+ xcb_xkb_section_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_section_t *)(((char *)R) + xcb_xkb_section_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_section_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_section_end
+ **
+ ** @param xcb_xkb_section_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_section_end (xcb_xkb_section_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_section_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_listing_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_listing_t *_aux = (xcb_xkb_listing_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_listing_t);
+ xcb_tmp += xcb_block_len;
+ /* string */
+ xcb_block_len += _aux->length * sizeof(xcb_xkb_string8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_string8_t * xcb_xkb_listing_string
+ **
+ ** @param const xcb_xkb_listing_t *R
+ ** @returns xcb_xkb_string8_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_string8_t *
+xcb_xkb_listing_string (const xcb_xkb_listing_t *R /**< */)
+{
+ return (xcb_xkb_string8_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_listing_string_length
+ **
+ ** @param const xcb_xkb_listing_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_listing_string_length (const xcb_xkb_listing_t *R /**< */)
+{
+ return R->length;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_listing_string_end
+ **
+ ** @param const xcb_xkb_listing_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_listing_string_end (const xcb_xkb_listing_t *R /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->length);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_listing_next
+ **
+ ** @param xcb_xkb_listing_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_listing_next (xcb_xkb_listing_iterator_t *i /**< */)
+{
+ xcb_xkb_listing_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_listing_t *)(((char *)R) + xcb_xkb_listing_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_listing_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_listing_end
+ **
+ ** @param xcb_xkb_listing_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_listing_end (xcb_xkb_listing_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_listing_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+int
+xcb_xkb_device_led_info_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_device_led_info_t *_aux = (xcb_xkb_device_led_info_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_device_led_info_t);
+ xcb_tmp += xcb_block_len;
+ /* names */
+ xcb_block_len += xcb_popcount(_aux->namesPresent) * sizeof(uint32_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* maps */
+ xcb_block_len += xcb_popcount(_aux->mapsPresent) * sizeof(xcb_xkb_indicator_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_device_led_info_names
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_device_led_info_names (const xcb_xkb_device_led_info_t *R /**< */)
+{
+ return (xcb_atom_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_device_led_info_names_length
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_device_led_info_names_length (const xcb_xkb_device_led_info_t *R /**< */)
+{
+ return xcb_popcount(R->namesPresent);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_device_led_info_names_end
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_device_led_info_names_end (const xcb_xkb_device_led_info_t *R /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_atom_t *) (R + 1)) + (xcb_popcount(R->namesPresent));
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_t * xcb_xkb_device_led_info_maps
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns xcb_xkb_indicator_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_t *
+xcb_xkb_device_led_info_maps (const xcb_xkb_device_led_info_t *R /**< */)
+{
+ xcb_generic_iterator_t prev = xcb_xkb_device_led_info_names_end(R);
+ return (xcb_xkb_indicator_map_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_indicator_map_t, prev.index) + 0);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_device_led_info_maps_length
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_device_led_info_maps_length (const xcb_xkb_device_led_info_t *R /**< */)
+{
+ return xcb_popcount(R->mapsPresent);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_iterator_t xcb_xkb_device_led_info_maps_iterator
+ **
+ ** @param const xcb_xkb_device_led_info_t *R
+ ** @returns xcb_xkb_indicator_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_iterator_t
+xcb_xkb_device_led_info_maps_iterator (const xcb_xkb_device_led_info_t *R /**< */)
+{
+ xcb_xkb_indicator_map_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_device_led_info_names_end(R);
+ i.data = (xcb_xkb_indicator_map_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_indicator_map_t, prev.index));
+ i.rem = xcb_popcount(R->mapsPresent);
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_device_led_info_next
+ **
+ ** @param xcb_xkb_device_led_info_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_device_led_info_next (xcb_xkb_device_led_info_iterator_t *i /**< */)
+{
+ xcb_xkb_device_led_info_t *R = i->data;
+ xcb_generic_iterator_t child;
+ child.data = (xcb_xkb_device_led_info_t *)(((char *)R) + xcb_xkb_device_led_info_sizeof(R));
+ i->index = (char *) child.data - (char *) i->data;
+ --i->rem;
+ i->data = (xcb_xkb_device_led_info_t *) child.data;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_device_led_info_end
+ **
+ ** @param xcb_xkb_device_led_info_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_device_led_info_end (xcb_xkb_device_led_info_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ while(i.rem > 0)
+ xcb_xkb_device_led_info_next(&i);
+ ret.data = i.data;
+ ret.rem = i.rem;
+ ret.index = i.index;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_no_action_next
+ **
+ ** @param xcb_xkb_sa_no_action_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_no_action_next (xcb_xkb_sa_no_action_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_no_action_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_no_action_end
+ **
+ ** @param xcb_xkb_sa_no_action_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_no_action_end (xcb_xkb_sa_no_action_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_set_mods_next
+ **
+ ** @param xcb_xkb_sa_set_mods_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_set_mods_next (xcb_xkb_sa_set_mods_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_set_mods_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_set_mods_end
+ **
+ ** @param xcb_xkb_sa_set_mods_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_set_mods_end (xcb_xkb_sa_set_mods_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_latch_mods_next
+ **
+ ** @param xcb_xkb_sa_latch_mods_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_latch_mods_next (xcb_xkb_sa_latch_mods_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_latch_mods_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_latch_mods_end
+ **
+ ** @param xcb_xkb_sa_latch_mods_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_latch_mods_end (xcb_xkb_sa_latch_mods_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_mods_next
+ **
+ ** @param xcb_xkb_sa_lock_mods_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_mods_next (xcb_xkb_sa_lock_mods_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_lock_mods_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_mods_end
+ **
+ ** @param xcb_xkb_sa_lock_mods_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_mods_end (xcb_xkb_sa_lock_mods_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_set_group_next
+ **
+ ** @param xcb_xkb_sa_set_group_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_set_group_next (xcb_xkb_sa_set_group_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_set_group_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_set_group_end
+ **
+ ** @param xcb_xkb_sa_set_group_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_set_group_end (xcb_xkb_sa_set_group_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_latch_group_next
+ **
+ ** @param xcb_xkb_sa_latch_group_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_latch_group_next (xcb_xkb_sa_latch_group_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_latch_group_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_latch_group_end
+ **
+ ** @param xcb_xkb_sa_latch_group_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_latch_group_end (xcb_xkb_sa_latch_group_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_group_next
+ **
+ ** @param xcb_xkb_sa_lock_group_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_group_next (xcb_xkb_sa_lock_group_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_lock_group_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_group_end
+ **
+ ** @param xcb_xkb_sa_lock_group_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_group_end (xcb_xkb_sa_lock_group_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_move_ptr_next
+ **
+ ** @param xcb_xkb_sa_move_ptr_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_move_ptr_next (xcb_xkb_sa_move_ptr_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_move_ptr_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_move_ptr_end
+ **
+ ** @param xcb_xkb_sa_move_ptr_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_move_ptr_end (xcb_xkb_sa_move_ptr_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_ptr_btn_next
+ **
+ ** @param xcb_xkb_sa_ptr_btn_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_ptr_btn_next (xcb_xkb_sa_ptr_btn_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_ptr_btn_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_ptr_btn_end
+ **
+ ** @param xcb_xkb_sa_ptr_btn_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_ptr_btn_end (xcb_xkb_sa_ptr_btn_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_ptr_btn_next
+ **
+ ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_ptr_btn_next (xcb_xkb_sa_lock_ptr_btn_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_lock_ptr_btn_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_ptr_btn_end
+ **
+ ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_ptr_btn_end (xcb_xkb_sa_lock_ptr_btn_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_set_ptr_dflt_next
+ **
+ ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_set_ptr_dflt_next (xcb_xkb_sa_set_ptr_dflt_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_set_ptr_dflt_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_set_ptr_dflt_end
+ **
+ ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_set_ptr_dflt_end (xcb_xkb_sa_set_ptr_dflt_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_iso_lock_next
+ **
+ ** @param xcb_xkb_sa_iso_lock_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_iso_lock_next (xcb_xkb_sa_iso_lock_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_iso_lock_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_iso_lock_end
+ **
+ ** @param xcb_xkb_sa_iso_lock_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_iso_lock_end (xcb_xkb_sa_iso_lock_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_terminate_next
+ **
+ ** @param xcb_xkb_sa_terminate_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_terminate_next (xcb_xkb_sa_terminate_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_terminate_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_terminate_end
+ **
+ ** @param xcb_xkb_sa_terminate_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_terminate_end (xcb_xkb_sa_terminate_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_switch_screen_next
+ **
+ ** @param xcb_xkb_sa_switch_screen_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_switch_screen_next (xcb_xkb_sa_switch_screen_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_switch_screen_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_switch_screen_end
+ **
+ ** @param xcb_xkb_sa_switch_screen_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_switch_screen_end (xcb_xkb_sa_switch_screen_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_set_controls_next
+ **
+ ** @param xcb_xkb_sa_set_controls_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_set_controls_next (xcb_xkb_sa_set_controls_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_set_controls_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_set_controls_end
+ **
+ ** @param xcb_xkb_sa_set_controls_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_set_controls_end (xcb_xkb_sa_set_controls_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_controls_next
+ **
+ ** @param xcb_xkb_sa_lock_controls_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_controls_next (xcb_xkb_sa_lock_controls_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_lock_controls_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_controls_end
+ **
+ ** @param xcb_xkb_sa_lock_controls_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_controls_end (xcb_xkb_sa_lock_controls_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_action_message_next
+ **
+ ** @param xcb_xkb_sa_action_message_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_action_message_next (xcb_xkb_sa_action_message_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_action_message_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_action_message_end
+ **
+ ** @param xcb_xkb_sa_action_message_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_action_message_end (xcb_xkb_sa_action_message_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_redirect_key_next
+ **
+ ** @param xcb_xkb_sa_redirect_key_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_redirect_key_next (xcb_xkb_sa_redirect_key_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_redirect_key_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_redirect_key_end
+ **
+ ** @param xcb_xkb_sa_redirect_key_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_redirect_key_end (xcb_xkb_sa_redirect_key_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_device_btn_next
+ **
+ ** @param xcb_xkb_sa_device_btn_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_device_btn_next (xcb_xkb_sa_device_btn_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_device_btn_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_device_btn_end
+ **
+ ** @param xcb_xkb_sa_device_btn_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_device_btn_end (xcb_xkb_sa_device_btn_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_lock_device_btn_next
+ **
+ ** @param xcb_xkb_sa_lock_device_btn_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_lock_device_btn_next (xcb_xkb_sa_lock_device_btn_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_lock_device_btn_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_lock_device_btn_end
+ **
+ ** @param xcb_xkb_sa_lock_device_btn_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_lock_device_btn_end (xcb_xkb_sa_lock_device_btn_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sa_device_valuator_next
+ **
+ ** @param xcb_xkb_sa_device_valuator_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sa_device_valuator_next (xcb_xkb_sa_device_valuator_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sa_device_valuator_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sa_device_valuator_end
+ **
+ ** @param xcb_xkb_sa_device_valuator_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sa_device_valuator_end (xcb_xkb_sa_device_valuator_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_action_next
+ **
+ ** @param xcb_xkb_action_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_action_next (xcb_xkb_action_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_action_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_action_end
+ **
+ ** @param xcb_xkb_action_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_action_end (xcb_xkb_action_iterator_t i /**< */)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint16_t wantedMajor
+ ** @param uint16_t wantedMinor
+ ** @returns xcb_xkb_use_extension_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_use_extension_cookie_t
+xcb_xkb_use_extension (xcb_connection_t *c /**< */,
+ uint16_t wantedMajor /**< */,
+ uint16_t wantedMinor /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_USE_EXTENSION,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_use_extension_cookie_t xcb_ret;
+ xcb_xkb_use_extension_request_t xcb_out;
+
+ xcb_out.wantedMajor = wantedMajor;
+ xcb_out.wantedMinor = wantedMinor;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint16_t wantedMajor
+ ** @param uint16_t wantedMinor
+ ** @returns xcb_xkb_use_extension_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_use_extension_cookie_t
+xcb_xkb_use_extension_unchecked (xcb_connection_t *c /**< */,
+ uint16_t wantedMajor /**< */,
+ uint16_t wantedMinor /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_USE_EXTENSION,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_use_extension_cookie_t xcb_ret;
+ xcb_xkb_use_extension_request_t xcb_out;
+
+ xcb_out.wantedMajor = wantedMajor;
+ xcb_out.wantedMinor = wantedMinor;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_use_extension_reply_t * xcb_xkb_use_extension_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_use_extension_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_use_extension_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_use_extension_reply_t *
+xcb_xkb_use_extension_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_use_extension_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_use_extension_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_xkb_select_events_details_serialize (void **_buffer /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ const xcb_xkb_select_events_details_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[23];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectNewKeyboard */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectNewKeyboard;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.newKeyboardDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->newKeyboardDetails;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_STATE_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectState */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectState;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.stateDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->stateDetails;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectCtrls */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectCtrls;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_select_events_details_t.ctrlDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->ctrlDetails;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectIndicatorState */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectIndicatorState;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_select_events_details_t.indicatorStateDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicatorStateDetails;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectIndicatorMap */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectIndicatorMap;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_select_events_details_t.indicatorMapDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicatorMapDetails;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NAMES_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectNames;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.namesDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->namesDetails;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectCompat */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectCompat;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_select_events_details_t.compatDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatDetails;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_BELL_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectBell */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectBell;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_select_events_details_t.bellDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bellDetails;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACTION_MESSAGE) {
+ /* xcb_xkb_select_events_details_t.affectMsgDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectMsgDetails;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_select_events_details_t.msgDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->msgDetails;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectAccessX */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectAccessX;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.accessXDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->accessXDetails;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectExtDev */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectExtDev;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.extdevDetails */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->extdevDetails;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_select_events_details_unpack (const void *_buffer /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ xcb_xkb_select_events_details_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectNewKeyboard */
+ _aux->affectNewKeyboard = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.newKeyboardDetails */
+ _aux->newKeyboardDetails = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_STATE_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectState */
+ _aux->affectState = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.stateDetails */
+ _aux->stateDetails = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectCtrls */
+ _aux->affectCtrls = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_select_events_details_t.ctrlDetails */
+ _aux->ctrlDetails = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectIndicatorState */
+ _aux->affectIndicatorState = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_select_events_details_t.indicatorStateDetails */
+ _aux->indicatorStateDetails = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectIndicatorMap */
+ _aux->affectIndicatorMap = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_select_events_details_t.indicatorMapDetails */
+ _aux->indicatorMapDetails = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NAMES_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectNames */
+ _aux->affectNames = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.namesDetails */
+ _aux->namesDetails = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectCompat */
+ _aux->affectCompat = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_select_events_details_t.compatDetails */
+ _aux->compatDetails = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_BELL_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectBell */
+ _aux->affectBell = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_select_events_details_t.bellDetails */
+ _aux->bellDetails = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACTION_MESSAGE) {
+ /* xcb_xkb_select_events_details_t.affectMsgDetails */
+ _aux->affectMsgDetails = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_select_events_details_t.msgDetails */
+ _aux->msgDetails = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectAccessX */
+ _aux->affectAccessX = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.accessXDetails */
+ _aux->accessXDetails = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY) {
+ /* xcb_xkb_select_events_details_t.affectExtDev */
+ _aux->affectExtDev = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_select_events_details_t.extdevDetails */
+ _aux->extdevDetails = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_select_events_details_sizeof (const void *_buffer /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */)
+{
+ xcb_xkb_select_events_details_t _aux;
+ return xcb_xkb_select_events_details_unpack(_buffer, affectWhich, clear, selectAll, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_select_events_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t affectWhich
+ ** @param uint16_t clear
+ ** @param uint16_t selectAll
+ ** @param uint16_t affectMap
+ ** @param uint16_t map
+ ** @param const void *details
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_select_events_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ uint16_t affectMap /**< */,
+ uint16_t map /**< */,
+ const void *details /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SELECT_EVENTS,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_select_events_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.affectWhich = affectWhich;
+ xcb_out.clear = clear;
+ xcb_out.selectAll = selectAll;
+ xcb_out.affectMap = affectMap;
+ xcb_out.map = map;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_select_events_details_t details */
+ xcb_parts[4].iov_base = (char *) details;
+ xcb_parts[4].iov_len =
+ xcb_xkb_select_events_details_sizeof (details, affectWhich, clear, selectAll);
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_select_events
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t affectWhich
+ ** @param uint16_t clear
+ ** @param uint16_t selectAll
+ ** @param uint16_t affectMap
+ ** @param uint16_t map
+ ** @param const void *details
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_select_events (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ uint16_t affectMap /**< */,
+ uint16_t map /**< */,
+ const void *details /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SELECT_EVENTS,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_select_events_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.affectWhich = affectWhich;
+ xcb_out.clear = clear;
+ xcb_out.selectAll = selectAll;
+ xcb_out.affectMap = affectMap;
+ xcb_out.map = map;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_select_events_details_t details */
+ xcb_parts[4].iov_base = (char *) details;
+ xcb_parts[4].iov_len =
+ xcb_xkb_select_events_details_sizeof (details, affectWhich, clear, selectAll);
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_select_events_aux_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t affectWhich
+ ** @param uint16_t clear
+ ** @param uint16_t selectAll
+ ** @param uint16_t affectMap
+ ** @param uint16_t map
+ ** @param const xcb_xkb_select_events_details_t *details
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_select_events_aux_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ uint16_t affectMap /**< */,
+ uint16_t map /**< */,
+ const xcb_xkb_select_events_details_t *details /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SELECT_EVENTS,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_select_events_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.affectWhich = affectWhich;
+ xcb_out.clear = clear;
+ xcb_out.selectAll = selectAll;
+ xcb_out.affectMap = affectMap;
+ xcb_out.map = map;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_select_events_details_t details */
+ xcb_parts[4].iov_len =
+ xcb_xkb_select_events_details_serialize (&xcb_aux0, affectWhich, clear, selectAll, details);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_select_events_aux
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t affectWhich
+ ** @param uint16_t clear
+ ** @param uint16_t selectAll
+ ** @param uint16_t affectMap
+ ** @param uint16_t map
+ ** @param const xcb_xkb_select_events_details_t *details
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_select_events_aux (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t affectWhich /**< */,
+ uint16_t clear /**< */,
+ uint16_t selectAll /**< */,
+ uint16_t affectMap /**< */,
+ uint16_t map /**< */,
+ const xcb_xkb_select_events_details_t *details /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SELECT_EVENTS,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_select_events_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.affectWhich = affectWhich;
+ xcb_out.clear = clear;
+ xcb_out.selectAll = selectAll;
+ xcb_out.affectMap = affectMap;
+ xcb_out.map = map;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_select_events_details_t details */
+ xcb_parts[4].iov_len =
+ xcb_xkb_select_events_details_serialize (&xcb_aux0, affectWhich, clear, selectAll, details);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_bell_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_bell_class_spec_t bellClass
+ ** @param xcb_xkb_id_spec_t bellID
+ ** @param int8_t percent
+ ** @param uint8_t forceSound
+ ** @param uint8_t eventOnly
+ ** @param int16_t pitch
+ ** @param int16_t duration
+ ** @param xcb_atom_t name
+ ** @param xcb_window_t window
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_bell_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_bell_class_spec_t bellClass /**< */,
+ xcb_xkb_id_spec_t bellID /**< */,
+ int8_t percent /**< */,
+ uint8_t forceSound /**< */,
+ uint8_t eventOnly /**< */,
+ int16_t pitch /**< */,
+ int16_t duration /**< */,
+ xcb_atom_t name /**< */,
+ xcb_window_t window /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_BELL,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_bell_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.bellClass = bellClass;
+ xcb_out.bellID = bellID;
+ xcb_out.percent = percent;
+ xcb_out.forceSound = forceSound;
+ xcb_out.eventOnly = eventOnly;
+ xcb_out.pad0 = 0;
+ xcb_out.pitch = pitch;
+ xcb_out.duration = duration;
+ memset(xcb_out.pad1, 0, 2);
+ xcb_out.name = name;
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_bell
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_bell_class_spec_t bellClass
+ ** @param xcb_xkb_id_spec_t bellID
+ ** @param int8_t percent
+ ** @param uint8_t forceSound
+ ** @param uint8_t eventOnly
+ ** @param int16_t pitch
+ ** @param int16_t duration
+ ** @param xcb_atom_t name
+ ** @param xcb_window_t window
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_bell (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_bell_class_spec_t bellClass /**< */,
+ xcb_xkb_id_spec_t bellID /**< */,
+ int8_t percent /**< */,
+ uint8_t forceSound /**< */,
+ uint8_t eventOnly /**< */,
+ int16_t pitch /**< */,
+ int16_t duration /**< */,
+ xcb_atom_t name /**< */,
+ xcb_window_t window /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_BELL,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_bell_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.bellClass = bellClass;
+ xcb_out.bellID = bellID;
+ xcb_out.percent = percent;
+ xcb_out.forceSound = forceSound;
+ xcb_out.eventOnly = eventOnly;
+ xcb_out.pad0 = 0;
+ xcb_out.pitch = pitch;
+ xcb_out.duration = duration;
+ memset(xcb_out.pad1, 0, 2);
+ xcb_out.name = name;
+ xcb_out.window = window;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_state_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_state_cookie_t
+xcb_xkb_get_state (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_STATE,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_state_cookie_t xcb_ret;
+ xcb_xkb_get_state_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_state_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_state_cookie_t
+xcb_xkb_get_state_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_STATE,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_state_cookie_t xcb_ret;
+ xcb_xkb_get_state_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_state_reply_t * xcb_xkb_get_state_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_state_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_state_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_state_reply_t *
+xcb_xkb_get_state_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_state_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_latch_lock_state_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t affectModLocks
+ ** @param uint8_t modLocks
+ ** @param uint8_t lockGroup
+ ** @param uint8_t groupLock
+ ** @param uint8_t affectModLatches
+ ** @param uint8_t latchGroup
+ ** @param uint16_t groupLatch
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_latch_lock_state_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t affectModLocks /**< */,
+ uint8_t modLocks /**< */,
+ uint8_t lockGroup /**< */,
+ uint8_t groupLock /**< */,
+ uint8_t affectModLatches /**< */,
+ uint8_t latchGroup /**< */,
+ uint16_t groupLatch /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_LATCH_LOCK_STATE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_latch_lock_state_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.affectModLocks = affectModLocks;
+ xcb_out.modLocks = modLocks;
+ xcb_out.lockGroup = lockGroup;
+ xcb_out.groupLock = groupLock;
+ xcb_out.affectModLatches = affectModLatches;
+ xcb_out.pad0 = 0;
+ xcb_out.latchGroup = latchGroup;
+ xcb_out.groupLatch = groupLatch;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_latch_lock_state
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t affectModLocks
+ ** @param uint8_t modLocks
+ ** @param uint8_t lockGroup
+ ** @param uint8_t groupLock
+ ** @param uint8_t affectModLatches
+ ** @param uint8_t latchGroup
+ ** @param uint16_t groupLatch
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_latch_lock_state (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t affectModLocks /**< */,
+ uint8_t modLocks /**< */,
+ uint8_t lockGroup /**< */,
+ uint8_t groupLock /**< */,
+ uint8_t affectModLatches /**< */,
+ uint8_t latchGroup /**< */,
+ uint16_t groupLatch /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_LATCH_LOCK_STATE,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_latch_lock_state_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.affectModLocks = affectModLocks;
+ xcb_out.modLocks = modLocks;
+ xcb_out.lockGroup = lockGroup;
+ xcb_out.groupLock = groupLock;
+ xcb_out.affectModLatches = affectModLatches;
+ xcb_out.pad0 = 0;
+ xcb_out.latchGroup = latchGroup;
+ xcb_out.groupLatch = groupLatch;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_controls_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_controls_cookie_t
+xcb_xkb_get_controls (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_CONTROLS,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_controls_cookie_t xcb_ret;
+ xcb_xkb_get_controls_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_controls_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_controls_cookie_t
+xcb_xkb_get_controls_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_CONTROLS,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_controls_cookie_t xcb_ret;
+ xcb_xkb_get_controls_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_controls_reply_t * xcb_xkb_get_controls_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_controls_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_controls_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_controls_reply_t *
+xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_controls_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_controls_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_controls_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t affectInternalRealMods
+ ** @param uint8_t internalRealMods
+ ** @param uint8_t affectIgnoreLockRealMods
+ ** @param uint8_t ignoreLockRealMods
+ ** @param uint16_t affectInternalVirtualMods
+ ** @param uint16_t internalVirtualMods
+ ** @param uint16_t affectIgnoreLockVirtualMods
+ ** @param uint16_t ignoreLockVirtualMods
+ ** @param uint8_t mouseKeysDfltBtn
+ ** @param uint8_t groupsWrap
+ ** @param xcb_xkb_ax_option_t accessXOptions
+ ** @param uint32_t affectEnabledControls
+ ** @param uint32_t enabledControls
+ ** @param uint32_t changeControls
+ ** @param uint16_t repeatDelay
+ ** @param uint16_t repeatInterval
+ ** @param uint16_t slowKeysDelay
+ ** @param uint16_t debounceDelay
+ ** @param uint16_t mouseKeysDelay
+ ** @param uint16_t mouseKeysInterval
+ ** @param uint16_t mouseKeysTimeToMax
+ ** @param uint16_t mouseKeysMaxSpeed
+ ** @param int16_t mouseKeysCurve
+ ** @param uint16_t accessXTimeout
+ ** @param uint32_t accessXTimeoutMask
+ ** @param uint32_t accessXTimeoutValues
+ ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsMask
+ ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsValues
+ ** @param const uint8_t *perKeyRepeat
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t affectInternalRealMods /**< */,
+ uint8_t internalRealMods /**< */,
+ uint8_t affectIgnoreLockRealMods /**< */,
+ uint8_t ignoreLockRealMods /**< */,
+ uint16_t affectInternalVirtualMods /**< */,
+ uint16_t internalVirtualMods /**< */,
+ uint16_t affectIgnoreLockVirtualMods /**< */,
+ uint16_t ignoreLockVirtualMods /**< */,
+ uint8_t mouseKeysDfltBtn /**< */,
+ uint8_t groupsWrap /**< */,
+ xcb_xkb_ax_option_t accessXOptions /**< */,
+ uint32_t affectEnabledControls /**< */,
+ uint32_t enabledControls /**< */,
+ uint32_t changeControls /**< */,
+ uint16_t repeatDelay /**< */,
+ uint16_t repeatInterval /**< */,
+ uint16_t slowKeysDelay /**< */,
+ uint16_t debounceDelay /**< */,
+ uint16_t mouseKeysDelay /**< */,
+ uint16_t mouseKeysInterval /**< */,
+ uint16_t mouseKeysTimeToMax /**< */,
+ uint16_t mouseKeysMaxSpeed /**< */,
+ int16_t mouseKeysCurve /**< */,
+ uint16_t accessXTimeout /**< */,
+ uint32_t accessXTimeoutMask /**< */,
+ uint32_t accessXTimeoutValues /**< */,
+ xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */,
+ xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */,
+ const uint8_t *perKeyRepeat /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_CONTROLS,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_controls_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.affectInternalRealMods = affectInternalRealMods;
+ xcb_out.internalRealMods = internalRealMods;
+ xcb_out.affectIgnoreLockRealMods = affectIgnoreLockRealMods;
+ xcb_out.ignoreLockRealMods = ignoreLockRealMods;
+ xcb_out.affectInternalVirtualMods = affectInternalVirtualMods;
+ xcb_out.internalVirtualMods = internalVirtualMods;
+ xcb_out.affectIgnoreLockVirtualMods = affectIgnoreLockVirtualMods;
+ xcb_out.ignoreLockVirtualMods = ignoreLockVirtualMods;
+ xcb_out.mouseKeysDfltBtn = mouseKeysDfltBtn;
+ xcb_out.groupsWrap = groupsWrap;
+ xcb_out.accessXOptions = accessXOptions;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.affectEnabledControls = affectEnabledControls;
+ xcb_out.enabledControls = enabledControls;
+ xcb_out.changeControls = changeControls;
+ xcb_out.repeatDelay = repeatDelay;
+ xcb_out.repeatInterval = repeatInterval;
+ xcb_out.slowKeysDelay = slowKeysDelay;
+ xcb_out.debounceDelay = debounceDelay;
+ xcb_out.mouseKeysDelay = mouseKeysDelay;
+ xcb_out.mouseKeysInterval = mouseKeysInterval;
+ xcb_out.mouseKeysTimeToMax = mouseKeysTimeToMax;
+ xcb_out.mouseKeysMaxSpeed = mouseKeysMaxSpeed;
+ xcb_out.mouseKeysCurve = mouseKeysCurve;
+ xcb_out.accessXTimeout = accessXTimeout;
+ xcb_out.accessXTimeoutMask = accessXTimeoutMask;
+ xcb_out.accessXTimeoutValues = accessXTimeoutValues;
+ xcb_out.accessXTimeoutOptionsMask = accessXTimeoutOptionsMask;
+ xcb_out.accessXTimeoutOptionsValues = accessXTimeoutOptionsValues;
+ memcpy(xcb_out.perKeyRepeat, perKeyRepeat, 32);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_controls
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t affectInternalRealMods
+ ** @param uint8_t internalRealMods
+ ** @param uint8_t affectIgnoreLockRealMods
+ ** @param uint8_t ignoreLockRealMods
+ ** @param uint16_t affectInternalVirtualMods
+ ** @param uint16_t internalVirtualMods
+ ** @param uint16_t affectIgnoreLockVirtualMods
+ ** @param uint16_t ignoreLockVirtualMods
+ ** @param uint8_t mouseKeysDfltBtn
+ ** @param uint8_t groupsWrap
+ ** @param xcb_xkb_ax_option_t accessXOptions
+ ** @param uint32_t affectEnabledControls
+ ** @param uint32_t enabledControls
+ ** @param uint32_t changeControls
+ ** @param uint16_t repeatDelay
+ ** @param uint16_t repeatInterval
+ ** @param uint16_t slowKeysDelay
+ ** @param uint16_t debounceDelay
+ ** @param uint16_t mouseKeysDelay
+ ** @param uint16_t mouseKeysInterval
+ ** @param uint16_t mouseKeysTimeToMax
+ ** @param uint16_t mouseKeysMaxSpeed
+ ** @param int16_t mouseKeysCurve
+ ** @param uint16_t accessXTimeout
+ ** @param uint32_t accessXTimeoutMask
+ ** @param uint32_t accessXTimeoutValues
+ ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsMask
+ ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsValues
+ ** @param const uint8_t *perKeyRepeat
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_controls (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t affectInternalRealMods /**< */,
+ uint8_t internalRealMods /**< */,
+ uint8_t affectIgnoreLockRealMods /**< */,
+ uint8_t ignoreLockRealMods /**< */,
+ uint16_t affectInternalVirtualMods /**< */,
+ uint16_t internalVirtualMods /**< */,
+ uint16_t affectIgnoreLockVirtualMods /**< */,
+ uint16_t ignoreLockVirtualMods /**< */,
+ uint8_t mouseKeysDfltBtn /**< */,
+ uint8_t groupsWrap /**< */,
+ xcb_xkb_ax_option_t accessXOptions /**< */,
+ uint32_t affectEnabledControls /**< */,
+ uint32_t enabledControls /**< */,
+ uint32_t changeControls /**< */,
+ uint16_t repeatDelay /**< */,
+ uint16_t repeatInterval /**< */,
+ uint16_t slowKeysDelay /**< */,
+ uint16_t debounceDelay /**< */,
+ uint16_t mouseKeysDelay /**< */,
+ uint16_t mouseKeysInterval /**< */,
+ uint16_t mouseKeysTimeToMax /**< */,
+ uint16_t mouseKeysMaxSpeed /**< */,
+ int16_t mouseKeysCurve /**< */,
+ uint16_t accessXTimeout /**< */,
+ uint32_t accessXTimeoutMask /**< */,
+ uint32_t accessXTimeoutValues /**< */,
+ xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */,
+ xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */,
+ const uint8_t *perKeyRepeat /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_CONTROLS,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_controls_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.affectInternalRealMods = affectInternalRealMods;
+ xcb_out.internalRealMods = internalRealMods;
+ xcb_out.affectIgnoreLockRealMods = affectIgnoreLockRealMods;
+ xcb_out.ignoreLockRealMods = ignoreLockRealMods;
+ xcb_out.affectInternalVirtualMods = affectInternalVirtualMods;
+ xcb_out.internalVirtualMods = internalVirtualMods;
+ xcb_out.affectIgnoreLockVirtualMods = affectIgnoreLockVirtualMods;
+ xcb_out.ignoreLockVirtualMods = ignoreLockVirtualMods;
+ xcb_out.mouseKeysDfltBtn = mouseKeysDfltBtn;
+ xcb_out.groupsWrap = groupsWrap;
+ xcb_out.accessXOptions = accessXOptions;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.affectEnabledControls = affectEnabledControls;
+ xcb_out.enabledControls = enabledControls;
+ xcb_out.changeControls = changeControls;
+ xcb_out.repeatDelay = repeatDelay;
+ xcb_out.repeatInterval = repeatInterval;
+ xcb_out.slowKeysDelay = slowKeysDelay;
+ xcb_out.debounceDelay = debounceDelay;
+ xcb_out.mouseKeysDelay = mouseKeysDelay;
+ xcb_out.mouseKeysInterval = mouseKeysInterval;
+ xcb_out.mouseKeysTimeToMax = mouseKeysTimeToMax;
+ xcb_out.mouseKeysMaxSpeed = mouseKeysMaxSpeed;
+ xcb_out.mouseKeysCurve = mouseKeysCurve;
+ xcb_out.accessXTimeout = accessXTimeout;
+ xcb_out.accessXTimeoutMask = accessXTimeoutMask;
+ xcb_out.accessXTimeoutValues = accessXTimeoutValues;
+ xcb_out.accessXTimeoutOptionsMask = accessXTimeoutOptionsMask;
+ xcb_out.accessXTimeoutOptionsValues = accessXTimeoutOptionsValues;
+ memcpy(xcb_out.perKeyRepeat, perKeyRepeat, 32);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_types_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_types_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return R->nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_type_iterator_t xcb_xkb_get_map_map_types_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_type_iterator_t
+xcb_xkb_get_map_map_types_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ xcb_xkb_key_type_iterator_t i;
+ i.data = /* map */ S->types_rtrn;
+ i.rem = R->nTypes;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_syms_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_syms_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return R->nKeySyms;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_map_map_syms_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_get_map_map_syms_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ xcb_xkb_key_sym_map_iterator_t i;
+ i.data = /* map */ S->syms_rtrn;
+ i.rem = R->nKeySyms;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_map_map_acts_rtrn_count
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_map_map_acts_rtrn_count (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->acts_rtrn_count;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_acts_rtrn_count_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_acts_rtrn_count_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return R->nKeyActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_map_map_acts_rtrn_count_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* map */ S->acts_rtrn_count + R->nKeyActions;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_map_map_acts_rtrn_acts
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_map_map_acts_rtrn_acts (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->acts_rtrn_acts;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_acts_rtrn_acts_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_acts_rtrn_acts_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return R->totalActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_map_map_acts_rtrn_acts_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_map_map_acts_rtrn_acts_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ xcb_xkb_action_iterator_t i;
+ i.data = /* map */ S->acts_rtrn_acts;
+ i.rem = R->totalActions;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_get_map_map_behaviors_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_get_map_map_behaviors_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->behaviors_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_behaviors_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_behaviors_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return R->totalKeyBehaviors;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_map_map_behaviors_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_get_map_map_behaviors_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ xcb_xkb_set_behavior_iterator_t i;
+ i.data = /* map */ S->behaviors_rtrn;
+ i.rem = R->totalKeyBehaviors;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_map_map_vmods_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_map_map_vmods_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->vmods_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_vmods_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_vmods_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return R->nVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_map_map_vmods_rtrn_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_vmods_rtrn_end (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* map */ S->vmods_rtrn + R->nVModMapKeys;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_get_map_map_explicit_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_get_map_map_explicit_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->explicit_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_explicit_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_explicit_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return R->totalKeyExplicit;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_map_map_explicit_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ xcb_xkb_set_explicit_iterator_t i;
+ i.data = /* map */ S->explicit_rtrn;
+ i.rem = R->totalKeyExplicit;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_get_map_map_modmap_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_get_map_map_modmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->modmap_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_modmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_modmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return R->totalModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_map_map_modmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ xcb_xkb_key_mod_map_iterator_t i;
+ i.data = /* map */ S->modmap_rtrn;
+ i.rem = R->totalModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_map_map_vmodmap_rtrn
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_get_map_map_vmodmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->vmodmap_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_vmodmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_vmodmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return R->totalVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_map_map_vmodmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_get_map_map_vmodmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ xcb_xkb_key_v_mod_map_iterator_t i;
+ i.data = /* map */ S->vmodmap_rtrn;
+ i.rem = R->totalVModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_get_map_map_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[19];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->types_rtrn;
+ for(i=0; i<nTypes; i++) {
+ xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->syms_rtrn;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_count */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_acts */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_get_map_map_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types_rtrn */
+ _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp;
+ for(i=0; i<nTypes; i++) {
+ xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms_rtrn */
+ _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_count */
+ _aux->acts_rtrn_count = (uint8_t *)xcb_tmp;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_acts */
+ _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors_rtrn */
+ _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods_rtrn */
+ _aux->vmods_rtrn = (uint8_t *)xcb_tmp;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit_rtrn */
+ _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap_rtrn */
+ _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap_rtrn */
+ _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_map_map_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */)
+{
+ xcb_xkb_get_map_map_t _aux;
+ return xcb_xkb_get_map_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t full
+ ** @param uint16_t partial
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint16_t virtualMods
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @returns xcb_xkb_get_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_map_cookie_t
+xcb_xkb_get_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t full /**< */,
+ uint16_t partial /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint16_t virtualMods /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_MAP,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_map_cookie_t xcb_ret;
+ xcb_xkb_get_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.full = full;
+ xcb_out.partial = partial;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKeySym = firstKeySym;
+ xcb_out.nKeySyms = nKeySyms;
+ xcb_out.firstKeyAction = firstKeyAction;
+ xcb_out.nKeyActions = nKeyActions;
+ xcb_out.firstKeyBehavior = firstKeyBehavior;
+ xcb_out.nKeyBehaviors = nKeyBehaviors;
+ xcb_out.virtualMods = virtualMods;
+ xcb_out.firstKeyExplicit = firstKeyExplicit;
+ xcb_out.nKeyExplicit = nKeyExplicit;
+ xcb_out.firstModMapKey = firstModMapKey;
+ xcb_out.nModMapKeys = nModMapKeys;
+ xcb_out.firstVModMapKey = firstVModMapKey;
+ xcb_out.nVModMapKeys = nVModMapKeys;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t full
+ ** @param uint16_t partial
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint16_t virtualMods
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @returns xcb_xkb_get_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_map_cookie_t
+xcb_xkb_get_map_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t full /**< */,
+ uint16_t partial /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint16_t virtualMods /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_MAP,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_map_cookie_t xcb_ret;
+ xcb_xkb_get_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.full = full;
+ xcb_out.partial = partial;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKeySym = firstKeySym;
+ xcb_out.nKeySyms = nKeySyms;
+ xcb_out.firstKeyAction = firstKeyAction;
+ xcb_out.nKeyActions = nKeyActions;
+ xcb_out.firstKeyBehavior = firstKeyBehavior;
+ xcb_out.nKeyBehaviors = nKeyBehaviors;
+ xcb_out.virtualMods = virtualMods;
+ xcb_out.firstKeyExplicit = firstKeyExplicit;
+ xcb_out.nKeyExplicit = nKeyExplicit;
+ xcb_out.firstModMapKey = firstModMapKey;
+ xcb_out.nModMapKeys = nModMapKeys;
+ xcb_out.firstVModMapKey = firstVModMapKey;
+ xcb_out.nVModMapKeys = nVModMapKeys;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_map_map_t * xcb_xkb_get_map_map
+ **
+ ** @param const xcb_xkb_get_map_reply_t *R
+ ** @returns xcb_xkb_get_map_map_t *
+ **
+ *****************************************************************************/
+
+void *
+xcb_xkb_get_map_map (const xcb_xkb_get_map_reply_t *R /**< */)
+{
+ return (void *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_map_reply_t * xcb_xkb_get_map_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_map_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_map_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_map_reply_t *
+xcb_xkb_get_map_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_map_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_types_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_types_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return R->nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_key_type_iterator_t xcb_xkb_set_map_values_types_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_set_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_key_type_iterator_t
+xcb_xkb_set_map_values_types_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ xcb_xkb_set_key_type_iterator_t i;
+ i.data = /* values */ S->types;
+ i.rem = R->nTypes;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_syms_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_syms_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return R->nKeySyms;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_set_map_values_syms_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_set_map_values_syms_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ xcb_xkb_key_sym_map_iterator_t i;
+ i.data = /* values */ S->syms;
+ i.rem = R->nKeySyms;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_set_map_values_actions_count
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_set_map_values_actions_count (const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return /* values */ S->actionsCount;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_actions_count_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_actions_count_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return R->nKeyActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_map_values_actions_count_end
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_map_values_actions_count_end (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* values */ S->actionsCount + R->nKeyActions;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_set_map_values_actions
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_set_map_values_actions (const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return /* values */ S->actions;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_actions_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_actions_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return R->totalActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_set_map_values_actions_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_set_map_values_actions_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ xcb_xkb_action_iterator_t i;
+ i.data = /* values */ S->actions;
+ i.rem = R->totalActions;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_set_map_values_behaviors
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_set_map_values_behaviors (const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return /* values */ S->behaviors;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_behaviors_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_behaviors_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return R->totalKeyBehaviors;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_set_map_values_behaviors_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_set_map_values_behaviors_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ xcb_xkb_set_behavior_iterator_t i;
+ i.data = /* values */ S->behaviors;
+ i.rem = R->totalKeyBehaviors;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_set_map_values_vmods
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_set_map_values_vmods (const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return /* values */ S->vmods;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_vmods_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_vmods_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return R->nVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_map_values_vmods_end
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_map_values_vmods_end (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* values */ S->vmods + R->nVModMapKeys;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_set_map_values_explicit
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_set_map_values_explicit (const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return /* values */ S->explicit;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_explicit_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_explicit_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return R->totalKeyExplicit;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_set_map_values_explicit_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_set_map_values_explicit_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ xcb_xkb_set_explicit_iterator_t i;
+ i.data = /* values */ S->explicit;
+ i.rem = R->totalKeyExplicit;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_set_map_values_modmap
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_set_map_values_modmap (const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return /* values */ S->modmap;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_modmap_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_modmap_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return R->totalModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_set_map_values_modmap_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_set_map_values_modmap_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ xcb_xkb_key_mod_map_iterator_t i;
+ i.data = /* values */ S->modmap;
+ i.rem = R->totalModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_set_map_values_vmodmap
+ **
+ ** @param const xcb_xkb_set_map_values_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_set_map_values_vmodmap (const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return /* values */ S->vmodmap;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_map_values_vmodmap_length
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_map_values_vmodmap_length (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ return R->totalVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_set_map_values_vmodmap_iterator
+ **
+ ** @param const xcb_xkb_set_map_values_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_set_map_values_vmodmap_iterator (const xcb_xkb_set_map_request_t *R /**< */,
+ const xcb_xkb_set_map_values_t *S /**< */)
+{
+ xcb_xkb_key_v_mod_map_iterator_t i;
+ i.data = /* values */ S->vmodmap;
+ i.rem = R->totalVModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_set_map_values_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_set_map_values_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[19];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->types;
+ for(i=0; i<nTypes; i++) {
+ xcb_block_len = xcb_xkb_set_key_type_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->syms;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* actionsCount */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->actionsCount;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* actions */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->actions;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_set_map_values_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_set_map_values_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types */
+ _aux->types = (xcb_xkb_set_key_type_t *)xcb_tmp;
+ for(i=0; i<nTypes; i++) {
+ xcb_tmp_len = xcb_xkb_set_key_type_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_set_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms */
+ _aux->syms = (xcb_xkb_key_sym_map_t *)xcb_tmp;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* actionsCount */
+ _aux->actionsCount = (uint8_t *)xcb_tmp;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* actions */
+ _aux->actions = (xcb_xkb_action_t *)xcb_tmp;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors */
+ _aux->behaviors = (xcb_xkb_set_behavior_t *)xcb_tmp;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods */
+ _aux->vmods = (uint8_t *)xcb_tmp;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit */
+ _aux->explicit = (xcb_xkb_set_explicit_t *)xcb_tmp;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap */
+ _aux->modmap = (xcb_xkb_key_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap */
+ _aux->vmodmap = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_set_map_values_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */)
+{
+ xcb_xkb_set_map_values_t _aux;
+ return xcb_xkb_set_map_values_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_map_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t present
+ ** @param uint16_t flags
+ ** @param xcb_keycode_t minKeyCode
+ ** @param xcb_keycode_t maxKeyCode
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param uint16_t totalSyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param uint16_t totalActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint8_t totalKeyBehaviors
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param uint8_t totalKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param uint8_t totalModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @param uint8_t totalVModMapKeys
+ ** @param uint16_t virtualMods
+ ** @param const void *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_map_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t present /**< */,
+ uint16_t flags /**< */,
+ xcb_keycode_t minKeyCode /**< */,
+ xcb_keycode_t maxKeyCode /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ uint16_t totalSyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ uint8_t totalModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
+ const void *values /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_MAP,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.present = present;
+ xcb_out.flags = flags;
+ xcb_out.minKeyCode = minKeyCode;
+ xcb_out.maxKeyCode = maxKeyCode;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKeySym = firstKeySym;
+ xcb_out.nKeySyms = nKeySyms;
+ xcb_out.totalSyms = totalSyms;
+ xcb_out.firstKeyAction = firstKeyAction;
+ xcb_out.nKeyActions = nKeyActions;
+ xcb_out.totalActions = totalActions;
+ xcb_out.firstKeyBehavior = firstKeyBehavior;
+ xcb_out.nKeyBehaviors = nKeyBehaviors;
+ xcb_out.totalKeyBehaviors = totalKeyBehaviors;
+ xcb_out.firstKeyExplicit = firstKeyExplicit;
+ xcb_out.nKeyExplicit = nKeyExplicit;
+ xcb_out.totalKeyExplicit = totalKeyExplicit;
+ xcb_out.firstModMapKey = firstModMapKey;
+ xcb_out.nModMapKeys = nModMapKeys;
+ xcb_out.totalModMapKeys = totalModMapKeys;
+ xcb_out.firstVModMapKey = firstVModMapKey;
+ xcb_out.nVModMapKeys = nVModMapKeys;
+ xcb_out.totalVModMapKeys = totalVModMapKeys;
+ xcb_out.virtualMods = virtualMods;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_set_map_values_t values */
+ xcb_parts[4].iov_base = (char *) values;
+ xcb_parts[4].iov_len =
+ xcb_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present);
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t present
+ ** @param uint16_t flags
+ ** @param xcb_keycode_t minKeyCode
+ ** @param xcb_keycode_t maxKeyCode
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param uint16_t totalSyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param uint16_t totalActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint8_t totalKeyBehaviors
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param uint8_t totalKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param uint8_t totalModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @param uint8_t totalVModMapKeys
+ ** @param uint16_t virtualMods
+ ** @param const void *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t present /**< */,
+ uint16_t flags /**< */,
+ xcb_keycode_t minKeyCode /**< */,
+ xcb_keycode_t maxKeyCode /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ uint16_t totalSyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ uint8_t totalModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
+ const void *values /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_MAP,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.present = present;
+ xcb_out.flags = flags;
+ xcb_out.minKeyCode = minKeyCode;
+ xcb_out.maxKeyCode = maxKeyCode;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKeySym = firstKeySym;
+ xcb_out.nKeySyms = nKeySyms;
+ xcb_out.totalSyms = totalSyms;
+ xcb_out.firstKeyAction = firstKeyAction;
+ xcb_out.nKeyActions = nKeyActions;
+ xcb_out.totalActions = totalActions;
+ xcb_out.firstKeyBehavior = firstKeyBehavior;
+ xcb_out.nKeyBehaviors = nKeyBehaviors;
+ xcb_out.totalKeyBehaviors = totalKeyBehaviors;
+ xcb_out.firstKeyExplicit = firstKeyExplicit;
+ xcb_out.nKeyExplicit = nKeyExplicit;
+ xcb_out.totalKeyExplicit = totalKeyExplicit;
+ xcb_out.firstModMapKey = firstModMapKey;
+ xcb_out.nModMapKeys = nModMapKeys;
+ xcb_out.totalModMapKeys = totalModMapKeys;
+ xcb_out.firstVModMapKey = firstVModMapKey;
+ xcb_out.nVModMapKeys = nVModMapKeys;
+ xcb_out.totalVModMapKeys = totalVModMapKeys;
+ xcb_out.virtualMods = virtualMods;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_set_map_values_t values */
+ xcb_parts[4].iov_base = (char *) values;
+ xcb_parts[4].iov_len =
+ xcb_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present);
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_map_aux_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t present
+ ** @param uint16_t flags
+ ** @param xcb_keycode_t minKeyCode
+ ** @param xcb_keycode_t maxKeyCode
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param uint16_t totalSyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param uint16_t totalActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint8_t totalKeyBehaviors
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param uint8_t totalKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param uint8_t totalModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @param uint8_t totalVModMapKeys
+ ** @param uint16_t virtualMods
+ ** @param const xcb_xkb_set_map_values_t *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_map_aux_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t present /**< */,
+ uint16_t flags /**< */,
+ xcb_keycode_t minKeyCode /**< */,
+ xcb_keycode_t maxKeyCode /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ uint16_t totalSyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ uint8_t totalModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
+ const xcb_xkb_set_map_values_t *values /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_MAP,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_map_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.present = present;
+ xcb_out.flags = flags;
+ xcb_out.minKeyCode = minKeyCode;
+ xcb_out.maxKeyCode = maxKeyCode;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKeySym = firstKeySym;
+ xcb_out.nKeySyms = nKeySyms;
+ xcb_out.totalSyms = totalSyms;
+ xcb_out.firstKeyAction = firstKeyAction;
+ xcb_out.nKeyActions = nKeyActions;
+ xcb_out.totalActions = totalActions;
+ xcb_out.firstKeyBehavior = firstKeyBehavior;
+ xcb_out.nKeyBehaviors = nKeyBehaviors;
+ xcb_out.totalKeyBehaviors = totalKeyBehaviors;
+ xcb_out.firstKeyExplicit = firstKeyExplicit;
+ xcb_out.nKeyExplicit = nKeyExplicit;
+ xcb_out.totalKeyExplicit = totalKeyExplicit;
+ xcb_out.firstModMapKey = firstModMapKey;
+ xcb_out.nModMapKeys = nModMapKeys;
+ xcb_out.totalModMapKeys = totalModMapKeys;
+ xcb_out.firstVModMapKey = firstVModMapKey;
+ xcb_out.nVModMapKeys = nVModMapKeys;
+ xcb_out.totalVModMapKeys = totalVModMapKeys;
+ xcb_out.virtualMods = virtualMods;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_set_map_values_t values */
+ xcb_parts[4].iov_len =
+ xcb_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, values);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_map_aux
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t present
+ ** @param uint16_t flags
+ ** @param xcb_keycode_t minKeyCode
+ ** @param xcb_keycode_t maxKeyCode
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param xcb_keycode_t firstKeySym
+ ** @param uint8_t nKeySyms
+ ** @param uint16_t totalSyms
+ ** @param xcb_keycode_t firstKeyAction
+ ** @param uint8_t nKeyActions
+ ** @param uint16_t totalActions
+ ** @param xcb_keycode_t firstKeyBehavior
+ ** @param uint8_t nKeyBehaviors
+ ** @param uint8_t totalKeyBehaviors
+ ** @param xcb_keycode_t firstKeyExplicit
+ ** @param uint8_t nKeyExplicit
+ ** @param uint8_t totalKeyExplicit
+ ** @param xcb_keycode_t firstModMapKey
+ ** @param uint8_t nModMapKeys
+ ** @param uint8_t totalModMapKeys
+ ** @param xcb_keycode_t firstVModMapKey
+ ** @param uint8_t nVModMapKeys
+ ** @param uint8_t totalVModMapKeys
+ ** @param uint16_t virtualMods
+ ** @param const xcb_xkb_set_map_values_t *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_map_aux (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t present /**< */,
+ uint16_t flags /**< */,
+ xcb_keycode_t minKeyCode /**< */,
+ xcb_keycode_t maxKeyCode /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ xcb_keycode_t firstKeySym /**< */,
+ uint8_t nKeySyms /**< */,
+ uint16_t totalSyms /**< */,
+ xcb_keycode_t firstKeyAction /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ xcb_keycode_t firstKeyBehavior /**< */,
+ uint8_t nKeyBehaviors /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ xcb_keycode_t firstKeyExplicit /**< */,
+ uint8_t nKeyExplicit /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ xcb_keycode_t firstModMapKey /**< */,
+ uint8_t nModMapKeys /**< */,
+ uint8_t totalModMapKeys /**< */,
+ xcb_keycode_t firstVModMapKey /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
+ const xcb_xkb_set_map_values_t *values /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_MAP,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_map_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.present = present;
+ xcb_out.flags = flags;
+ xcb_out.minKeyCode = minKeyCode;
+ xcb_out.maxKeyCode = maxKeyCode;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKeySym = firstKeySym;
+ xcb_out.nKeySyms = nKeySyms;
+ xcb_out.totalSyms = totalSyms;
+ xcb_out.firstKeyAction = firstKeyAction;
+ xcb_out.nKeyActions = nKeyActions;
+ xcb_out.totalActions = totalActions;
+ xcb_out.firstKeyBehavior = firstKeyBehavior;
+ xcb_out.nKeyBehaviors = nKeyBehaviors;
+ xcb_out.totalKeyBehaviors = totalKeyBehaviors;
+ xcb_out.firstKeyExplicit = firstKeyExplicit;
+ xcb_out.nKeyExplicit = nKeyExplicit;
+ xcb_out.totalKeyExplicit = totalKeyExplicit;
+ xcb_out.firstModMapKey = firstModMapKey;
+ xcb_out.nModMapKeys = nModMapKeys;
+ xcb_out.totalModMapKeys = totalModMapKeys;
+ xcb_out.firstVModMapKey = firstVModMapKey;
+ xcb_out.nVModMapKeys = nVModMapKeys;
+ xcb_out.totalVModMapKeys = totalVModMapKeys;
+ xcb_out.virtualMods = virtualMods;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_set_map_values_t values */
+ xcb_parts[4].iov_len =
+ xcb_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, values);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+int
+xcb_xkb_get_compat_map_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_get_compat_map_reply_t *_aux = (xcb_xkb_get_compat_map_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_get_compat_map_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* si_rtrn */
+ xcb_block_len += (16 * _aux->nSIRtrn) * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* group_rtrn */
+ xcb_block_len += xcb_popcount(_aux->groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t groups
+ ** @param uint8_t getAllSI
+ ** @param uint16_t firstSI
+ ** @param uint16_t nSI
+ ** @returns xcb_xkb_get_compat_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_compat_map_cookie_t
+xcb_xkb_get_compat_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t groups /**< */,
+ uint8_t getAllSI /**< */,
+ uint16_t firstSI /**< */,
+ uint16_t nSI /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_COMPAT_MAP,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_compat_map_cookie_t xcb_ret;
+ xcb_xkb_get_compat_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.groups = groups;
+ xcb_out.getAllSI = getAllSI;
+ xcb_out.firstSI = firstSI;
+ xcb_out.nSI = nSI;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t groups
+ ** @param uint8_t getAllSI
+ ** @param uint16_t firstSI
+ ** @param uint16_t nSI
+ ** @returns xcb_xkb_get_compat_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_compat_map_cookie_t
+xcb_xkb_get_compat_map_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t groups /**< */,
+ uint8_t getAllSI /**< */,
+ uint16_t firstSI /**< */,
+ uint16_t nSI /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_COMPAT_MAP,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_compat_map_cookie_t xcb_ret;
+ xcb_xkb_get_compat_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.groups = groups;
+ xcb_out.getAllSI = getAllSI;
+ xcb_out.firstSI = firstSI;
+ xcb_out.nSI = nSI;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_compat_map_si_rtrn
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */)
+{
+ return (uint8_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_compat_map_si_rtrn_length
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_compat_map_si_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */)
+{
+ return (16 * R->nSIRtrn);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_compat_map_si_rtrn_end
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_compat_map_si_rtrn_end (const xcb_xkb_get_compat_map_reply_t *R /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((uint8_t *) (R + 1)) + ((16 * R->nSIRtrn));
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_t * xcb_xkb_get_compat_map_group_rtrn
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns xcb_xkb_mod_def_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_t *
+xcb_xkb_get_compat_map_group_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */)
+{
+ xcb_generic_iterator_t prev = xcb_xkb_get_compat_map_si_rtrn_end(R);
+ return (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index) + 0);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_compat_map_group_rtrn_length
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_compat_map_group_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */)
+{
+ return xcb_popcount(R->groupsRtrn);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_compat_map_group_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_compat_map_reply_t *R
+ ** @returns xcb_xkb_mod_def_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_iterator_t
+xcb_xkb_get_compat_map_group_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R /**< */)
+{
+ xcb_xkb_mod_def_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_get_compat_map_si_rtrn_end(R);
+ i.data = (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index));
+ i.rem = xcb_popcount(R->groupsRtrn);
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_compat_map_reply_t * xcb_xkb_get_compat_map_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_compat_map_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_compat_map_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_compat_map_reply_t *
+xcb_xkb_get_compat_map_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_compat_map_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_compat_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_xkb_set_compat_map_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_set_compat_map_request_t *_aux = (xcb_xkb_set_compat_map_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_set_compat_map_request_t);
+ xcb_tmp += xcb_block_len;
+ /* si */
+ xcb_block_len += (16 * _aux->nSI) * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* groupMaps */
+ xcb_block_len += xcb_popcount(_aux->groups) * sizeof(xcb_xkb_mod_def_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_compat_map_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t recomputeActions
+ ** @param uint8_t truncateSI
+ ** @param uint8_t groups
+ ** @param uint16_t firstSI
+ ** @param uint16_t nSI
+ ** @param const uint8_t *si
+ ** @param const xcb_xkb_mod_def_t *groupMaps
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_compat_map_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t recomputeActions /**< */,
+ uint8_t truncateSI /**< */,
+ uint8_t groups /**< */,
+ uint16_t firstSI /**< */,
+ uint16_t nSI /**< */,
+ const uint8_t *si /**< */,
+ const xcb_xkb_mod_def_t *groupMaps /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 6,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_COMPAT_MAP,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[8];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_compat_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.pad0 = 0;
+ xcb_out.recomputeActions = recomputeActions;
+ xcb_out.truncateSI = truncateSI;
+ xcb_out.groups = groups;
+ xcb_out.firstSI = firstSI;
+ xcb_out.nSI = nSI;
+ memset(xcb_out.pad1, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* uint8_t si */
+ xcb_parts[4].iov_base = (char *) si;
+ xcb_parts[4].iov_len = (16 * nSI) * sizeof(uint8_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_xkb_mod_def_t groupMaps */
+ xcb_parts[6].iov_base = (char *) groupMaps;
+ xcb_parts[6].iov_len = xcb_popcount(groups) * sizeof(xcb_xkb_mod_def_t);
+ xcb_parts[7].iov_base = 0;
+ xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_compat_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t recomputeActions
+ ** @param uint8_t truncateSI
+ ** @param uint8_t groups
+ ** @param uint16_t firstSI
+ ** @param uint16_t nSI
+ ** @param const uint8_t *si
+ ** @param const xcb_xkb_mod_def_t *groupMaps
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_compat_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t recomputeActions /**< */,
+ uint8_t truncateSI /**< */,
+ uint8_t groups /**< */,
+ uint16_t firstSI /**< */,
+ uint16_t nSI /**< */,
+ const uint8_t *si /**< */,
+ const xcb_xkb_mod_def_t *groupMaps /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 6,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_COMPAT_MAP,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[8];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_compat_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.pad0 = 0;
+ xcb_out.recomputeActions = recomputeActions;
+ xcb_out.truncateSI = truncateSI;
+ xcb_out.groups = groups;
+ xcb_out.firstSI = firstSI;
+ xcb_out.nSI = nSI;
+ memset(xcb_out.pad1, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* uint8_t si */
+ xcb_parts[4].iov_base = (char *) si;
+ xcb_parts[4].iov_len = (16 * nSI) * sizeof(uint8_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_xkb_mod_def_t groupMaps */
+ xcb_parts[6].iov_base = (char *) groupMaps;
+ xcb_parts[6].iov_len = xcb_popcount(groups) * sizeof(xcb_xkb_mod_def_t);
+ xcb_parts[7].iov_base = 0;
+ xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_indicator_state_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_state_cookie_t
+xcb_xkb_get_indicator_state (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_INDICATOR_STATE,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_indicator_state_cookie_t xcb_ret;
+ xcb_xkb_get_indicator_state_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @returns xcb_xkb_get_indicator_state_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_state_cookie_t
+xcb_xkb_get_indicator_state_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_INDICATOR_STATE,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_indicator_state_cookie_t xcb_ret;
+ xcb_xkb_get_indicator_state_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_state_reply_t * xcb_xkb_get_indicator_state_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_indicator_state_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_indicator_state_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_state_reply_t *
+xcb_xkb_get_indicator_state_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_indicator_state_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_indicator_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_xkb_get_indicator_map_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_get_indicator_map_reply_t *_aux = (xcb_xkb_get_indicator_map_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_get_indicator_map_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* maps */
+ xcb_block_len += _aux->nIndicators * sizeof(xcb_xkb_indicator_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @returns xcb_xkb_get_indicator_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_map_cookie_t
+xcb_xkb_get_indicator_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_INDICATOR_MAP,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_indicator_map_cookie_t xcb_ret;
+ xcb_xkb_get_indicator_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.which = which;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @returns xcb_xkb_get_indicator_map_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_map_cookie_t
+xcb_xkb_get_indicator_map_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_INDICATOR_MAP,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_indicator_map_cookie_t xcb_ret;
+ xcb_xkb_get_indicator_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.which = which;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_t * xcb_xkb_get_indicator_map_maps
+ **
+ ** @param const xcb_xkb_get_indicator_map_reply_t *R
+ ** @returns xcb_xkb_indicator_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_t *
+xcb_xkb_get_indicator_map_maps (const xcb_xkb_get_indicator_map_reply_t *R /**< */)
+{
+ return (xcb_xkb_indicator_map_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_indicator_map_maps_length
+ **
+ ** @param const xcb_xkb_get_indicator_map_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_indicator_map_maps_length (const xcb_xkb_get_indicator_map_reply_t *R /**< */)
+{
+ return R->nIndicators;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_indicator_map_maps_iterator
+ **
+ ** @param const xcb_xkb_get_indicator_map_reply_t *R
+ ** @returns xcb_xkb_indicator_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_iterator_t
+xcb_xkb_get_indicator_map_maps_iterator (const xcb_xkb_get_indicator_map_reply_t *R /**< */)
+{
+ xcb_xkb_indicator_map_iterator_t i;
+ i.data = (xcb_xkb_indicator_map_t *) (R + 1);
+ i.rem = R->nIndicators;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_indicator_map_reply_t * xcb_xkb_get_indicator_map_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_indicator_map_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_indicator_map_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_indicator_map_reply_t *
+xcb_xkb_get_indicator_map_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_indicator_map_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_indicator_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_xkb_set_indicator_map_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_set_indicator_map_request_t *_aux = (xcb_xkb_set_indicator_map_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_set_indicator_map_request_t);
+ xcb_tmp += xcb_block_len;
+ /* maps */
+ xcb_block_len += xcb_popcount(_aux->which) * sizeof(xcb_xkb_indicator_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_indicator_map_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @param const xcb_xkb_indicator_map_t *maps
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_indicator_map_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_indicator_map_t *maps /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 4,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_INDICATOR_MAP,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_indicator_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.which = which;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_indicator_map_t maps */
+ xcb_parts[4].iov_base = (char *) maps;
+ xcb_parts[4].iov_len = xcb_popcount(which) * sizeof(xcb_xkb_indicator_map_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_indicator_map
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @param const xcb_xkb_indicator_map_t *maps
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_indicator_map (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_indicator_map_t *maps /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 4,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_INDICATOR_MAP,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_indicator_map_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.which = which;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_indicator_map_t maps */
+ xcb_parts[4].iov_base = (char *) maps;
+ xcb_parts[4].iov_len = xcb_popcount(which) * sizeof(xcb_xkb_indicator_map_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @param xcb_atom_t indicator
+ ** @returns xcb_xkb_get_named_indicator_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_named_indicator_cookie_t
+xcb_xkb_get_named_indicator (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */,
+ xcb_atom_t indicator /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_NAMED_INDICATOR,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_named_indicator_cookie_t xcb_ret;
+ xcb_xkb_get_named_indicator_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.ledClass = ledClass;
+ xcb_out.ledID = ledID;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.indicator = indicator;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @param xcb_atom_t indicator
+ ** @returns xcb_xkb_get_named_indicator_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_named_indicator_cookie_t
+xcb_xkb_get_named_indicator_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */,
+ xcb_atom_t indicator /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_NAMED_INDICATOR,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_named_indicator_cookie_t xcb_ret;
+ xcb_xkb_get_named_indicator_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.ledClass = ledClass;
+ xcb_out.ledID = ledID;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.indicator = indicator;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_named_indicator_reply_t * xcb_xkb_get_named_indicator_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_named_indicator_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_named_indicator_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_named_indicator_reply_t *
+xcb_xkb_get_named_indicator_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_named_indicator_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_named_indicator_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_named_indicator_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @param xcb_atom_t indicator
+ ** @param uint8_t setState
+ ** @param uint8_t on
+ ** @param uint8_t setMap
+ ** @param uint8_t createMap
+ ** @param uint8_t map_flags
+ ** @param uint8_t map_whichGroups
+ ** @param uint8_t map_groups
+ ** @param uint8_t map_whichMods
+ ** @param uint8_t map_realMods
+ ** @param uint16_t map_vmods
+ ** @param uint32_t map_ctrls
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_named_indicator_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */,
+ xcb_atom_t indicator /**< */,
+ uint8_t setState /**< */,
+ uint8_t on /**< */,
+ uint8_t setMap /**< */,
+ uint8_t createMap /**< */,
+ uint8_t map_flags /**< */,
+ uint8_t map_whichGroups /**< */,
+ uint8_t map_groups /**< */,
+ uint8_t map_whichMods /**< */,
+ uint8_t map_realMods /**< */,
+ uint16_t map_vmods /**< */,
+ uint32_t map_ctrls /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_NAMED_INDICATOR,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_named_indicator_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.ledClass = ledClass;
+ xcb_out.ledID = ledID;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.indicator = indicator;
+ xcb_out.setState = setState;
+ xcb_out.on = on;
+ xcb_out.setMap = setMap;
+ xcb_out.createMap = createMap;
+ xcb_out.pad1 = 0;
+ xcb_out.map_flags = map_flags;
+ xcb_out.map_whichGroups = map_whichGroups;
+ xcb_out.map_groups = map_groups;
+ xcb_out.map_whichMods = map_whichMods;
+ xcb_out.map_realMods = map_realMods;
+ xcb_out.map_vmods = map_vmods;
+ xcb_out.map_ctrls = map_ctrls;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_named_indicator
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @param xcb_atom_t indicator
+ ** @param uint8_t setState
+ ** @param uint8_t on
+ ** @param uint8_t setMap
+ ** @param uint8_t createMap
+ ** @param uint8_t map_flags
+ ** @param uint8_t map_whichGroups
+ ** @param uint8_t map_groups
+ ** @param uint8_t map_whichMods
+ ** @param uint8_t map_realMods
+ ** @param uint16_t map_vmods
+ ** @param uint32_t map_ctrls
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_named_indicator (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */,
+ xcb_atom_t indicator /**< */,
+ uint8_t setState /**< */,
+ uint8_t on /**< */,
+ uint8_t setMap /**< */,
+ uint8_t createMap /**< */,
+ uint8_t map_flags /**< */,
+ uint8_t map_whichGroups /**< */,
+ uint8_t map_groups /**< */,
+ uint8_t map_whichMods /**< */,
+ uint8_t map_realMods /**< */,
+ uint16_t map_vmods /**< */,
+ uint32_t map_ctrls /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_NAMED_INDICATOR,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_named_indicator_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.ledClass = ledClass;
+ xcb_out.ledID = ledID;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.indicator = indicator;
+ xcb_out.setState = setState;
+ xcb_out.on = on;
+ xcb_out.setMap = setMap;
+ xcb_out.createMap = createMap;
+ xcb_out.pad1 = 0;
+ xcb_out.map_flags = map_flags;
+ xcb_out.map_whichGroups = map_whichGroups;
+ xcb_out.map_groups = map_groups;
+ xcb_out.map_whichMods = map_whichMods;
+ xcb_out.map_realMods = map_realMods;
+ xcb_out.map_vmods = map_vmods;
+ xcb_out.map_ctrls = map_ctrls;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_type_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_type_names (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->typeNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_type_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_type_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return R->nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_type_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_type_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* valueList */ S->typeNames + R->nTypes;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_names_value_list_n_levels_per_type
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_names_value_list_n_levels_per_type (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->nLevelsPerType;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_n_levels_per_type_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_n_levels_per_type_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return R->nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_n_levels_per_type_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* valueList */ S->nLevelsPerType + R->nTypes;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_kt_level_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_kt_level_names (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->ktLevelNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_kt_level_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_kt_level_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return qt_xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_kt_level_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_kt_level_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* valueList */ S->ktLevelNames + qt_xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_indicator_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_indicator_names (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->indicatorNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_indicator_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_indicator_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return xcb_popcount(R->indicators);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_indicator_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_indicator_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* valueList */ S->indicatorNames + xcb_popcount(R->indicators);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_virtual_mod_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_virtual_mod_names (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->virtualModNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_virtual_mod_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_virtual_mod_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return xcb_popcount(R->virtualMods);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_virtual_mod_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_virtual_mod_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* valueList */ S->virtualModNames + xcb_popcount(R->virtualMods);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_groups
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_groups (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->groups;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_groups_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_groups_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return xcb_popcount(R->groupNames);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_groups_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_groups_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* valueList */ S->groups + xcb_popcount(R->groupNames);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_t * xcb_xkb_get_names_value_list_key_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_xkb_key_name_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_t *
+xcb_xkb_get_names_value_list_key_names (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->keyNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_key_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_key_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return R->nKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_iterator_t xcb_xkb_get_names_value_list_key_names_iterator
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_xkb_key_name_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_iterator_t
+xcb_xkb_get_names_value_list_key_names_iterator (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ xcb_xkb_key_name_iterator_t i;
+ i.data = /* valueList */ S->keyNames;
+ i.rem = R->nKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_names_value_list_key_aliases
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_names_value_list_key_aliases (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->keyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_key_aliases_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return R->nKeyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_names_value_list_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_names_value_list_key_aliases_iterator (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ xcb_xkb_key_alias_iterator_t i;
+ i.data = /* valueList */ S->keyAliases;
+ i.rem = R->nKeyAliases;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_names_value_list_radio_group_names
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_names_value_list_radio_group_names (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->radioGroupNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_radio_group_names_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_radio_group_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return R->nRadioGroups;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_radio_group_names_end
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_names_value_list_radio_group_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* valueList */ S->radioGroupNames + R->nRadioGroups;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_get_names_value_list_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_get_names_value_list_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[25];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
+ /* xcb_xkb_get_names_value_list_t.keycodesName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_names_value_list_t.geometryName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
+ /* xcb_xkb_get_names_value_list_t.symbolsName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
+ /* xcb_xkb_get_names_value_list_t.physSymbolsName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_TYPES) {
+ /* xcb_xkb_get_names_value_list_t.typesName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
+ /* xcb_xkb_get_names_value_list_t.compatName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* typeNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
+ xcb_block_len += nTypes * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* nLevelsPerType */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
+ xcb_block_len += nTypes * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
+ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = qt_xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* indicatorNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
+ xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* virtualModNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* groups */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
+ xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
+ xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
+ xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* radioGroupNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
+ xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_names_value_list_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ xcb_xkb_get_names_value_list_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
+ /* xcb_xkb_get_names_value_list_t.keycodesName */
+ _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_names_value_list_t.geometryName */
+ _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
+ /* xcb_xkb_get_names_value_list_t.symbolsName */
+ _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
+ /* xcb_xkb_get_names_value_list_t.physSymbolsName */
+ _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_TYPES) {
+ /* xcb_xkb_get_names_value_list_t.typesName */
+ _aux->typesName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
+ /* xcb_xkb_get_names_value_list_t.compatName */
+ _aux->compatName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* typeNames */
+ _aux->typeNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += nTypes * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* nLevelsPerType */
+ _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
+ xcb_block_len += nTypes * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* indicatorNames */
+ _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* virtualModNames */
+ _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* groups */
+ _aux->groups = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyNames */
+ _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
+ xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
+ xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* radioGroupNames */
+ _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_names_value_list_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */)
+{
+ xcb_xkb_get_names_value_list_t _aux;
+ return xcb_xkb_get_names_value_list_unpack(_buffer, nTypes, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @returns xcb_xkb_get_names_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_names_cookie_t
+xcb_xkb_get_names (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_NAMES,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_names_cookie_t xcb_ret;
+ xcb_xkb_get_names_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.which = which;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t which
+ ** @returns xcb_xkb_get_names_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_names_cookie_t
+xcb_xkb_get_names_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t which /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_NAMES,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_names_cookie_t xcb_ret;
+ xcb_xkb_get_names_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.which = which;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_names_value_list_t * xcb_xkb_get_names_value_list
+ **
+ ** @param const xcb_xkb_get_names_reply_t *R
+ ** @returns xcb_xkb_get_names_value_list_t *
+ **
+ *****************************************************************************/
+
+void *
+xcb_xkb_get_names_value_list (const xcb_xkb_get_names_reply_t *R /**< */)
+{
+ return (void *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_names_reply_t * xcb_xkb_get_names_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_names_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_names_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_names_reply_t *
+xcb_xkb_get_names_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_names_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_names_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_type_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_type_names (const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return /* values */ S->typeNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_type_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_type_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return R->nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_type_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_type_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* values */ S->typeNames + R->nTypes;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_set_names_values_n_levels_per_type
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_set_names_values_n_levels_per_type (const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return /* values */ S->nLevelsPerType;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_n_levels_per_type_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_n_levels_per_type_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return R->nKTLevels;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_n_levels_per_type_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_n_levels_per_type_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* values */ S->nLevelsPerType + R->nKTLevels;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_kt_level_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_kt_level_names (const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return /* values */ S->ktLevelNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_kt_level_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_kt_level_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return qt_xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_kt_level_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_kt_level_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* values */ S->ktLevelNames + qt_xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_indicator_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_indicator_names (const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return /* values */ S->indicatorNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_indicator_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_indicator_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return xcb_popcount(R->indicators);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_indicator_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_indicator_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* values */ S->indicatorNames + xcb_popcount(R->indicators);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_virtual_mod_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_virtual_mod_names (const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return /* values */ S->virtualModNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_virtual_mod_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_virtual_mod_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return xcb_popcount(R->virtualMods);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_virtual_mod_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_virtual_mod_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* values */ S->virtualModNames + xcb_popcount(R->virtualMods);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_groups
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_groups (const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return /* values */ S->groups;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_groups_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_groups_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return xcb_popcount(R->groupNames);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_groups_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_groups_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* values */ S->groups + xcb_popcount(R->groupNames);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_t * xcb_xkb_set_names_values_key_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_xkb_key_name_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_t *
+xcb_xkb_set_names_values_key_names (const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return /* values */ S->keyNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_key_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_key_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return R->nKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_iterator_t xcb_xkb_set_names_values_key_names_iterator
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_xkb_key_name_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_iterator_t
+xcb_xkb_set_names_values_key_names_iterator (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ xcb_xkb_key_name_iterator_t i;
+ i.data = /* values */ S->keyNames;
+ i.rem = R->nKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_set_names_values_key_aliases
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_set_names_values_key_aliases (const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return /* values */ S->keyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_key_aliases_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_key_aliases_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return R->nKeyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_set_names_values_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_set_names_values_key_aliases_iterator (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ xcb_xkb_key_alias_iterator_t i;
+ i.data = /* values */ S->keyAliases;
+ i.rem = R->nKeyAliases;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_set_names_values_radio_group_names
+ **
+ ** @param const xcb_xkb_set_names_values_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_set_names_values_radio_group_names (const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return /* values */ S->radioGroupNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_set_names_values_radio_group_names_length
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_set_names_values_radio_group_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ return R->nRadioGroups;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_set_names_values_radio_group_names_end
+ **
+ ** @param const xcb_xkb_set_names_values_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_set_names_values_radio_group_names_end (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* values */ S->radioGroupNames + R->nRadioGroups;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_set_names_values_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_set_names_values_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[25];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
+ /* xcb_xkb_set_names_values_t.keycodesName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
+ /* xcb_xkb_set_names_values_t.geometryName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
+ /* xcb_xkb_set_names_values_t.symbolsName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
+ /* xcb_xkb_set_names_values_t.physSymbolsName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_TYPES) {
+ /* xcb_xkb_set_names_values_t.typesName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
+ /* xcb_xkb_set_names_values_t.compatName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* typeNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
+ xcb_block_len += nTypes * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* nLevelsPerType */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
+ xcb_block_len += nKTLevels * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
+ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* indicatorNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
+ xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* virtualModNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* groups */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
+ xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
+ xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
+ xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* radioGroupNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
+ xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_set_names_values_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ xcb_xkb_set_names_values_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
+ /* xcb_xkb_set_names_values_t.keycodesName */
+ _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
+ /* xcb_xkb_set_names_values_t.geometryName */
+ _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
+ /* xcb_xkb_set_names_values_t.symbolsName */
+ _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
+ /* xcb_xkb_set_names_values_t.physSymbolsName */
+ _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_TYPES) {
+ /* xcb_xkb_set_names_values_t.typesName */
+ _aux->typesName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
+ /* xcb_xkb_set_names_values_t.compatName */
+ _aux->compatName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* typeNames */
+ _aux->typeNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += nTypes * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* nLevelsPerType */
+ _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
+ xcb_block_len += nKTLevels * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* indicatorNames */
+ _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* virtualModNames */
+ _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* groups */
+ _aux->groups = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyNames */
+ _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
+ xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
+ xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* radioGroupNames */
+ _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_set_names_values_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */)
+{
+ xcb_xkb_set_names_values_t _aux;
+ return xcb_xkb_set_names_values_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_names_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t virtualMods
+ ** @param uint32_t which
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param uint8_t firstKTLevelt
+ ** @param uint8_t nKTLevels
+ ** @param uint32_t indicators
+ ** @param uint8_t groupNames
+ ** @param uint8_t nRadioGroups
+ ** @param xcb_keycode_t firstKey
+ ** @param uint8_t nKeys
+ ** @param uint8_t nKeyAliases
+ ** @param uint16_t totalKTLevelNames
+ ** @param const void *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_names_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t virtualMods /**< */,
+ uint32_t which /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t firstKTLevelt /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nRadioGroups /**< */,
+ xcb_keycode_t firstKey /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint16_t totalKTLevelNames /**< */,
+ const void *values /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_NAMES,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_names_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.virtualMods = virtualMods;
+ xcb_out.which = which;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKTLevelt = firstKTLevelt;
+ xcb_out.nKTLevels = nKTLevels;
+ xcb_out.indicators = indicators;
+ xcb_out.groupNames = groupNames;
+ xcb_out.nRadioGroups = nRadioGroups;
+ xcb_out.firstKey = firstKey;
+ xcb_out.nKeys = nKeys;
+ xcb_out.nKeyAliases = nKeyAliases;
+ xcb_out.pad0 = 0;
+ xcb_out.totalKTLevelNames = totalKTLevelNames;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_set_names_values_t values */
+ xcb_parts[4].iov_base = (char *) values;
+ xcb_parts[4].iov_len =
+ xcb_xkb_set_names_values_sizeof (values, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which);
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_names
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t virtualMods
+ ** @param uint32_t which
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param uint8_t firstKTLevelt
+ ** @param uint8_t nKTLevels
+ ** @param uint32_t indicators
+ ** @param uint8_t groupNames
+ ** @param uint8_t nRadioGroups
+ ** @param xcb_keycode_t firstKey
+ ** @param uint8_t nKeys
+ ** @param uint8_t nKeyAliases
+ ** @param uint16_t totalKTLevelNames
+ ** @param const void *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_names (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t virtualMods /**< */,
+ uint32_t which /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t firstKTLevelt /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nRadioGroups /**< */,
+ xcb_keycode_t firstKey /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint16_t totalKTLevelNames /**< */,
+ const void *values /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_NAMES,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_names_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.virtualMods = virtualMods;
+ xcb_out.which = which;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKTLevelt = firstKTLevelt;
+ xcb_out.nKTLevels = nKTLevels;
+ xcb_out.indicators = indicators;
+ xcb_out.groupNames = groupNames;
+ xcb_out.nRadioGroups = nRadioGroups;
+ xcb_out.firstKey = firstKey;
+ xcb_out.nKeys = nKeys;
+ xcb_out.nKeyAliases = nKeyAliases;
+ xcb_out.pad0 = 0;
+ xcb_out.totalKTLevelNames = totalKTLevelNames;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_set_names_values_t values */
+ xcb_parts[4].iov_base = (char *) values;
+ xcb_parts[4].iov_len =
+ xcb_xkb_set_names_values_sizeof (values, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which);
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_names_aux_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t virtualMods
+ ** @param uint32_t which
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param uint8_t firstKTLevelt
+ ** @param uint8_t nKTLevels
+ ** @param uint32_t indicators
+ ** @param uint8_t groupNames
+ ** @param uint8_t nRadioGroups
+ ** @param xcb_keycode_t firstKey
+ ** @param uint8_t nKeys
+ ** @param uint8_t nKeyAliases
+ ** @param uint16_t totalKTLevelNames
+ ** @param const xcb_xkb_set_names_values_t *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_names_aux_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t virtualMods /**< */,
+ uint32_t which /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t firstKTLevelt /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nRadioGroups /**< */,
+ xcb_keycode_t firstKey /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint16_t totalKTLevelNames /**< */,
+ const xcb_xkb_set_names_values_t *values /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_NAMES,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_names_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.virtualMods = virtualMods;
+ xcb_out.which = which;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKTLevelt = firstKTLevelt;
+ xcb_out.nKTLevels = nKTLevels;
+ xcb_out.indicators = indicators;
+ xcb_out.groupNames = groupNames;
+ xcb_out.nRadioGroups = nRadioGroups;
+ xcb_out.firstKey = firstKey;
+ xcb_out.nKeys = nKeys;
+ xcb_out.nKeyAliases = nKeyAliases;
+ xcb_out.pad0 = 0;
+ xcb_out.totalKTLevelNames = totalKTLevelNames;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_set_names_values_t values */
+ xcb_parts[4].iov_len =
+ xcb_xkb_set_names_values_serialize (&xcb_aux0, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, values);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_names_aux
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t virtualMods
+ ** @param uint32_t which
+ ** @param uint8_t firstType
+ ** @param uint8_t nTypes
+ ** @param uint8_t firstKTLevelt
+ ** @param uint8_t nKTLevels
+ ** @param uint32_t indicators
+ ** @param uint8_t groupNames
+ ** @param uint8_t nRadioGroups
+ ** @param xcb_keycode_t firstKey
+ ** @param uint8_t nKeys
+ ** @param uint8_t nKeyAliases
+ ** @param uint16_t totalKTLevelNames
+ ** @param const xcb_xkb_set_names_values_t *values
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_names_aux (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t virtualMods /**< */,
+ uint32_t which /**< */,
+ uint8_t firstType /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t firstKTLevelt /**< */,
+ uint8_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nRadioGroups /**< */,
+ xcb_keycode_t firstKey /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint16_t totalKTLevelNames /**< */,
+ const xcb_xkb_set_names_values_t *values /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 3,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_NAMES,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[5];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_names_request_t xcb_out;
+ void *xcb_aux0 = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.virtualMods = virtualMods;
+ xcb_out.which = which;
+ xcb_out.firstType = firstType;
+ xcb_out.nTypes = nTypes;
+ xcb_out.firstKTLevelt = firstKTLevelt;
+ xcb_out.nKTLevels = nKTLevels;
+ xcb_out.indicators = indicators;
+ xcb_out.groupNames = groupNames;
+ xcb_out.nRadioGroups = nRadioGroups;
+ xcb_out.firstKey = firstKey;
+ xcb_out.nKeys = nKeys;
+ xcb_out.nKeyAliases = nKeyAliases;
+ xcb_out.pad0 = 0;
+ xcb_out.totalKTLevelNames = totalKTLevelNames;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_set_names_values_t values */
+ xcb_parts[4].iov_len =
+ xcb_xkb_set_names_values_serialize (&xcb_aux0, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, values);
+ xcb_parts[4].iov_base = xcb_aux0;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ free(xcb_aux0);
+ return xcb_ret;
+}
+
+int
+xcb_xkb_get_geometry_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_get_geometry_reply_t *_aux = (xcb_xkb_get_geometry_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_xkb_get_geometry_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* labelFont */
+ xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* properties */
+ for(i=0; i<_aux->nProperties; i++) {
+ xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_property_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* colors */
+ for(i=0; i<_aux->nColors; i++) {
+ xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* shapes */
+ for(i=0; i<_aux->nShapes; i++) {
+ xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_shape_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* sections */
+ for(i=0; i<_aux->nSections; i++) {
+ xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_section_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* doodads */
+ for(i=0; i<_aux->nDoodads; i++) {
+ xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_doodad_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ xcb_block_len += _aux->nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_geometry_cookie_t xcb_xkb_get_geometry
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_atom_t name
+ ** @returns xcb_xkb_get_geometry_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_geometry_cookie_t
+xcb_xkb_get_geometry (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_atom_t name /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_GEOMETRY,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_geometry_cookie_t xcb_ret;
+ xcb_xkb_get_geometry_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.name = name;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_geometry_cookie_t xcb_xkb_get_geometry_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param xcb_atom_t name
+ ** @returns xcb_xkb_get_geometry_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_geometry_cookie_t
+xcb_xkb_get_geometry_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ xcb_atom_t name /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_GEOMETRY,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_geometry_cookie_t xcb_ret;
+ xcb_xkb_get_geometry_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.name = name;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_get_geometry_label_font
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_get_geometry_label_font (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ return (xcb_xkb_counted_string_16_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_properties_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_properties_length (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ return R->nProperties;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_property_iterator_t xcb_xkb_get_geometry_properties_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_property_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_property_iterator_t
+xcb_xkb_get_geometry_properties_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ xcb_xkb_property_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_string_end(xcb_xkb_get_geometry_label_font(R));
+ i.data = (xcb_xkb_property_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_property_t, prev.index));
+ i.rem = R->nProperties;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_colors_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_colors_length (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ return R->nColors;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_iterator_t xcb_xkb_get_geometry_colors_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_counted_string_16_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_iterator_t
+xcb_xkb_get_geometry_colors_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ xcb_xkb_counted_string_16_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_property_end(xcb_xkb_get_geometry_properties_iterator(R));
+ i.data = (xcb_xkb_counted_string_16_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_counted_string_16_t, prev.index));
+ i.rem = R->nColors;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_shapes_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_shapes_length (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ return R->nShapes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_shape_iterator_t xcb_xkb_get_geometry_shapes_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_shape_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_shape_iterator_t
+xcb_xkb_get_geometry_shapes_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ xcb_xkb_shape_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_end(xcb_xkb_get_geometry_colors_iterator(R));
+ i.data = (xcb_xkb_shape_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_shape_t, prev.index));
+ i.rem = R->nShapes;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_sections_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_sections_length (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ return R->nSections;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_section_iterator_t xcb_xkb_get_geometry_sections_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_section_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_section_iterator_t
+xcb_xkb_get_geometry_sections_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ xcb_xkb_section_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_shape_end(xcb_xkb_get_geometry_shapes_iterator(R));
+ i.data = (xcb_xkb_section_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_section_t, prev.index));
+ i.rem = R->nSections;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_doodads_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_doodads_length (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ return R->nDoodads;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_doodad_iterator_t xcb_xkb_get_geometry_doodads_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_doodad_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_doodad_iterator_t
+xcb_xkb_get_geometry_doodads_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ xcb_xkb_doodad_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_section_end(xcb_xkb_get_geometry_sections_iterator(R));
+ i.data = (xcb_xkb_doodad_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_doodad_t, prev.index));
+ i.rem = R->nDoodads;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_geometry_key_aliases
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_geometry_key_aliases (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ xcb_generic_iterator_t prev = xcb_xkb_doodad_end(xcb_xkb_get_geometry_doodads_iterator(R));
+ return (xcb_xkb_key_alias_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_key_alias_t, prev.index) + 0);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_geometry_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_geometry_key_aliases_length (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ return R->nKeyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_geometry_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_geometry_reply_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_geometry_key_aliases_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */)
+{
+ xcb_xkb_key_alias_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_doodad_end(xcb_xkb_get_geometry_doodads_iterator(R));
+ i.data = (xcb_xkb_key_alias_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_key_alias_t, prev.index));
+ i.rem = R->nKeyAliases;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_geometry_reply_t * xcb_xkb_get_geometry_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_geometry_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_geometry_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_geometry_reply_t *
+xcb_xkb_get_geometry_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_geometry_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ xcb_xkb_get_geometry_reply_t *reply = (xcb_xkb_get_geometry_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+ int i;
+ xcb_xkb_property_iterator_t properties_iter = xcb_xkb_get_geometry_properties_iterator(reply);
+ int properties_len = xcb_xkb_get_geometry_properties_length(reply);
+ xcb_xkb_property_t *properties_data;
+ /* special cases: transform parts of the reply to match XCB data structures */
+ for(i=0; i<properties_len; i++) {
+ properties_data = properties_iter.data;
+ xcb_xkb_property_unserialize((const void *)properties_data, &properties_data);
+ xcb_xkb_property_next(&properties_iter);
+ }
+ return reply;
+}
+
+int
+xcb_xkb_set_geometry_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_set_geometry_request_t *_aux = (xcb_xkb_set_geometry_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_xkb_set_geometry_request_t);
+ xcb_tmp += xcb_block_len;
+ /* labelFont */
+ xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* properties */
+ for(i=0; i<_aux->nProperties; i++) {
+ xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_property_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* colors */
+ for(i=0; i<_aux->nColors; i++) {
+ xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* shapes */
+ for(i=0; i<_aux->nShapes; i++) {
+ xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_shape_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* sections */
+ for(i=0; i<_aux->nSections; i++) {
+ xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_section_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* doodads */
+ for(i=0; i<_aux->nDoodads; i++) {
+ xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_doodad_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ xcb_block_len += _aux->nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_geometry_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t nShapes
+ ** @param uint8_t nSections
+ ** @param xcb_atom_t name
+ ** @param uint16_t widthMM
+ ** @param uint16_t heightMM
+ ** @param uint16_t nProperties
+ ** @param uint16_t nColors
+ ** @param uint16_t nDoodads
+ ** @param uint16_t nKeyAliases
+ ** @param uint8_t baseColorNdx
+ ** @param uint8_t labelColorNdx
+ ** @param xcb_xkb_counted_string_16_t *labelFont
+ ** @param const xcb_xkb_property_t *properties
+ ** @param const xcb_xkb_counted_string_16_t *colors
+ ** @param const xcb_xkb_shape_t *shapes
+ ** @param const xcb_xkb_section_t *sections
+ ** @param const xcb_xkb_doodad_t *doodads
+ ** @param const xcb_xkb_key_alias_t *keyAliases
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_geometry_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t nShapes /**< */,
+ uint8_t nSections /**< */,
+ xcb_atom_t name /**< */,
+ uint16_t widthMM /**< */,
+ uint16_t heightMM /**< */,
+ uint16_t nProperties /**< */,
+ uint16_t nColors /**< */,
+ uint16_t nDoodads /**< */,
+ uint16_t nKeyAliases /**< */,
+ uint8_t baseColorNdx /**< */,
+ uint8_t labelColorNdx /**< */,
+ xcb_xkb_counted_string_16_t *labelFont /**< */,
+ const xcb_xkb_property_t *properties /**< */,
+ const xcb_xkb_counted_string_16_t *colors /**< */,
+ const xcb_xkb_shape_t *shapes /**< */,
+ const xcb_xkb_section_t *sections /**< */,
+ const xcb_xkb_doodad_t *doodads /**< */,
+ const xcb_xkb_key_alias_t *keyAliases /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 16,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_GEOMETRY,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[18];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_geometry_request_t xcb_out;
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+ char *xcb_tmp;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.nShapes = nShapes;
+ xcb_out.nSections = nSections;
+ xcb_out.name = name;
+ xcb_out.widthMM = widthMM;
+ xcb_out.heightMM = heightMM;
+ xcb_out.nProperties = nProperties;
+ xcb_out.nColors = nColors;
+ xcb_out.nDoodads = nDoodads;
+ xcb_out.nKeyAliases = nKeyAliases;
+ xcb_out.baseColorNdx = baseColorNdx;
+ xcb_out.labelColorNdx = labelColorNdx;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_counted_string_16_t labelFont */
+ xcb_parts[4].iov_base = (char *) labelFont;
+ xcb_parts[4].iov_len =
+ xcb_xkb_counted_string_16_sizeof (labelFont);
+ /* xcb_xkb_property_t properties */
+ xcb_parts[5].iov_base = (char *) properties;
+ xcb_parts[5].iov_len = 0;
+ xcb_tmp = (char *)properties;
+ for(i=0; i<nProperties; i++) {
+ xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp);
+ xcb_parts[5].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[6].iov_base = 0;
+ xcb_parts[6].iov_len = -xcb_parts[5].iov_len & 3;
+ /* xcb_xkb_counted_string_16_t colors */
+ xcb_parts[7].iov_base = (char *) colors;
+ xcb_parts[7].iov_len = 0;
+ xcb_tmp = (char *)colors;
+ for(i=0; i<nColors; i++) {
+ xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_parts[7].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[8].iov_base = 0;
+ xcb_parts[8].iov_len = -xcb_parts[7].iov_len & 3;
+ /* xcb_xkb_shape_t shapes */
+ xcb_parts[9].iov_base = (char *) shapes;
+ xcb_parts[9].iov_len = 0;
+ xcb_tmp = (char *)shapes;
+ for(i=0; i<nShapes; i++) {
+ xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp);
+ xcb_parts[9].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[10].iov_base = 0;
+ xcb_parts[10].iov_len = -xcb_parts[9].iov_len & 3;
+ /* xcb_xkb_section_t sections */
+ xcb_parts[11].iov_base = (char *) sections;
+ xcb_parts[11].iov_len = 0;
+ xcb_tmp = (char *)sections;
+ for(i=0; i<nSections; i++) {
+ xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp);
+ xcb_parts[11].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[12].iov_base = 0;
+ xcb_parts[12].iov_len = -xcb_parts[11].iov_len & 3;
+ /* xcb_xkb_doodad_t doodads */
+ xcb_parts[13].iov_base = (char *) doodads;
+ xcb_parts[13].iov_len = 0;
+ xcb_tmp = (char *)doodads;
+ for(i=0; i<nDoodads; i++) {
+ xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp);
+ xcb_parts[13].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[14].iov_base = 0;
+ xcb_parts[14].iov_len = -xcb_parts[13].iov_len & 3;
+ /* xcb_xkb_key_alias_t keyAliases */
+ xcb_parts[15].iov_base = (char *) keyAliases;
+ xcb_parts[15].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts[16].iov_base = 0;
+ xcb_parts[16].iov_len = -xcb_parts[15].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_geometry
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t nShapes
+ ** @param uint8_t nSections
+ ** @param xcb_atom_t name
+ ** @param uint16_t widthMM
+ ** @param uint16_t heightMM
+ ** @param uint16_t nProperties
+ ** @param uint16_t nColors
+ ** @param uint16_t nDoodads
+ ** @param uint16_t nKeyAliases
+ ** @param uint8_t baseColorNdx
+ ** @param uint8_t labelColorNdx
+ ** @param xcb_xkb_counted_string_16_t *labelFont
+ ** @param const xcb_xkb_property_t *properties
+ ** @param const xcb_xkb_counted_string_16_t *colors
+ ** @param const xcb_xkb_shape_t *shapes
+ ** @param const xcb_xkb_section_t *sections
+ ** @param const xcb_xkb_doodad_t *doodads
+ ** @param const xcb_xkb_key_alias_t *keyAliases
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_geometry (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t nShapes /**< */,
+ uint8_t nSections /**< */,
+ xcb_atom_t name /**< */,
+ uint16_t widthMM /**< */,
+ uint16_t heightMM /**< */,
+ uint16_t nProperties /**< */,
+ uint16_t nColors /**< */,
+ uint16_t nDoodads /**< */,
+ uint16_t nKeyAliases /**< */,
+ uint8_t baseColorNdx /**< */,
+ uint8_t labelColorNdx /**< */,
+ xcb_xkb_counted_string_16_t *labelFont /**< */,
+ const xcb_xkb_property_t *properties /**< */,
+ const xcb_xkb_counted_string_16_t *colors /**< */,
+ const xcb_xkb_shape_t *shapes /**< */,
+ const xcb_xkb_section_t *sections /**< */,
+ const xcb_xkb_doodad_t *doodads /**< */,
+ const xcb_xkb_key_alias_t *keyAliases /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 16,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_GEOMETRY,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[18];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_geometry_request_t xcb_out;
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+ char *xcb_tmp;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.nShapes = nShapes;
+ xcb_out.nSections = nSections;
+ xcb_out.name = name;
+ xcb_out.widthMM = widthMM;
+ xcb_out.heightMM = heightMM;
+ xcb_out.nProperties = nProperties;
+ xcb_out.nColors = nColors;
+ xcb_out.nDoodads = nDoodads;
+ xcb_out.nKeyAliases = nKeyAliases;
+ xcb_out.baseColorNdx = baseColorNdx;
+ xcb_out.labelColorNdx = labelColorNdx;
+ memset(xcb_out.pad0, 0, 2);
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_counted_string_16_t labelFont */
+ xcb_parts[4].iov_base = (char *) labelFont;
+ xcb_parts[4].iov_len =
+ xcb_xkb_counted_string_16_sizeof (labelFont);
+ /* xcb_xkb_property_t properties */
+ xcb_parts[5].iov_base = (char *) properties;
+ xcb_parts[5].iov_len = 0;
+ xcb_tmp = (char *)properties;
+ for(i=0; i<nProperties; i++) {
+ xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp);
+ xcb_parts[5].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[6].iov_base = 0;
+ xcb_parts[6].iov_len = -xcb_parts[5].iov_len & 3;
+ /* xcb_xkb_counted_string_16_t colors */
+ xcb_parts[7].iov_base = (char *) colors;
+ xcb_parts[7].iov_len = 0;
+ xcb_tmp = (char *)colors;
+ for(i=0; i<nColors; i++) {
+ xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_parts[7].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[8].iov_base = 0;
+ xcb_parts[8].iov_len = -xcb_parts[7].iov_len & 3;
+ /* xcb_xkb_shape_t shapes */
+ xcb_parts[9].iov_base = (char *) shapes;
+ xcb_parts[9].iov_len = 0;
+ xcb_tmp = (char *)shapes;
+ for(i=0; i<nShapes; i++) {
+ xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp);
+ xcb_parts[9].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[10].iov_base = 0;
+ xcb_parts[10].iov_len = -xcb_parts[9].iov_len & 3;
+ /* xcb_xkb_section_t sections */
+ xcb_parts[11].iov_base = (char *) sections;
+ xcb_parts[11].iov_len = 0;
+ xcb_tmp = (char *)sections;
+ for(i=0; i<nSections; i++) {
+ xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp);
+ xcb_parts[11].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[12].iov_base = 0;
+ xcb_parts[12].iov_len = -xcb_parts[11].iov_len & 3;
+ /* xcb_xkb_doodad_t doodads */
+ xcb_parts[13].iov_base = (char *) doodads;
+ xcb_parts[13].iov_len = 0;
+ xcb_tmp = (char *)doodads;
+ for(i=0; i<nDoodads; i++) {
+ xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp);
+ xcb_parts[13].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[14].iov_base = 0;
+ xcb_parts[14].iov_len = -xcb_parts[13].iov_len & 3;
+ /* xcb_xkb_key_alias_t keyAliases */
+ xcb_parts[15].iov_base = (char *) keyAliases;
+ xcb_parts[15].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts[16].iov_base = 0;
+ xcb_parts[16].iov_len = -xcb_parts[15].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t change
+ ** @param uint32_t value
+ ** @param uint32_t ctrlsToChange
+ ** @param uint32_t autoCtrls
+ ** @param uint32_t autoCtrlsValues
+ ** @returns xcb_xkb_per_client_flags_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_per_client_flags_cookie_t
+xcb_xkb_per_client_flags (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t change /**< */,
+ uint32_t value /**< */,
+ uint32_t ctrlsToChange /**< */,
+ uint32_t autoCtrls /**< */,
+ uint32_t autoCtrlsValues /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_PER_CLIENT_FLAGS,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_per_client_flags_cookie_t xcb_ret;
+ xcb_xkb_per_client_flags_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.change = change;
+ xcb_out.value = value;
+ xcb_out.ctrlsToChange = ctrlsToChange;
+ xcb_out.autoCtrls = autoCtrls;
+ xcb_out.autoCtrlsValues = autoCtrlsValues;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint32_t change
+ ** @param uint32_t value
+ ** @param uint32_t ctrlsToChange
+ ** @param uint32_t autoCtrls
+ ** @param uint32_t autoCtrlsValues
+ ** @returns xcb_xkb_per_client_flags_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_per_client_flags_cookie_t
+xcb_xkb_per_client_flags_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint32_t change /**< */,
+ uint32_t value /**< */,
+ uint32_t ctrlsToChange /**< */,
+ uint32_t autoCtrls /**< */,
+ uint32_t autoCtrlsValues /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_PER_CLIENT_FLAGS,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_per_client_flags_cookie_t xcb_ret;
+ xcb_xkb_per_client_flags_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.change = change;
+ xcb_out.value = value;
+ xcb_out.ctrlsToChange = ctrlsToChange;
+ xcb_out.autoCtrls = autoCtrls;
+ xcb_out.autoCtrlsValues = autoCtrlsValues;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_per_client_flags_reply_t * xcb_xkb_per_client_flags_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_per_client_flags_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_per_client_flags_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_per_client_flags_reply_t *
+xcb_xkb_per_client_flags_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_per_client_flags_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_per_client_flags_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_xkb_list_components_serialize (void **_buffer /**< */,
+ const xcb_xkb_list_components_request_t *_aux /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[15];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ /* xcb_xkb_list_components_request_t.deviceSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->deviceSpec;
+ xcb_block_len += sizeof(xcb_xkb_device_spec_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_xkb_device_spec_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_device_spec_t);
+ /* xcb_xkb_list_components_request_t.maxNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->maxNames;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_list_components_request_t.keymapsSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keymapsSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* keymapsSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) keymapsSpec;
+ xcb_block_len += _aux->keymapsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->keymapsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.keycodesSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* keycodesSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) keycodesSpec;
+ xcb_block_len += _aux->keycodesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->keycodesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.typesSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* typesSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) typesSpec;
+ xcb_block_len += _aux->typesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->typesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.compatMapSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatMapSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* compatMapSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) compatMapSpec;
+ xcb_block_len += _aux->compatMapSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->compatMapSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.symbolsSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* symbolsSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) symbolsSpec;
+ xcb_block_len += _aux->symbolsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->symbolsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.geometrySpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometrySpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* geometrySpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) geometrySpec;
+ xcb_block_len += _aux->geometrySpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->geometrySpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_list_components_unserialize (const void *_buffer /**< */,
+ xcb_xkb_list_components_request_t **_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ xcb_xkb_list_components_request_t xcb_out;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ xcb_xkb_string8_t *keymapsSpec;
+ int keymapsSpec_len;
+ xcb_xkb_string8_t *keycodesSpec;
+ int keycodesSpec_len;
+ xcb_xkb_string8_t *typesSpec;
+ int typesSpec_len;
+ xcb_xkb_string8_t *compatMapSpec;
+ int compatMapSpec_len;
+ xcb_xkb_string8_t *symbolsSpec;
+ int symbolsSpec_len;
+ xcb_xkb_string8_t *geometrySpec;
+ int geometrySpec_len;
+
+ /* xcb_xkb_list_components_request_t.major_opcode */
+ xcb_out.major_opcode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_list_components_request_t.minor_opcode */
+ xcb_out.minor_opcode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_list_components_request_t.length */
+ xcb_out.length = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_list_components_request_t.deviceSpec */
+ xcb_out.deviceSpec = *(xcb_xkb_device_spec_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_xkb_device_spec_t);
+ xcb_tmp += sizeof(xcb_xkb_device_spec_t);
+ xcb_align_to = ALIGNOF(xcb_xkb_device_spec_t);
+ /* xcb_xkb_list_components_request_t.maxNames */
+ xcb_out.maxNames = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_list_components_request_t.keymapsSpecLen */
+ xcb_out.keymapsSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* keymapsSpec */
+ keymapsSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ keymapsSpec_len = xcb_out.keymapsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += keymapsSpec_len;
+ xcb_tmp += keymapsSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.keycodesSpecLen */
+ xcb_out.keycodesSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* keycodesSpec */
+ keycodesSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ keycodesSpec_len = xcb_out.keycodesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += keycodesSpec_len;
+ xcb_tmp += keycodesSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.typesSpecLen */
+ xcb_out.typesSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* typesSpec */
+ typesSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ typesSpec_len = xcb_out.typesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += typesSpec_len;
+ xcb_tmp += typesSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.compatMapSpecLen */
+ xcb_out.compatMapSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* compatMapSpec */
+ compatMapSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ compatMapSpec_len = xcb_out.compatMapSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += compatMapSpec_len;
+ xcb_tmp += compatMapSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.symbolsSpecLen */
+ xcb_out.symbolsSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* symbolsSpec */
+ symbolsSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ symbolsSpec_len = xcb_out.symbolsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += symbolsSpec_len;
+ xcb_tmp += symbolsSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_list_components_request_t.geometrySpecLen */
+ xcb_out.geometrySpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* geometrySpec */
+ geometrySpec = (xcb_xkb_string8_t *)xcb_tmp;
+ geometrySpec_len = xcb_out.geometrySpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += geometrySpec_len;
+ xcb_tmp += geometrySpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == _aux)
+ return xcb_buffer_len;
+
+ if (NULL == *_aux) {
+ /* allocate memory */
+ *_aux = malloc(xcb_buffer_len);
+ }
+
+ xcb_tmp = ((char *)*_aux)+xcb_buffer_len;
+ xcb_tmp -= geometrySpec_len;
+ memmove(xcb_tmp, geometrySpec, geometrySpec_len);
+ xcb_tmp -= symbolsSpec_len;
+ memmove(xcb_tmp, symbolsSpec, symbolsSpec_len);
+ xcb_tmp -= compatMapSpec_len;
+ memmove(xcb_tmp, compatMapSpec, compatMapSpec_len);
+ xcb_tmp -= typesSpec_len;
+ memmove(xcb_tmp, typesSpec, typesSpec_len);
+ xcb_tmp -= keycodesSpec_len;
+ memmove(xcb_tmp, keycodesSpec, keycodesSpec_len);
+ xcb_tmp -= keymapsSpec_len;
+ memmove(xcb_tmp, keymapsSpec, keymapsSpec_len);
+ **_aux = xcb_out;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_list_components_sizeof (const void *_buffer /**< */)
+{
+ return xcb_xkb_list_components_unserialize(_buffer, NULL);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t maxNames
+ ** @param uint8_t keymapsSpecLen
+ ** @param const xcb_xkb_string8_t *keymapsSpec
+ ** @param uint8_t keycodesSpecLen
+ ** @param const xcb_xkb_string8_t *keycodesSpec
+ ** @param uint8_t typesSpecLen
+ ** @param const xcb_xkb_string8_t *typesSpec
+ ** @param uint8_t compatMapSpecLen
+ ** @param const xcb_xkb_string8_t *compatMapSpec
+ ** @param uint8_t symbolsSpecLen
+ ** @param const xcb_xkb_string8_t *symbolsSpec
+ ** @param uint8_t geometrySpecLen
+ ** @param const xcb_xkb_string8_t *geometrySpec
+ ** @returns xcb_xkb_list_components_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_list_components_cookie_t
+xcb_xkb_list_components (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t maxNames /**< */,
+ uint8_t keymapsSpecLen /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ uint8_t keycodesSpecLen /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ uint8_t typesSpecLen /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ uint8_t compatMapSpecLen /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ uint8_t symbolsSpecLen /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ uint8_t geometrySpecLen /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_LIST_COMPONENTS,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_list_components_cookie_t xcb_ret;
+ xcb_xkb_list_components_request_t xcb_out;
+ /* in the protocol description, variable size fields are followed by fixed size fields */
+ void *xcb_aux = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.maxNames = maxNames;
+ xcb_out.keymapsSpecLen = keymapsSpecLen;
+ xcb_out.keycodesSpecLen = keycodesSpecLen;
+ xcb_out.typesSpecLen = typesSpecLen;
+ xcb_out.compatMapSpecLen = compatMapSpecLen;
+ xcb_out.symbolsSpecLen = symbolsSpecLen;
+ xcb_out.geometrySpecLen = geometrySpecLen;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = 2*sizeof(uint8_t) + sizeof(uint16_t);
+ xcb_parts[3].iov_len = xcb_xkb_list_components_serialize (&xcb_aux, &xcb_out, keymapsSpec, keycodesSpec, typesSpec, compatMapSpec, symbolsSpec, geometrySpec);
+ xcb_parts[3].iov_base = (char *) xcb_aux;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ free(xcb_aux);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t maxNames
+ ** @param uint8_t keymapsSpecLen
+ ** @param const xcb_xkb_string8_t *keymapsSpec
+ ** @param uint8_t keycodesSpecLen
+ ** @param const xcb_xkb_string8_t *keycodesSpec
+ ** @param uint8_t typesSpecLen
+ ** @param const xcb_xkb_string8_t *typesSpec
+ ** @param uint8_t compatMapSpecLen
+ ** @param const xcb_xkb_string8_t *compatMapSpec
+ ** @param uint8_t symbolsSpecLen
+ ** @param const xcb_xkb_string8_t *symbolsSpec
+ ** @param uint8_t geometrySpecLen
+ ** @param const xcb_xkb_string8_t *geometrySpec
+ ** @returns xcb_xkb_list_components_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_list_components_cookie_t
+xcb_xkb_list_components_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t maxNames /**< */,
+ uint8_t keymapsSpecLen /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ uint8_t keycodesSpecLen /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ uint8_t typesSpecLen /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ uint8_t compatMapSpecLen /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ uint8_t symbolsSpecLen /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ uint8_t geometrySpecLen /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_LIST_COMPONENTS,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_list_components_cookie_t xcb_ret;
+ xcb_xkb_list_components_request_t xcb_out;
+ /* in the protocol description, variable size fields are followed by fixed size fields */
+ void *xcb_aux = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.maxNames = maxNames;
+ xcb_out.keymapsSpecLen = keymapsSpecLen;
+ xcb_out.keycodesSpecLen = keycodesSpecLen;
+ xcb_out.typesSpecLen = typesSpecLen;
+ xcb_out.compatMapSpecLen = compatMapSpecLen;
+ xcb_out.symbolsSpecLen = symbolsSpecLen;
+ xcb_out.geometrySpecLen = geometrySpecLen;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = 2*sizeof(uint8_t) + sizeof(uint16_t);
+ xcb_parts[3].iov_len = xcb_xkb_list_components_serialize (&xcb_aux, &xcb_out, keymapsSpec, keycodesSpec, typesSpec, compatMapSpec, symbolsSpec, geometrySpec);
+ xcb_parts[3].iov_base = (char *) xcb_aux;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ free(xcb_aux);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_keymaps_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_keymaps_length (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ return R->nKeymaps;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keymaps_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_keymaps_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ xcb_xkb_listing_iterator_t i;
+ i.data = (xcb_xkb_listing_t *) (R + 1);
+ i.rem = R->nKeymaps;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_keycodes_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_keycodes_length (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ return R->nKeycodes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keycodes_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_keycodes_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ xcb_xkb_listing_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_keymaps_iterator(R));
+ i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
+ i.rem = R->nKeycodes;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_types_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_types_length (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ return R->nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_types_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_types_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ xcb_xkb_listing_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_keycodes_iterator(R));
+ i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
+ i.rem = R->nTypes;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_compat_maps_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_compat_maps_length (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ return R->nCompatMaps;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_compat_maps_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_compat_maps_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ xcb_xkb_listing_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_types_iterator(R));
+ i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
+ i.rem = R->nCompatMaps;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_symbols_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_symbols_length (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ return R->nSymbols;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_symbols_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_symbols_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ xcb_xkb_listing_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_compat_maps_iterator(R));
+ i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
+ i.rem = R->nSymbols;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_list_components_geometries_length
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_list_components_geometries_length (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ return R->nGeometries;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_geometries_iterator
+ **
+ ** @param const xcb_xkb_list_components_reply_t *R
+ ** @returns xcb_xkb_listing_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_listing_iterator_t
+xcb_xkb_list_components_geometries_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
+{
+ xcb_xkb_listing_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_symbols_iterator(R));
+ i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
+ i.rem = R->nGeometries;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_list_components_reply_t * xcb_xkb_list_components_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_list_components_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_list_components_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_list_components_reply_t *
+xcb_xkb_list_components_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_list_components_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_list_components_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_xkb_get_kbd_by_name_serialize (void **_buffer /**< */,
+ const xcb_xkb_get_kbd_by_name_request_t *_aux /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[18];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ /* xcb_xkb_get_kbd_by_name_request_t.deviceSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->deviceSpec;
+ xcb_block_len += sizeof(xcb_xkb_device_spec_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_xkb_device_spec_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_device_spec_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.need */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->need;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.want */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->want;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.load */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->load;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.keymapsSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keymapsSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* keymapsSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) keymapsSpec;
+ xcb_block_len += _aux->keymapsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->keymapsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.keycodesSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* keycodesSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) keycodesSpec;
+ xcb_block_len += _aux->keycodesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->keycodesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.typesSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* typesSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) typesSpec;
+ xcb_block_len += _aux->typesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->typesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.compatMapSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatMapSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* compatMapSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) compatMapSpec;
+ xcb_block_len += _aux->compatMapSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->compatMapSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.symbolsSpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsSpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* symbolsSpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) symbolsSpec;
+ xcb_block_len += _aux->symbolsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->symbolsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.geometrySpecLen */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometrySpecLen;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* geometrySpec */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) geometrySpec;
+ xcb_block_len += _aux->geometrySpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->geometrySpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_unserialize (const void *_buffer /**< */,
+ xcb_xkb_get_kbd_by_name_request_t **_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ xcb_xkb_get_kbd_by_name_request_t xcb_out;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ xcb_xkb_string8_t *keymapsSpec;
+ int keymapsSpec_len;
+ xcb_xkb_string8_t *keycodesSpec;
+ int keycodesSpec_len;
+ xcb_xkb_string8_t *typesSpec;
+ int typesSpec_len;
+ xcb_xkb_string8_t *compatMapSpec;
+ int compatMapSpec_len;
+ xcb_xkb_string8_t *symbolsSpec;
+ int symbolsSpec_len;
+ xcb_xkb_string8_t *geometrySpec;
+ int geometrySpec_len;
+
+ /* xcb_xkb_get_kbd_by_name_request_t.major_opcode */
+ xcb_out.major_opcode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.minor_opcode */
+ xcb_out.minor_opcode = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.length */
+ xcb_out.length = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.deviceSpec */
+ xcb_out.deviceSpec = *(xcb_xkb_device_spec_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_xkb_device_spec_t);
+ xcb_tmp += sizeof(xcb_xkb_device_spec_t);
+ xcb_align_to = ALIGNOF(xcb_xkb_device_spec_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.need */
+ xcb_out.need = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.want */
+ xcb_out.want = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.load */
+ xcb_out.load = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.pad0 */
+ xcb_out.pad0 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.keymapsSpecLen */
+ xcb_out.keymapsSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* keymapsSpec */
+ keymapsSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ keymapsSpec_len = xcb_out.keymapsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += keymapsSpec_len;
+ xcb_tmp += keymapsSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.keycodesSpecLen */
+ xcb_out.keycodesSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* keycodesSpec */
+ keycodesSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ keycodesSpec_len = xcb_out.keycodesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += keycodesSpec_len;
+ xcb_tmp += keycodesSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.typesSpecLen */
+ xcb_out.typesSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* typesSpec */
+ typesSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ typesSpec_len = xcb_out.typesSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += typesSpec_len;
+ xcb_tmp += typesSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.compatMapSpecLen */
+ xcb_out.compatMapSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* compatMapSpec */
+ compatMapSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ compatMapSpec_len = xcb_out.compatMapSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += compatMapSpec_len;
+ xcb_tmp += compatMapSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.symbolsSpecLen */
+ xcb_out.symbolsSpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* symbolsSpec */
+ symbolsSpec = (xcb_xkb_string8_t *)xcb_tmp;
+ symbolsSpec_len = xcb_out.symbolsSpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += symbolsSpec_len;
+ xcb_tmp += symbolsSpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* xcb_xkb_get_kbd_by_name_request_t.geometrySpecLen */
+ xcb_out.geometrySpecLen = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* geometrySpec */
+ geometrySpec = (xcb_xkb_string8_t *)xcb_tmp;
+ geometrySpec_len = xcb_out.geometrySpecLen * sizeof(xcb_xkb_string8_t);
+ xcb_block_len += geometrySpec_len;
+ xcb_tmp += geometrySpec_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == _aux)
+ return xcb_buffer_len;
+
+ if (NULL == *_aux) {
+ /* allocate memory */
+ *_aux = malloc(xcb_buffer_len);
+ }
+
+ xcb_tmp = ((char *)*_aux)+xcb_buffer_len;
+ xcb_tmp -= geometrySpec_len;
+ memmove(xcb_tmp, geometrySpec, geometrySpec_len);
+ xcb_tmp -= symbolsSpec_len;
+ memmove(xcb_tmp, symbolsSpec, symbolsSpec_len);
+ xcb_tmp -= compatMapSpec_len;
+ memmove(xcb_tmp, compatMapSpec, compatMapSpec_len);
+ xcb_tmp -= typesSpec_len;
+ memmove(xcb_tmp, typesSpec, typesSpec_len);
+ xcb_tmp -= keycodesSpec_len;
+ memmove(xcb_tmp, keycodesSpec, keycodesSpec_len);
+ xcb_tmp -= keymapsSpec_len;
+ memmove(xcb_tmp, keymapsSpec, keymapsSpec_len);
+ **_aux = xcb_out;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_sizeof (const void *_buffer /**< */)
+{
+ return xcb_xkb_get_kbd_by_name_unserialize(_buffer, NULL);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_type_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_type_iterator_t i;
+ i.data = /* replies */ S->types.map.types_rtrn;
+ i.rem = /* replies */ S->types.nTypes;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.nKeySyms;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_sym_map_iterator_t i;
+ i.data = /* replies */ S->types.map.syms_rtrn;
+ i.rem = /* replies */ S->types.nKeySyms;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.map.acts_rtrn_count;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.nKeyActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->types.map.acts_rtrn_count + /* replies */ S->types.nKeyActions;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.map.acts_rtrn_acts;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.totalActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_action_iterator_t i;
+ i.data = /* replies */ S->types.map.acts_rtrn_acts;
+ i.rem = /* replies */ S->types.totalActions;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.map.behaviors_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.totalKeyBehaviors;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_set_behavior_iterator_t i;
+ i.data = /* replies */ S->types.map.behaviors_rtrn;
+ i.rem = /* replies */ S->types.totalKeyBehaviors;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.map.vmods_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.nVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->types.map.vmods_rtrn + /* replies */ S->types.nVModMapKeys;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.map.explicit_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.totalKeyExplicit;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_set_explicit_iterator_t i;
+ i.data = /* replies */ S->types.map.explicit_rtrn;
+ i.rem = /* replies */ S->types.totalKeyExplicit;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.map.modmap_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.totalModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_mod_map_iterator_t i;
+ i.data = /* replies */ S->types.map.modmap_rtrn;
+ i.rem = /* replies */ S->types.totalModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.map.vmodmap_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->types.totalVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_v_mod_map_iterator_t i;
+ i.data = /* replies */ S->types.map.vmodmap_rtrn;
+ i.rem = /* replies */ S->types.totalVModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[19];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->types_rtrn;
+ for(i=0; i<nTypes; i++) {
+ xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->syms_rtrn;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_count */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_acts */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types_rtrn */
+ _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp;
+ for(i=0; i<nTypes; i++) {
+ xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms_rtrn */
+ _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_count */
+ _aux->acts_rtrn_count = (uint8_t *)xcb_tmp;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_acts */
+ _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors_rtrn */
+ _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods_rtrn */
+ _aux->vmods_rtrn = (uint8_t *)xcb_tmp;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit_rtrn */
+ _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap_rtrn */
+ _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap_rtrn */
+ _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */)
+{
+ xcb_xkb_get_kbd_by_name_replies_types_map_t _aux;
+ return xcb_xkb_get_kbd_by_name_replies_types_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_type_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_type_iterator_t i;
+ i.data = /* replies */ S->client_symbols.map.types_rtrn;
+ i.rem = /* replies */ S->client_symbols.nTypes;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.nKeySyms;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_sym_map_iterator_t i;
+ i.data = /* replies */ S->client_symbols.map.syms_rtrn;
+ i.rem = /* replies */ S->client_symbols.nKeySyms;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.map.acts_rtrn_count;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.nKeyActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->client_symbols.map.acts_rtrn_count + /* replies */ S->client_symbols.nKeyActions;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.map.acts_rtrn_acts;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.totalActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_action_iterator_t i;
+ i.data = /* replies */ S->client_symbols.map.acts_rtrn_acts;
+ i.rem = /* replies */ S->client_symbols.totalActions;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.map.behaviors_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.totalKeyBehaviors;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_set_behavior_iterator_t i;
+ i.data = /* replies */ S->client_symbols.map.behaviors_rtrn;
+ i.rem = /* replies */ S->client_symbols.totalKeyBehaviors;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.map.vmods_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.nVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->client_symbols.map.vmods_rtrn + /* replies */ S->client_symbols.nVModMapKeys;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.map.explicit_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.totalKeyExplicit;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_set_explicit_iterator_t i;
+ i.data = /* replies */ S->client_symbols.map.explicit_rtrn;
+ i.rem = /* replies */ S->client_symbols.totalKeyExplicit;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.map.modmap_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.totalModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_mod_map_iterator_t i;
+ i.data = /* replies */ S->client_symbols.map.modmap_rtrn;
+ i.rem = /* replies */ S->client_symbols.totalModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.map.vmodmap_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->client_symbols.totalVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_v_mod_map_iterator_t i;
+ i.data = /* replies */ S->client_symbols.map.vmodmap_rtrn;
+ i.rem = /* replies */ S->client_symbols.totalVModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[19];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->types_rtrn;
+ for(i=0; i<nTypes; i++) {
+ xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->syms_rtrn;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_count */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_acts */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types_rtrn */
+ _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp;
+ for(i=0; i<nTypes; i++) {
+ xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms_rtrn */
+ _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_count */
+ _aux->acts_rtrn_count = (uint8_t *)xcb_tmp;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_acts */
+ _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors_rtrn */
+ _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods_rtrn */
+ _aux->vmods_rtrn = (uint8_t *)xcb_tmp;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit_rtrn */
+ _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap_rtrn */
+ _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap_rtrn */
+ _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */)
+{
+ xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t _aux;
+ return xcb_xkb_get_kbd_by_name_replies_client_symbols_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_key_type_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_type_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_type_iterator_t i;
+ i.data = /* replies */ S->server_symbols.map.types_rtrn;
+ i.rem = /* replies */ S->server_symbols.nTypes;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.nKeySyms;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_key_sym_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_sym_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_sym_map_iterator_t i;
+ i.data = /* replies */ S->server_symbols.map.syms_rtrn;
+ i.rem = /* replies */ S->server_symbols.nKeySyms;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.map.acts_rtrn_count;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.nKeyActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->server_symbols.map.acts_rtrn_count + /* replies */ S->server_symbols.nKeyActions;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.map.acts_rtrn_acts;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.totalActions;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_action_iterator_t i;
+ i.data = /* replies */ S->server_symbols.map.acts_rtrn_acts;
+ i.rem = /* replies */ S->server_symbols.totalActions;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_behavior_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.map.behaviors_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.totalKeyBehaviors;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_set_behavior_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_behavior_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_set_behavior_iterator_t i;
+ i.data = /* replies */ S->server_symbols.map.behaviors_rtrn;
+ i.rem = /* replies */ S->server_symbols.totalKeyBehaviors;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.map.vmods_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.nVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->server_symbols.map.vmods_rtrn + /* replies */ S->server_symbols.nVModMapKeys;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_set_explicit_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.map.explicit_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.totalKeyExplicit;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_set_explicit_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_explicit_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_set_explicit_iterator_t i;
+ i.data = /* replies */ S->server_symbols.map.explicit_rtrn;
+ i.rem = /* replies */ S->server_symbols.totalKeyExplicit;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.map.modmap_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.totalModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_key_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_mod_map_iterator_t i;
+ i.data = /* replies */ S->server_symbols.map.modmap_rtrn;
+ i.rem = /* replies */ S->server_symbols.totalModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_v_mod_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.map.vmodmap_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->server_symbols.totalVModMapKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R
+ ** @returns xcb_xkb_key_v_mod_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_v_mod_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_v_mod_map_iterator_t i;
+ i.data = /* replies */ S->server_symbols.map.vmodmap_rtrn;
+ i.rem = /* replies */ S->server_symbols.totalVModMapKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[19];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->types_rtrn;
+ for(i=0; i<nTypes; i++) {
+ xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->syms_rtrn;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_count */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_acts */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */,
+ xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* types_rtrn */
+ _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp;
+ for(i=0; i<nTypes; i++) {
+ xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* syms_rtrn */
+ _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp;
+ for(i=0; i<nKeySyms; i++) {
+ xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_count */
+ _aux->acts_rtrn_count = (uint8_t *)xcb_tmp;
+ xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* acts_rtrn_acts */
+ _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp;
+ xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ }
+ if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* behaviors_rtrn */
+ _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp;
+ xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmods_rtrn */
+ _aux->vmods_rtrn = (uint8_t *)xcb_tmp;
+ xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
+ if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* explicit_rtrn */
+ _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp;
+ xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
+ }
+ if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* modmap_rtrn */
+ _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
+ }
+ if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* vmodmap_rtrn */
+ _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
+ xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint8_t nKeySyms /**< */,
+ uint8_t nKeyActions /**< */,
+ uint16_t totalActions /**< */,
+ uint8_t totalKeyBehaviors /**< */,
+ uint8_t nVModMapKeys /**< */,
+ uint8_t totalKeyExplicit /**< */,
+ uint8_t totalModMapKeys /**< */,
+ uint8_t totalVModMapKeys /**< */,
+ uint16_t present /**< */)
+{
+ xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t _aux;
+ return xcb_xkb_get_kbd_by_name_replies_server_symbols_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.valueList.typeNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->key_names.valueList.typeNames + /* replies */ S->key_names.nTypes;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.valueList.nLevelsPerType;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.nKTLevels;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->key_names.valueList.nLevelsPerType + /* replies */ S->key_names.nKTLevels;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.valueList.ktLevelNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return qt_xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->key_names.valueList.ktLevelNames + qt_xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.valueList.indicatorNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return xcb_popcount(/* replies */ S->key_names.indicators);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->key_names.valueList.indicatorNames + xcb_popcount(/* replies */ S->key_names.indicators);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.valueList.virtualModNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return xcb_popcount(/* replies */ S->key_names.virtualMods);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->key_names.valueList.virtualModNames + xcb_popcount(/* replies */ S->key_names.virtualMods);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.valueList.groups;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return xcb_popcount(/* replies */ S->key_names.groupNames);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->key_names.valueList.groups + xcb_popcount(/* replies */ S->key_names.groupNames);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_name_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.valueList.keyNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.nKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_xkb_key_name_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_name_iterator_t i;
+ i.data = /* replies */ S->key_names.valueList.keyNames;
+ i.rem = /* replies */ S->key_names.nKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.valueList.keyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.nKeyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_alias_iterator_t i;
+ i.data = /* replies */ S->key_names.valueList.keyAliases;
+ i.rem = /* replies */ S->key_names.nKeyAliases;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.valueList.radioGroupNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->key_names.nRadioGroups;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->key_names.valueList.radioGroupNames + /* replies */ S->key_names.nRadioGroups;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[25];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.keycodesName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.geometryName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.symbolsName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.physSymbolsName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_TYPES) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.typesName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.compatName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* typeNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
+ xcb_block_len += nTypes * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* nLevelsPerType */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
+ xcb_block_len += nKTLevels * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
+ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* indicatorNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
+ xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* virtualModNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* groups */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
+ xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
+ xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
+ xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* radioGroupNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
+ xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.keycodesName */
+ _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.geometryName */
+ _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.symbolsName */
+ _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.physSymbolsName */
+ _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_TYPES) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.typesName */
+ _aux->typesName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
+ /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.compatName */
+ _aux->compatName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* typeNames */
+ _aux->typeNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += nTypes * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* nLevelsPerType */
+ _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
+ xcb_block_len += nKTLevels * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* indicatorNames */
+ _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* virtualModNames */
+ _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* groups */
+ _aux->groups = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyNames */
+ _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
+ xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
+ xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* radioGroupNames */
+ _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */)
+{
+ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t _aux;
+ return xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.valueList.typeNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.nTypes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->other_names.valueList.typeNames + /* replies */ S->other_names.nTypes;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.valueList.nLevelsPerType;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.nKTLevels;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->other_names.valueList.nLevelsPerType + /* replies */ S->other_names.nKTLevels;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.valueList.ktLevelNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return qt_xcb_sumof(/* replies */ S->other_names.valueList.nLevelsPerType, /* replies */ S->other_names.nKTLevels);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->other_names.valueList.ktLevelNames + qt_xcb_sumof(/* replies */ S->other_names.valueList.nLevelsPerType, /* replies */ S->other_names.nKTLevels);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.valueList.indicatorNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return xcb_popcount(/* replies */ S->other_names.indicators);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->other_names.valueList.indicatorNames + xcb_popcount(/* replies */ S->other_names.indicators);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.valueList.virtualModNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return xcb_popcount(/* replies */ S->other_names.virtualMods);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->other_names.valueList.virtualModNames + xcb_popcount(/* replies */ S->other_names.virtualMods);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.valueList.groups;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return xcb_popcount(/* replies */ S->other_names.groupNames);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->other_names.valueList.groups + xcb_popcount(/* replies */ S->other_names.groupNames);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_name_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.valueList.keyNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.nKeys;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_xkb_key_name_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_name_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_name_iterator_t i;
+ i.data = /* replies */ S->other_names.valueList.keyNames;
+ i.rem = /* replies */ S->other_names.nKeys;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.valueList.keyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.nKeyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_alias_iterator_t i;
+ i.data = /* replies */ S->other_names.valueList.keyAliases;
+ i.rem = /* replies */ S->other_names.nKeyAliases;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_atom_t *
+ **
+ *****************************************************************************/
+
+xcb_atom_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.valueList.radioGroupNames;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->other_names.nRadioGroups;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->other_names.valueList.radioGroupNames + /* replies */ S->other_names.nRadioGroups;
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_serialize (void **_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[25];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.keycodesName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.geometryName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.symbolsName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.physSymbolsName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_TYPES) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.typesName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.compatName */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* typeNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
+ xcb_block_len += nTypes * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* nLevelsPerType */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
+ xcb_block_len += nKTLevels * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
+ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* indicatorNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
+ xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* virtualModNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* groups */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
+ xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
+ xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
+ xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* radioGroupNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
+ xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_unpack (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */,
+ xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.keycodesName */
+ _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.geometryName */
+ _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.symbolsName */
+ _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.physSymbolsName */
+ _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_TYPES) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.typesName */
+ _aux->typesName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
+ /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.compatName */
+ _aux->compatName = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* typeNames */
+ _aux->typeNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += nTypes * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* nLevelsPerType */
+ _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
+ xcb_block_len += nKTLevels * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* indicatorNames */
+ _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* virtualModNames */
+ _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* groups */
+ _aux->groups = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyNames */
+ _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
+ xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
+ xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* radioGroupNames */
+ _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
+ xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_sizeof (const void *_buffer /**< */,
+ uint8_t nTypes /**< */,
+ uint16_t nKTLevels /**< */,
+ uint32_t indicators /**< */,
+ uint16_t virtualMods /**< */,
+ uint8_t groupNames /**< */,
+ uint8_t nKeys /**< */,
+ uint8_t nKeyAliases /**< */,
+ uint8_t nRadioGroups /**< */,
+ uint32_t which /**< */)
+{
+ xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t _aux;
+ return xcb_xkb_get_kbd_by_name_replies_other_names_value_list_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_types_map_t * xcb_xkb_get_kbd_by_name_replies_types_map
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_types_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_types_map_t *
+xcb_xkb_get_kbd_by_name_replies_types_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */)
+{
+ return (xcb_xkb_get_kbd_by_name_replies_types_map_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->compat_map.si_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return (16 * /* replies */ S->compat_map.nSIRtrn);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_end
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = /* replies */ S->compat_map.si_rtrn + (16 * /* replies */ S->compat_map.nSIRtrn);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_t * xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_mod_def_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_t *
+xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->compat_map.group_rtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return xcb_popcount(/* replies */ S->compat_map.groupsRtrn);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_mod_def_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_mod_def_iterator_t
+xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_mod_def_iterator_t i;
+ i.data = /* replies */ S->compat_map.group_rtrn;
+ i.rem = xcb_popcount(/* replies */ S->compat_map.groupsRtrn);
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *
+xcb_xkb_get_kbd_by_name_replies_client_symbols_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */)
+{
+ return (xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *
+xcb_xkb_get_kbd_by_name_replies_server_symbols_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */)
+{
+ return (xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_t * xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_indicator_map_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_t *
+xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->indicator_maps.maps;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->indicator_maps.nIndicators;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_indicator_map_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_indicator_map_iterator_t
+xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_indicator_map_iterator_t i;
+ i.data = /* replies */ S->indicator_maps.maps;
+ i.rem = /* replies */ S->indicator_maps.nIndicators;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
+xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */)
+{
+ return (xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *
+xcb_xkb_get_kbd_by_name_replies_other_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */)
+{
+ return (xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_t * xcb_xkb_get_kbd_by_name_replies_geometry_label_font
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_counted_string_16_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_t *
+xcb_xkb_get_kbd_by_name_replies_geometry_label_font (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */)
+{
+ return (xcb_xkb_counted_string_16_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_properties_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_properties_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->geometry.nProperties;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_property_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_properties_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_property_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_property_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_properties_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_property_iterator_t i;
+ i.data = /* replies */ S->geometry.properties;
+ i.rem = /* replies */ S->geometry.nProperties;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_colors_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_colors_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->geometry.nColors;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_counted_string_16_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_colors_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_counted_string_16_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_counted_string_16_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_colors_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_counted_string_16_iterator_t i;
+ i.data = /* replies */ S->geometry.colors;
+ i.rem = /* replies */ S->geometry.nColors;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_shapes_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_shapes_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->geometry.nShapes;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_shape_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_shapes_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_shape_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_shape_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_shapes_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_shape_iterator_t i;
+ i.data = /* replies */ S->geometry.shapes;
+ i.rem = /* replies */ S->geometry.nShapes;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_sections_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_sections_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->geometry.nSections;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_section_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_sections_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_section_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_section_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_sections_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_section_iterator_t i;
+ i.data = /* replies */ S->geometry.sections;
+ i.rem = /* replies */ S->geometry.nSections;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_doodads_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_doodads_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->geometry.nDoodads;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_doodad_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_doodads_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_doodad_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_doodad_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_doodads_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_doodad_iterator_t i;
+ i.data = /* replies */ S->geometry.doodads;
+ i.rem = /* replies */ S->geometry.nDoodads;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
+ ** @returns xcb_xkb_key_alias_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_t *
+xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->geometry.keyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_length
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ return /* replies */ S->geometry.nKeyAliases;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_iterator
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
+ ** @returns xcb_xkb_key_alias_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_key_alias_iterator_t
+xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+{
+ xcb_xkb_key_alias_iterator_t i;
+ i.data = /* replies */ S->geometry.keyAliases;
+ i.rem = /* replies */ S->geometry.nKeyAliases;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_serialize (void **_buffer /**< */,
+ uint16_t reported /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */)
+{
+ char *xcb_out = *_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+ struct iovec xcb_parts[172];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+ char *xcb_tmp;
+
+ if(reported & XCB_XKB_GBN_DETAIL_TYPES) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_type */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_type;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.typeDeviceID */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeDeviceID;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_sequence */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_sequence;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_length */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_length;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*2;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*2;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMinKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeMinKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMaxKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeMaxKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.present */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.present;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstType */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstType;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nTypes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nTypes;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalTypes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalTypes;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeySym */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeySym;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalSyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalSyms;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeySyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeySyms;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyAction */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyAction;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalActions */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalActions;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyActions */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyActions;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyBehavior */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyBehavior;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyBehaviors */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyBehaviors;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyBehaviors */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalKeyBehaviors;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyExplicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyExplicit;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyExplicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyExplicit;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyExplicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalKeyExplicit;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstModMapKey */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstModMapKey;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstVModMapKey */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstVModMapKey;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nVModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nVModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalVModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalVModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.pad1 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.virtualMods */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.virtualMods;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* map */
+ xcb_parts[xcb_parts_idx].iov_base = (char *)0;
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_types_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.nVModMapKeys, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_types_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.nVModMapKeys, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_types_map_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_COMPAT_MAP) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatDeviceID */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatDeviceID;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.groupsRtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.groupsRtrn;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.firstSIRtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.firstSIRtrn;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nSIRtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.nSIRtrn;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nTotalSI */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.nTotalSI;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad1 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*16;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*16;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* si_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->compat_map.si_rtrn;
+ xcb_block_len += (16 * _aux->compat_map.nSIRtrn) * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = (16 * _aux->compat_map.nSIRtrn) * sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* group_rtrn */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->compat_map.group_rtrn;
+ xcb_block_len += xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientDeviceID */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.clientDeviceID;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*2;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*2;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientMinKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.clientMinKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientMaxKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.clientMaxKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.present */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.present;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstType */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstType;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nTypes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nTypes;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalTypes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalTypes;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeySym */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstKeySym;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalSyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalSyms;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeySyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nKeySyms;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyAction */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstKeyAction;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalActions */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalActions;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyActions */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nKeyActions;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyBehavior */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstKeyBehavior;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyBehaviors */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nKeyBehaviors;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalKeyBehaviors */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalKeyBehaviors;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyExplicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstKeyExplicit;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyExplicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nKeyExplicit;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalKeyExplicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalKeyExplicit;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstModMapKey */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstModMapKey;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstVModMapKey */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstVModMapKey;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nVModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nVModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalVModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalVModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.pad1 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.virtualMods */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.virtualMods;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* map */
+ xcb_parts[xcb_parts_idx].iov_base = (char *)0;
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_client_symbols_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->client_symbols.nTypes, _aux->client_symbols.nKeySyms, _aux->client_symbols.nKeyActions, _aux->client_symbols.totalActions, _aux->client_symbols.totalKeyBehaviors, _aux->client_symbols.nVModMapKeys, _aux->client_symbols.totalKeyExplicit, _aux->client_symbols.totalModMapKeys, _aux->client_symbols.totalVModMapKeys, _aux->client_symbols.present, &_aux->client_symbols.map);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_client_symbols_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->client_symbols.nTypes, _aux->client_symbols.nKeySyms, _aux->client_symbols.nKeyActions, _aux->client_symbols.totalActions, _aux->client_symbols.totalKeyBehaviors, _aux->client_symbols.nVModMapKeys, _aux->client_symbols.totalKeyExplicit, _aux->client_symbols.totalModMapKeys, _aux->client_symbols.totalVModMapKeys, _aux->client_symbols.present, &_aux->client_symbols.map);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverDeviceID */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.serverDeviceID;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*2;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*2;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverMinKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.serverMinKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverMaxKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.serverMaxKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.present */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.present;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstType */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstType;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nTypes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nTypes;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalTypes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalTypes;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeySym */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstKeySym;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalSyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalSyms;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeySyms */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nKeySyms;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyAction */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstKeyAction;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalActions */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalActions;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyActions */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nKeyActions;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyBehavior */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstKeyBehavior;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyBehaviors */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nKeyBehaviors;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalKeyBehaviors */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalKeyBehaviors;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyExplicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstKeyExplicit;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyExplicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nKeyExplicit;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalKeyExplicit */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalKeyExplicit;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstModMapKey */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstModMapKey;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstVModMapKey */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstVModMapKey;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nVModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nVModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalVModMapKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalVModMapKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.pad1 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.virtualMods */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.virtualMods;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* map */
+ xcb_parts[xcb_parts_idx].iov_base = (char *)0;
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_server_symbols_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->server_symbols.nTypes, _aux->server_symbols.nKeySyms, _aux->server_symbols.nKeyActions, _aux->server_symbols.totalActions, _aux->server_symbols.totalKeyBehaviors, _aux->server_symbols.nVModMapKeys, _aux->server_symbols.totalKeyExplicit, _aux->server_symbols.totalModMapKeys, _aux->server_symbols.totalVModMapKeys, _aux->server_symbols.present, &_aux->server_symbols.map);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_server_symbols_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->server_symbols.nTypes, _aux->server_symbols.nKeySyms, _aux->server_symbols.nKeyActions, _aux->server_symbols.totalActions, _aux->server_symbols.totalKeyBehaviors, _aux->server_symbols.nVModMapKeys, _aux->server_symbols.totalKeyExplicit, _aux->server_symbols.totalModMapKeys, _aux->server_symbols.totalVModMapKeys, _aux->server_symbols.present, &_aux->server_symbols.map);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatorDeviceID */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatorDeviceID;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.which */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.which;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.realIndicators */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.realIndicators;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.nIndicators */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.nIndicators;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*15;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*15;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* maps */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicator_maps.maps;
+ xcb_block_len += _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyDeviceID */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyDeviceID;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.which */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.which;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMinKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyMinKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMaxKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyMaxKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nTypes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nTypes;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.groupNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.groupNames;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.virtualMods */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.virtualMods;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.firstKey */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.firstKey;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.indicators */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.indicators;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nRadioGroups */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nRadioGroups;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeyAliases */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKeyAliases;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKTLevels */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKTLevels;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*4;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*4;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* valueList */
+ xcb_parts[xcb_parts_idx].iov_base = (char *)0;
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherDeviceID */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.otherDeviceID;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.which */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.which;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherMinKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.otherMinKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherMaxKeyCode */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.otherMaxKeyCode;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nTypes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nTypes;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.groupNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.groupNames;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.virtualMods */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.virtualMods;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.firstKey */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.firstKey;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKeys */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nKeys;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.indicators */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.indicators;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nRadioGroups */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nRadioGroups;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKeyAliases */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nKeyAliases;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKTLevels */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nKTLevels;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_block_len += sizeof(uint8_t)*4;
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*4;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* valueList */
+ xcb_parts[xcb_parts_idx].iov_base = (char *)0;
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_other_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->other_names.nTypes, _aux->other_names.nKTLevels, _aux->other_names.indicators, _aux->other_names.virtualMods, _aux->other_names.groupNames, _aux->other_names.nKeys, _aux->other_names.nKeyAliases, _aux->other_names.nRadioGroups, _aux->other_names.which, &_aux->other_names.valueList);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_other_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->other_names.nTypes, _aux->other_names.nKTLevels, _aux->other_names.indicators, _aux->other_names.virtualMods, _aux->other_names.groupNames, _aux->other_names.nKeys, _aux->other_names.nKeyAliases, _aux->other_names.nRadioGroups, _aux->other_names.which, &_aux->other_names.valueList);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryDeviceID */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometryDeviceID;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.name */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.name;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryFound */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometryFound;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.pad0 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.widthMM */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.widthMM;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.heightMM */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.heightMM;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nProperties */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nProperties;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nColors */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nColors;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nShapes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nShapes;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nSections */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nSections;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nDoodads */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nDoodads;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nKeyAliases */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nKeyAliases;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.baseColorNdx */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.baseColorNdx;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.labelColorNdx */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.labelColorNdx;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* labelFont */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.labelFont;
+ xcb_block_len += xcb_xkb_counted_string_16_sizeof(_aux->geometry.labelFont);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_counted_string_16_sizeof(_aux->geometry.labelFont);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* properties */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.properties;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->geometry.properties;
+ for(i=0; i<_aux->geometry.nProperties; i++) {
+ xcb_block_len = xcb_xkb_property_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_property_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* colors */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.colors;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->geometry.colors;
+ for(i=0; i<_aux->geometry.nColors; i++) {
+ xcb_block_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* shapes */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.shapes;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->geometry.shapes;
+ for(i=0; i<_aux->geometry.nShapes; i++) {
+ xcb_block_len = xcb_xkb_shape_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_shape_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* sections */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.sections;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->geometry.sections;
+ for(i=0; i<_aux->geometry.nSections; i++) {
+ xcb_block_len = xcb_xkb_section_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_section_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* doodads */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.doodads;
+ xcb_parts[xcb_parts_idx].iov_len = 0;
+ xcb_tmp = (char *) _aux->geometry.doodads;
+ for(i=0; i<_aux->geometry.nDoodads; i++) {
+ xcb_block_len = xcb_xkb_doodad_sizeof(xcb_tmp);
+ xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
+ }
+ xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_doodad_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.keyAliases;
+ xcb_block_len += _aux->geometry.nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->geometry.nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
+ xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
+ xcb_parts_idx++;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ if (NULL == xcb_out) {
+ /* allocate memory */
+ xcb_out = malloc(xcb_buffer_len);
+ *_buffer = xcb_out;
+ }
+
+ xcb_tmp = xcb_out;
+ for(i=0; i<xcb_parts_idx; i++) {
+ if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
+ memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
+ if (0 != xcb_parts[i].iov_len)
+ xcb_tmp += xcb_parts[i].iov_len;
+ }
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buffer /**< */,
+ uint16_t reported /**< */,
+ xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ if(reported & XCB_XKB_GBN_DETAIL_TYPES) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_type */
+ _aux->types.getmap_type = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.typeDeviceID */
+ _aux->types.typeDeviceID = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_sequence */
+ _aux->types.getmap_sequence = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_length */
+ _aux->types.getmap_length = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.pad0 */
+ _aux->types.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->types.pad0[1] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 2;
+ xcb_tmp += sizeof(uint8_t) * 2;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMinKeyCode */
+ _aux->types.typeMinKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMaxKeyCode */
+ _aux->types.typeMaxKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.present */
+ _aux->types.present = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstType */
+ _aux->types.firstType = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nTypes */
+ _aux->types.nTypes = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalTypes */
+ _aux->types.totalTypes = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeySym */
+ _aux->types.firstKeySym = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalSyms */
+ _aux->types.totalSyms = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeySyms */
+ _aux->types.nKeySyms = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyAction */
+ _aux->types.firstKeyAction = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalActions */
+ _aux->types.totalActions = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyActions */
+ _aux->types.nKeyActions = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyBehavior */
+ _aux->types.firstKeyBehavior = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyBehaviors */
+ _aux->types.nKeyBehaviors = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyBehaviors */
+ _aux->types.totalKeyBehaviors = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyExplicit */
+ _aux->types.firstKeyExplicit = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyExplicit */
+ _aux->types.nKeyExplicit = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyExplicit */
+ _aux->types.totalKeyExplicit = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstModMapKey */
+ _aux->types.firstModMapKey = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nModMapKeys */
+ _aux->types.nModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalModMapKeys */
+ _aux->types.totalModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.firstVModMapKey */
+ _aux->types.firstVModMapKey = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.nVModMapKeys */
+ _aux->types.nVModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.totalVModMapKeys */
+ _aux->types.totalVModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.pad1 */
+ _aux->types.pad1 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.types.virtualMods */
+ _aux->types.virtualMods = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* map */
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_types_map_unpack(xcb_tmp, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.nVModMapKeys, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_types_map_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_COMPAT_MAP) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatDeviceID */
+ _aux->compat_map.compatDeviceID = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.groupsRtrn */
+ _aux->compat_map.groupsRtrn = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad0 */
+ _aux->compat_map.pad0 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.firstSIRtrn */
+ _aux->compat_map.firstSIRtrn = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nSIRtrn */
+ _aux->compat_map.nSIRtrn = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nTotalSI */
+ _aux->compat_map.nTotalSI = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad1 */
+ _aux->compat_map.pad1[0] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[1] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[2] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[3] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[4] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[5] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[6] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[7] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[8] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[9] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[10] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[11] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[12] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[13] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[14] = *(uint8_t *)xcb_tmp;
+ _aux->compat_map.pad1[15] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 16;
+ xcb_tmp += sizeof(uint8_t) * 16;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* si_rtrn */
+ _aux->compat_map.si_rtrn = (uint8_t *)xcb_tmp;
+ xcb_block_len += (16 * _aux->compat_map.nSIRtrn) * sizeof(uint8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* group_rtrn */
+ _aux->compat_map.group_rtrn = (xcb_xkb_mod_def_t *)xcb_tmp;
+ xcb_block_len += xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientDeviceID */
+ _aux->client_symbols.clientDeviceID = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.pad0 */
+ _aux->client_symbols.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->client_symbols.pad0[1] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 2;
+ xcb_tmp += sizeof(uint8_t) * 2;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientMinKeyCode */
+ _aux->client_symbols.clientMinKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientMaxKeyCode */
+ _aux->client_symbols.clientMaxKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.present */
+ _aux->client_symbols.present = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstType */
+ _aux->client_symbols.firstType = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nTypes */
+ _aux->client_symbols.nTypes = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalTypes */
+ _aux->client_symbols.totalTypes = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeySym */
+ _aux->client_symbols.firstKeySym = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalSyms */
+ _aux->client_symbols.totalSyms = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeySyms */
+ _aux->client_symbols.nKeySyms = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyAction */
+ _aux->client_symbols.firstKeyAction = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalActions */
+ _aux->client_symbols.totalActions = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyActions */
+ _aux->client_symbols.nKeyActions = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyBehavior */
+ _aux->client_symbols.firstKeyBehavior = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyBehaviors */
+ _aux->client_symbols.nKeyBehaviors = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalKeyBehaviors */
+ _aux->client_symbols.totalKeyBehaviors = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyExplicit */
+ _aux->client_symbols.firstKeyExplicit = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyExplicit */
+ _aux->client_symbols.nKeyExplicit = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalKeyExplicit */
+ _aux->client_symbols.totalKeyExplicit = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstModMapKey */
+ _aux->client_symbols.firstModMapKey = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nModMapKeys */
+ _aux->client_symbols.nModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalModMapKeys */
+ _aux->client_symbols.totalModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstVModMapKey */
+ _aux->client_symbols.firstVModMapKey = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nVModMapKeys */
+ _aux->client_symbols.nVModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalVModMapKeys */
+ _aux->client_symbols.totalVModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.pad1 */
+ _aux->client_symbols.pad1 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.virtualMods */
+ _aux->client_symbols.virtualMods = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* map */
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_client_symbols_map_unpack(xcb_tmp, _aux->client_symbols.nTypes, _aux->client_symbols.nKeySyms, _aux->client_symbols.nKeyActions, _aux->client_symbols.totalActions, _aux->client_symbols.totalKeyBehaviors, _aux->client_symbols.nVModMapKeys, _aux->client_symbols.totalKeyExplicit, _aux->client_symbols.totalModMapKeys, _aux->client_symbols.totalVModMapKeys, _aux->client_symbols.present, &_aux->client_symbols.map);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverDeviceID */
+ _aux->server_symbols.serverDeviceID = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.pad0 */
+ _aux->server_symbols.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->server_symbols.pad0[1] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 2;
+ xcb_tmp += sizeof(uint8_t) * 2;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverMinKeyCode */
+ _aux->server_symbols.serverMinKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverMaxKeyCode */
+ _aux->server_symbols.serverMaxKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.present */
+ _aux->server_symbols.present = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstType */
+ _aux->server_symbols.firstType = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nTypes */
+ _aux->server_symbols.nTypes = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalTypes */
+ _aux->server_symbols.totalTypes = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeySym */
+ _aux->server_symbols.firstKeySym = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalSyms */
+ _aux->server_symbols.totalSyms = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeySyms */
+ _aux->server_symbols.nKeySyms = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyAction */
+ _aux->server_symbols.firstKeyAction = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalActions */
+ _aux->server_symbols.totalActions = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyActions */
+ _aux->server_symbols.nKeyActions = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyBehavior */
+ _aux->server_symbols.firstKeyBehavior = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyBehaviors */
+ _aux->server_symbols.nKeyBehaviors = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalKeyBehaviors */
+ _aux->server_symbols.totalKeyBehaviors = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyExplicit */
+ _aux->server_symbols.firstKeyExplicit = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyExplicit */
+ _aux->server_symbols.nKeyExplicit = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalKeyExplicit */
+ _aux->server_symbols.totalKeyExplicit = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstModMapKey */
+ _aux->server_symbols.firstModMapKey = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nModMapKeys */
+ _aux->server_symbols.nModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalModMapKeys */
+ _aux->server_symbols.totalModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstVModMapKey */
+ _aux->server_symbols.firstVModMapKey = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nVModMapKeys */
+ _aux->server_symbols.nVModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalVModMapKeys */
+ _aux->server_symbols.totalVModMapKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.pad1 */
+ _aux->server_symbols.pad1 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.virtualMods */
+ _aux->server_symbols.virtualMods = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* map */
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_server_symbols_map_unpack(xcb_tmp, _aux->server_symbols.nTypes, _aux->server_symbols.nKeySyms, _aux->server_symbols.nKeyActions, _aux->server_symbols.totalActions, _aux->server_symbols.totalKeyBehaviors, _aux->server_symbols.nVModMapKeys, _aux->server_symbols.totalKeyExplicit, _aux->server_symbols.totalModMapKeys, _aux->server_symbols.totalVModMapKeys, _aux->server_symbols.present, &_aux->server_symbols.map);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatorDeviceID */
+ _aux->indicator_maps.indicatorDeviceID = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.which */
+ _aux->indicator_maps.which = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.realIndicators */
+ _aux->indicator_maps.realIndicators = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.nIndicators */
+ _aux->indicator_maps.nIndicators = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.pad0 */
+ _aux->indicator_maps.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[1] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[2] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[3] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[4] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[5] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[6] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[7] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[8] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[9] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[10] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[11] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[12] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[13] = *(uint8_t *)xcb_tmp;
+ _aux->indicator_maps.pad0[14] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 15;
+ xcb_tmp += sizeof(uint8_t) * 15;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* maps */
+ _aux->indicator_maps.maps = (xcb_xkb_indicator_map_t *)xcb_tmp;
+ xcb_block_len += _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyDeviceID */
+ _aux->key_names.keyDeviceID = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.which */
+ _aux->key_names.which = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMinKeyCode */
+ _aux->key_names.keyMinKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMaxKeyCode */
+ _aux->key_names.keyMaxKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nTypes */
+ _aux->key_names.nTypes = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.groupNames */
+ _aux->key_names.groupNames = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.virtualMods */
+ _aux->key_names.virtualMods = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.firstKey */
+ _aux->key_names.firstKey = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeys */
+ _aux->key_names.nKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.indicators */
+ _aux->key_names.indicators = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nRadioGroups */
+ _aux->key_names.nRadioGroups = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeyAliases */
+ _aux->key_names.nKeyAliases = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKTLevels */
+ _aux->key_names.nKTLevels = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.pad0 */
+ _aux->key_names.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->key_names.pad0[1] = *(uint8_t *)xcb_tmp;
+ _aux->key_names.pad0[2] = *(uint8_t *)xcb_tmp;
+ _aux->key_names.pad0[3] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 4;
+ xcb_tmp += sizeof(uint8_t) * 4;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* valueList */
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack(xcb_tmp, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherDeviceID */
+ _aux->other_names.otherDeviceID = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.which */
+ _aux->other_names.which = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherMinKeyCode */
+ _aux->other_names.otherMinKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherMaxKeyCode */
+ _aux->other_names.otherMaxKeyCode = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nTypes */
+ _aux->other_names.nTypes = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.groupNames */
+ _aux->other_names.groupNames = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.virtualMods */
+ _aux->other_names.virtualMods = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.firstKey */
+ _aux->other_names.firstKey = *(xcb_keycode_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_keycode_t);
+ xcb_tmp += sizeof(xcb_keycode_t);
+ xcb_align_to = ALIGNOF(xcb_keycode_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKeys */
+ _aux->other_names.nKeys = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.indicators */
+ _aux->other_names.indicators = *(uint32_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_tmp += sizeof(uint32_t);
+ xcb_align_to = ALIGNOF(uint32_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nRadioGroups */
+ _aux->other_names.nRadioGroups = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKeyAliases */
+ _aux->other_names.nKeyAliases = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKTLevels */
+ _aux->other_names.nKTLevels = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.other_names.pad0 */
+ _aux->other_names.pad0[0] = *(uint8_t *)xcb_tmp;
+ _aux->other_names.pad0[1] = *(uint8_t *)xcb_tmp;
+ _aux->other_names.pad0[2] = *(uint8_t *)xcb_tmp;
+ _aux->other_names.pad0[3] = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t) * 4;
+ xcb_tmp += sizeof(uint8_t) * 4;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* valueList */
+ xcb_block_len += xcb_xkb_get_kbd_by_name_replies_other_names_value_list_unpack(xcb_tmp, _aux->other_names.nTypes, _aux->other_names.nKTLevels, _aux->other_names.indicators, _aux->other_names.virtualMods, _aux->other_names.groupNames, _aux->other_names.nKeys, _aux->other_names.nKeyAliases, _aux->other_names.nRadioGroups, _aux->other_names.which, &_aux->other_names.valueList);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t);
+ }
+ if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryDeviceID */
+ _aux->geometry.geometryDeviceID = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.name */
+ _aux->geometry.name = *(xcb_atom_t *)xcb_tmp;
+ xcb_block_len += sizeof(xcb_atom_t);
+ xcb_tmp += sizeof(xcb_atom_t);
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryFound */
+ _aux->geometry.geometryFound = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.pad0 */
+ _aux->geometry.pad0 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.widthMM */
+ _aux->geometry.widthMM = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.heightMM */
+ _aux->geometry.heightMM = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nProperties */
+ _aux->geometry.nProperties = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nColors */
+ _aux->geometry.nColors = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nShapes */
+ _aux->geometry.nShapes = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nSections */
+ _aux->geometry.nSections = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nDoodads */
+ _aux->geometry.nDoodads = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nKeyAliases */
+ _aux->geometry.nKeyAliases = *(uint16_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint16_t);
+ xcb_tmp += sizeof(uint16_t);
+ xcb_align_to = ALIGNOF(uint16_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.baseColorNdx */
+ _aux->geometry.baseColorNdx = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.labelColorNdx */
+ _aux->geometry.labelColorNdx = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* labelFont */
+ _aux->geometry.labelFont = (xcb_xkb_counted_string_16_t *)xcb_tmp;
+ xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* properties */
+ _aux->geometry.properties = (xcb_xkb_property_t *)xcb_tmp;
+ for(i=0; i<_aux->geometry.nProperties; i++) {
+ xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_property_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* colors */
+ _aux->geometry.colors = (xcb_xkb_counted_string_16_t *)xcb_tmp;
+ for(i=0; i<_aux->geometry.nColors; i++) {
+ xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* shapes */
+ _aux->geometry.shapes = (xcb_xkb_shape_t *)xcb_tmp;
+ for(i=0; i<_aux->geometry.nShapes; i++) {
+ xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_shape_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* sections */
+ _aux->geometry.sections = (xcb_xkb_section_t *)xcb_tmp;
+ for(i=0; i<_aux->geometry.nSections; i++) {
+ xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_section_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* doodads */
+ _aux->geometry.doodads = (xcb_xkb_doodad_t *)xcb_tmp;
+ for(i=0; i<_aux->geometry.nDoodads; i++) {
+ xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_doodad_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* keyAliases */
+ _aux->geometry.keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
+ xcb_block_len += _aux->geometry.nKeyAliases * sizeof(xcb_xkb_key_alias_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
+ }
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+int
+xcb_xkb_get_kbd_by_name_replies_sizeof (const void *_buffer /**< */,
+ uint16_t reported /**< */)
+{
+ xcb_xkb_get_kbd_by_name_replies_t _aux;
+ return xcb_xkb_get_kbd_by_name_replies_unpack(_buffer, reported, &_aux);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t need
+ ** @param uint16_t want
+ ** @param uint8_t load
+ ** @param uint8_t keymapsSpecLen
+ ** @param const xcb_xkb_string8_t *keymapsSpec
+ ** @param uint8_t keycodesSpecLen
+ ** @param const xcb_xkb_string8_t *keycodesSpec
+ ** @param uint8_t typesSpecLen
+ ** @param const xcb_xkb_string8_t *typesSpec
+ ** @param uint8_t compatMapSpecLen
+ ** @param const xcb_xkb_string8_t *compatMapSpec
+ ** @param uint8_t symbolsSpecLen
+ ** @param const xcb_xkb_string8_t *symbolsSpec
+ ** @param uint8_t geometrySpecLen
+ ** @param const xcb_xkb_string8_t *geometrySpec
+ ** @returns xcb_xkb_get_kbd_by_name_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_cookie_t
+xcb_xkb_get_kbd_by_name (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t need /**< */,
+ uint16_t want /**< */,
+ uint8_t load /**< */,
+ uint8_t keymapsSpecLen /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ uint8_t keycodesSpecLen /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ uint8_t typesSpecLen /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ uint8_t compatMapSpecLen /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ uint8_t symbolsSpecLen /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ uint8_t geometrySpecLen /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_KBD_BY_NAME,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_kbd_by_name_cookie_t xcb_ret;
+ xcb_xkb_get_kbd_by_name_request_t xcb_out;
+ /* in the protocol description, variable size fields are followed by fixed size fields */
+ void *xcb_aux = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.need = need;
+ xcb_out.want = want;
+ xcb_out.load = load;
+ xcb_out.pad0 = 0;
+ xcb_out.keymapsSpecLen = keymapsSpecLen;
+ xcb_out.keycodesSpecLen = keycodesSpecLen;
+ xcb_out.typesSpecLen = typesSpecLen;
+ xcb_out.compatMapSpecLen = compatMapSpecLen;
+ xcb_out.symbolsSpecLen = symbolsSpecLen;
+ xcb_out.geometrySpecLen = geometrySpecLen;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = 2*sizeof(uint8_t) + sizeof(uint16_t);
+ xcb_parts[3].iov_len = xcb_xkb_get_kbd_by_name_serialize (&xcb_aux, &xcb_out, keymapsSpec, keycodesSpec, typesSpec, compatMapSpec, symbolsSpec, geometrySpec);
+ xcb_parts[3].iov_base = (char *) xcb_aux;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ free(xcb_aux);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t need
+ ** @param uint16_t want
+ ** @param uint8_t load
+ ** @param uint8_t keymapsSpecLen
+ ** @param const xcb_xkb_string8_t *keymapsSpec
+ ** @param uint8_t keycodesSpecLen
+ ** @param const xcb_xkb_string8_t *keycodesSpec
+ ** @param uint8_t typesSpecLen
+ ** @param const xcb_xkb_string8_t *typesSpec
+ ** @param uint8_t compatMapSpecLen
+ ** @param const xcb_xkb_string8_t *compatMapSpec
+ ** @param uint8_t symbolsSpecLen
+ ** @param const xcb_xkb_string8_t *symbolsSpec
+ ** @param uint8_t geometrySpecLen
+ ** @param const xcb_xkb_string8_t *geometrySpec
+ ** @returns xcb_xkb_get_kbd_by_name_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_cookie_t
+xcb_xkb_get_kbd_by_name_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t need /**< */,
+ uint16_t want /**< */,
+ uint8_t load /**< */,
+ uint8_t keymapsSpecLen /**< */,
+ const xcb_xkb_string8_t *keymapsSpec /**< */,
+ uint8_t keycodesSpecLen /**< */,
+ const xcb_xkb_string8_t *keycodesSpec /**< */,
+ uint8_t typesSpecLen /**< */,
+ const xcb_xkb_string8_t *typesSpec /**< */,
+ uint8_t compatMapSpecLen /**< */,
+ const xcb_xkb_string8_t *compatMapSpec /**< */,
+ uint8_t symbolsSpecLen /**< */,
+ const xcb_xkb_string8_t *symbolsSpec /**< */,
+ uint8_t geometrySpecLen /**< */,
+ const xcb_xkb_string8_t *geometrySpec /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_KBD_BY_NAME,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_kbd_by_name_cookie_t xcb_ret;
+ xcb_xkb_get_kbd_by_name_request_t xcb_out;
+ /* in the protocol description, variable size fields are followed by fixed size fields */
+ void *xcb_aux = 0;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.need = need;
+ xcb_out.want = want;
+ xcb_out.load = load;
+ xcb_out.pad0 = 0;
+ xcb_out.keymapsSpecLen = keymapsSpecLen;
+ xcb_out.keycodesSpecLen = keycodesSpecLen;
+ xcb_out.typesSpecLen = typesSpecLen;
+ xcb_out.compatMapSpecLen = compatMapSpecLen;
+ xcb_out.symbolsSpecLen = symbolsSpecLen;
+ xcb_out.geometrySpecLen = geometrySpecLen;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = 2*sizeof(uint8_t) + sizeof(uint16_t);
+ xcb_parts[3].iov_len = xcb_xkb_get_kbd_by_name_serialize (&xcb_aux, &xcb_out, keymapsSpec, keycodesSpec, typesSpec, compatMapSpec, symbolsSpec, geometrySpec);
+ xcb_parts[3].iov_base = (char *) xcb_aux;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ free(xcb_aux);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_replies_t * xcb_xkb_get_kbd_by_name_replies
+ **
+ ** @param const xcb_xkb_get_kbd_by_name_reply_t *R
+ ** @returns xcb_xkb_get_kbd_by_name_replies_t *
+ **
+ *****************************************************************************/
+
+void *
+xcb_xkb_get_kbd_by_name_replies (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */)
+{
+ return (void *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_kbd_by_name_reply_t * xcb_xkb_get_kbd_by_name_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_kbd_by_name_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_kbd_by_name_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_kbd_by_name_reply_t *
+xcb_xkb_get_kbd_by_name_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_kbd_by_name_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_kbd_by_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_xkb_get_device_info_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_get_device_info_reply_t *_aux = (xcb_xkb_get_device_info_reply_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_xkb_get_device_info_reply_t);
+ xcb_tmp += xcb_block_len;
+ /* name */
+ xcb_block_len += _aux->nameLen * sizeof(xcb_xkb_string8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* btnActions */
+ xcb_block_len += _aux->nBtnsRtrn * sizeof(xcb_xkb_action_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* leds */
+ for(i=0; i<_aux->nDeviceLedFBs; i++) {
+ xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_device_led_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t wanted
+ ** @param uint8_t allButtons
+ ** @param uint8_t firstButton
+ ** @param uint8_t nButtons
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @returns xcb_xkb_get_device_info_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_device_info_cookie_t
+xcb_xkb_get_device_info (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t wanted /**< */,
+ uint8_t allButtons /**< */,
+ uint8_t firstButton /**< */,
+ uint8_t nButtons /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_DEVICE_INFO,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_device_info_cookie_t xcb_ret;
+ xcb_xkb_get_device_info_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.wanted = wanted;
+ xcb_out.allButtons = allButtons;
+ xcb_out.firstButton = firstButton;
+ xcb_out.nButtons = nButtons;
+ xcb_out.pad0 = 0;
+ xcb_out.ledClass = ledClass;
+ xcb_out.ledID = ledID;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t wanted
+ ** @param uint8_t allButtons
+ ** @param uint8_t firstButton
+ ** @param uint8_t nButtons
+ ** @param xcb_xkb_led_class_spec_t ledClass
+ ** @param xcb_xkb_id_spec_t ledID
+ ** @returns xcb_xkb_get_device_info_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_device_info_cookie_t
+xcb_xkb_get_device_info_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t wanted /**< */,
+ uint8_t allButtons /**< */,
+ uint8_t firstButton /**< */,
+ uint8_t nButtons /**< */,
+ xcb_xkb_led_class_spec_t ledClass /**< */,
+ xcb_xkb_id_spec_t ledID /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 2,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_GET_DEVICE_INFO,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[4];
+ xcb_xkb_get_device_info_cookie_t xcb_ret;
+ xcb_xkb_get_device_info_request_t xcb_out;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.wanted = wanted;
+ xcb_out.allButtons = allButtons;
+ xcb_out.firstButton = firstButton;
+ xcb_out.nButtons = nButtons;
+ xcb_out.pad0 = 0;
+ xcb_out.ledClass = ledClass;
+ xcb_out.ledID = ledID;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_string8_t * xcb_xkb_get_device_info_name
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_xkb_string8_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_string8_t *
+xcb_xkb_get_device_info_name (const xcb_xkb_get_device_info_reply_t *R /**< */)
+{
+ return (xcb_xkb_string8_t *) (R + 1);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_device_info_name_length
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_device_info_name_length (const xcb_xkb_get_device_info_reply_t *R /**< */)
+{
+ return R->nameLen;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_device_info_name_end
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_device_info_name_end (const xcb_xkb_get_device_info_reply_t *R /**< */)
+{
+ xcb_generic_iterator_t i;
+ i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->nameLen);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_t * xcb_xkb_get_device_info_btn_actions
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_xkb_action_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_t *
+xcb_xkb_get_device_info_btn_actions (const xcb_xkb_get_device_info_reply_t *R /**< */)
+{
+ xcb_generic_iterator_t prev = xcb_xkb_get_device_info_name_end(R);
+ return (xcb_xkb_action_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_action_t, prev.index) + 0);
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_device_info_btn_actions_length
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_device_info_btn_actions_length (const xcb_xkb_get_device_info_reply_t *R /**< */)
+{
+ return R->nBtnsRtrn;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_action_iterator_t xcb_xkb_get_device_info_btn_actions_iterator
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_xkb_action_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_action_iterator_t
+xcb_xkb_get_device_info_btn_actions_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */)
+{
+ xcb_xkb_action_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_get_device_info_name_end(R);
+ i.data = (xcb_xkb_action_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_action_t, prev.index));
+ i.rem = R->nBtnsRtrn;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_device_info_leds_length
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_device_info_leds_length (const xcb_xkb_get_device_info_reply_t *R /**< */)
+{
+ return R->nDeviceLedFBs;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_device_led_info_iterator_t xcb_xkb_get_device_info_leds_iterator
+ **
+ ** @param const xcb_xkb_get_device_info_reply_t *R
+ ** @returns xcb_xkb_device_led_info_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_device_led_info_iterator_t
+xcb_xkb_get_device_info_leds_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */)
+{
+ xcb_xkb_device_led_info_iterator_t i;
+ xcb_generic_iterator_t prev = xcb_xkb_action_end(xcb_xkb_get_device_info_btn_actions_iterator(R));
+ i.data = (xcb_xkb_device_led_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_device_led_info_t, prev.index));
+ i.rem = R->nDeviceLedFBs;
+ i.index = (char *) i.data - (char *) R;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_get_device_info_reply_t * xcb_xkb_get_device_info_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_get_device_info_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_get_device_info_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_get_device_info_reply_t *
+xcb_xkb_get_device_info_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_get_device_info_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_get_device_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
+int
+xcb_xkb_set_device_info_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_set_device_info_request_t *_aux = (xcb_xkb_set_device_info_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+
+ xcb_block_len += sizeof(xcb_xkb_set_device_info_request_t);
+ xcb_tmp += xcb_block_len;
+ /* btnActions */
+ xcb_block_len += _aux->nBtns * sizeof(xcb_xkb_action_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_action_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+ /* leds */
+ for(i=0; i<_aux->nDeviceLedFBs; i++) {
+ xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_device_led_info_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_device_info_checked
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t firstBtn
+ ** @param uint8_t nBtns
+ ** @param uint16_t change
+ ** @param uint16_t nDeviceLedFBs
+ ** @param const xcb_xkb_action_t *btnActions
+ ** @param const xcb_xkb_device_led_info_t *leds
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_device_info_checked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t firstBtn /**< */,
+ uint8_t nBtns /**< */,
+ uint16_t change /**< */,
+ uint16_t nDeviceLedFBs /**< */,
+ const xcb_xkb_action_t *btnActions /**< */,
+ const xcb_xkb_device_led_info_t *leds /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 6,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_DEVICE_INFO,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[8];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_device_info_request_t xcb_out;
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+ char *xcb_tmp;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.firstBtn = firstBtn;
+ xcb_out.nBtns = nBtns;
+ xcb_out.change = change;
+ xcb_out.nDeviceLedFBs = nDeviceLedFBs;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_action_t btnActions */
+ xcb_parts[4].iov_base = (char *) btnActions;
+ xcb_parts[4].iov_len = nBtns * sizeof(xcb_xkb_action_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_xkb_device_led_info_t leds */
+ xcb_parts[6].iov_base = (char *) leds;
+ xcb_parts[6].iov_len = 0;
+ xcb_tmp = (char *)leds;
+ for(i=0; i<nDeviceLedFBs; i++) {
+ xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
+ xcb_parts[6].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[7].iov_base = 0;
+ xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_void_cookie_t xcb_xkb_set_device_info
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint8_t firstBtn
+ ** @param uint8_t nBtns
+ ** @param uint16_t change
+ ** @param uint16_t nDeviceLedFBs
+ ** @param const xcb_xkb_action_t *btnActions
+ ** @param const xcb_xkb_device_led_info_t *leds
+ ** @returns xcb_void_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_void_cookie_t
+xcb_xkb_set_device_info (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint8_t firstBtn /**< */,
+ uint8_t nBtns /**< */,
+ uint16_t change /**< */,
+ uint16_t nDeviceLedFBs /**< */,
+ const xcb_xkb_action_t *btnActions /**< */,
+ const xcb_xkb_device_led_info_t *leds /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 6,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_DEVICE_INFO,
+ /* isvoid */ 1
+ };
+
+ struct iovec xcb_parts[8];
+ xcb_void_cookie_t xcb_ret;
+ xcb_xkb_set_device_info_request_t xcb_out;
+ unsigned int i;
+ unsigned int xcb_tmp_len;
+ char *xcb_tmp;
+
+ xcb_out.deviceSpec = deviceSpec;
+ xcb_out.firstBtn = firstBtn;
+ xcb_out.nBtns = nBtns;
+ xcb_out.change = change;
+ xcb_out.nDeviceLedFBs = nDeviceLedFBs;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_action_t btnActions */
+ xcb_parts[4].iov_base = (char *) btnActions;
+ xcb_parts[4].iov_len = nBtns * sizeof(xcb_xkb_action_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+ /* xcb_xkb_device_led_info_t leds */
+ xcb_parts[6].iov_base = (char *) leds;
+ xcb_parts[6].iov_len = 0;
+ xcb_tmp = (char *)leds;
+ for(i=0; i<nDeviceLedFBs; i++) {
+ xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
+ xcb_parts[6].iov_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_parts[7].iov_base = 0;
+ xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+int
+xcb_xkb_set_debugging_flags_sizeof (const void *_buffer /**< */)
+{
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_set_debugging_flags_request_t *_aux = (xcb_xkb_set_debugging_flags_request_t *)_buffer;
+ unsigned int xcb_buffer_len = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int xcb_pad = 0;
+ unsigned int xcb_align_to;
+
+
+ xcb_block_len += sizeof(xcb_xkb_set_debugging_flags_request_t);
+ xcb_tmp += xcb_block_len;
+ /* message */
+ xcb_block_len += _aux->msgLength * sizeof(xcb_xkb_string8_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
+ /* insert padding */
+ xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+ if (0 != xcb_pad) {
+ xcb_tmp += xcb_pad;
+ xcb_pad = 0;
+ }
+ xcb_block_len = 0;
+
+ return xcb_buffer_len;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint16_t msgLength
+ ** @param uint32_t affectFlags
+ ** @param uint32_t flags
+ ** @param uint32_t affectCtrls
+ ** @param uint32_t ctrls
+ ** @param const xcb_xkb_string8_t *message
+ ** @returns xcb_xkb_set_debugging_flags_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_debugging_flags_cookie_t
+xcb_xkb_set_debugging_flags (xcb_connection_t *c /**< */,
+ uint16_t msgLength /**< */,
+ uint32_t affectFlags /**< */,
+ uint32_t flags /**< */,
+ uint32_t affectCtrls /**< */,
+ uint32_t ctrls /**< */,
+ const xcb_xkb_string8_t *message /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 4,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_DEBUGGING_FLAGS,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_xkb_set_debugging_flags_cookie_t xcb_ret;
+ xcb_xkb_set_debugging_flags_request_t xcb_out;
+
+ xcb_out.msgLength = msgLength;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.affectFlags = affectFlags;
+ xcb_out.flags = flags;
+ xcb_out.affectCtrls = affectCtrls;
+ xcb_out.ctrls = ctrls;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_string8_t message */
+ xcb_parts[4].iov_base = (char *) message;
+ xcb_parts[4].iov_len = msgLength * sizeof(xcb_xkb_string8_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags_unchecked
+ **
+ ** @param xcb_connection_t *c
+ ** @param uint16_t msgLength
+ ** @param uint32_t affectFlags
+ ** @param uint32_t flags
+ ** @param uint32_t affectCtrls
+ ** @param uint32_t ctrls
+ ** @param const xcb_xkb_string8_t *message
+ ** @returns xcb_xkb_set_debugging_flags_cookie_t
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_debugging_flags_cookie_t
+xcb_xkb_set_debugging_flags_unchecked (xcb_connection_t *c /**< */,
+ uint16_t msgLength /**< */,
+ uint32_t affectFlags /**< */,
+ uint32_t flags /**< */,
+ uint32_t affectCtrls /**< */,
+ uint32_t ctrls /**< */,
+ const xcb_xkb_string8_t *message /**< */)
+{
+ static const xcb_protocol_request_t xcb_req = {
+ /* count */ 4,
+ /* ext */ &xcb_xkb_id,
+ /* opcode */ XCB_XKB_SET_DEBUGGING_FLAGS,
+ /* isvoid */ 0
+ };
+
+ struct iovec xcb_parts[6];
+ xcb_xkb_set_debugging_flags_cookie_t xcb_ret;
+ xcb_xkb_set_debugging_flags_request_t xcb_out;
+
+ xcb_out.msgLength = msgLength;
+ memset(xcb_out.pad0, 0, 2);
+ xcb_out.affectFlags = affectFlags;
+ xcb_out.flags = flags;
+ xcb_out.affectCtrls = affectCtrls;
+ xcb_out.ctrls = ctrls;
+
+ xcb_parts[2].iov_base = (char *) &xcb_out;
+ xcb_parts[2].iov_len = sizeof(xcb_out);
+ xcb_parts[3].iov_base = 0;
+ xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
+ /* xcb_xkb_string8_t message */
+ xcb_parts[4].iov_base = (char *) message;
+ xcb_parts[4].iov_len = msgLength * sizeof(xcb_xkb_string8_t);
+ xcb_parts[5].iov_base = 0;
+ xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
+
+ xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
+ return xcb_ret;
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_xkb_set_debugging_flags_reply_t * xcb_xkb_set_debugging_flags_reply
+ **
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_set_debugging_flags_cookie_t cookie
+ ** @param xcb_generic_error_t **e
+ ** @returns xcb_xkb_set_debugging_flags_reply_t *
+ **
+ *****************************************************************************/
+
+xcb_xkb_set_debugging_flags_reply_t *
+xcb_xkb_set_debugging_flags_reply (xcb_connection_t *c /**< */,
+ xcb_xkb_set_debugging_flags_cookie_t cookie /**< */,
+ xcb_generic_error_t **e /**< */)
+{
+ return (xcb_xkb_set_debugging_flags_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
+}
+
diff --git a/src/3rdparty/xcb/libxcb/xkb.patch b/src/3rdparty/xcb/libxcb/xkb.patch
new file mode 100644
index 0000000000..054d97467f
--- /dev/null
+++ b/src/3rdparty/xcb/libxcb/xkb.patch
@@ -0,0 +1,172 @@
+diff --git src/3rdparty/xcb/libxcb/xkb.c src/3rdparty/xcb/libxcb/xkb.c
+index cd09226..3e07d6d 100644
+--- src/3rdparty/xcb/libxcb/xkb.c
++++ src/3rdparty/xcb/libxcb/xkb.c
+@@ -15,6 +15,15 @@
+
+ xcb_extension_t xcb_xkb_id = { "XKEYBOARD", 0 };
+
++int qt_xcb_sumof(uint8_t *list, int len)
++{
++ int i, s = 0;
++ for(i=0; i<len; i++) {
++ s += *list;
++ list++;
++ }
++ return s;
++}
+
+ /*****************************************************************************
+ **
+@@ -9622,7 +9631,7 @@ int
+ xcb_xkb_get_names_value_list_kt_level_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+ {
+- return xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
++ return qt_xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
+ }
+
+
+@@ -9640,7 +9649,7 @@ xcb_xkb_get_names_value_list_kt_level_names_end (const xcb_xkb_get_names_reply_t
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+ {
+ xcb_generic_iterator_t i;
+- i.data = /* valueList */ S->ktLevelNames + xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
++ i.data = /* valueList */ S->ktLevelNames + qt_xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+@@ -10089,8 +10098,8 @@ xcb_xkb_get_names_value_list_serialize (void **_
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
+- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
+- xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
++ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
++ xcb_parts[xcb_parts_idx].iov_len = qt_xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+@@ -10330,7 +10339,7 @@ xcb_xkb_get_names_value_list_unpack (const void *_buffer /
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
+- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
++ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+@@ -10707,7 +10716,7 @@ int
+ xcb_xkb_set_names_values_kt_level_names_length (const xcb_xkb_set_names_request_t *R /**< */,
+ const xcb_xkb_set_names_values_t *S /**< */)
+ {
+- return xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
++ return qt_xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
+ }
+
+
+@@ -10725,7 +10734,7 @@ xcb_xkb_set_names_values_kt_level_names_end (const xcb_xkb_set_names_request_t *
+ const xcb_xkb_set_names_values_t *S /**< */)
+ {
+ xcb_generic_iterator_t i;
+- i.data = /* values */ S->ktLevelNames + xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
++ i.data = /* values */ S->ktLevelNames + qt_xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+@@ -11175,8 +11184,8 @@ xcb_xkb_set_names_values_serialize (void **_buffer
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
+- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+- xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
++ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
++ xcb_parts[xcb_parts_idx].iov_len = qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+@@ -11417,7 +11426,7 @@ xcb_xkb_set_names_values_unpack (const void *_buffer /**< */,
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
+- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
++ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+@@ -16654,7 +16663,7 @@ int
+ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+ {
+- return xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
++ return qt_xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
+ }
+
+
+@@ -16672,7 +16681,7 @@ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end (const x
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+ {
+ xcb_generic_iterator_t i;
+- i.data = /* replies */ S->key_names.valueList.ktLevelNames + xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
++ i.data = /* replies */ S->key_names.valueList.ktLevelNames + qt_xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+@@ -17122,8 +17131,8 @@ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
+- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+- xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
++ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
++ xcb_parts[xcb_parts_idx].iov_len = qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+@@ -17364,7 +17373,7 @@ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
+- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
++ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+@@ -17624,7 +17633,7 @@ int
+ xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+ {
+- return xcb_sumof(/* replies */ S->other_names.valueList.nLevelsPerType, /* replies */ S->other_names.nKTLevels);
++ return qt_xcb_sumof(/* replies */ S->other_names.valueList.nLevelsPerType, /* replies */ S->other_names.nKTLevels);
+ }
+
+
+@@ -17642,7 +17651,7 @@ xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_end (const
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
+ {
+ xcb_generic_iterator_t i;
+- i.data = /* replies */ S->other_names.valueList.ktLevelNames + xcb_sumof(/* replies */ S->other_names.valueList.nLevelsPerType, /* replies */ S->other_names.nKTLevels);
++ i.data = /* replies */ S->other_names.valueList.ktLevelNames + qt_xcb_sumof(/* replies */ S->other_names.valueList.nLevelsPerType, /* replies */ S->other_names.nKTLevels);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+@@ -18092,8 +18101,8 @@ xcb_xkb_get_kbd_by_name_replies_other_names_value_list_serialize (void
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
+- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+- xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
++ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
++ xcb_parts[xcb_parts_idx].iov_len = qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
+@@ -18334,7 +18343,7 @@ xcb_xkb_get_kbd_by_name_replies_other_names_value_list_unpack (const void
+ xcb_block_len = 0;
+ /* ktLevelNames */
+ _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
+- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
++ xcb_block_len += qt_xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(xcb_atom_t);
+ }
diff --git a/src/3rdparty/xkbcommon.pri b/src/3rdparty/xkbcommon.pri
new file mode 100644
index 0000000000..99536576f7
--- /dev/null
+++ b/src/3rdparty/xkbcommon.pri
@@ -0,0 +1,40 @@
+QMAKE_CFLAGS = -std=gnu99 -w
+INCLUDEPATH += $$PWD/xkbcommon $$PWD/xkbcommon/src $$PWD/xkbcommon/src/xkbcomp
+
+DEFINES += DFLT_XKB_CONFIG_ROOT='\\"/usr/share/X11/xkb\\"'
+
+### RMLVO names can be overwritten with environmental variables (See libxkbcommon documentation)
+DEFINES += DEFAULT_XKB_RULES='\\"evdev\\"'
+DEFINES += DEFAULT_XKB_MODEL='\\"pc105\\"'
+DEFINES += DEFAULT_XKB_LAYOUT='\\"us\\"'
+
+# Need to rename 2 files, qmake has problems processing a project when
+# directories contain files with equal names.
+SOURCES += \
+ $$PWD/xkbcommon/src/atom.c \
+ $$PWD/xkbcommon/src/xkb-compat.c \ # renamed: compat.c -> xkb-compat.c
+ $$PWD/xkbcommon/src/context.c \
+ $$PWD/xkbcommon/src/xkb-keymap.c \ # renamed: keymap.c -> xkb-keymap.c
+ $$PWD/xkbcommon/src/keysym.c \
+ $$PWD/xkbcommon/src/keysym-utf.c \
+ $$PWD/xkbcommon/src/state.c \
+ $$PWD/xkbcommon/src/text.c
+
+SOURCES += \
+ $$PWD/xkbcommon/src/xkbcomp/action.c \
+ $$PWD/xkbcommon/src/xkbcomp/ast-build.c \
+ $$PWD/xkbcommon/src/xkbcomp/compat.c \
+ $$PWD/xkbcommon/src/xkbcomp/expr.c \
+ $$PWD/xkbcommon/src/xkbcomp/include.c \
+ $$PWD/xkbcommon/src/xkbcomp/keycodes.c \
+ $$PWD/xkbcommon/src/xkbcomp/keymap-dump.c \
+ $$PWD/xkbcommon/src/xkbcomp/keymap.c \
+ $$PWD/xkbcommon/src/xkbcomp/parser.c \
+ $$PWD/xkbcommon/src/xkbcomp/rules.c \
+ $$PWD/xkbcommon/src/xkbcomp/scanner.c \
+ $$PWD/xkbcommon/src/xkbcomp/symbols.c \
+ $$PWD/xkbcommon/src/xkbcomp/types.c \
+ $$PWD/xkbcommon/src/xkbcomp/vmod.c \
+ $$PWD/xkbcommon/src/xkbcomp/xkbcomp.c
+
+TR_EXCLUDE += $$PWD/*
diff --git a/src/3rdparty/xkbcommon/COPYING b/src/3rdparty/xkbcommon/COPYING
new file mode 100644
index 0000000000..2d3b55a962
--- /dev/null
+++ b/src/3rdparty/xkbcommon/COPYING
@@ -0,0 +1,188 @@
+The following is a list of all copyright notices and license statements which
+appear in the xkbcommon source tree.
+
+If making new contributions, the first form (i.e. Daniel Stone, Ran Benita,
+etc) is vastly preferred.
+
+All licenses are derivative of the MIT/X11 license, mostly identical other
+than no-endorsement clauses (e.g. paragraph 4 of The Open Group's license).
+
+These statements are split into two sections: one for the code compiled and
+distributed as part of the libxkbcommon shared library and the code
+component of all tests (i.e. everything under src/ and xkbcommon/, plus the
+.c and .h files under test/), and another for the test data under test/data,
+which is distributed with the xkbcommon source tarball, but not installed to
+the system.
+
+
+BEGINNING OF SOFTWARE COPYRIGHT/LICENSE STATEMENTS:
+
+
+-------------------------------------------------------------------------------
+
+Copyright © 2009-2012 Daniel Stone
+Copyright © 2012 Ran Benita <ran234@gmail.com>
+Copyright © 2010, 2012 Intel Corporation
+Copyright © 2008, 2009 Dan Nicholson
+Copyright © 2010 Francisco Jerez <currojerez@riseup.net>
+
+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 (including the next
+paragraph) 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 OR COPYRIGHT HOLDERS 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.
+
+
+-------------------------------------------------------------------------------
+
+
+Copyright 1985, 1987, 1988, 1990, 1998 The Open Group
+
+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.
+
+
+-------------------------------------------------------------------------------
+
+
+Copyright (c) 1993, 1994, 1995, 1996 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+-------------------------------------------------------------------------------
+
+
+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+
+-------------------------------------------------------------------------------
+
+
+Copyright (C) 2011 Joseph Adams <joeyadams3.14159@gmail.com>
+
+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 OR COPYRIGHT HOLDERS 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.
+
+
+-------------------------------------------------------------------------------
+
+
+
+END OF SOFTWARE COPYRIGHT/LICENSE STATEMENTS
+
+
+BEGINNING OF LICENSE STATEMENTS FOR UNDISTRIBUTED DATA FILES IN test/data,
+derived from xkeyboard-config:
+
+
+
+-------------------------------------------------------------------------------
+
+Copyright 1996 by Joseph Moss
+Copyright (C) 2002-2007 Free Software Foundation, Inc.
+Copyright (C) Dmitry Golubev <lastguru@mail.ru>, 2003-2004
+Copyright (C) 2004, Gregory Mokhin <mokhin@bog.msu.ru>
+Copyright (C) 2006 Erdal Ronahî
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of the copyright holder(s) not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. The copyright holder(s) makes no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+THE COPYRIGHT HOLDER(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/src/3rdparty/xkbcommon/README b/src/3rdparty/xkbcommon/README
new file mode 100644
index 0000000000..fa8e94c81c
--- /dev/null
+++ b/src/3rdparty/xkbcommon/README
@@ -0,0 +1,119 @@
+Overview {#mainpage}
+========
+
+xkbcommon is a keymap compiler and support library which processes a
+reduced subset of keymaps as defined by the XKB specification. Primarily,
+a keymap is created from a set of Rules/Model/Layout/Variant/Options names,
+processed through an XKB ruleset, and compiled into a struct xkb_keymap,
+which is the base type for all xkbcommon operations.
+
+From an xkb_keymap, an xkb_state object is created which holds the current
+state of all modifiers, groups, LEDs, etc, relating to that keymap. All
+key events must be fed into the xkb_state object using xkb_state_update_key().
+Once this is done, the xkb_state object will be properly updated, and the
+keysyms to use can be obtained with xkb_state_key_get_syms().
+
+libxkbcommon does not distribute a dataset itself, other than for testing
+purposes. The most common dataset is xkeyboard-config, as used by all
+current distributions for their X11 XKB data. More information on
+xkeyboard-config is available here:
+ http://www.freedesktop.org/wiki/Software/XKeyboardConfig
+
+
+API
+===
+
+While xkbcommon's API is somewhat derived from the classic XKB API as found
+in <X11/extensions/XKB.h> and friends, it has been substantially reworked to
+expose fewer internal details to clients. The only supported API is available
+in <xkbcommon/xkbcommon.h>. Any definition not in this header (including
+accessing internal structures through the old macros previously available)
+should be regarded as an implementation detail and is liable to change at any
+time.
+
+During its early development, xkbcommon does not promise API or ABI stability.
+Regardless, we will attempt to not break ABI during a minor release series,
+so applications written against 0.1.0 should be completely compatible with
+0.1.3, but not necessarily with 0.2.0. However, new symbols may be introduced
+in any release. Thus, anyone packaging xkbcommon should make sure any package
+depending on it depends on a release greater than or equal to the version it
+was built against (or earlier, if it doesn't use any newly-introduced
+symbols), but less than the next major release.
+
+xkbcommon 1.x will offer full API and ABI stability for its lifetime, with a
+soname of libxkbcommon.so.1. Any ABI breaks will wait until xkbcommon 2.0,
+which will be libxkbcommon.so.2.
+
+The xkbcomp command-line tool has also been removed, although this will
+likely reappear in a later release.
+
+
+Relation to X11
+===============
+
+Relative to the XKB 1.1 specification implemented in current X servers,
+xkbcommon has removed support for some parts of the specification which
+introduced unnecessary complications. Many of these removals were in fact
+not implemented, or half-implemented at best, as well as being totally
+unused in the standard dataset.
+
+Notable removals:
+ - geometry support
+ + there were very few geometry definitions available, and while
+ xkbcommon was responsible for parsing this insanely complex format,
+ it never actually did anything with it
+ + hopefully someone will develop a companion library which supports
+ keyboard geometries in a more useful format
+ - KcCGST (keycodes/compat/geometry/symbols/types) API
+ + use RMLVO instead; KcCGST is now an implementation detail
+ + including pre-defined keymap files
+ - XKM support
+ + may come in an optional X11 support/compatibility library
+ - around half of the interpret actions
+ + pointer device, message and redirect actions in particular
+ - non-virtual modifiers
+ + core and virtual modifiers have been collapsed into the same
+ namespace, with a 'significant' flag that largely parallels the
+ core/virtual split
+ - radio groups
+ + completely unused in current keymaps, never fully implemented
+ - overlays
+ + almost completely unused in current keymaps
+ - key behaviors
+ + used to implement radio groups and overlays, and to deal with things
+ like keys that physically lock; unused in current keymaps
+ - indicator behaviours such as LED-controls-key
+ + the only supported LED behaviour is key-controls-LED; again this
+ was never really used in current keymaps
+
+Notable additions:
+ - 32-bit keycodes
+ - extended number of modifiers
+ - extended number of groups
+ - multiple keysyms per level
+ + this requires incompatible dataset changes, such that X11 would
+ not be able to parse these
+
+
+Development
+===========
+
+An extremely rudimentary homepage can be found at:
+ http://xkbcommon.org
+
+xkbcommon is maintained in git at freedesktop.org:
+ git://anongit.freedesktop.org/git/libxkbcommon
+
+Patches are always welcome, and may be sent to either xorg-devel@lists.x.org,
+or wayland-devel@lists.freedesktop.org. Bugs are tracked in Bugzilla at:
+ http://bugs.freedesktop.org
+
+The maintainer is Daniel Stone, who can be reached at:
+ <daniel@fooishbar.org>
+
+
+Credits
+=======
+
+Many thanks are due to Dan Nicholson for his heroic work in getting xkbcommon
+off the ground initially, as well as to Ran Benita for subsequent development.
diff --git a/src/3rdparty/xkbcommon/src/atom.c b/src/3rdparty/xkbcommon/src/atom.c
new file mode 100644
index 0000000000..a77502336e
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/atom.c
@@ -0,0 +1,248 @@
+/***********************************************************
+ * Copyright 1987, 1998 The Open Group
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.
+ *
+ * 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
+ * OPEN GROUP 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 name of The Open Group 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 Open Group.
+ *
+ *
+ * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Digital not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ *
+ * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ ******************************************************************/
+
+/************************************************************
+ * Copyright 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#include "utils.h"
+#include "atom.h"
+
+struct atom_node {
+ struct atom_node *left, *right;
+ xkb_atom_t atom;
+ unsigned int fingerprint;
+ char *string;
+};
+
+struct atom_table {
+ struct atom_node *root;
+ darray(struct atom_node *) table;
+};
+
+struct atom_table *
+atom_table_new(void)
+{
+ struct atom_table *table;
+
+ table = calloc(1, sizeof(*table));
+ if (!table)
+ return NULL;
+
+ darray_init(table->table);
+ darray_growalloc(table->table, 100);
+ darray_append(table->table, NULL);
+
+ return table;
+}
+
+static void
+free_atom(struct atom_node *patom)
+{
+ if (!patom)
+ return;
+
+ free_atom(patom->left);
+ free_atom(patom->right);
+ free(patom->string);
+ free(patom);
+}
+
+void
+atom_table_free(struct atom_table *table)
+{
+ if (!table)
+ return;
+
+ free_atom(table->root);
+ darray_free(table->table);
+ free(table);
+}
+
+const char *
+atom_text(struct atom_table *table, xkb_atom_t atom)
+{
+ if (atom >= darray_size(table->table) ||
+ darray_item(table->table, atom) == NULL)
+ return NULL;
+
+ return darray_item(table->table, atom)->string;
+}
+
+char *
+atom_strdup(struct atom_table *table, xkb_atom_t atom)
+{
+ return strdup_safe(atom_text(table, atom));
+}
+
+static bool
+find_node_pointer(struct atom_table *table, const char *string,
+ struct atom_node ***np_out, unsigned int *fingerprint_out)
+{
+ struct atom_node **np;
+ unsigned i;
+ int comp;
+ unsigned int fp = 0;
+ size_t len;
+ bool found = false;
+
+ len = strlen(string);
+ np = &table->root;
+ for (i = 0; i < (len + 1) / 2; i++) {
+ fp = fp * 27 + string[i];
+ fp = fp * 27 + string[len - 1 - i];
+ }
+
+ while (*np) {
+ if (fp < (*np)->fingerprint) {
+ np = &((*np)->left);
+ }
+ else if (fp > (*np)->fingerprint) {
+ np = &((*np)->right);
+ }
+ else {
+ /* now start testing the strings */
+ comp = strncmp(string, (*np)->string, len);
+ if (comp < 0 || (comp == 0 && len < strlen((*np)->string))) {
+ np = &((*np)->left);
+ }
+ else if (comp > 0) {
+ np = &((*np)->right);
+ }
+ else {
+ found = true;
+ break;
+ }
+ }
+ }
+
+ *fingerprint_out = fp;
+ *np_out = np;
+ return found;
+}
+
+xkb_atom_t
+atom_lookup(struct atom_table *table, const char *string)
+{
+ struct atom_node **np;
+ unsigned int fp;
+
+ if (!string)
+ return XKB_ATOM_NONE;
+
+ if (!find_node_pointer(table, string, &np, &fp))
+ return XKB_ATOM_NONE;
+
+ return (*np)->atom;
+}
+
+/*
+ * If steal is true, we do not strdup @string; therefore it must be
+ * dynamically allocated, not be free'd by the caller and not be used
+ * afterwards. Use to avoid some redundant allocations.
+ */
+xkb_atom_t
+atom_intern(struct atom_table *table, const char *string,
+ bool steal)
+{
+ struct atom_node **np;
+ struct atom_node *nd;
+ unsigned int fp;
+
+ if (!string)
+ return XKB_ATOM_NONE;
+
+ if (find_node_pointer(table, string, &np, &fp)) {
+ if (steal)
+ free(UNCONSTIFY(string));
+ return (*np)->atom;
+ }
+
+ nd = malloc(sizeof(*nd));
+ if (!nd)
+ return XKB_ATOM_NONE;
+
+ if (steal) {
+ nd->string = UNCONSTIFY(string);
+ }
+ else {
+ nd->string = strdup(string);
+ if (!nd->string) {
+ free(nd);
+ return XKB_ATOM_NONE;
+ }
+ }
+
+ *np = nd;
+ nd->left = nd->right = NULL;
+ nd->fingerprint = fp;
+ nd->atom = darray_size(table->table);
+ darray_append(table->table, nd);
+
+ return nd->atom;
+}
diff --git a/src/3rdparty/xkbcommon/src/atom.h b/src/3rdparty/xkbcommon/src/atom.h
new file mode 100644
index 0000000000..f1abf1b72f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/atom.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright © 2009 Dan Nicholson
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef ATOM_H
+#define ATOM_H
+
+typedef uint32_t xkb_atom_t;
+
+#define XKB_ATOM_NONE 0
+
+struct atom_table;
+
+struct atom_table *
+atom_table_new(void);
+
+void
+atom_table_free(struct atom_table *table);
+
+xkb_atom_t
+atom_lookup(struct atom_table *table, const char *string);
+
+xkb_atom_t
+atom_intern(struct atom_table *table, const char *string,
+ bool steal);
+
+char *
+atom_strdup(struct atom_table *table, xkb_atom_t atom);
+
+const char *
+atom_text(struct atom_table *table, xkb_atom_t atom);
+
+#endif /* ATOM_H */
diff --git a/src/3rdparty/xkbcommon/src/context.c b/src/3rdparty/xkbcommon/src/context.c
new file mode 100644
index 0000000000..8d56487004
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/context.c
@@ -0,0 +1,492 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include "xkbcommon/xkbcommon.h"
+#include "utils.h"
+#include "context.h"
+
+struct xkb_context {
+ int refcnt;
+
+ ATTR_PRINTF(3, 0) void (*log_fn)(struct xkb_context *ctx,
+ enum xkb_log_level level,
+ const char *fmt, va_list args);
+ enum xkb_log_level log_level;
+ int log_verbosity;
+ void *user_data;
+
+ struct xkb_rule_names names_dflt;
+
+ darray(char *) includes;
+ darray(char *) failed_includes;
+
+ struct atom_table *atom_table;
+
+ /* Buffer for the *Text() functions. */
+ char text_buffer[2048];
+ size_t text_next;
+
+ unsigned int use_environment_names : 1;
+};
+
+/**
+ * Append one directory to the context's include path.
+ */
+XKB_EXPORT int
+xkb_context_include_path_append(struct xkb_context *ctx, const char *path)
+{
+ struct stat stat_buf;
+ int err;
+ char *tmp;
+
+ tmp = strdup(path);
+ if (!tmp)
+ goto err;
+
+ err = stat(path, &stat_buf);
+ if (err != 0)
+ goto err;
+ if (!S_ISDIR(stat_buf.st_mode))
+ goto err;
+
+#if defined(HAVE_EACCESS)
+ if (eaccess(path, R_OK | X_OK) != 0)
+ goto err;
+#elif defined(HAVE_EUIDACCESS)
+ if (euidaccess(path, R_OK | X_OK) != 0)
+ goto err;
+#endif
+
+ darray_append(ctx->includes, tmp);
+ return 1;
+
+err:
+ darray_append(ctx->failed_includes, tmp);
+ return 0;
+}
+
+/**
+ * Append the default include directories to the context.
+ */
+XKB_EXPORT int
+xkb_context_include_path_append_default(struct xkb_context *ctx)
+{
+ const char *home;
+ char *user_path;
+ int err;
+ int ret = 0;
+
+ ret |= xkb_context_include_path_append(ctx, DFLT_XKB_CONFIG_ROOT);
+
+ home = getenv("HOME");
+ if (!home)
+ return ret;
+ err = asprintf(&user_path, "%s/.xkb", home);
+ if (err <= 0)
+ return ret;
+ ret |= xkb_context_include_path_append(ctx, user_path);
+ free(user_path);
+
+ return ret;
+}
+
+/**
+ * Remove all entries in the context's include path.
+ */
+XKB_EXPORT void
+xkb_context_include_path_clear(struct xkb_context *ctx)
+{
+ char **path;
+
+ darray_foreach(path, ctx->includes)
+ free(*path);
+ darray_free(ctx->includes);
+
+ darray_foreach(path, ctx->failed_includes)
+ free(*path);
+ darray_free(ctx->failed_includes);
+}
+
+/**
+ * xkb_context_include_path_clear() + xkb_context_include_path_append_default()
+ */
+XKB_EXPORT int
+xkb_context_include_path_reset_defaults(struct xkb_context *ctx)
+{
+ xkb_context_include_path_clear(ctx);
+ return xkb_context_include_path_append_default(ctx);
+}
+
+/**
+ * Returns the number of entries in the context's include path.
+ */
+XKB_EXPORT unsigned int
+xkb_context_num_include_paths(struct xkb_context *ctx)
+{
+ return darray_size(ctx->includes);
+}
+
+unsigned int
+xkb_context_num_failed_include_paths(struct xkb_context *ctx)
+{
+ return darray_size(ctx->failed_includes);
+}
+
+/**
+ * Returns the given entry in the context's include path, or NULL if an
+ * invalid index is passed.
+ */
+XKB_EXPORT const char *
+xkb_context_include_path_get(struct xkb_context *ctx, unsigned int idx)
+{
+ if (idx >= xkb_context_num_include_paths(ctx))
+ return NULL;
+
+ return darray_item(ctx->includes, idx);
+}
+
+const char *
+xkb_context_failed_include_path_get(struct xkb_context *ctx,
+ unsigned int idx)
+{
+ if (idx >= xkb_context_num_failed_include_paths(ctx))
+ return NULL;
+
+ return darray_item(ctx->failed_includes, idx);
+}
+
+/**
+ * Take a new reference on the context.
+ */
+XKB_EXPORT struct xkb_context *
+xkb_context_ref(struct xkb_context *ctx)
+{
+ ctx->refcnt++;
+ return ctx;
+}
+
+/**
+ * Drop an existing reference on the context, and free it if the refcnt is
+ * now 0.
+ */
+XKB_EXPORT void
+xkb_context_unref(struct xkb_context *ctx)
+{
+ if (!ctx || --ctx->refcnt > 0)
+ return;
+
+ xkb_context_include_path_clear(ctx);
+ atom_table_free(ctx->atom_table);
+ free(ctx);
+}
+
+static const char *
+log_level_to_prefix(enum xkb_log_level level)
+{
+ switch (level) {
+ case XKB_LOG_LEVEL_DEBUG:
+ return "Debug:";
+ case XKB_LOG_LEVEL_INFO:
+ return "Info:";
+ case XKB_LOG_LEVEL_WARNING:
+ return "Warning:";
+ case XKB_LOG_LEVEL_ERROR:
+ return "Error:";
+ case XKB_LOG_LEVEL_CRITICAL:
+ return "Critical:";
+ default:
+ return NULL;
+ }
+}
+
+ATTR_PRINTF(3, 0) static void
+default_log_fn(struct xkb_context *ctx, enum xkb_log_level level,
+ const char *fmt, va_list args)
+{
+ const char *prefix = log_level_to_prefix(level);
+
+ if (prefix)
+ fprintf(stderr, "%-10s", prefix);
+ vfprintf(stderr, fmt, args);
+}
+
+static enum xkb_log_level
+log_level(const char *level) {
+ char *endptr;
+ enum xkb_log_level lvl;
+
+ errno = 0;
+ lvl = strtol(level, &endptr, 10);
+ if (errno == 0 && (endptr[0] == '\0' || isspace(endptr[0])))
+ return lvl;
+ if (istreq_prefix("crit", level))
+ return XKB_LOG_LEVEL_CRITICAL;
+ if (istreq_prefix("err", level))
+ return XKB_LOG_LEVEL_ERROR;
+ if (istreq_prefix("warn", level))
+ return XKB_LOG_LEVEL_WARNING;
+ if (istreq_prefix("info", level))
+ return XKB_LOG_LEVEL_INFO;
+ if (istreq_prefix("debug", level) || istreq_prefix("dbg", level))
+ return XKB_LOG_LEVEL_DEBUG;
+
+ return XKB_LOG_LEVEL_ERROR;
+}
+
+static int
+log_verbosity(const char *verbosity) {
+ char *endptr;
+ int v;
+
+ errno = 0;
+ v = strtol(verbosity, &endptr, 10);
+ if (errno == 0)
+ return v;
+
+ return 0;
+}
+
+#ifndef DEFAULT_XKB_VARIANT
+#define DEFAULT_XKB_VARIANT NULL
+#endif
+
+#ifndef DEFAULT_XKB_OPTIONS
+#define DEFAULT_XKB_OPTIONS NULL
+#endif
+
+/**
+ * Create a new context.
+ */
+XKB_EXPORT struct xkb_context *
+xkb_context_new(enum xkb_context_flags flags)
+{
+ const char *env;
+ struct xkb_context *ctx = calloc(1, sizeof(*ctx));
+
+ if (!ctx)
+ return NULL;
+
+ ctx->refcnt = 1;
+ ctx->log_fn = default_log_fn;
+ ctx->log_level = XKB_LOG_LEVEL_ERROR;
+ ctx->log_verbosity = 0;
+
+ /* Environment overwrites defaults. */
+ env = getenv("XKB_LOG_LEVEL");
+ if (env)
+ xkb_context_set_log_level(ctx, log_level(env));
+
+ env = getenv("XKB_LOG_VERBOSITY");
+ if (env)
+ xkb_context_set_log_verbosity(ctx, log_verbosity(env));
+
+ if (!(flags & XKB_CONTEXT_NO_DEFAULT_INCLUDES) &&
+ !xkb_context_include_path_append_default(ctx)) {
+ log_err(ctx, "failed to add default include path %s\n",
+ DFLT_XKB_CONFIG_ROOT);
+ xkb_context_unref(ctx);
+ return NULL;
+ }
+
+ ctx->use_environment_names = !(flags & XKB_CONTEXT_NO_ENVIRONMENT_NAMES);
+
+ ctx->atom_table = atom_table_new();
+ if (!ctx->atom_table) {
+ xkb_context_unref(ctx);
+ return NULL;
+ }
+
+ return ctx;
+}
+
+xkb_atom_t
+xkb_atom_lookup(struct xkb_context *ctx, const char *string)
+{
+ return atom_lookup(ctx->atom_table, string);
+}
+
+xkb_atom_t
+xkb_atom_intern(struct xkb_context *ctx, const char *string)
+{
+ return atom_intern(ctx->atom_table, string, false);
+}
+
+xkb_atom_t
+xkb_atom_steal(struct xkb_context *ctx, char *string)
+{
+ return atom_intern(ctx->atom_table, string, true);
+}
+
+char *
+xkb_atom_strdup(struct xkb_context *ctx, xkb_atom_t atom)
+{
+ return atom_strdup(ctx->atom_table, atom);
+}
+
+const char *
+xkb_atom_text(struct xkb_context *ctx, xkb_atom_t atom)
+{
+ return atom_text(ctx->atom_table, atom);
+}
+
+void
+xkb_log(struct xkb_context *ctx, enum xkb_log_level level,
+ const char *fmt, ...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+ ctx->log_fn(ctx, level, fmt, args);
+ va_end(args);
+}
+
+XKB_EXPORT void
+xkb_context_set_log_fn(struct xkb_context *ctx,
+ void (*log_fn)(struct xkb_context *ctx,
+ enum xkb_log_level level,
+ const char *fmt, va_list args))
+{
+ ctx->log_fn = (log_fn ? log_fn : default_log_fn);
+}
+
+XKB_EXPORT enum xkb_log_level
+xkb_context_get_log_level(struct xkb_context *ctx)
+{
+ return ctx->log_level;
+}
+
+XKB_EXPORT void
+xkb_context_set_log_level(struct xkb_context *ctx, enum xkb_log_level level)
+{
+ ctx->log_level = level;
+}
+
+XKB_EXPORT int
+xkb_context_get_log_verbosity(struct xkb_context *ctx)
+{
+ return ctx->log_verbosity;
+}
+
+XKB_EXPORT void
+xkb_context_set_log_verbosity(struct xkb_context *ctx, int verbosity)
+{
+ ctx->log_verbosity = verbosity;
+}
+
+XKB_EXPORT void *
+xkb_context_get_user_data(struct xkb_context *ctx)
+{
+ if (ctx)
+ return ctx->user_data;
+ return NULL;
+}
+
+XKB_EXPORT void
+xkb_context_set_user_data(struct xkb_context *ctx, void *user_data)
+{
+ ctx->user_data = user_data;
+}
+
+char *
+xkb_context_get_buffer(struct xkb_context *ctx, size_t size)
+{
+ char *rtrn;
+
+ if (size >= sizeof(ctx->text_buffer))
+ return NULL;
+
+ if (sizeof(ctx->text_buffer) - ctx->text_next <= size)
+ ctx->text_next = 0;
+
+ rtrn = &ctx->text_buffer[ctx->text_next];
+ ctx->text_next += size;
+
+ return rtrn;
+}
+
+const char *
+xkb_context_get_default_rules(struct xkb_context *ctx)
+{
+ const char *env = NULL;
+
+ if (ctx->use_environment_names)
+ env = getenv("XKB_DEFAULT_RULES");
+
+ return env ? env : DEFAULT_XKB_RULES;
+}
+
+const char *
+xkb_context_get_default_model(struct xkb_context *ctx)
+{
+ const char *env = NULL;
+
+ if (ctx->use_environment_names)
+ env = getenv("XKB_DEFAULT_MODEL");
+
+ return env ? env : DEFAULT_XKB_MODEL;
+}
+
+const char *
+xkb_context_get_default_layout(struct xkb_context *ctx)
+{
+ const char *env = NULL;
+
+ if (ctx->use_environment_names)
+ env = getenv("XKB_DEFAULT_LAYOUT");
+
+ return env ? env : DEFAULT_XKB_LAYOUT;
+}
+
+const char *
+xkb_context_get_default_variant(struct xkb_context *ctx)
+{
+ const char *env = NULL;
+ const char *layout = getenv("XKB_DEFAULT_VARIANT");
+
+ /* We don't want to inherit the variant if they haven't also set a
+ * layout, since they're so closely paired. */
+ if (layout && ctx->use_environment_names)
+ env = getenv("XKB_DEFAULT_VARIANT");
+
+ return env ? env : DEFAULT_XKB_VARIANT;
+}
+
+const char *
+xkb_context_get_default_options(struct xkb_context *ctx)
+{
+ const char *env = NULL;
+
+ if (ctx->use_environment_names)
+ env = getenv("XKB_DEFAULT_OPTIONS");
+
+ return env ? env : DEFAULT_XKB_OPTIONS;
+}
diff --git a/src/3rdparty/xkbcommon/src/context.h b/src/3rdparty/xkbcommon/src/context.h
new file mode 100644
index 0000000000..7c061a086f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/context.h
@@ -0,0 +1,124 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#ifndef CONTEXT_H
+#define CONTEXT_H
+
+#include "atom.h"
+
+unsigned int
+xkb_context_num_failed_include_paths(struct xkb_context *ctx);
+
+const char *
+xkb_context_failed_include_path_get(struct xkb_context *ctx,
+ unsigned int idx);
+
+/*
+ * Returns XKB_ATOM_NONE if @string was not previously interned,
+ * otherwise returns the atom.
+ */
+xkb_atom_t
+xkb_atom_lookup(struct xkb_context *ctx, const char *string);
+
+xkb_atom_t
+xkb_atom_intern(struct xkb_context *ctx, const char *string);
+
+/**
+ * If @string is dynamically allocated, free'd immediately after
+ * being interned, and not used afterwards, use this function
+ * instead of xkb_atom_intern to avoid some unnecessary allocations.
+ * The caller should not use or free the passed in string afterwards.
+ */
+xkb_atom_t
+xkb_atom_steal(struct xkb_context *ctx, char *string);
+
+char *
+xkb_atom_strdup(struct xkb_context *ctx, xkb_atom_t atom);
+
+const char *
+xkb_atom_text(struct xkb_context *ctx, xkb_atom_t atom);
+
+char *
+xkb_context_get_buffer(struct xkb_context *ctx, size_t size);
+
+ATTR_PRINTF(3, 4) void
+xkb_log(struct xkb_context *ctx, enum xkb_log_level level,
+ const char *fmt, ...);
+
+#define xkb_log_cond_level(ctx, level, ...) do { \
+ if (xkb_context_get_log_level(ctx) >= (level)) \
+ xkb_log((ctx), (level), __VA_ARGS__); \
+} while (0)
+
+#define xkb_log_cond_verbosity(ctx, level, vrb, ...) do { \
+ if (xkb_context_get_log_verbosity(ctx) >= (vrb)) \
+ xkb_log_cond_level((ctx), (level), __VA_ARGS__); \
+} while (0)
+
+const char *
+xkb_context_get_default_rules(struct xkb_context *ctx);
+
+const char *
+xkb_context_get_default_model(struct xkb_context *ctx);
+
+const char *
+xkb_context_get_default_layout(struct xkb_context *ctx);
+
+const char *
+xkb_context_get_default_variant(struct xkb_context *ctx);
+
+const char *
+xkb_context_get_default_options(struct xkb_context *ctx);
+
+/*
+ * The format is not part of the argument list in order to avoid the
+ * "ISO C99 requires rest arguments to be used" warning when only the
+ * format is supplied without arguments. Not supplying it would still
+ * result in an error, though.
+ */
+#define log_dbg(ctx, ...) \
+ xkb_log_cond_level((ctx), XKB_LOG_LEVEL_DEBUG, __VA_ARGS__)
+#define log_info(ctx, ...) \
+ xkb_log_cond_level((ctx), XKB_LOG_LEVEL_INFO, __VA_ARGS__)
+#define log_warn(ctx, ...) \
+ xkb_log_cond_level((ctx), XKB_LOG_LEVEL_WARNING, __VA_ARGS__)
+#define log_err(ctx, ...) \
+ xkb_log_cond_level((ctx), XKB_LOG_LEVEL_ERROR, __VA_ARGS__)
+#define log_wsgo(ctx, ...) \
+ xkb_log_cond_level((ctx), XKB_LOG_LEVEL_CRITICAL, __VA_ARGS__)
+#define log_vrb(ctx, vrb, ...) \
+ xkb_log_cond_verbosity((ctx), XKB_LOG_LEVEL_WARNING, (vrb), __VA_ARGS__)
+
+/*
+ * Variants which are prefixed by the name of the function they're
+ * called from.
+ * Here we must have the silly 1 variant.
+ */
+#define log_err_func(ctx, fmt, ...) \
+ log_err(ctx, "%s: " fmt, __func__, __VA_ARGS__)
+#define log_err_func1(ctx, fmt) \
+ log_err(ctx, "%s: " fmt, __func__)
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/darray.h b/src/3rdparty/xkbcommon/src/darray.h
new file mode 100644
index 0000000000..0cf3747be7
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/darray.h
@@ -0,0 +1,388 @@
+/*
+ * Copyright (C) 2011 Joseph Adams <joeyadams3.14159@gmail.com>
+ *
+ * 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef CCAN_DARRAY_H
+#define CCAN_DARRAY_H
+
+#include <stdlib.h>
+#include <string.h>
+
+/*
+ * SYNOPSIS
+ *
+ * Life cycle of a darray (dynamically-allocated array):
+ *
+ * darray(int) a = darray_new();
+ * darray_free(a);
+ *
+ * struct {darray(int) a;} foo;
+ * darray_init(foo.a);
+ * darray_free(foo.a);
+ *
+ * Typedefs for darrays of common types:
+ *
+ * darray_char, darray_schar, darray_uchar
+ * darray_short, darray_int, darray_long
+ * darray_ushort, darray_uint, darray_ulong
+ *
+ * Access:
+ *
+ * T darray_item(darray(T) arr, size_t index);
+ * size_t darray_size(darray(T) arr);
+ * size_t darray_alloc(darray(T) arr);
+ * bool darray_empty(darray(T) arr);
+ *
+ * // Access raw memory, starting from the item in offset.
+ * // Not safe, be careful, etc.
+ * T* darray_mem(darray(T) arr, size_t offset);
+ *
+ * Insertion (single item):
+ *
+ * void darray_append(darray(T) arr, T item);
+ * void darray_prepend(darray(T) arr, T item);
+ * void darray_push(darray(T) arr, T item); // same as darray_append
+ *
+ * Insertion (multiple items):
+ *
+ * void darray_append_items(darray(T) arr, T *items, size_t count);
+ * void darray_prepend_items(darray(T) arr, T *items, size_t count);
+ *
+ * void darray_appends(darray(T) arr, [T item, [...]]);
+ * void darray_prepends(darray(T) arr, [T item, [...]]);
+ *
+ * Removal:
+ *
+ * T darray_pop(darray(T) arr | darray_size(arr) != 0);
+ * T* darray_pop_check(darray(T*) arr);
+ *
+ * Replacement:
+ *
+ * void darray_from_items(darray(T) arr, T *items, size_t count);
+ * void darray_from_c(darray(T) arr, T c_array[N]);
+ *
+ * String buffer:
+ *
+ * void darray_append_string(darray(char) arr, const char *str);
+ * void darray_append_lit(darray(char) arr, char stringLiteral[N+1]);
+ *
+ * void darray_prepend_string(darray(char) arr, const char *str);
+ * void darray_prepend_lit(darray(char) arr, char stringLiteral[N+1]);
+ *
+ * void darray_from_string(darray(T) arr, const char *str);
+ * void darray_from_lit(darray(char) arr, char stringLiteral[N+1]);
+ *
+ * Size management:
+ *
+ * void darray_resize(darray(T) arr, size_t newSize);
+ * void darray_resize0(darray(T) arr, size_t newSize);
+ *
+ * void darray_realloc(darray(T) arr, size_t newAlloc);
+ * void darray_growalloc(darray(T) arr, size_t newAlloc);
+ *
+ * Traversal:
+ *
+ * darray_foreach(T *&i, darray(T) arr) {...}
+ * darray_foreach_reverse(T *&i, darray(T) arr) {...}
+ *
+ * Except for darray_foreach and darray_foreach_reverse,
+ * all macros evaluate their non-darray arguments only once.
+ */
+
+/*** Life cycle ***/
+
+#define darray(type) struct { type *item; size_t size; size_t alloc; }
+
+#define darray_new() { 0, 0, 0 }
+
+#define darray_init(arr) do { \
+ (arr).item = 0; (arr).size = 0; (arr).alloc = 0; \
+} while (0)
+
+#define darray_free(arr) do { \
+ free((arr).item); darray_init(arr); \
+} while (0)
+
+/*
+ * Typedefs for darrays of common types. These are useful
+ * when you want to pass a pointer to an darray(T) around.
+ *
+ * The following will produce an incompatible pointer warning:
+ *
+ * void foo(darray(int) *arr);
+ * darray(int) arr = darray_new();
+ * foo(&arr);
+ *
+ * The workaround:
+ *
+ * void foo(darray_int *arr);
+ * darray_int arr = darray_new();
+ * foo(&arr);
+ */
+
+typedef darray (char) darray_char;
+typedef darray (signed char) darray_schar;
+typedef darray (unsigned char) darray_uchar;
+
+typedef darray (short) darray_short;
+typedef darray (int) darray_int;
+typedef darray (long) darray_long;
+
+typedef darray (unsigned short) darray_ushort;
+typedef darray (unsigned int) darray_uint;
+typedef darray (unsigned long) darray_ulong;
+
+/*** Access ***/
+
+#define darray_item(arr, i) ((arr).item[i])
+#define darray_size(arr) ((arr).size)
+#define darray_alloc(arr) ((arr).alloc)
+#define darray_empty(arr) ((arr).size == 0)
+
+#define darray_mem(arr, offset) ((arr).item + (offset))
+#define darray_same(arr1, arr2) ((arr1).item == (arr2).item)
+
+/*** Insertion (single item) ***/
+
+#define darray_append(arr, ...) do { \
+ darray_resize(arr, (arr).size + 1); \
+ (arr).item[(arr).size - 1] = (__VA_ARGS__); \
+} while (0)
+
+#define darray_prepend(arr, ...) do { \
+ darray_resize(arr, (arr).size + 1); \
+ memmove((arr).item + 1, (arr).item, \
+ ((arr).size - 1) * sizeof(*(arr).item)); \
+ (arr).item[0] = (__VA_ARGS__); \
+} while (0)
+
+#define darray_push(arr, ...) darray_append(arr, __VA_ARGS__)
+
+/*** Insertion (multiple items) ***/
+
+#define darray_append_items(arr, items, count) do { \
+ size_t __count = (count), __oldSize = (arr).size; \
+ darray_resize(arr, __oldSize + __count); \
+ memcpy((arr).item + __oldSize, items, __count * sizeof(*(arr).item)); \
+} while (0)
+
+#define darray_prepend_items(arr, items, count) do { \
+ size_t __count = (count), __oldSize = (arr).size; \
+ darray_resize(arr, __count + __oldSize); \
+ memmove((arr).item + __count, (arr).item, \
+ __oldSize * sizeof(*(arr).item)); \
+ memcpy((arr).item, items, __count * sizeof(*(arr).item)); \
+} while (0)
+
+#define darray_append_items_nullterminate(arr, items, count) do { \
+ size_t __count = (count), __oldSize = (arr).size; \
+ darray_resize(arr, __oldSize + __count + 1); \
+ memcpy((arr).item + __oldSize, items, __count * sizeof(*(arr).item)); \
+ (arr).item[--(arr).size] = 0; \
+} while (0)
+
+#define darray_prepend_items_nullterminate(arr, items, count) do { \
+ size_t __count = (count), __oldSize = (arr).size; \
+ darray_resize(arr, __count + __oldSize + 1); \
+ memmove((arr).item + __count, (arr).item, \
+ __oldSize * sizeof(*(arr).item)); \
+ memcpy((arr).item, items, __count * sizeof(*(arr).item)); \
+ (arr).item[--(arr).size] = 0; \
+} while (0)
+
+#define darray_appends_t(arr, type, ...) do { \
+ type __src[] = { __VA_ARGS__ }; \
+ darray_append_items(arr, __src, sizeof(__src) / sizeof(*__src)); \
+} while (0)
+
+#define darray_prepends_t(arr, type, ...) do { \
+ type __src[] = { __VA_ARGS__ }; \
+ darray_prepend_items(arr, __src, sizeof(__src) / sizeof(*__src)); \
+} while (0)
+
+/*** Removal ***/
+
+/* Warning: Do not call darray_pop on an empty darray. */
+#define darray_pop(arr) ((arr).item[--(arr).size])
+#define darray_pop_check(arr) ((arr).size ? darray_pop(arr) : NULL)
+
+/*** Replacement ***/
+
+#define darray_from_items(arr, items, count) do { \
+ size_t __count = (count); \
+ darray_resize(arr, __count); \
+ memcpy((arr).item, items, __count * sizeof(*(arr).item)); \
+} while (0)
+
+#define darray_from_c(arr, c_array) \
+ darray_from_items(arr, c_array, sizeof(c_array) / sizeof(*(c_array)))
+
+#define darray_copy(arr_to, arr_from) \
+ darray_from_items((arr_to), (arr_from).item, (arr_from).size)
+
+/*** String buffer ***/
+
+#define darray_append_string(arr, str) do { \
+ const char *__str = (str); \
+ darray_append_items(arr, __str, strlen(__str) + 1); \
+ (arr).size--; \
+} while (0)
+
+#define darray_append_lit(arr, stringLiteral) do { \
+ darray_append_items(arr, stringLiteral, sizeof(stringLiteral)); \
+ (arr).size--; \
+} while (0)
+
+#define darray_prepend_string(arr, str) do { \
+ const char *__str = (str); \
+ darray_prepend_items_nullterminate(arr, __str, strlen(__str)); \
+} while (0)
+
+#define darray_prepend_lit(arr, stringLiteral) \
+ darray_prepend_items_nullterminate(arr, stringLiteral, \
+ sizeof(stringLiteral) - 1)
+
+#define darray_from_string(arr, str) do { \
+ const char *__str = (str); \
+ darray_from_items(arr, __str, strlen(__str) + 1); \
+ (arr).size--; \
+} while (0)
+
+#define darray_from_lit(arr, stringLiteral) do { \
+ darray_from_items(arr, stringLiteral, sizeof(stringLiteral)); \
+ (arr).size--; \
+} while (0)
+
+/*** Size management ***/
+
+#define darray_resize(arr, newSize) \
+ darray_growalloc(arr, (arr).size = (newSize))
+
+#define darray_resize0(arr, newSize) do { \
+ size_t __oldSize = (arr).size, __newSize = (newSize); \
+ (arr).size = __newSize; \
+ if (__newSize > __oldSize) { \
+ darray_growalloc(arr, __newSize); \
+ memset(&(arr).item[__oldSize], 0, \
+ (__newSize - __oldSize) * sizeof(*(arr).item)); \
+ } \
+} while (0)
+
+#define darray_realloc(arr, newAlloc) do { \
+ (arr).item = realloc((arr).item, \
+ ((arr).alloc = (newAlloc)) * sizeof(*(arr).item)); \
+} while (0)
+
+#define darray_growalloc(arr, need) do { \
+ size_t __need = (need); \
+ if (__need > (arr).alloc) \
+ darray_realloc(arr, darray_next_alloc((arr).alloc, __need)); \
+} while (0)
+
+static inline size_t
+darray_next_alloc(size_t alloc, size_t need)
+{
+ if (alloc == 0)
+ alloc = 4;
+ while (alloc < need)
+ alloc *= 2;
+ return alloc;
+}
+
+/*** Traversal ***/
+
+/*
+ * darray_foreach(T *&i, darray(T) arr) {...}
+ *
+ * Traverse a darray. `i` must be declared in advance as a pointer to an item.
+ */
+#define darray_foreach(i, arr) \
+ for ((i) = &(arr).item[0]; (i) < &(arr).item[(arr).size]; (i)++)
+
+#define darray_foreach_from(i, arr, from) \
+ for ((i) = &(arr).item[from]; (i) < &(arr).item[(arr).size]; (i)++)
+
+/* Iterate on index and value at the same time, like Python's enumerate. */
+#define darray_enumerate(idx, val, arr) \
+ for ((idx) = 0, (val) = &(arr).item[0]; \
+ (idx) < (arr).size; \
+ (idx)++, (val)++)
+
+#define darray_enumerate_from(idx, val, arr, from) \
+ for ((idx) = (from), (val) = &(arr).item[0]; \
+ (idx) < (arr).size; \
+ (idx)++, (val)++)
+
+/*
+ * darray_foreach_reverse(T *&i, darray(T) arr) {...}
+ *
+ * Like darray_foreach, but traverse in reverse order.
+ */
+#define darray_foreach_reverse(i, arr) \
+ for ((i) = &(arr).item[(arr).size]; (i)-- > &(arr).item[0]; )
+
+#endif /* CCAN_DARRAY_H */
+
+/*
+ *
+ * darray_growalloc(arr, newAlloc) sees if the darray can currently hold newAlloc items;
+ * if not, it increases the alloc to satisfy this requirement, allocating slack
+ * space to avoid having to reallocate for every size increment.
+ *
+ * darray_from_string(arr, str) copies a string to an darray_char.
+ *
+ * darray_push(arr, item) pushes an item to the end of the darray.
+ * darray_pop(arr) pops it back out. Be sure there is at least one item in the darray before calling.
+ * darray_pop_check(arr) does the same as darray_pop, but returns NULL if there are no more items left in the darray.
+ *
+ * darray_make_room(arr, room) ensures there's 'room' elements of space after the end of the darray, and it returns a pointer to this space.
+ * Currently requires HAVE_STATEMENT_EXPR, but I plan to remove this dependency by creating an inline function.
+ *
+ * The following require HAVE_TYPEOF==1 :
+ *
+ * darray_appends(arr, item0, item1...) appends a collection of comma-delimited items to the darray.
+ * darray_prepends(arr, item0, item1...) prepends a collection of comma-delimited items to the darray.\
+ *
+ *
+ * Examples:
+ *
+ * darray(int) arr;
+ * int *i;
+ *
+ * darray_appends(arr, 0,1,2,3,4);
+ * darray_appends(arr, -5,-4,-3,-2,-1);
+ * darray_foreach(i, arr)
+ * printf("%d ", *i);
+ * printf("\n");
+ *
+ * darray_free(arr);
+ *
+ *
+ * typedef struct {int n,d;} Fraction;
+ * darray(Fraction) fractions;
+ * Fraction *i;
+ *
+ * darray_appends(fractions, {3,4}, {3,5}, {2,1});
+ * darray_foreach(i, fractions)
+ * printf("%d/%d\n", i->n, i->d);
+ *
+ * darray_free(fractions);
+ */
diff --git a/src/3rdparty/xkbcommon/src/keymap.h b/src/3rdparty/xkbcommon/src/keymap.h
new file mode 100644
index 0000000000..c6b884d6bc
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/keymap.h
@@ -0,0 +1,451 @@
+/*
+ * Copyright 1985, 1987, 1990, 1998 The Open Group
+ *
+ * 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.
+ */
+
+/************************************************************
+ * Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2009 Dan Nicholson
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ * Dan Nicholson <dbn.lists@gmail.com>
+ */
+
+#ifndef KEYMAP_H
+#define KEYMAP_H
+
+ /* Don't use compat names in internal code. */
+#define _XKBCOMMON_COMPAT_H
+#include "xkbcommon/xkbcommon.h"
+
+#include "utils.h"
+#include "context.h"
+
+/* This limit is artificially enforced, we do not depend on it any where.
+ * The reason it's still here is that the rules file format does not
+ * support multiple groups very well, and the rules shipped with
+ * xkeyboard-config (see rules/evdev) depend on this limit extensively.
+ * So just lifting this limit would cause problems for people who will use
+ * more than 4 layouts.
+ * TODO: Fix the group index syntax in the rules format, preferably in a
+ * backwards compatible way.
+ * See e.g. https://bugs.freedesktop.org/show_bug.cgi?id=14372
+ * Note: A limit on the number of groups we *do* depend on is imposed by
+ * the size of the xkb_layout_mask_t type (32). This is more than enough
+ * though.
+ */
+#define XKB_MAX_GROUPS 4
+
+/* Don't allow more modifiers than we can hold in xkb_mod_mask_t. */
+#define XKB_MAX_MODS ((xkb_mod_index_t) (sizeof(xkb_mod_mask_t) * 8))
+
+/* Don't allow more leds than we can hold in xkb_led_mask_t. */
+#define XKB_MAX_LEDS ((xkb_led_index_t) (sizeof(xkb_led_mask_t) * 8))
+
+/* These should all go away. */
+enum mod_type {
+ MOD_REAL = (1 << 0),
+ MOD_VIRT = (1 << 1),
+ MOD_BOTH = (MOD_REAL | MOD_VIRT),
+};
+#define MOD_REAL_MASK_ALL ((xkb_mod_mask_t) 0x000000ff)
+
+enum xkb_action_type {
+ ACTION_TYPE_NONE = 0,
+ ACTION_TYPE_MOD_SET,
+ ACTION_TYPE_MOD_LATCH,
+ ACTION_TYPE_MOD_LOCK,
+ ACTION_TYPE_GROUP_SET,
+ ACTION_TYPE_GROUP_LATCH,
+ ACTION_TYPE_GROUP_LOCK,
+ ACTION_TYPE_PTR_MOVE,
+ ACTION_TYPE_PTR_BUTTON,
+ ACTION_TYPE_PTR_LOCK,
+ ACTION_TYPE_PTR_DEFAULT,
+ ACTION_TYPE_TERMINATE,
+ ACTION_TYPE_SWITCH_VT,
+ ACTION_TYPE_CTRL_SET,
+ ACTION_TYPE_CTRL_LOCK,
+ ACTION_TYPE_KEY_REDIRECT,
+ ACTION_TYPE_PRIVATE,
+ _ACTION_TYPE_NUM_ENTRIES
+};
+
+enum xkb_action_flags {
+ ACTION_LOCK_CLEAR = (1 << 0),
+ ACTION_LATCH_TO_LOCK = (1 << 1),
+ ACTION_LOCK_NO_LOCK = (1 << 2),
+ ACTION_LOCK_NO_UNLOCK = (1 << 3),
+ ACTION_MODS_LOOKUP_MODMAP = (1 << 4),
+ ACTION_ABSOLUTE_SWITCH = (1 << 5),
+ ACTION_ABSOLUTE_X = (1 << 6),
+ ACTION_ABSOLUTE_Y = (1 << 7),
+ ACTION_NO_ACCEL = (1 << 8),
+ ACTION_SAME_SCREEN = (1 << 9),
+};
+
+enum xkb_action_controls {
+ CONTROL_REPEAT = (1 << 0),
+ CONTROL_SLOW = (1 << 1),
+ CONTROL_DEBOUNCE = (1 << 2),
+ CONTROL_STICKY = (1 << 3),
+ CONTROL_MOUSEKEYS = (1 << 4),
+ CONTROL_MOUSEKEYS_ACCEL = (1 << 5),
+ CONTROL_AX = (1 << 6),
+ CONTROL_AX_TIMEOUT = (1 << 7),
+ CONTROL_AX_FEEDBACK = (1 << 8),
+ CONTROL_BELL = (1 << 9),
+ CONTROL_IGNORE_GROUP_LOCK = (1 << 10),
+ CONTROL_ALL = \
+ (CONTROL_REPEAT | CONTROL_SLOW | CONTROL_DEBOUNCE | CONTROL_STICKY | \
+ CONTROL_MOUSEKEYS | CONTROL_MOUSEKEYS_ACCEL | CONTROL_AX | \
+ CONTROL_AX_TIMEOUT | CONTROL_AX_FEEDBACK | CONTROL_BELL | \
+ CONTROL_IGNORE_GROUP_LOCK)
+};
+
+enum xkb_match_operation {
+ MATCH_NONE,
+ MATCH_ANY_OR_NONE,
+ MATCH_ANY,
+ MATCH_ALL,
+ MATCH_EXACTLY,
+};
+
+struct xkb_mods {
+ xkb_mod_mask_t mods; /* original real+virtual mods in definition */
+ xkb_mod_mask_t mask; /* computed effective mask */
+};
+
+struct xkb_mod_action {
+ enum xkb_action_type type;
+ enum xkb_action_flags flags;
+ struct xkb_mods mods;
+};
+
+struct xkb_group_action {
+ enum xkb_action_type type;
+ enum xkb_action_flags flags;
+ int32_t group;
+};
+
+struct xkb_controls_action {
+ enum xkb_action_type type;
+ enum xkb_action_flags flags;
+ enum xkb_action_controls ctrls;
+};
+
+struct xkb_pointer_default_action {
+ enum xkb_action_type type;
+ enum xkb_action_flags flags;
+ int8_t value;
+};
+
+struct xkb_switch_screen_action {
+ enum xkb_action_type type;
+ enum xkb_action_flags flags;
+ int8_t screen;
+};
+
+struct xkb_redirect_key_action {
+ enum xkb_action_type type;
+ enum xkb_action_flags flags;
+ xkb_keycode_t new_kc;
+ uint8_t mods_mask;
+ uint8_t mods;
+ uint16_t vmods_mask;
+ uint16_t vmods;
+};
+
+struct xkb_pointer_action {
+ enum xkb_action_type type;
+ enum xkb_action_flags flags;
+ int16_t x;
+ int16_t y;
+};
+
+struct xkb_pointer_button_action {
+ enum xkb_action_type type;
+ enum xkb_action_flags flags;
+ uint8_t count;
+ int8_t button;
+};
+
+struct xkb_private_action {
+ enum xkb_action_type type;
+ enum xkb_action_flags flags;
+ uint8_t data[7];
+};
+
+union xkb_action {
+ enum xkb_action_type type;
+ struct xkb_mod_action mods;
+ struct xkb_group_action group;
+ struct xkb_controls_action ctrls;
+ struct xkb_pointer_default_action dflt;
+ struct xkb_switch_screen_action screen;
+ struct xkb_redirect_key_action redirect; /* XXX wholly unnecessary? */
+ struct xkb_pointer_action ptr;
+ struct xkb_pointer_button_action btn;
+ struct xkb_private_action priv;
+};
+
+struct xkb_key_type_entry {
+ xkb_level_index_t level;
+ struct xkb_mods mods;
+ struct xkb_mods preserve;
+};
+
+struct xkb_key_type {
+ xkb_atom_t name;
+ struct xkb_mods mods;
+ xkb_level_index_t num_levels;
+ xkb_atom_t *level_names;
+ unsigned int num_entries;
+ struct xkb_key_type_entry *entries;
+};
+
+struct xkb_sym_interpret {
+ xkb_keysym_t sym;
+ enum xkb_match_operation match;
+ bool level_one_only;
+ xkb_mod_mask_t mods;
+ xkb_mod_index_t virtual_mod;
+ union xkb_action action;
+ bool repeat;
+};
+
+struct xkb_led {
+ xkb_atom_t name;
+ enum xkb_state_component which_groups;
+ xkb_layout_mask_t groups;
+ enum xkb_state_component which_mods;
+ struct xkb_mods mods;
+ enum xkb_action_controls ctrls;
+};
+
+struct xkb_key_alias {
+ xkb_atom_t real;
+ xkb_atom_t alias;
+};
+
+struct xkb_controls {
+ unsigned char groups_wrap;
+ struct xkb_mods internal;
+ struct xkb_mods ignore_lock;
+ unsigned short repeat_delay;
+ unsigned short repeat_interval;
+ unsigned short slow_keys_delay;
+ unsigned short debounce_delay;
+ unsigned short ax_options;
+ unsigned short ax_timeout;
+ unsigned short axt_opts_mask;
+ unsigned short axt_opts_values;
+ unsigned int axt_ctrls_mask;
+ unsigned int axt_ctrls_values;
+};
+
+/* Such an awkward name. Oh well. */
+enum xkb_range_exceed_type {
+ RANGE_SATURATE,
+ RANGE_WRAP,
+ RANGE_REDIRECT,
+};
+
+enum xkb_explicit_components {
+ EXPLICIT_INTERP = (1 << 0),
+ EXPLICIT_VMODMAP = (1 << 1),
+ EXPLICIT_REPEAT = (1 << 2),
+};
+
+struct xkb_level {
+ union xkb_action action;
+ unsigned int num_syms;
+ union {
+ xkb_keysym_t sym; /* num_syms == 1 */
+ xkb_keysym_t *syms; /* num_syms > 1 */
+ } u;
+};
+
+struct xkb_group {
+ bool explicit_type;
+ /* Points to a type in keymap->types. */
+ const struct xkb_key_type *type;
+ /* Use XkbKeyGroupWidth for the number of levels. */
+ struct xkb_level *levels;
+};
+
+struct xkb_key {
+ xkb_keycode_t keycode;
+ xkb_atom_t name;
+
+ enum xkb_explicit_components explicit;
+
+ xkb_mod_mask_t modmap;
+ xkb_mod_mask_t vmodmap;
+
+ bool repeats;
+
+ enum xkb_range_exceed_type out_of_range_group_action;
+ xkb_layout_index_t out_of_range_group_number;
+
+ xkb_layout_index_t num_groups;
+ struct xkb_group *groups;
+};
+
+struct xkb_mod {
+ xkb_atom_t name;
+ enum mod_type type;
+ xkb_mod_mask_t mapping; /* vmod -> real mod mapping */
+};
+
+/* Common keyboard description structure */
+struct xkb_keymap {
+ struct xkb_context *ctx;
+
+ int refcnt;
+ enum xkb_keymap_compile_flags flags;
+ enum xkb_keymap_format format;
+
+ enum xkb_action_controls enabled_ctrls;
+
+ xkb_keycode_t min_key_code;
+ xkb_keycode_t max_key_code;
+ struct xkb_key *keys;
+
+ /* aliases in no particular order */
+ unsigned int num_key_aliases;
+ struct xkb_key_alias *key_aliases;
+
+ struct xkb_key_type *types;
+ unsigned int num_types;
+
+ darray(struct xkb_sym_interpret) sym_interprets;
+
+ darray(struct xkb_mod) mods;
+
+ /* Number of groups in the key with the most groups. */
+ xkb_layout_index_t num_groups;
+ /* Not all groups must have names. */
+ xkb_layout_index_t num_group_names;
+ xkb_atom_t *group_names;
+
+ darray(struct xkb_led) leds;
+
+ char *keycodes_section_name;
+ char *symbols_section_name;
+ char *types_section_name;
+ char *compat_section_name;
+};
+
+#define xkb_foreach_key(iter, keymap) \
+ for (iter = keymap->keys + keymap->min_key_code; \
+ iter <= keymap->keys + keymap->max_key_code; \
+ iter++)
+
+static inline const struct xkb_key *
+XkbKey(struct xkb_keymap *keymap, xkb_keycode_t kc)
+{
+ if (kc < keymap->min_key_code || kc > keymap->max_key_code)
+ return NULL;
+ return &keymap->keys[kc];
+}
+
+static inline xkb_level_index_t
+XkbKeyGroupWidth(const struct xkb_key *key, xkb_layout_index_t layout)
+{
+ return key->groups[layout].type->num_levels;
+}
+
+struct xkb_key *
+XkbKeyByName(struct xkb_keymap *keymap, xkb_atom_t name, bool use_aliases);
+
+xkb_atom_t
+XkbResolveKeyAlias(struct xkb_keymap *keymap, xkb_atom_t name);
+
+xkb_layout_index_t
+wrap_group_into_range(int32_t group,
+ xkb_layout_index_t num_groups,
+ enum xkb_range_exceed_type out_of_range_group_action,
+ xkb_layout_index_t out_of_range_group_number);
+
+struct xkb_keymap_format_ops {
+ bool (*keymap_new_from_names)(struct xkb_keymap *keymap,
+ const struct xkb_rule_names *names);
+ bool (*keymap_new_from_string)(struct xkb_keymap *keymap,
+ const char *string);
+ bool (*keymap_new_from_buffer)(struct xkb_keymap *keymap,
+ const char *buffer, size_t length);
+ bool (*keymap_new_from_file)(struct xkb_keymap *keymap, FILE *file);
+ char *(*keymap_get_as_string)(struct xkb_keymap *keymap);
+};
+
+extern const struct xkb_keymap_format_ops text_v1_keymap_format_ops;
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/keysym-utf.c b/src/3rdparty/xkbcommon/src/keysym-utf.c
new file mode 100644
index 0000000000..5484a8311d
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/keysym-utf.c
@@ -0,0 +1,971 @@
+/* The table and comments below along with the function xkb_keysym_to_ucs4
+ * are under the public domain and are derived as described below.
+ */
+/* This module converts keysym values into the corresponding ISO 10646
+ * (UCS, Unicode) values.
+ *
+ * The array keysymtab[] contains pairs of X11 keysym values for graphical
+ * characters and the corresponding Unicode value. The function
+ * keysym2ucs() maps a keysym onto a Unicode value using a binary search,
+ * therefore keysymtab[] must remain SORTED by keysym value.
+ *
+ * The keysym -> UTF-8 conversion will hopefully one day be provided
+ * by Xlib via XmbLookupString() and should ideally not have to be
+ * done in X applications. But we are not there yet.
+ *
+ * We allow to represent any UCS character in the range U-00000000 to
+ * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff.
+ * This admittedly does not cover the entire 31-bit space of UCS, but
+ * it does cover all of the characters up to U-10FFFF, which can be
+ * represented by UTF-16, and more, and it is very unlikely that higher
+ * UCS codes will ever be assigned by ISO. So to get Unicode character
+ * U+ABCD you can directly use keysym 0x0100abcd.
+ *
+ * NOTE: The comments in the table below contain the actual character
+ * encoded in UTF-8, so for viewing and editing best use an editor in
+ * UTF-8 mode.
+ *
+ * Author: Markus G. Kuhn <http://www.cl.cam.ac.uk/~mgk25/>,
+ * University of Cambridge, April 2001
+ *
+ * Special thanks to Richard Verhoeven <river@win.tue.nl> for preparing
+ * an initial draft of the mapping table.
+ *
+ * This software is in the public domain. Share and enjoy!
+ *
+ */
+
+#include "xkbcommon/xkbcommon.h"
+#include "utils.h"
+
+/* We don't use the uint32_t types here, to save some space. */
+struct codepair {
+ uint16_t keysym;
+ uint16_t ucs;
+};
+
+static const struct codepair keysymtab[] = {
+ { 0x01a1, 0x0104 }, /* Aogonek Ą LATIN CAPITAL LETTER A WITH OGONEK */
+ { 0x01a2, 0x02d8 }, /* breve ˘ BREVE */
+ { 0x01a3, 0x0141 }, /* Lstroke Ł LATIN CAPITAL LETTER L WITH STROKE */
+ { 0x01a5, 0x013d }, /* Lcaron Ľ LATIN CAPITAL LETTER L WITH CARON */
+ { 0x01a6, 0x015a }, /* Sacute Ś LATIN CAPITAL LETTER S WITH ACUTE */
+ { 0x01a9, 0x0160 }, /* Scaron Š LATIN CAPITAL LETTER S WITH CARON */
+ { 0x01aa, 0x015e }, /* Scedilla Ş LATIN CAPITAL LETTER S WITH CEDILLA */
+ { 0x01ab, 0x0164 }, /* Tcaron Ť LATIN CAPITAL LETTER T WITH CARON */
+ { 0x01ac, 0x0179 }, /* Zacute Ź LATIN CAPITAL LETTER Z WITH ACUTE */
+ { 0x01ae, 0x017d }, /* Zcaron Ž LATIN CAPITAL LETTER Z WITH CARON */
+ { 0x01af, 0x017b }, /* Zabovedot Ż LATIN CAPITAL LETTER Z WITH DOT ABOVE */
+ { 0x01b1, 0x0105 }, /* aogonek ą LATIN SMALL LETTER A WITH OGONEK */
+ { 0x01b2, 0x02db }, /* ogonek ˛ OGONEK */
+ { 0x01b3, 0x0142 }, /* lstroke ł LATIN SMALL LETTER L WITH STROKE */
+ { 0x01b5, 0x013e }, /* lcaron ľ LATIN SMALL LETTER L WITH CARON */
+ { 0x01b6, 0x015b }, /* sacute ś LATIN SMALL LETTER S WITH ACUTE */
+ { 0x01b7, 0x02c7 }, /* caron ˇ CARON */
+ { 0x01b9, 0x0161 }, /* scaron š LATIN SMALL LETTER S WITH CARON */
+ { 0x01ba, 0x015f }, /* scedilla ş LATIN SMALL LETTER S WITH CEDILLA */
+ { 0x01bb, 0x0165 }, /* tcaron ť LATIN SMALL LETTER T WITH CARON */
+ { 0x01bc, 0x017a }, /* zacute ź LATIN SMALL LETTER Z WITH ACUTE */
+ { 0x01bd, 0x02dd }, /* doubleacute ˝ DOUBLE ACUTE ACCENT */
+ { 0x01be, 0x017e }, /* zcaron ž LATIN SMALL LETTER Z WITH CARON */
+ { 0x01bf, 0x017c }, /* zabovedot ż LATIN SMALL LETTER Z WITH DOT ABOVE */
+ { 0x01c0, 0x0154 }, /* Racute Ŕ LATIN CAPITAL LETTER R WITH ACUTE */
+ { 0x01c3, 0x0102 }, /* Abreve Ă LATIN CAPITAL LETTER A WITH BREVE */
+ { 0x01c5, 0x0139 }, /* Lacute Ĺ LATIN CAPITAL LETTER L WITH ACUTE */
+ { 0x01c6, 0x0106 }, /* Cacute Ć LATIN CAPITAL LETTER C WITH ACUTE */
+ { 0x01c8, 0x010c }, /* Ccaron Č LATIN CAPITAL LETTER C WITH CARON */
+ { 0x01ca, 0x0118 }, /* Eogonek Ę LATIN CAPITAL LETTER E WITH OGONEK */
+ { 0x01cc, 0x011a }, /* Ecaron Ě LATIN CAPITAL LETTER E WITH CARON */
+ { 0x01cf, 0x010e }, /* Dcaron Ď LATIN CAPITAL LETTER D WITH CARON */
+ { 0x01d0, 0x0110 }, /* Dstroke Đ LATIN CAPITAL LETTER D WITH STROKE */
+ { 0x01d1, 0x0143 }, /* Nacute Ń LATIN CAPITAL LETTER N WITH ACUTE */
+ { 0x01d2, 0x0147 }, /* Ncaron Ň LATIN CAPITAL LETTER N WITH CARON */
+ { 0x01d5, 0x0150 }, /* Odoubleacute Ő LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */
+ { 0x01d8, 0x0158 }, /* Rcaron Ř LATIN CAPITAL LETTER R WITH CARON */
+ { 0x01d9, 0x016e }, /* Uring Ů LATIN CAPITAL LETTER U WITH RING ABOVE */
+ { 0x01db, 0x0170 }, /* Udoubleacute Ű LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */
+ { 0x01de, 0x0162 }, /* Tcedilla Ţ LATIN CAPITAL LETTER T WITH CEDILLA */
+ { 0x01e0, 0x0155 }, /* racute ŕ LATIN SMALL LETTER R WITH ACUTE */
+ { 0x01e3, 0x0103 }, /* abreve ă LATIN SMALL LETTER A WITH BREVE */
+ { 0x01e5, 0x013a }, /* lacute ĺ LATIN SMALL LETTER L WITH ACUTE */
+ { 0x01e6, 0x0107 }, /* cacute ć LATIN SMALL LETTER C WITH ACUTE */
+ { 0x01e8, 0x010d }, /* ccaron č LATIN SMALL LETTER C WITH CARON */
+ { 0x01ea, 0x0119 }, /* eogonek ę LATIN SMALL LETTER E WITH OGONEK */
+ { 0x01ec, 0x011b }, /* ecaron ě LATIN SMALL LETTER E WITH CARON */
+ { 0x01ef, 0x010f }, /* dcaron ď LATIN SMALL LETTER D WITH CARON */
+ { 0x01f0, 0x0111 }, /* dstroke đ LATIN SMALL LETTER D WITH STROKE */
+ { 0x01f1, 0x0144 }, /* nacute ń LATIN SMALL LETTER N WITH ACUTE */
+ { 0x01f2, 0x0148 }, /* ncaron ň LATIN SMALL LETTER N WITH CARON */
+ { 0x01f5, 0x0151 }, /* odoubleacute ő LATIN SMALL LETTER O WITH DOUBLE ACUTE */
+ { 0x01f8, 0x0159 }, /* rcaron ř LATIN SMALL LETTER R WITH CARON */
+ { 0x01f9, 0x016f }, /* uring ů LATIN SMALL LETTER U WITH RING ABOVE */
+ { 0x01fb, 0x0171 }, /* udoubleacute ű LATIN SMALL LETTER U WITH DOUBLE ACUTE */
+ { 0x01fe, 0x0163 }, /* tcedilla ţ LATIN SMALL LETTER T WITH CEDILLA */
+ { 0x01ff, 0x02d9 }, /* abovedot ˙ DOT ABOVE */
+ { 0x02a1, 0x0126 }, /* Hstroke Ħ LATIN CAPITAL LETTER H WITH STROKE */
+ { 0x02a6, 0x0124 }, /* Hcircumflex Ĥ LATIN CAPITAL LETTER H WITH CIRCUMFLEX */
+ { 0x02a9, 0x0130 }, /* Iabovedot İ LATIN CAPITAL LETTER I WITH DOT ABOVE */
+ { 0x02ab, 0x011e }, /* Gbreve Ğ LATIN CAPITAL LETTER G WITH BREVE */
+ { 0x02ac, 0x0134 }, /* Jcircumflex Ĵ LATIN CAPITAL LETTER J WITH CIRCUMFLEX */
+ { 0x02b1, 0x0127 }, /* hstroke ħ LATIN SMALL LETTER H WITH STROKE */
+ { 0x02b6, 0x0125 }, /* hcircumflex ĥ LATIN SMALL LETTER H WITH CIRCUMFLEX */
+ { 0x02b9, 0x0131 }, /* idotless ı LATIN SMALL LETTER DOTLESS I */
+ { 0x02bb, 0x011f }, /* gbreve ğ LATIN SMALL LETTER G WITH BREVE */
+ { 0x02bc, 0x0135 }, /* jcircumflex ĵ LATIN SMALL LETTER J WITH CIRCUMFLEX */
+ { 0x02c5, 0x010a }, /* Cabovedot Ċ LATIN CAPITAL LETTER C WITH DOT ABOVE */
+ { 0x02c6, 0x0108 }, /* Ccircumflex Ĉ LATIN CAPITAL LETTER C WITH CIRCUMFLEX */
+ { 0x02d5, 0x0120 }, /* Gabovedot Ġ LATIN CAPITAL LETTER G WITH DOT ABOVE */
+ { 0x02d8, 0x011c }, /* Gcircumflex Ĝ LATIN CAPITAL LETTER G WITH CIRCUMFLEX */
+ { 0x02dd, 0x016c }, /* Ubreve Ŭ LATIN CAPITAL LETTER U WITH BREVE */
+ { 0x02de, 0x015c }, /* Scircumflex Ŝ LATIN CAPITAL LETTER S WITH CIRCUMFLEX */
+ { 0x02e5, 0x010b }, /* cabovedot ċ LATIN SMALL LETTER C WITH DOT ABOVE */
+ { 0x02e6, 0x0109 }, /* ccircumflex ĉ LATIN SMALL LETTER C WITH CIRCUMFLEX */
+ { 0x02f5, 0x0121 }, /* gabovedot ġ LATIN SMALL LETTER G WITH DOT ABOVE */
+ { 0x02f8, 0x011d }, /* gcircumflex ĝ LATIN SMALL LETTER G WITH CIRCUMFLEX */
+ { 0x02fd, 0x016d }, /* ubreve ŭ LATIN SMALL LETTER U WITH BREVE */
+ { 0x02fe, 0x015d }, /* scircumflex ŝ LATIN SMALL LETTER S WITH CIRCUMFLEX */
+ { 0x03a2, 0x0138 }, /* kra ĸ LATIN SMALL LETTER KRA */
+ { 0x03a3, 0x0156 }, /* Rcedilla Ŗ LATIN CAPITAL LETTER R WITH CEDILLA */
+ { 0x03a5, 0x0128 }, /* Itilde Ĩ LATIN CAPITAL LETTER I WITH TILDE */
+ { 0x03a6, 0x013b }, /* Lcedilla Ļ LATIN CAPITAL LETTER L WITH CEDILLA */
+ { 0x03aa, 0x0112 }, /* Emacron Ē LATIN CAPITAL LETTER E WITH MACRON */
+ { 0x03ab, 0x0122 }, /* Gcedilla Ģ LATIN CAPITAL LETTER G WITH CEDILLA */
+ { 0x03ac, 0x0166 }, /* Tslash Ŧ LATIN CAPITAL LETTER T WITH STROKE */
+ { 0x03b3, 0x0157 }, /* rcedilla ŗ LATIN SMALL LETTER R WITH CEDILLA */
+ { 0x03b5, 0x0129 }, /* itilde ĩ LATIN SMALL LETTER I WITH TILDE */
+ { 0x03b6, 0x013c }, /* lcedilla ļ LATIN SMALL LETTER L WITH CEDILLA */
+ { 0x03ba, 0x0113 }, /* emacron ē LATIN SMALL LETTER E WITH MACRON */
+ { 0x03bb, 0x0123 }, /* gcedilla ģ LATIN SMALL LETTER G WITH CEDILLA */
+ { 0x03bc, 0x0167 }, /* tslash ŧ LATIN SMALL LETTER T WITH STROKE */
+ { 0x03bd, 0x014a }, /* ENG Ŋ LATIN CAPITAL LETTER ENG */
+ { 0x03bf, 0x014b }, /* eng ŋ LATIN SMALL LETTER ENG */
+ { 0x03c0, 0x0100 }, /* Amacron Ā LATIN CAPITAL LETTER A WITH MACRON */
+ { 0x03c7, 0x012e }, /* Iogonek Į LATIN CAPITAL LETTER I WITH OGONEK */
+ { 0x03cc, 0x0116 }, /* Eabovedot Ė LATIN CAPITAL LETTER E WITH DOT ABOVE */
+ { 0x03cf, 0x012a }, /* Imacron Ī LATIN CAPITAL LETTER I WITH MACRON */
+ { 0x03d1, 0x0145 }, /* Ncedilla Ņ LATIN CAPITAL LETTER N WITH CEDILLA */
+ { 0x03d2, 0x014c }, /* Omacron Ō LATIN CAPITAL LETTER O WITH MACRON */
+ { 0x03d3, 0x0136 }, /* Kcedilla Ķ LATIN CAPITAL LETTER K WITH CEDILLA */
+ { 0x03d9, 0x0172 }, /* Uogonek Ų LATIN CAPITAL LETTER U WITH OGONEK */
+ { 0x03dd, 0x0168 }, /* Utilde Ũ LATIN CAPITAL LETTER U WITH TILDE */
+ { 0x03de, 0x016a }, /* Umacron Ū LATIN CAPITAL LETTER U WITH MACRON */
+ { 0x03e0, 0x0101 }, /* amacron ā LATIN SMALL LETTER A WITH MACRON */
+ { 0x03e7, 0x012f }, /* iogonek į LATIN SMALL LETTER I WITH OGONEK */
+ { 0x03ec, 0x0117 }, /* eabovedot ė LATIN SMALL LETTER E WITH DOT ABOVE */
+ { 0x03ef, 0x012b }, /* imacron ī LATIN SMALL LETTER I WITH MACRON */
+ { 0x03f1, 0x0146 }, /* ncedilla ņ LATIN SMALL LETTER N WITH CEDILLA */
+ { 0x03f2, 0x014d }, /* omacron ō LATIN SMALL LETTER O WITH MACRON */
+ { 0x03f3, 0x0137 }, /* kcedilla ķ LATIN SMALL LETTER K WITH CEDILLA */
+ { 0x03f9, 0x0173 }, /* uogonek ų LATIN SMALL LETTER U WITH OGONEK */
+ { 0x03fd, 0x0169 }, /* utilde ũ LATIN SMALL LETTER U WITH TILDE */
+ { 0x03fe, 0x016b }, /* umacron ū LATIN SMALL LETTER U WITH MACRON */
+ { 0x047e, 0x203e }, /* overline ‾ OVERLINE */
+ { 0x04a1, 0x3002 }, /* kana_fullstop 。 IDEOGRAPHIC FULL STOP */
+ { 0x04a2, 0x300c }, /* kana_openingbracket 「 LEFT CORNER BRACKET */
+ { 0x04a3, 0x300d }, /* kana_closingbracket 」 RIGHT CORNER BRACKET */
+ { 0x04a4, 0x3001 }, /* kana_comma 、 IDEOGRAPHIC COMMA */
+ { 0x04a5, 0x30fb }, /* kana_conjunctive ・ KATAKANA MIDDLE DOT */
+ { 0x04a6, 0x30f2 }, /* kana_WO ヲ KATAKANA LETTER WO */
+ { 0x04a7, 0x30a1 }, /* kana_a ァ KATAKANA LETTER SMALL A */
+ { 0x04a8, 0x30a3 }, /* kana_i ィ KATAKANA LETTER SMALL I */
+ { 0x04a9, 0x30a5 }, /* kana_u ゥ KATAKANA LETTER SMALL U */
+ { 0x04aa, 0x30a7 }, /* kana_e ェ KATAKANA LETTER SMALL E */
+ { 0x04ab, 0x30a9 }, /* kana_o ォ KATAKANA LETTER SMALL O */
+ { 0x04ac, 0x30e3 }, /* kana_ya ャ KATAKANA LETTER SMALL YA */
+ { 0x04ad, 0x30e5 }, /* kana_yu ュ KATAKANA LETTER SMALL YU */
+ { 0x04ae, 0x30e7 }, /* kana_yo ョ KATAKANA LETTER SMALL YO */
+ { 0x04af, 0x30c3 }, /* kana_tsu ッ KATAKANA LETTER SMALL TU */
+ { 0x04b0, 0x30fc }, /* prolongedsound ー KATAKANA-HIRAGANA PROLONGED SOUND MARK */
+ { 0x04b1, 0x30a2 }, /* kana_A ア KATAKANA LETTER A */
+ { 0x04b2, 0x30a4 }, /* kana_I イ KATAKANA LETTER I */
+ { 0x04b3, 0x30a6 }, /* kana_U ウ KATAKANA LETTER U */
+ { 0x04b4, 0x30a8 }, /* kana_E エ KATAKANA LETTER E */
+ { 0x04b5, 0x30aa }, /* kana_O オ KATAKANA LETTER O */
+ { 0x04b6, 0x30ab }, /* kana_KA カ KATAKANA LETTER KA */
+ { 0x04b7, 0x30ad }, /* kana_KI キ KATAKANA LETTER KI */
+ { 0x04b8, 0x30af }, /* kana_KU ク KATAKANA LETTER KU */
+ { 0x04b9, 0x30b1 }, /* kana_KE ケ KATAKANA LETTER KE */
+ { 0x04ba, 0x30b3 }, /* kana_KO コ KATAKANA LETTER KO */
+ { 0x04bb, 0x30b5 }, /* kana_SA サ KATAKANA LETTER SA */
+ { 0x04bc, 0x30b7 }, /* kana_SHI シ KATAKANA LETTER SI */
+ { 0x04bd, 0x30b9 }, /* kana_SU ス KATAKANA LETTER SU */
+ { 0x04be, 0x30bb }, /* kana_SE セ KATAKANA LETTER SE */
+ { 0x04bf, 0x30bd }, /* kana_SO ソ KATAKANA LETTER SO */
+ { 0x04c0, 0x30bf }, /* kana_TA タ KATAKANA LETTER TA */
+ { 0x04c1, 0x30c1 }, /* kana_CHI チ KATAKANA LETTER TI */
+ { 0x04c2, 0x30c4 }, /* kana_TSU ツ KATAKANA LETTER TU */
+ { 0x04c3, 0x30c6 }, /* kana_TE テ KATAKANA LETTER TE */
+ { 0x04c4, 0x30c8 }, /* kana_TO ト KATAKANA LETTER TO */
+ { 0x04c5, 0x30ca }, /* kana_NA ナ KATAKANA LETTER NA */
+ { 0x04c6, 0x30cb }, /* kana_NI ニ KATAKANA LETTER NI */
+ { 0x04c7, 0x30cc }, /* kana_NU ヌ KATAKANA LETTER NU */
+ { 0x04c8, 0x30cd }, /* kana_NE ネ KATAKANA LETTER NE */
+ { 0x04c9, 0x30ce }, /* kana_NO ノ KATAKANA LETTER NO */
+ { 0x04ca, 0x30cf }, /* kana_HA ハ KATAKANA LETTER HA */
+ { 0x04cb, 0x30d2 }, /* kana_HI ヒ KATAKANA LETTER HI */
+ { 0x04cc, 0x30d5 }, /* kana_FU フ KATAKANA LETTER HU */
+ { 0x04cd, 0x30d8 }, /* kana_HE ヘ KATAKANA LETTER HE */
+ { 0x04ce, 0x30db }, /* kana_HO ホ KATAKANA LETTER HO */
+ { 0x04cf, 0x30de }, /* kana_MA マ KATAKANA LETTER MA */
+ { 0x04d0, 0x30df }, /* kana_MI ミ KATAKANA LETTER MI */
+ { 0x04d1, 0x30e0 }, /* kana_MU ム KATAKANA LETTER MU */
+ { 0x04d2, 0x30e1 }, /* kana_ME メ KATAKANA LETTER ME */
+ { 0x04d3, 0x30e2 }, /* kana_MO モ KATAKANA LETTER MO */
+ { 0x04d4, 0x30e4 }, /* kana_YA ヤ KATAKANA LETTER YA */
+ { 0x04d5, 0x30e6 }, /* kana_YU ユ KATAKANA LETTER YU */
+ { 0x04d6, 0x30e8 }, /* kana_YO ヨ KATAKANA LETTER YO */
+ { 0x04d7, 0x30e9 }, /* kana_RA ラ KATAKANA LETTER RA */
+ { 0x04d8, 0x30ea }, /* kana_RI リ KATAKANA LETTER RI */
+ { 0x04d9, 0x30eb }, /* kana_RU ル KATAKANA LETTER RU */
+ { 0x04da, 0x30ec }, /* kana_RE レ KATAKANA LETTER RE */
+ { 0x04db, 0x30ed }, /* kana_RO ロ KATAKANA LETTER RO */
+ { 0x04dc, 0x30ef }, /* kana_WA ワ KATAKANA LETTER WA */
+ { 0x04dd, 0x30f3 }, /* kana_N ン KATAKANA LETTER N */
+ { 0x04de, 0x309b }, /* voicedsound ゛ KATAKANA-HIRAGANA VOICED SOUND MARK */
+ { 0x04df, 0x309c }, /* semivoicedsound ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */
+ { 0x05ac, 0x060c }, /* Arabic_comma ، ARABIC COMMA */
+ { 0x05bb, 0x061b }, /* Arabic_semicolon ؛ ARABIC SEMICOLON */
+ { 0x05bf, 0x061f }, /* Arabic_question_mark ؟ ARABIC QUESTION MARK */
+ { 0x05c1, 0x0621 }, /* Arabic_hamza ء ARABIC LETTER HAMZA */
+ { 0x05c2, 0x0622 }, /* Arabic_maddaonalef آ ARABIC LETTER ALEF WITH MADDA ABOVE */
+ { 0x05c3, 0x0623 }, /* Arabic_hamzaonalef أ ARABIC LETTER ALEF WITH HAMZA ABOVE */
+ { 0x05c4, 0x0624 }, /* Arabic_hamzaonwaw ؤ ARABIC LETTER WAW WITH HAMZA ABOVE */
+ { 0x05c5, 0x0625 }, /* Arabic_hamzaunderalef إ ARABIC LETTER ALEF WITH HAMZA BELOW */
+ { 0x05c6, 0x0626 }, /* Arabic_hamzaonyeh ئ ARABIC LETTER YEH WITH HAMZA ABOVE */
+ { 0x05c7, 0x0627 }, /* Arabic_alef ا ARABIC LETTER ALEF */
+ { 0x05c8, 0x0628 }, /* Arabic_beh ب ARABIC LETTER BEH */
+ { 0x05c9, 0x0629 }, /* Arabic_tehmarbuta ة ARABIC LETTER TEH MARBUTA */
+ { 0x05ca, 0x062a }, /* Arabic_teh ت ARABIC LETTER TEH */
+ { 0x05cb, 0x062b }, /* Arabic_theh ث ARABIC LETTER THEH */
+ { 0x05cc, 0x062c }, /* Arabic_jeem ج ARABIC LETTER JEEM */
+ { 0x05cd, 0x062d }, /* Arabic_hah ح ARABIC LETTER HAH */
+ { 0x05ce, 0x062e }, /* Arabic_khah خ ARABIC LETTER KHAH */
+ { 0x05cf, 0x062f }, /* Arabic_dal د ARABIC LETTER DAL */
+ { 0x05d0, 0x0630 }, /* Arabic_thal ذ ARABIC LETTER THAL */
+ { 0x05d1, 0x0631 }, /* Arabic_ra ر ARABIC LETTER REH */
+ { 0x05d2, 0x0632 }, /* Arabic_zain ز ARABIC LETTER ZAIN */
+ { 0x05d3, 0x0633 }, /* Arabic_seen س ARABIC LETTER SEEN */
+ { 0x05d4, 0x0634 }, /* Arabic_sheen ش ARABIC LETTER SHEEN */
+ { 0x05d5, 0x0635 }, /* Arabic_sad ص ARABIC LETTER SAD */
+ { 0x05d6, 0x0636 }, /* Arabic_dad ض ARABIC LETTER DAD */
+ { 0x05d7, 0x0637 }, /* Arabic_tah ط ARABIC LETTER TAH */
+ { 0x05d8, 0x0638 }, /* Arabic_zah ظ ARABIC LETTER ZAH */
+ { 0x05d9, 0x0639 }, /* Arabic_ain ع ARABIC LETTER AIN */
+ { 0x05da, 0x063a }, /* Arabic_ghain غ ARABIC LETTER GHAIN */
+ { 0x05e0, 0x0640 }, /* Arabic_tatweel ـ ARABIC TATWEEL */
+ { 0x05e1, 0x0641 }, /* Arabic_feh ف ARABIC LETTER FEH */
+ { 0x05e2, 0x0642 }, /* Arabic_qaf ق ARABIC LETTER QAF */
+ { 0x05e3, 0x0643 }, /* Arabic_kaf ك ARABIC LETTER KAF */
+ { 0x05e4, 0x0644 }, /* Arabic_lam ل ARABIC LETTER LAM */
+ { 0x05e5, 0x0645 }, /* Arabic_meem م ARABIC LETTER MEEM */
+ { 0x05e6, 0x0646 }, /* Arabic_noon ن ARABIC LETTER NOON */
+ { 0x05e7, 0x0647 }, /* Arabic_ha ه ARABIC LETTER HEH */
+ { 0x05e8, 0x0648 }, /* Arabic_waw و ARABIC LETTER WAW */
+ { 0x05e9, 0x0649 }, /* Arabic_alefmaksura ى ARABIC LETTER ALEF MAKSURA */
+ { 0x05ea, 0x064a }, /* Arabic_yeh ي ARABIC LETTER YEH */
+ { 0x05eb, 0x064b }, /* Arabic_fathatan ً ARABIC FATHATAN */
+ { 0x05ec, 0x064c }, /* Arabic_dammatan ٌ ARABIC DAMMATAN */
+ { 0x05ed, 0x064d }, /* Arabic_kasratan ٍ ARABIC KASRATAN */
+ { 0x05ee, 0x064e }, /* Arabic_fatha َ ARABIC FATHA */
+ { 0x05ef, 0x064f }, /* Arabic_damma ُ ARABIC DAMMA */
+ { 0x05f0, 0x0650 }, /* Arabic_kasra ِ ARABIC KASRA */
+ { 0x05f1, 0x0651 }, /* Arabic_shadda ّ ARABIC SHADDA */
+ { 0x05f2, 0x0652 }, /* Arabic_sukun ْ ARABIC SUKUN */
+ { 0x06a1, 0x0452 }, /* Serbian_dje ђ CYRILLIC SMALL LETTER DJE */
+ { 0x06a2, 0x0453 }, /* Macedonia_gje ѓ CYRILLIC SMALL LETTER GJE */
+ { 0x06a3, 0x0451 }, /* Cyrillic_io ё CYRILLIC SMALL LETTER IO */
+ { 0x06a4, 0x0454 }, /* Ukrainian_ie є CYRILLIC SMALL LETTER UKRAINIAN IE */
+ { 0x06a5, 0x0455 }, /* Macedonia_dse ѕ CYRILLIC SMALL LETTER DZE */
+ { 0x06a6, 0x0456 }, /* Ukrainian_i і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */
+ { 0x06a7, 0x0457 }, /* Ukrainian_yi ї CYRILLIC SMALL LETTER YI */
+ { 0x06a8, 0x0458 }, /* Cyrillic_je ј CYRILLIC SMALL LETTER JE */
+ { 0x06a9, 0x0459 }, /* Cyrillic_lje љ CYRILLIC SMALL LETTER LJE */
+ { 0x06aa, 0x045a }, /* Cyrillic_nje њ CYRILLIC SMALL LETTER NJE */
+ { 0x06ab, 0x045b }, /* Serbian_tshe ћ CYRILLIC SMALL LETTER TSHE */
+ { 0x06ac, 0x045c }, /* Macedonia_kje ќ CYRILLIC SMALL LETTER KJE */
+ { 0x06ad, 0x0491 }, /* Ukrainian_ghe_with_upturn ґ CYRILLIC SMALL LETTER GHE WITH UPTURN */
+ { 0x06ae, 0x045e }, /* Byelorussian_shortu ў CYRILLIC SMALL LETTER SHORT U */
+ { 0x06af, 0x045f }, /* Cyrillic_dzhe џ CYRILLIC SMALL LETTER DZHE */
+ { 0x06b0, 0x2116 }, /* numerosign № NUMERO SIGN */
+ { 0x06b1, 0x0402 }, /* Serbian_DJE Ђ CYRILLIC CAPITAL LETTER DJE */
+ { 0x06b2, 0x0403 }, /* Macedonia_GJE Ѓ CYRILLIC CAPITAL LETTER GJE */
+ { 0x06b3, 0x0401 }, /* Cyrillic_IO Ё CYRILLIC CAPITAL LETTER IO */
+ { 0x06b4, 0x0404 }, /* Ukrainian_IE Є CYRILLIC CAPITAL LETTER UKRAINIAN IE */
+ { 0x06b5, 0x0405 }, /* Macedonia_DSE Ѕ CYRILLIC CAPITAL LETTER DZE */
+ { 0x06b6, 0x0406 }, /* Ukrainian_I І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */
+ { 0x06b7, 0x0407 }, /* Ukrainian_YI Ї CYRILLIC CAPITAL LETTER YI */
+ { 0x06b8, 0x0408 }, /* Cyrillic_JE Ј CYRILLIC CAPITAL LETTER JE */
+ { 0x06b9, 0x0409 }, /* Cyrillic_LJE Љ CYRILLIC CAPITAL LETTER LJE */
+ { 0x06ba, 0x040a }, /* Cyrillic_NJE Њ CYRILLIC CAPITAL LETTER NJE */
+ { 0x06bb, 0x040b }, /* Serbian_TSHE Ћ CYRILLIC CAPITAL LETTER TSHE */
+ { 0x06bc, 0x040c }, /* Macedonia_KJE Ќ CYRILLIC CAPITAL LETTER KJE */
+ { 0x06bd, 0x0490 }, /* Ukrainian_GHE_WITH_UPTURN Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN */
+ { 0x06be, 0x040e }, /* Byelorussian_SHORTU Ў CYRILLIC CAPITAL LETTER SHORT U */
+ { 0x06bf, 0x040f }, /* Cyrillic_DZHE Џ CYRILLIC CAPITAL LETTER DZHE */
+ { 0x06c0, 0x044e }, /* Cyrillic_yu ю CYRILLIC SMALL LETTER YU */
+ { 0x06c1, 0x0430 }, /* Cyrillic_a а CYRILLIC SMALL LETTER A */
+ { 0x06c2, 0x0431 }, /* Cyrillic_be б CYRILLIC SMALL LETTER BE */
+ { 0x06c3, 0x0446 }, /* Cyrillic_tse ц CYRILLIC SMALL LETTER TSE */
+ { 0x06c4, 0x0434 }, /* Cyrillic_de д CYRILLIC SMALL LETTER DE */
+ { 0x06c5, 0x0435 }, /* Cyrillic_ie е CYRILLIC SMALL LETTER IE */
+ { 0x06c6, 0x0444 }, /* Cyrillic_ef ф CYRILLIC SMALL LETTER EF */
+ { 0x06c7, 0x0433 }, /* Cyrillic_ghe г CYRILLIC SMALL LETTER GHE */
+ { 0x06c8, 0x0445 }, /* Cyrillic_ha х CYRILLIC SMALL LETTER HA */
+ { 0x06c9, 0x0438 }, /* Cyrillic_i и CYRILLIC SMALL LETTER I */
+ { 0x06ca, 0x0439 }, /* Cyrillic_shorti й CYRILLIC SMALL LETTER SHORT I */
+ { 0x06cb, 0x043a }, /* Cyrillic_ka к CYRILLIC SMALL LETTER KA */
+ { 0x06cc, 0x043b }, /* Cyrillic_el л CYRILLIC SMALL LETTER EL */
+ { 0x06cd, 0x043c }, /* Cyrillic_em м CYRILLIC SMALL LETTER EM */
+ { 0x06ce, 0x043d }, /* Cyrillic_en н CYRILLIC SMALL LETTER EN */
+ { 0x06cf, 0x043e }, /* Cyrillic_o о CYRILLIC SMALL LETTER O */
+ { 0x06d0, 0x043f }, /* Cyrillic_pe п CYRILLIC SMALL LETTER PE */
+ { 0x06d1, 0x044f }, /* Cyrillic_ya я CYRILLIC SMALL LETTER YA */
+ { 0x06d2, 0x0440 }, /* Cyrillic_er р CYRILLIC SMALL LETTER ER */
+ { 0x06d3, 0x0441 }, /* Cyrillic_es с CYRILLIC SMALL LETTER ES */
+ { 0x06d4, 0x0442 }, /* Cyrillic_te т CYRILLIC SMALL LETTER TE */
+ { 0x06d5, 0x0443 }, /* Cyrillic_u у CYRILLIC SMALL LETTER U */
+ { 0x06d6, 0x0436 }, /* Cyrillic_zhe ж CYRILLIC SMALL LETTER ZHE */
+ { 0x06d7, 0x0432 }, /* Cyrillic_ve в CYRILLIC SMALL LETTER VE */
+ { 0x06d8, 0x044c }, /* Cyrillic_softsign ь CYRILLIC SMALL LETTER SOFT SIGN */
+ { 0x06d9, 0x044b }, /* Cyrillic_yeru ы CYRILLIC SMALL LETTER YERU */
+ { 0x06da, 0x0437 }, /* Cyrillic_ze з CYRILLIC SMALL LETTER ZE */
+ { 0x06db, 0x0448 }, /* Cyrillic_sha ш CYRILLIC SMALL LETTER SHA */
+ { 0x06dc, 0x044d }, /* Cyrillic_e э CYRILLIC SMALL LETTER E */
+ { 0x06dd, 0x0449 }, /* Cyrillic_shcha щ CYRILLIC SMALL LETTER SHCHA */
+ { 0x06de, 0x0447 }, /* Cyrillic_che ч CYRILLIC SMALL LETTER CHE */
+ { 0x06df, 0x044a }, /* Cyrillic_hardsign ъ CYRILLIC SMALL LETTER HARD SIGN */
+ { 0x06e0, 0x042e }, /* Cyrillic_YU Ю CYRILLIC CAPITAL LETTER YU */
+ { 0x06e1, 0x0410 }, /* Cyrillic_A А CYRILLIC CAPITAL LETTER A */
+ { 0x06e2, 0x0411 }, /* Cyrillic_BE Б CYRILLIC CAPITAL LETTER BE */
+ { 0x06e3, 0x0426 }, /* Cyrillic_TSE Ц CYRILLIC CAPITAL LETTER TSE */
+ { 0x06e4, 0x0414 }, /* Cyrillic_DE Д CYRILLIC CAPITAL LETTER DE */
+ { 0x06e5, 0x0415 }, /* Cyrillic_IE Е CYRILLIC CAPITAL LETTER IE */
+ { 0x06e6, 0x0424 }, /* Cyrillic_EF Ф CYRILLIC CAPITAL LETTER EF */
+ { 0x06e7, 0x0413 }, /* Cyrillic_GHE Г CYRILLIC CAPITAL LETTER GHE */
+ { 0x06e8, 0x0425 }, /* Cyrillic_HA Х CYRILLIC CAPITAL LETTER HA */
+ { 0x06e9, 0x0418 }, /* Cyrillic_I И CYRILLIC CAPITAL LETTER I */
+ { 0x06ea, 0x0419 }, /* Cyrillic_SHORTI Й CYRILLIC CAPITAL LETTER SHORT I */
+ { 0x06eb, 0x041a }, /* Cyrillic_KA К CYRILLIC CAPITAL LETTER KA */
+ { 0x06ec, 0x041b }, /* Cyrillic_EL Л CYRILLIC CAPITAL LETTER EL */
+ { 0x06ed, 0x041c }, /* Cyrillic_EM М CYRILLIC CAPITAL LETTER EM */
+ { 0x06ee, 0x041d }, /* Cyrillic_EN Н CYRILLIC CAPITAL LETTER EN */
+ { 0x06ef, 0x041e }, /* Cyrillic_O О CYRILLIC CAPITAL LETTER O */
+ { 0x06f0, 0x041f }, /* Cyrillic_PE П CYRILLIC CAPITAL LETTER PE */
+ { 0x06f1, 0x042f }, /* Cyrillic_YA Я CYRILLIC CAPITAL LETTER YA */
+ { 0x06f2, 0x0420 }, /* Cyrillic_ER Р CYRILLIC CAPITAL LETTER ER */
+ { 0x06f3, 0x0421 }, /* Cyrillic_ES С CYRILLIC CAPITAL LETTER ES */
+ { 0x06f4, 0x0422 }, /* Cyrillic_TE Т CYRILLIC CAPITAL LETTER TE */
+ { 0x06f5, 0x0423 }, /* Cyrillic_U У CYRILLIC CAPITAL LETTER U */
+ { 0x06f6, 0x0416 }, /* Cyrillic_ZHE Ж CYRILLIC CAPITAL LETTER ZHE */
+ { 0x06f7, 0x0412 }, /* Cyrillic_VE В CYRILLIC CAPITAL LETTER VE */
+ { 0x06f8, 0x042c }, /* Cyrillic_SOFTSIGN Ь CYRILLIC CAPITAL LETTER SOFT SIGN */
+ { 0x06f9, 0x042b }, /* Cyrillic_YERU Ы CYRILLIC CAPITAL LETTER YERU */
+ { 0x06fa, 0x0417 }, /* Cyrillic_ZE З CYRILLIC CAPITAL LETTER ZE */
+ { 0x06fb, 0x0428 }, /* Cyrillic_SHA Ш CYRILLIC CAPITAL LETTER SHA */
+ { 0x06fc, 0x042d }, /* Cyrillic_E Э CYRILLIC CAPITAL LETTER E */
+ { 0x06fd, 0x0429 }, /* Cyrillic_SHCHA Щ CYRILLIC CAPITAL LETTER SHCHA */
+ { 0x06fe, 0x0427 }, /* Cyrillic_CHE Ч CYRILLIC CAPITAL LETTER CHE */
+ { 0x06ff, 0x042a }, /* Cyrillic_HARDSIGN Ъ CYRILLIC CAPITAL LETTER HARD SIGN */
+ { 0x07a1, 0x0386 }, /* Greek_ALPHAaccent Ά GREEK CAPITAL LETTER ALPHA WITH TONOS */
+ { 0x07a2, 0x0388 }, /* Greek_EPSILONaccent Έ GREEK CAPITAL LETTER EPSILON WITH TONOS */
+ { 0x07a3, 0x0389 }, /* Greek_ETAaccent Ή GREEK CAPITAL LETTER ETA WITH TONOS */
+ { 0x07a4, 0x038a }, /* Greek_IOTAaccent Ί GREEK CAPITAL LETTER IOTA WITH TONOS */
+ { 0x07a5, 0x03aa }, /* Greek_IOTAdiaeresis Ϊ GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */
+ { 0x07a7, 0x038c }, /* Greek_OMICRONaccent Ό GREEK CAPITAL LETTER OMICRON WITH TONOS */
+ { 0x07a8, 0x038e }, /* Greek_UPSILONaccent Ύ GREEK CAPITAL LETTER UPSILON WITH TONOS */
+ { 0x07a9, 0x03ab }, /* Greek_UPSILONdieresis Ϋ GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */
+ { 0x07ab, 0x038f }, /* Greek_OMEGAaccent Ώ GREEK CAPITAL LETTER OMEGA WITH TONOS */
+ { 0x07ae, 0x0385 }, /* Greek_accentdieresis ΅ GREEK DIALYTIKA TONOS */
+ { 0x07af, 0x2015 }, /* Greek_horizbar ― HORIZONTAL BAR */
+ { 0x07b1, 0x03ac }, /* Greek_alphaaccent ά GREEK SMALL LETTER ALPHA WITH TONOS */
+ { 0x07b2, 0x03ad }, /* Greek_epsilonaccent έ GREEK SMALL LETTER EPSILON WITH TONOS */
+ { 0x07b3, 0x03ae }, /* Greek_etaaccent ή GREEK SMALL LETTER ETA WITH TONOS */
+ { 0x07b4, 0x03af }, /* Greek_iotaaccent ί GREEK SMALL LETTER IOTA WITH TONOS */
+ { 0x07b5, 0x03ca }, /* Greek_iotadieresis ϊ GREEK SMALL LETTER IOTA WITH DIALYTIKA */
+ { 0x07b6, 0x0390 }, /* Greek_iotaaccentdieresis ΐ GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */
+ { 0x07b7, 0x03cc }, /* Greek_omicronaccent ό GREEK SMALL LETTER OMICRON WITH TONOS */
+ { 0x07b8, 0x03cd }, /* Greek_upsilonaccent ύ GREEK SMALL LETTER UPSILON WITH TONOS */
+ { 0x07b9, 0x03cb }, /* Greek_upsilondieresis ϋ GREEK SMALL LETTER UPSILON WITH DIALYTIKA */
+ { 0x07ba, 0x03b0 }, /* Greek_upsilonaccentdieresis ΰ GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */
+ { 0x07bb, 0x03ce }, /* Greek_omegaaccent ώ GREEK SMALL LETTER OMEGA WITH TONOS */
+ { 0x07c1, 0x0391 }, /* Greek_ALPHA Α GREEK CAPITAL LETTER ALPHA */
+ { 0x07c2, 0x0392 }, /* Greek_BETA Β GREEK CAPITAL LETTER BETA */
+ { 0x07c3, 0x0393 }, /* Greek_GAMMA Γ GREEK CAPITAL LETTER GAMMA */
+ { 0x07c4, 0x0394 }, /* Greek_DELTA Δ GREEK CAPITAL LETTER DELTA */
+ { 0x07c5, 0x0395 }, /* Greek_EPSILON Ε GREEK CAPITAL LETTER EPSILON */
+ { 0x07c6, 0x0396 }, /* Greek_ZETA Ζ GREEK CAPITAL LETTER ZETA */
+ { 0x07c7, 0x0397 }, /* Greek_ETA Η GREEK CAPITAL LETTER ETA */
+ { 0x07c8, 0x0398 }, /* Greek_THETA Θ GREEK CAPITAL LETTER THETA */
+ { 0x07c9, 0x0399 }, /* Greek_IOTA Ι GREEK CAPITAL LETTER IOTA */
+ { 0x07ca, 0x039a }, /* Greek_KAPPA Κ GREEK CAPITAL LETTER KAPPA */
+ { 0x07cb, 0x039b }, /* Greek_LAMBDA Λ GREEK CAPITAL LETTER LAMDA */
+ { 0x07cc, 0x039c }, /* Greek_MU Μ GREEK CAPITAL LETTER MU */
+ { 0x07cd, 0x039d }, /* Greek_NU Ν GREEK CAPITAL LETTER NU */
+ { 0x07ce, 0x039e }, /* Greek_XI Ξ GREEK CAPITAL LETTER XI */
+ { 0x07cf, 0x039f }, /* Greek_OMICRON Ο GREEK CAPITAL LETTER OMICRON */
+ { 0x07d0, 0x03a0 }, /* Greek_PI Π GREEK CAPITAL LETTER PI */
+ { 0x07d1, 0x03a1 }, /* Greek_RHO Ρ GREEK CAPITAL LETTER RHO */
+ { 0x07d2, 0x03a3 }, /* Greek_SIGMA Σ GREEK CAPITAL LETTER SIGMA */
+ { 0x07d4, 0x03a4 }, /* Greek_TAU Τ GREEK CAPITAL LETTER TAU */
+ { 0x07d5, 0x03a5 }, /* Greek_UPSILON Υ GREEK CAPITAL LETTER UPSILON */
+ { 0x07d6, 0x03a6 }, /* Greek_PHI Φ GREEK CAPITAL LETTER PHI */
+ { 0x07d7, 0x03a7 }, /* Greek_CHI Χ GREEK CAPITAL LETTER CHI */
+ { 0x07d8, 0x03a8 }, /* Greek_PSI Ψ GREEK CAPITAL LETTER PSI */
+ { 0x07d9, 0x03a9 }, /* Greek_OMEGA Ω GREEK CAPITAL LETTER OMEGA */
+ { 0x07e1, 0x03b1 }, /* Greek_alpha α GREEK SMALL LETTER ALPHA */
+ { 0x07e2, 0x03b2 }, /* Greek_beta β GREEK SMALL LETTER BETA */
+ { 0x07e3, 0x03b3 }, /* Greek_gamma γ GREEK SMALL LETTER GAMMA */
+ { 0x07e4, 0x03b4 }, /* Greek_delta δ GREEK SMALL LETTER DELTA */
+ { 0x07e5, 0x03b5 }, /* Greek_epsilon ε GREEK SMALL LETTER EPSILON */
+ { 0x07e6, 0x03b6 }, /* Greek_zeta ζ GREEK SMALL LETTER ZETA */
+ { 0x07e7, 0x03b7 }, /* Greek_eta η GREEK SMALL LETTER ETA */
+ { 0x07e8, 0x03b8 }, /* Greek_theta θ GREEK SMALL LETTER THETA */
+ { 0x07e9, 0x03b9 }, /* Greek_iota ι GREEK SMALL LETTER IOTA */
+ { 0x07ea, 0x03ba }, /* Greek_kappa κ GREEK SMALL LETTER KAPPA */
+ { 0x07eb, 0x03bb }, /* Greek_lambda λ GREEK SMALL LETTER LAMDA */
+ { 0x07ec, 0x03bc }, /* Greek_mu μ GREEK SMALL LETTER MU */
+ { 0x07ed, 0x03bd }, /* Greek_nu ν GREEK SMALL LETTER NU */
+ { 0x07ee, 0x03be }, /* Greek_xi ξ GREEK SMALL LETTER XI */
+ { 0x07ef, 0x03bf }, /* Greek_omicron ο GREEK SMALL LETTER OMICRON */
+ { 0x07f0, 0x03c0 }, /* Greek_pi π GREEK SMALL LETTER PI */
+ { 0x07f1, 0x03c1 }, /* Greek_rho ρ GREEK SMALL LETTER RHO */
+ { 0x07f2, 0x03c3 }, /* Greek_sigma σ GREEK SMALL LETTER SIGMA */
+ { 0x07f3, 0x03c2 }, /* Greek_finalsmallsigma ς GREEK SMALL LETTER FINAL SIGMA */
+ { 0x07f4, 0x03c4 }, /* Greek_tau τ GREEK SMALL LETTER TAU */
+ { 0x07f5, 0x03c5 }, /* Greek_upsilon υ GREEK SMALL LETTER UPSILON */
+ { 0x07f6, 0x03c6 }, /* Greek_phi φ GREEK SMALL LETTER PHI */
+ { 0x07f7, 0x03c7 }, /* Greek_chi χ GREEK SMALL LETTER CHI */
+ { 0x07f8, 0x03c8 }, /* Greek_psi ψ GREEK SMALL LETTER PSI */
+ { 0x07f9, 0x03c9 }, /* Greek_omega ω GREEK SMALL LETTER OMEGA */
+ { 0x08a1, 0x23b7 }, /* leftradical ⎷ ??? */
+ { 0x08a2, 0x250c }, /* topleftradical ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT */
+ { 0x08a3, 0x2500 }, /* horizconnector ─ BOX DRAWINGS LIGHT HORIZONTAL */
+ { 0x08a4, 0x2320 }, /* topintegral ⌠ TOP HALF INTEGRAL */
+ { 0x08a5, 0x2321 }, /* botintegral ⌡ BOTTOM HALF INTEGRAL */
+ { 0x08a6, 0x2502 }, /* vertconnector │ BOX DRAWINGS LIGHT VERTICAL */
+ { 0x08a7, 0x23a1 }, /* topleftsqbracket ⎡ ??? */
+ { 0x08a8, 0x23a3 }, /* botleftsqbracket ⎣ ??? */
+ { 0x08a9, 0x23a4 }, /* toprightsqbracket ⎤ ??? */
+ { 0x08aa, 0x23a6 }, /* botrightsqbracket ⎦ ??? */
+ { 0x08ab, 0x239b }, /* topleftparens ⎛ ??? */
+ { 0x08ac, 0x239d }, /* botleftparens ⎝ ??? */
+ { 0x08ad, 0x239e }, /* toprightparens ⎞ ??? */
+ { 0x08ae, 0x23a0 }, /* botrightparens ⎠ ??? */
+ { 0x08af, 0x23a8 }, /* leftmiddlecurlybrace ⎨ ??? */
+ { 0x08b0, 0x23ac }, /* rightmiddlecurlybrace ⎬ ??? */
+ /* 0x08b1 topleftsummation ? ??? */
+ /* 0x08b2 botleftsummation ? ??? */
+ /* 0x08b3 topvertsummationconnector ? ??? */
+ /* 0x08b4 botvertsummationconnector ? ??? */
+ /* 0x08b5 toprightsummation ? ??? */
+ /* 0x08b6 botrightsummation ? ??? */
+ /* 0x08b7 rightmiddlesummation ? ??? */
+ { 0x08bc, 0x2264 }, /* lessthanequal ≤ LESS-THAN OR EQUAL TO */
+ { 0x08bd, 0x2260 }, /* notequal ≠ NOT EQUAL TO */
+ { 0x08be, 0x2265 }, /* greaterthanequal ≥ GREATER-THAN OR EQUAL TO */
+ { 0x08bf, 0x222b }, /* integral ∫ INTEGRAL */
+ { 0x08c0, 0x2234 }, /* therefore ∴ THEREFORE */
+ { 0x08c1, 0x221d }, /* variation ∝ PROPORTIONAL TO */
+ { 0x08c2, 0x221e }, /* infinity ∞ INFINITY */
+ { 0x08c5, 0x2207 }, /* nabla ∇ NABLA */
+ { 0x08c8, 0x223c }, /* approximate ∼ TILDE OPERATOR */
+ { 0x08c9, 0x2243 }, /* similarequal ≃ ASYMPTOTICALLY EQUAL TO */
+ { 0x08cd, 0x21d4 }, /* ifonlyif ⇔ LEFT RIGHT DOUBLE ARROW */
+ { 0x08ce, 0x21d2 }, /* implies ⇒ RIGHTWARDS DOUBLE ARROW */
+ { 0x08cf, 0x2261 }, /* identical ≡ IDENTICAL TO */
+ { 0x08d6, 0x221a }, /* radical √ SQUARE ROOT */
+ { 0x08da, 0x2282 }, /* includedin ⊂ SUBSET OF */
+ { 0x08db, 0x2283 }, /* includes ⊃ SUPERSET OF */
+ { 0x08dc, 0x2229 }, /* intersection ∩ INTERSECTION */
+ { 0x08dd, 0x222a }, /* union ∪ UNION */
+ { 0x08de, 0x2227 }, /* logicaland ∧ LOGICAL AND */
+ { 0x08df, 0x2228 }, /* logicalor ∨ LOGICAL OR */
+ { 0x08ef, 0x2202 }, /* partialderivative ∂ PARTIAL DIFFERENTIAL */
+ { 0x08f6, 0x0192 }, /* function ƒ LATIN SMALL LETTER F WITH HOOK */
+ { 0x08fb, 0x2190 }, /* leftarrow ← LEFTWARDS ARROW */
+ { 0x08fc, 0x2191 }, /* uparrow ↑ UPWARDS ARROW */
+ { 0x08fd, 0x2192 }, /* rightarrow → RIGHTWARDS ARROW */
+ { 0x08fe, 0x2193 }, /* downarrow ↓ DOWNWARDS ARROW */
+/* 0x09df blank ? ??? */
+ { 0x09e0, 0x25c6 }, /* soliddiamond ◆ BLACK DIAMOND */
+ { 0x09e1, 0x2592 }, /* checkerboard ▒ MEDIUM SHADE */
+ { 0x09e2, 0x2409 }, /* ht ␉ SYMBOL FOR HORIZONTAL TABULATION */
+ { 0x09e3, 0x240c }, /* ff ␌ SYMBOL FOR FORM FEED */
+ { 0x09e4, 0x240d }, /* cr ␍ SYMBOL FOR CARRIAGE RETURN */
+ { 0x09e5, 0x240a }, /* lf ␊ SYMBOL FOR LINE FEED */
+ { 0x09e8, 0x2424 }, /* nl ␤ SYMBOL FOR NEWLINE */
+ { 0x09e9, 0x240b }, /* vt ␋ SYMBOL FOR VERTICAL TABULATION */
+ { 0x09ea, 0x2518 }, /* lowrightcorner ┘ BOX DRAWINGS LIGHT UP AND LEFT */
+ { 0x09eb, 0x2510 }, /* uprightcorner ┐ BOX DRAWINGS LIGHT DOWN AND LEFT */
+ { 0x09ec, 0x250c }, /* upleftcorner ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT */
+ { 0x09ed, 0x2514 }, /* lowleftcorner └ BOX DRAWINGS LIGHT UP AND RIGHT */
+ { 0x09ee, 0x253c }, /* crossinglines ┼ BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */
+ { 0x09ef, 0x23ba }, /* horizlinescan1 ⎺ HORIZONTAL SCAN LINE-1 (Unicode 3.2 draft) */
+ { 0x09f0, 0x23bb }, /* horizlinescan3 ⎻ HORIZONTAL SCAN LINE-3 (Unicode 3.2 draft) */
+ { 0x09f1, 0x2500 }, /* horizlinescan5 ─ BOX DRAWINGS LIGHT HORIZONTAL */
+ { 0x09f2, 0x23bc }, /* horizlinescan7 ⎼ HORIZONTAL SCAN LINE-7 (Unicode 3.2 draft) */
+ { 0x09f3, 0x23bd }, /* horizlinescan9 ⎽ HORIZONTAL SCAN LINE-9 (Unicode 3.2 draft) */
+ { 0x09f4, 0x251c }, /* leftt ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT */
+ { 0x09f5, 0x2524 }, /* rightt ┤ BOX DRAWINGS LIGHT VERTICAL AND LEFT */
+ { 0x09f6, 0x2534 }, /* bott ┴ BOX DRAWINGS LIGHT UP AND HORIZONTAL */
+ { 0x09f7, 0x252c }, /* topt ┬ BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */
+ { 0x09f8, 0x2502 }, /* vertbar │ BOX DRAWINGS LIGHT VERTICAL */
+ { 0x0aa1, 0x2003 }, /* emspace   EM SPACE */
+ { 0x0aa2, 0x2002 }, /* enspace   EN SPACE */
+ { 0x0aa3, 0x2004 }, /* em3space   THREE-PER-EM SPACE */
+ { 0x0aa4, 0x2005 }, /* em4space   FOUR-PER-EM SPACE */
+ { 0x0aa5, 0x2007 }, /* digitspace   FIGURE SPACE */
+ { 0x0aa6, 0x2008 }, /* punctspace   PUNCTUATION SPACE */
+ { 0x0aa7, 0x2009 }, /* thinspace   THIN SPACE */
+ { 0x0aa8, 0x200a }, /* hairspace   HAIR SPACE */
+ { 0x0aa9, 0x2014 }, /* emdash — EM DASH */
+ { 0x0aaa, 0x2013 }, /* endash – EN DASH */
+ /* 0x0aac signifblank ? ??? */
+ { 0x0aae, 0x2026 }, /* ellipsis … HORIZONTAL ELLIPSIS */
+ { 0x0aaf, 0x2025 }, /* doubbaselinedot ‥ TWO DOT LEADER */
+ { 0x0ab0, 0x2153 }, /* onethird ⅓ VULGAR FRACTION ONE THIRD */
+ { 0x0ab1, 0x2154 }, /* twothirds ⅔ VULGAR FRACTION TWO THIRDS */
+ { 0x0ab2, 0x2155 }, /* onefifth ⅕ VULGAR FRACTION ONE FIFTH */
+ { 0x0ab3, 0x2156 }, /* twofifths ⅖ VULGAR FRACTION TWO FIFTHS */
+ { 0x0ab4, 0x2157 }, /* threefifths ⅗ VULGAR FRACTION THREE FIFTHS */
+ { 0x0ab5, 0x2158 }, /* fourfifths ⅘ VULGAR FRACTION FOUR FIFTHS */
+ { 0x0ab6, 0x2159 }, /* onesixth ⅙ VULGAR FRACTION ONE SIXTH */
+ { 0x0ab7, 0x215a }, /* fivesixths ⅚ VULGAR FRACTION FIVE SIXTHS */
+ { 0x0ab8, 0x2105 }, /* careof ℅ CARE OF */
+ { 0x0abb, 0x2012 }, /* figdash ‒ FIGURE DASH */
+ { 0x0abc, 0x2329 }, /* leftanglebracket 〈 LEFT-POINTING ANGLE BRACKET */
+ { 0x0abd, 0x002e }, /* decimalpoint . FULL STOP */
+ { 0x0abe, 0x232a }, /* rightanglebracket 〉 RIGHT-POINTING ANGLE BRACKET */
+ /* 0x0abf marker ? ??? */
+ { 0x0ac3, 0x215b }, /* oneeighth ⅛ VULGAR FRACTION ONE EIGHTH */
+ { 0x0ac4, 0x215c }, /* threeeighths ⅜ VULGAR FRACTION THREE EIGHTHS */
+ { 0x0ac5, 0x215d }, /* fiveeighths ⅝ VULGAR FRACTION FIVE EIGHTHS */
+ { 0x0ac6, 0x215e }, /* seveneighths ⅞ VULGAR FRACTION SEVEN EIGHTHS */
+ { 0x0ac9, 0x2122 }, /* trademark ™ TRADE MARK SIGN */
+ { 0x0aca, 0x2613 }, /* signaturemark ☓ SALTIRE */
+ /* 0x0acb trademarkincircle ? ??? */
+ { 0x0acc, 0x25c1 }, /* leftopentriangle ◁ WHITE LEFT-POINTING TRIANGLE */
+ { 0x0acd, 0x25b7 }, /* rightopentriangle ▷ WHITE RIGHT-POINTING TRIANGLE */
+ { 0x0ace, 0x25cb }, /* emopencircle ○ WHITE CIRCLE */
+ { 0x0acf, 0x25af }, /* emopenrectangle ▯ WHITE VERTICAL RECTANGLE */
+ { 0x0ad0, 0x2018 }, /* leftsinglequotemark ‘ LEFT SINGLE QUOTATION MARK */
+ { 0x0ad1, 0x2019 }, /* rightsinglequotemark ’ RIGHT SINGLE QUOTATION MARK */
+ { 0x0ad2, 0x201c }, /* leftdoublequotemark “ LEFT DOUBLE QUOTATION MARK */
+ { 0x0ad3, 0x201d }, /* rightdoublequotemark ” RIGHT DOUBLE QUOTATION MARK */
+ { 0x0ad4, 0x211e }, /* prescription ℞ PRESCRIPTION TAKE */
+ { 0x0ad6, 0x2032 }, /* minutes ′ PRIME */
+ { 0x0ad7, 0x2033 }, /* seconds ″ DOUBLE PRIME */
+ { 0x0ad9, 0x271d }, /* latincross ✝ LATIN CROSS */
+ /* 0x0ada hexagram ? ??? */
+ { 0x0adb, 0x25ac }, /* filledrectbullet ▬ BLACK RECTANGLE */
+ { 0x0adc, 0x25c0 }, /* filledlefttribullet ◀ BLACK LEFT-POINTING TRIANGLE */
+ { 0x0add, 0x25b6 }, /* filledrighttribullet ▶ BLACK RIGHT-POINTING TRIANGLE */
+ { 0x0ade, 0x25cf }, /* emfilledcircle ● BLACK CIRCLE */
+ { 0x0adf, 0x25ae }, /* emfilledrect ▮ BLACK VERTICAL RECTANGLE */
+ { 0x0ae0, 0x25e6 }, /* enopencircbullet ◦ WHITE BULLET */
+ { 0x0ae1, 0x25ab }, /* enopensquarebullet ▫ WHITE SMALL SQUARE */
+ { 0x0ae2, 0x25ad }, /* openrectbullet ▭ WHITE RECTANGLE */
+ { 0x0ae3, 0x25b3 }, /* opentribulletup △ WHITE UP-POINTING TRIANGLE */
+ { 0x0ae4, 0x25bd }, /* opentribulletdown ▽ WHITE DOWN-POINTING TRIANGLE */
+ { 0x0ae5, 0x2606 }, /* openstar ☆ WHITE STAR */
+ { 0x0ae6, 0x2022 }, /* enfilledcircbullet • BULLET */
+ { 0x0ae7, 0x25aa }, /* enfilledsqbullet ▪ BLACK SMALL SQUARE */
+ { 0x0ae8, 0x25b2 }, /* filledtribulletup ▲ BLACK UP-POINTING TRIANGLE */
+ { 0x0ae9, 0x25bc }, /* filledtribulletdown ▼ BLACK DOWN-POINTING TRIANGLE */
+ { 0x0aea, 0x261c }, /* leftpointer ☜ WHITE LEFT POINTING INDEX */
+ { 0x0aeb, 0x261e }, /* rightpointer ☞ WHITE RIGHT POINTING INDEX */
+ { 0x0aec, 0x2663 }, /* club ♣ BLACK CLUB SUIT */
+ { 0x0aed, 0x2666 }, /* diamond ♦ BLACK DIAMOND SUIT */
+ { 0x0aee, 0x2665 }, /* heart ♥ BLACK HEART SUIT */
+ { 0x0af0, 0x2720 }, /* maltesecross ✠ MALTESE CROSS */
+ { 0x0af1, 0x2020 }, /* dagger † DAGGER */
+ { 0x0af2, 0x2021 }, /* doubledagger ‡ DOUBLE DAGGER */
+ { 0x0af3, 0x2713 }, /* checkmark ✓ CHECK MARK */
+ { 0x0af4, 0x2717 }, /* ballotcross ✗ BALLOT X */
+ { 0x0af5, 0x266f }, /* musicalsharp ♯ MUSIC SHARP SIGN */
+ { 0x0af6, 0x266d }, /* musicalflat ♭ MUSIC FLAT SIGN */
+ { 0x0af7, 0x2642 }, /* malesymbol ♂ MALE SIGN */
+ { 0x0af8, 0x2640 }, /* femalesymbol ♀ FEMALE SIGN */
+ { 0x0af9, 0x260e }, /* telephone ☎ BLACK TELEPHONE */
+ { 0x0afa, 0x2315 }, /* telephonerecorder ⌕ TELEPHONE RECORDER */
+ { 0x0afb, 0x2117 }, /* phonographcopyright ℗ SOUND RECORDING COPYRIGHT */
+ { 0x0afc, 0x2038 }, /* caret ‸ CARET */
+ { 0x0afd, 0x201a }, /* singlelowquotemark ‚ SINGLE LOW-9 QUOTATION MARK */
+ { 0x0afe, 0x201e }, /* doublelowquotemark „ DOUBLE LOW-9 QUOTATION MARK */
+ /* 0x0aff cursor ? ??? */
+ { 0x0ba3, 0x003c }, /* leftcaret < LESS-THAN SIGN */
+ { 0x0ba6, 0x003e }, /* rightcaret > GREATER-THAN SIGN */
+ { 0x0ba8, 0x2228 }, /* downcaret ∨ LOGICAL OR */
+ { 0x0ba9, 0x2227 }, /* upcaret ∧ LOGICAL AND */
+ { 0x0bc0, 0x00af }, /* overbar ¯ MACRON */
+ { 0x0bc2, 0x22a4 }, /* downtack ⊤ DOWN TACK */
+ { 0x0bc3, 0x2229 }, /* upshoe ∩ INTERSECTION */
+ { 0x0bc4, 0x230a }, /* downstile ⌊ LEFT FLOOR */
+ { 0x0bc6, 0x005f }, /* underbar _ LOW LINE */
+ { 0x0bca, 0x2218 }, /* jot ∘ RING OPERATOR */
+ { 0x0bcc, 0x2395 }, /* quad ⎕ APL FUNCTIONAL SYMBOL QUAD (Unicode 3.0) */
+ { 0x0bce, 0x22a5 }, /* uptack ⊥ UP TACK */
+ { 0x0bcf, 0x25cb }, /* circle ○ WHITE CIRCLE */
+ { 0x0bd3, 0x2308 }, /* upstile ⌈ LEFT CEILING */
+ { 0x0bd6, 0x222a }, /* downshoe ∪ UNION */
+ { 0x0bd8, 0x2283 }, /* rightshoe ⊃ SUPERSET OF */
+ { 0x0bda, 0x2282 }, /* leftshoe ⊂ SUBSET OF */
+ { 0x0bdc, 0x22a2 }, /* lefttack ⊢ RIGHT TACK */
+ { 0x0bfc, 0x22a3 }, /* righttack ⊣ LEFT TACK */
+ { 0x0cdf, 0x2017 }, /* hebrew_doublelowline ‗ DOUBLE LOW LINE */
+ { 0x0ce0, 0x05d0 }, /* hebrew_aleph א HEBREW LETTER ALEF */
+ { 0x0ce1, 0x05d1 }, /* hebrew_bet ב HEBREW LETTER BET */
+ { 0x0ce2, 0x05d2 }, /* hebrew_gimel ג HEBREW LETTER GIMEL */
+ { 0x0ce3, 0x05d3 }, /* hebrew_dalet ד HEBREW LETTER DALET */
+ { 0x0ce4, 0x05d4 }, /* hebrew_he ה HEBREW LETTER HE */
+ { 0x0ce5, 0x05d5 }, /* hebrew_waw ו HEBREW LETTER VAV */
+ { 0x0ce6, 0x05d6 }, /* hebrew_zain ז HEBREW LETTER ZAYIN */
+ { 0x0ce7, 0x05d7 }, /* hebrew_chet ח HEBREW LETTER HET */
+ { 0x0ce8, 0x05d8 }, /* hebrew_tet ט HEBREW LETTER TET */
+ { 0x0ce9, 0x05d9 }, /* hebrew_yod י HEBREW LETTER YOD */
+ { 0x0cea, 0x05da }, /* hebrew_finalkaph ך HEBREW LETTER FINAL KAF */
+ { 0x0ceb, 0x05db }, /* hebrew_kaph כ HEBREW LETTER KAF */
+ { 0x0cec, 0x05dc }, /* hebrew_lamed ל HEBREW LETTER LAMED */
+ { 0x0ced, 0x05dd }, /* hebrew_finalmem ם HEBREW LETTER FINAL MEM */
+ { 0x0cee, 0x05de }, /* hebrew_mem מ HEBREW LETTER MEM */
+ { 0x0cef, 0x05df }, /* hebrew_finalnun ן HEBREW LETTER FINAL NUN */
+ { 0x0cf0, 0x05e0 }, /* hebrew_nun נ HEBREW LETTER NUN */
+ { 0x0cf1, 0x05e1 }, /* hebrew_samech ס HEBREW LETTER SAMEKH */
+ { 0x0cf2, 0x05e2 }, /* hebrew_ayin ע HEBREW LETTER AYIN */
+ { 0x0cf3, 0x05e3 }, /* hebrew_finalpe ף HEBREW LETTER FINAL PE */
+ { 0x0cf4, 0x05e4 }, /* hebrew_pe פ HEBREW LETTER PE */
+ { 0x0cf5, 0x05e5 }, /* hebrew_finalzade ץ HEBREW LETTER FINAL TSADI */
+ { 0x0cf6, 0x05e6 }, /* hebrew_zade צ HEBREW LETTER TSADI */
+ { 0x0cf7, 0x05e7 }, /* hebrew_qoph ק HEBREW LETTER QOF */
+ { 0x0cf8, 0x05e8 }, /* hebrew_resh ר HEBREW LETTER RESH */
+ { 0x0cf9, 0x05e9 }, /* hebrew_shin ש HEBREW LETTER SHIN */
+ { 0x0cfa, 0x05ea }, /* hebrew_taw ת HEBREW LETTER TAV */
+ { 0x0da1, 0x0e01 }, /* Thai_kokai ก THAI CHARACTER KO KAI */
+ { 0x0da2, 0x0e02 }, /* Thai_khokhai ข THAI CHARACTER KHO KHAI */
+ { 0x0da3, 0x0e03 }, /* Thai_khokhuat ฃ THAI CHARACTER KHO KHUAT */
+ { 0x0da4, 0x0e04 }, /* Thai_khokhwai ค THAI CHARACTER KHO KHWAI */
+ { 0x0da5, 0x0e05 }, /* Thai_khokhon ฅ THAI CHARACTER KHO KHON */
+ { 0x0da6, 0x0e06 }, /* Thai_khorakhang ฆ THAI CHARACTER KHO RAKHANG */
+ { 0x0da7, 0x0e07 }, /* Thai_ngongu ง THAI CHARACTER NGO NGU */
+ { 0x0da8, 0x0e08 }, /* Thai_chochan จ THAI CHARACTER CHO CHAN */
+ { 0x0da9, 0x0e09 }, /* Thai_choching ฉ THAI CHARACTER CHO CHING */
+ { 0x0daa, 0x0e0a }, /* Thai_chochang ช THAI CHARACTER CHO CHANG */
+ { 0x0dab, 0x0e0b }, /* Thai_soso ซ THAI CHARACTER SO SO */
+ { 0x0dac, 0x0e0c }, /* Thai_chochoe ฌ THAI CHARACTER CHO CHOE */
+ { 0x0dad, 0x0e0d }, /* Thai_yoying ญ THAI CHARACTER YO YING */
+ { 0x0dae, 0x0e0e }, /* Thai_dochada ฎ THAI CHARACTER DO CHADA */
+ { 0x0daf, 0x0e0f }, /* Thai_topatak ฏ THAI CHARACTER TO PATAK */
+ { 0x0db0, 0x0e10 }, /* Thai_thothan ฐ THAI CHARACTER THO THAN */
+ { 0x0db1, 0x0e11 }, /* Thai_thonangmontho ฑ THAI CHARACTER THO NANGMONTHO */
+ { 0x0db2, 0x0e12 }, /* Thai_thophuthao ฒ THAI CHARACTER THO PHUTHAO */
+ { 0x0db3, 0x0e13 }, /* Thai_nonen ณ THAI CHARACTER NO NEN */
+ { 0x0db4, 0x0e14 }, /* Thai_dodek ด THAI CHARACTER DO DEK */
+ { 0x0db5, 0x0e15 }, /* Thai_totao ต THAI CHARACTER TO TAO */
+ { 0x0db6, 0x0e16 }, /* Thai_thothung ถ THAI CHARACTER THO THUNG */
+ { 0x0db7, 0x0e17 }, /* Thai_thothahan ท THAI CHARACTER THO THAHAN */
+ { 0x0db8, 0x0e18 }, /* Thai_thothong ธ THAI CHARACTER THO THONG */
+ { 0x0db9, 0x0e19 }, /* Thai_nonu น THAI CHARACTER NO NU */
+ { 0x0dba, 0x0e1a }, /* Thai_bobaimai บ THAI CHARACTER BO BAIMAI */
+ { 0x0dbb, 0x0e1b }, /* Thai_popla ป THAI CHARACTER PO PLA */
+ { 0x0dbc, 0x0e1c }, /* Thai_phophung ผ THAI CHARACTER PHO PHUNG */
+ { 0x0dbd, 0x0e1d }, /* Thai_fofa ฝ THAI CHARACTER FO FA */
+ { 0x0dbe, 0x0e1e }, /* Thai_phophan พ THAI CHARACTER PHO PHAN */
+ { 0x0dbf, 0x0e1f }, /* Thai_fofan ฟ THAI CHARACTER FO FAN */
+ { 0x0dc0, 0x0e20 }, /* Thai_phosamphao ภ THAI CHARACTER PHO SAMPHAO */
+ { 0x0dc1, 0x0e21 }, /* Thai_moma ม THAI CHARACTER MO MA */
+ { 0x0dc2, 0x0e22 }, /* Thai_yoyak ย THAI CHARACTER YO YAK */
+ { 0x0dc3, 0x0e23 }, /* Thai_rorua ร THAI CHARACTER RO RUA */
+ { 0x0dc4, 0x0e24 }, /* Thai_ru ฤ THAI CHARACTER RU */
+ { 0x0dc5, 0x0e25 }, /* Thai_loling ล THAI CHARACTER LO LING */
+ { 0x0dc6, 0x0e26 }, /* Thai_lu ฦ THAI CHARACTER LU */
+ { 0x0dc7, 0x0e27 }, /* Thai_wowaen ว THAI CHARACTER WO WAEN */
+ { 0x0dc8, 0x0e28 }, /* Thai_sosala ศ THAI CHARACTER SO SALA */
+ { 0x0dc9, 0x0e29 }, /* Thai_sorusi ษ THAI CHARACTER SO RUSI */
+ { 0x0dca, 0x0e2a }, /* Thai_sosua ส THAI CHARACTER SO SUA */
+ { 0x0dcb, 0x0e2b }, /* Thai_hohip ห THAI CHARACTER HO HIP */
+ { 0x0dcc, 0x0e2c }, /* Thai_lochula ฬ THAI CHARACTER LO CHULA */
+ { 0x0dcd, 0x0e2d }, /* Thai_oang อ THAI CHARACTER O ANG */
+ { 0x0dce, 0x0e2e }, /* Thai_honokhuk ฮ THAI CHARACTER HO NOKHUK */
+ { 0x0dcf, 0x0e2f }, /* Thai_paiyannoi ฯ THAI CHARACTER PAIYANNOI */
+ { 0x0dd0, 0x0e30 }, /* Thai_saraa ะ THAI CHARACTER SARA A */
+ { 0x0dd1, 0x0e31 }, /* Thai_maihanakat ั THAI CHARACTER MAI HAN-AKAT */
+ { 0x0dd2, 0x0e32 }, /* Thai_saraaa า THAI CHARACTER SARA AA */
+ { 0x0dd3, 0x0e33 }, /* Thai_saraam ำ THAI CHARACTER SARA AM */
+ { 0x0dd4, 0x0e34 }, /* Thai_sarai ิ THAI CHARACTER SARA I */
+ { 0x0dd5, 0x0e35 }, /* Thai_saraii ี THAI CHARACTER SARA II */
+ { 0x0dd6, 0x0e36 }, /* Thai_saraue ึ THAI CHARACTER SARA UE */
+ { 0x0dd7, 0x0e37 }, /* Thai_sarauee ื THAI CHARACTER SARA UEE */
+ { 0x0dd8, 0x0e38 }, /* Thai_sarau ุ THAI CHARACTER SARA U */
+ { 0x0dd9, 0x0e39 }, /* Thai_sarauu ู THAI CHARACTER SARA UU */
+ { 0x0dda, 0x0e3a }, /* Thai_phinthu ฺ THAI CHARACTER PHINTHU */
+ { 0x0dde, 0x0e3e }, /* Thai_maihanakat_maitho ฾ ??? */
+ { 0x0ddf, 0x0e3f }, /* Thai_baht ฿ THAI CURRENCY SYMBOL BAHT */
+ { 0x0de0, 0x0e40 }, /* Thai_sarae เ THAI CHARACTER SARA E */
+ { 0x0de1, 0x0e41 }, /* Thai_saraae แ THAI CHARACTER SARA AE */
+ { 0x0de2, 0x0e42 }, /* Thai_sarao โ THAI CHARACTER SARA O */
+ { 0x0de3, 0x0e43 }, /* Thai_saraaimaimuan ใ THAI CHARACTER SARA AI MAIMUAN */
+ { 0x0de4, 0x0e44 }, /* Thai_saraaimaimalai ไ THAI CHARACTER SARA AI MAIMALAI */
+ { 0x0de5, 0x0e45 }, /* Thai_lakkhangyao ๅ THAI CHARACTER LAKKHANGYAO */
+ { 0x0de6, 0x0e46 }, /* Thai_maiyamok ๆ THAI CHARACTER MAIYAMOK */
+ { 0x0de7, 0x0e47 }, /* Thai_maitaikhu ็ THAI CHARACTER MAITAIKHU */
+ { 0x0de8, 0x0e48 }, /* Thai_maiek ่ THAI CHARACTER MAI EK */
+ { 0x0de9, 0x0e49 }, /* Thai_maitho ้ THAI CHARACTER MAI THO */
+ { 0x0dea, 0x0e4a }, /* Thai_maitri ๊ THAI CHARACTER MAI TRI */
+ { 0x0deb, 0x0e4b }, /* Thai_maichattawa ๋ THAI CHARACTER MAI CHATTAWA */
+ { 0x0dec, 0x0e4c }, /* Thai_thanthakhat ์ THAI CHARACTER THANTHAKHAT */
+ { 0x0ded, 0x0e4d }, /* Thai_nikhahit ํ THAI CHARACTER NIKHAHIT */
+ { 0x0df0, 0x0e50 }, /* Thai_leksun ๐ THAI DIGIT ZERO */
+ { 0x0df1, 0x0e51 }, /* Thai_leknung ๑ THAI DIGIT ONE */
+ { 0x0df2, 0x0e52 }, /* Thai_leksong ๒ THAI DIGIT TWO */
+ { 0x0df3, 0x0e53 }, /* Thai_leksam ๓ THAI DIGIT THREE */
+ { 0x0df4, 0x0e54 }, /* Thai_leksi ๔ THAI DIGIT FOUR */
+ { 0x0df5, 0x0e55 }, /* Thai_lekha ๕ THAI DIGIT FIVE */
+ { 0x0df6, 0x0e56 }, /* Thai_lekhok ๖ THAI DIGIT SIX */
+ { 0x0df7, 0x0e57 }, /* Thai_lekchet ๗ THAI DIGIT SEVEN */
+ { 0x0df8, 0x0e58 }, /* Thai_lekpaet ๘ THAI DIGIT EIGHT */
+ { 0x0df9, 0x0e59 }, /* Thai_lekkao ๙ THAI DIGIT NINE */
+ { 0x0ea1, 0x3131 }, /* Hangul_Kiyeog ㄱ HANGUL LETTER KIYEOK */
+ { 0x0ea2, 0x3132 }, /* Hangul_SsangKiyeog ㄲ HANGUL LETTER SSANGKIYEOK */
+ { 0x0ea3, 0x3133 }, /* Hangul_KiyeogSios ㄳ HANGUL LETTER KIYEOK-SIOS */
+ { 0x0ea4, 0x3134 }, /* Hangul_Nieun ㄴ HANGUL LETTER NIEUN */
+ { 0x0ea5, 0x3135 }, /* Hangul_NieunJieuj ㄵ HANGUL LETTER NIEUN-CIEUC */
+ { 0x0ea6, 0x3136 }, /* Hangul_NieunHieuh ㄶ HANGUL LETTER NIEUN-HIEUH */
+ { 0x0ea7, 0x3137 }, /* Hangul_Dikeud ㄷ HANGUL LETTER TIKEUT */
+ { 0x0ea8, 0x3138 }, /* Hangul_SsangDikeud ㄸ HANGUL LETTER SSANGTIKEUT */
+ { 0x0ea9, 0x3139 }, /* Hangul_Rieul ㄹ HANGUL LETTER RIEUL */
+ { 0x0eaa, 0x313a }, /* Hangul_RieulKiyeog ㄺ HANGUL LETTER RIEUL-KIYEOK */
+ { 0x0eab, 0x313b }, /* Hangul_RieulMieum ㄻ HANGUL LETTER RIEUL-MIEUM */
+ { 0x0eac, 0x313c }, /* Hangul_RieulPieub ㄼ HANGUL LETTER RIEUL-PIEUP */
+ { 0x0ead, 0x313d }, /* Hangul_RieulSios ㄽ HANGUL LETTER RIEUL-SIOS */
+ { 0x0eae, 0x313e }, /* Hangul_RieulTieut ㄾ HANGUL LETTER RIEUL-THIEUTH */
+ { 0x0eaf, 0x313f }, /* Hangul_RieulPhieuf ㄿ HANGUL LETTER RIEUL-PHIEUPH */
+ { 0x0eb0, 0x3140 }, /* Hangul_RieulHieuh ㅀ HANGUL LETTER RIEUL-HIEUH */
+ { 0x0eb1, 0x3141 }, /* Hangul_Mieum ㅁ HANGUL LETTER MIEUM */
+ { 0x0eb2, 0x3142 }, /* Hangul_Pieub ㅂ HANGUL LETTER PIEUP */
+ { 0x0eb3, 0x3143 }, /* Hangul_SsangPieub ㅃ HANGUL LETTER SSANGPIEUP */
+ { 0x0eb4, 0x3144 }, /* Hangul_PieubSios ㅄ HANGUL LETTER PIEUP-SIOS */
+ { 0x0eb5, 0x3145 }, /* Hangul_Sios ㅅ HANGUL LETTER SIOS */
+ { 0x0eb6, 0x3146 }, /* Hangul_SsangSios ㅆ HANGUL LETTER SSANGSIOS */
+ { 0x0eb7, 0x3147 }, /* Hangul_Ieung ㅇ HANGUL LETTER IEUNG */
+ { 0x0eb8, 0x3148 }, /* Hangul_Jieuj ㅈ HANGUL LETTER CIEUC */
+ { 0x0eb9, 0x3149 }, /* Hangul_SsangJieuj ㅉ HANGUL LETTER SSANGCIEUC */
+ { 0x0eba, 0x314a }, /* Hangul_Cieuc ㅊ HANGUL LETTER CHIEUCH */
+ { 0x0ebb, 0x314b }, /* Hangul_Khieuq ㅋ HANGUL LETTER KHIEUKH */
+ { 0x0ebc, 0x314c }, /* Hangul_Tieut ㅌ HANGUL LETTER THIEUTH */
+ { 0x0ebd, 0x314d }, /* Hangul_Phieuf ㅍ HANGUL LETTER PHIEUPH */
+ { 0x0ebe, 0x314e }, /* Hangul_Hieuh ㅎ HANGUL LETTER HIEUH */
+ { 0x0ebf, 0x314f }, /* Hangul_A ㅏ HANGUL LETTER A */
+ { 0x0ec0, 0x3150 }, /* Hangul_AE ㅐ HANGUL LETTER AE */
+ { 0x0ec1, 0x3151 }, /* Hangul_YA ㅑ HANGUL LETTER YA */
+ { 0x0ec2, 0x3152 }, /* Hangul_YAE ㅒ HANGUL LETTER YAE */
+ { 0x0ec3, 0x3153 }, /* Hangul_EO ㅓ HANGUL LETTER EO */
+ { 0x0ec4, 0x3154 }, /* Hangul_E ㅔ HANGUL LETTER E */
+ { 0x0ec5, 0x3155 }, /* Hangul_YEO ㅕ HANGUL LETTER YEO */
+ { 0x0ec6, 0x3156 }, /* Hangul_YE ㅖ HANGUL LETTER YE */
+ { 0x0ec7, 0x3157 }, /* Hangul_O ㅗ HANGUL LETTER O */
+ { 0x0ec8, 0x3158 }, /* Hangul_WA ㅘ HANGUL LETTER WA */
+ { 0x0ec9, 0x3159 }, /* Hangul_WAE ㅙ HANGUL LETTER WAE */
+ { 0x0eca, 0x315a }, /* Hangul_OE ㅚ HANGUL LETTER OE */
+ { 0x0ecb, 0x315b }, /* Hangul_YO ㅛ HANGUL LETTER YO */
+ { 0x0ecc, 0x315c }, /* Hangul_U ㅜ HANGUL LETTER U */
+ { 0x0ecd, 0x315d }, /* Hangul_WEO ㅝ HANGUL LETTER WEO */
+ { 0x0ece, 0x315e }, /* Hangul_WE ㅞ HANGUL LETTER WE */
+ { 0x0ecf, 0x315f }, /* Hangul_WI ㅟ HANGUL LETTER WI */
+ { 0x0ed0, 0x3160 }, /* Hangul_YU ㅠ HANGUL LETTER YU */
+ { 0x0ed1, 0x3161 }, /* Hangul_EU ㅡ HANGUL LETTER EU */
+ { 0x0ed2, 0x3162 }, /* Hangul_YI ㅢ HANGUL LETTER YI */
+ { 0x0ed3, 0x3163 }, /* Hangul_I ㅣ HANGUL LETTER I */
+ { 0x0ed4, 0x11a8 }, /* Hangul_J_Kiyeog ᆨ HANGUL JONGSEONG KIYEOK */
+ { 0x0ed5, 0x11a9 }, /* Hangul_J_SsangKiyeog ᆩ HANGUL JONGSEONG SSANGKIYEOK */
+ { 0x0ed6, 0x11aa }, /* Hangul_J_KiyeogSios ᆪ HANGUL JONGSEONG KIYEOK-SIOS */
+ { 0x0ed7, 0x11ab }, /* Hangul_J_Nieun ᆫ HANGUL JONGSEONG NIEUN */
+ { 0x0ed8, 0x11ac }, /* Hangul_J_NieunJieuj ᆬ HANGUL JONGSEONG NIEUN-CIEUC */
+ { 0x0ed9, 0x11ad }, /* Hangul_J_NieunHieuh ᆭ HANGUL JONGSEONG NIEUN-HIEUH */
+ { 0x0eda, 0x11ae }, /* Hangul_J_Dikeud ᆮ HANGUL JONGSEONG TIKEUT */
+ { 0x0edb, 0x11af }, /* Hangul_J_Rieul ᆯ HANGUL JONGSEONG RIEUL */
+ { 0x0edc, 0x11b0 }, /* Hangul_J_RieulKiyeog ᆰ HANGUL JONGSEONG RIEUL-KIYEOK */
+ { 0x0edd, 0x11b1 }, /* Hangul_J_RieulMieum ᆱ HANGUL JONGSEONG RIEUL-MIEUM */
+ { 0x0ede, 0x11b2 }, /* Hangul_J_RieulPieub ᆲ HANGUL JONGSEONG RIEUL-PIEUP */
+ { 0x0edf, 0x11b3 }, /* Hangul_J_RieulSios ᆳ HANGUL JONGSEONG RIEUL-SIOS */
+ { 0x0ee0, 0x11b4 }, /* Hangul_J_RieulTieut ᆴ HANGUL JONGSEONG RIEUL-THIEUTH */
+ { 0x0ee1, 0x11b5 }, /* Hangul_J_RieulPhieuf ᆵ HANGUL JONGSEONG RIEUL-PHIEUPH */
+ { 0x0ee2, 0x11b6 }, /* Hangul_J_RieulHieuh ᆶ HANGUL JONGSEONG RIEUL-HIEUH */
+ { 0x0ee3, 0x11b7 }, /* Hangul_J_Mieum ᆷ HANGUL JONGSEONG MIEUM */
+ { 0x0ee4, 0x11b8 }, /* Hangul_J_Pieub ᆸ HANGUL JONGSEONG PIEUP */
+ { 0x0ee5, 0x11b9 }, /* Hangul_J_PieubSios ᆹ HANGUL JONGSEONG PIEUP-SIOS */
+ { 0x0ee6, 0x11ba }, /* Hangul_J_Sios ᆺ HANGUL JONGSEONG SIOS */
+ { 0x0ee7, 0x11bb }, /* Hangul_J_SsangSios ᆻ HANGUL JONGSEONG SSANGSIOS */
+ { 0x0ee8, 0x11bc }, /* Hangul_J_Ieung ᆼ HANGUL JONGSEONG IEUNG */
+ { 0x0ee9, 0x11bd }, /* Hangul_J_Jieuj ᆽ HANGUL JONGSEONG CIEUC */
+ { 0x0eea, 0x11be }, /* Hangul_J_Cieuc ᆾ HANGUL JONGSEONG CHIEUCH */
+ { 0x0eeb, 0x11bf }, /* Hangul_J_Khieuq ᆿ HANGUL JONGSEONG KHIEUKH */
+ { 0x0eec, 0x11c0 }, /* Hangul_J_Tieut ᇀ HANGUL JONGSEONG THIEUTH */
+ { 0x0eed, 0x11c1 }, /* Hangul_J_Phieuf ᇁ HANGUL JONGSEONG PHIEUPH */
+ { 0x0eee, 0x11c2 }, /* Hangul_J_Hieuh ᇂ HANGUL JONGSEONG HIEUH */
+ { 0x0eef, 0x316d }, /* Hangul_RieulYeorinHieuh ㅭ HANGUL LETTER RIEUL-YEORINHIEUH */
+ { 0x0ef0, 0x3171 }, /* Hangul_SunkyeongeumMieum ㅱ HANGUL LETTER KAPYEOUNMIEUM */
+ { 0x0ef1, 0x3178 }, /* Hangul_SunkyeongeumPieub ㅸ HANGUL LETTER KAPYEOUNPIEUP */
+ { 0x0ef2, 0x317f }, /* Hangul_PanSios ㅿ HANGUL LETTER PANSIOS */
+/* 0x0ef3 Hangul_KkogjiDalrinIeung ? ??? */
+ { 0x0ef4, 0x3184 }, /* Hangul_SunkyeongeumPhieuf ㆄ HANGUL LETTER KAPYEOUNPHIEUPH */
+ { 0x0ef5, 0x3186 }, /* Hangul_YeorinHieuh ㆆ HANGUL LETTER YEORINHIEUH */
+ { 0x0ef6, 0x318d }, /* Hangul_AraeA ㆍ HANGUL LETTER ARAEA */
+ { 0x0ef7, 0x318e }, /* Hangul_AraeAE ㆎ HANGUL LETTER ARAEAE */
+ { 0x0ef8, 0x11eb }, /* Hangul_J_PanSios ᇫ HANGUL JONGSEONG PANSIOS */
+ { 0x0ef9, 0x11f0 }, /* Hangul_J_KkogjiDalrinIeung ᇰ HANGUL JONGSEONG YESIEUNG */
+ { 0x0efa, 0x11f9 }, /* Hangul_J_YeorinHieuh ᇹ HANGUL JONGSEONG YEORINHIEUH */
+ { 0x0eff, 0x20a9 }, /* Korean_Won ₩ WON SIGN */
+ { 0x13a4, 0x20ac }, /* Euro € EURO SIGN */
+ { 0x13bc, 0x0152 }, /* OE ΠLATIN CAPITAL LIGATURE OE */
+ { 0x13bd, 0x0153 }, /* oe œ LATIN SMALL LIGATURE OE */
+ { 0x13be, 0x0178 }, /* Ydiaeresis Ÿ LATIN CAPITAL LETTER Y WITH DIAERESIS */
+ { 0x20a0, 0x20a0 }, /* EcuSign ₠ EURO-CURRENCY SIGN */
+ { 0x20a1, 0x20a1 }, /* ColonSign ₡ COLON SIGN */
+ { 0x20a2, 0x20a2 }, /* CruzeiroSign ₢ CRUZEIRO SIGN */
+ { 0x20a3, 0x20a3 }, /* FFrancSign ₣ FRENCH FRANC SIGN */
+ { 0x20a4, 0x20a4 }, /* LiraSign ₤ LIRA SIGN */
+ { 0x20a5, 0x20a5 }, /* MillSign ₥ MILL SIGN */
+ { 0x20a6, 0x20a6 }, /* NairaSign ₦ NAIRA SIGN */
+ { 0x20a7, 0x20a7 }, /* PesetaSign ₧ PESETA SIGN */
+ { 0x20a8, 0x20a8 }, /* RupeeSign ₨ RUPEE SIGN */
+ { 0x20a9, 0x20a9 }, /* WonSign ₩ WON SIGN */
+ { 0x20aa, 0x20aa }, /* NewSheqelSign ₪ NEW SHEQEL SIGN */
+ { 0x20ab, 0x20ab }, /* DongSign ₫ DONG SIGN */
+ { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */
+};
+
+/* binary search with range check */
+static uint32_t
+bin_search(const struct codepair *table, size_t length, xkb_keysym_t keysym)
+{
+ int min = 0;
+ int max = length;
+ int mid;
+
+ if (keysym < table[0].keysym || keysym > table[length].keysym)
+ return 0;
+
+ /* binary search in table */
+ while (max >= min) {
+ mid = (min + max) / 2;
+ if (table[mid].keysym < keysym)
+ min = mid + 1;
+ else if (table[mid].keysym > keysym)
+ max = mid - 1;
+ else /* found it */
+ return table[mid].ucs;
+ }
+
+ /* no matching Unicode value found in table */
+ return 0;
+}
+
+XKB_EXPORT uint32_t
+xkb_keysym_to_utf32(xkb_keysym_t keysym)
+{
+ /* first check for Latin-1 characters (1:1 mapping) */
+ if ((keysym >= 0x0020 && keysym <= 0x007e) ||
+ (keysym >= 0x00a0 && keysym <= 0x00ff))
+ return keysym;
+
+ /* patch encoding botch */
+ if (keysym == XKB_KEY_KP_Space)
+ return XKB_KEY_space & 0x7f;
+
+ /* special keysyms */
+ if ((keysym >= XKB_KEY_BackSpace && keysym <= XKB_KEY_Clear) ||
+ (keysym >= XKB_KEY_KP_Multiply && keysym <= XKB_KEY_KP_9) ||
+ keysym == XKB_KEY_Return || keysym == XKB_KEY_Escape ||
+ keysym == XKB_KEY_Delete || keysym == XKB_KEY_KP_Tab ||
+ keysym == XKB_KEY_KP_Enter || keysym == XKB_KEY_KP_Equal)
+ return keysym & 0x7f;
+
+ /* also check for directly encoded 24-bit UCS characters */
+ if ((keysym & 0xff000000) == 0x01000000)
+ return keysym & 0x00ffffff;
+
+ /* search main table */
+ return bin_search(keysymtab, ARRAY_SIZE(keysymtab) - 1, keysym);
+}
+
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Rob Bradford <rob@linux.intel.com>
+ */
+
+static int
+utf32_to_utf8(uint32_t unichar, char *buffer)
+{
+ int count, shift, length;
+ uint8_t head;
+
+ if (unichar <= 0x007f) {
+ buffer[0] = unichar;
+ buffer[1] = '\0';
+ return 2;
+ }
+ else if (unichar <= 0x07FF) {
+ length = 2;
+ head = 0xc0;
+ }
+ else if (unichar <= 0xffff) {
+ length = 3;
+ head = 0xe0;
+ }
+ else if (unichar <= 0x1fffff) {
+ length = 4;
+ head = 0xf0;
+ }
+ else if (unichar <= 0x3ffffff) {
+ length = 5;
+ head = 0xf8;
+ }
+ else {
+ length = 6;
+ head = 0xfc;
+ }
+
+ for (count = length - 1, shift = 0; count > 0; count--, shift += 6)
+ buffer[count] = 0x80 | ((unichar >> shift) & 0x3f);
+
+ buffer[0] = head | ((unichar >> shift) & 0x3f);
+ buffer[length] = '\0';
+
+ return length + 1;
+}
+
+XKB_EXPORT int
+xkb_keysym_to_utf8(xkb_keysym_t keysym, char *buffer, size_t size)
+{
+ uint32_t codepoint;
+
+ if (size < 7)
+ return -1;
+
+ codepoint = xkb_keysym_to_utf32(keysym);
+
+ if (codepoint == 0)
+ return 0;
+
+ return utf32_to_utf8(codepoint, buffer);
+}
diff --git a/src/3rdparty/xkbcommon/src/keysym.c b/src/3rdparty/xkbcommon/src/keysym.c
new file mode 100644
index 0000000000..1e92a4ac9f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/keysym.c
@@ -0,0 +1,720 @@
+/*
+ * Copyright 1985, 1987, 1990, 1998 The Open Group
+ *
+ * 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.
+ */
+
+/*
+ * Copyright © 2009 Dan Nicholson
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#include <stdlib.h>
+#include "xkbcommon/xkbcommon.h"
+#include "utils.h"
+#include "keysym.h"
+#include "ks_tables.h"
+
+static int
+compare_by_keysym(const void *a, const void *b)
+{
+ const struct name_keysym *key = a, *entry = b;
+ return key->keysym - (int32_t)entry->keysym;
+}
+
+static int
+compare_by_name(const void *a, const void *b)
+{
+ const struct name_keysym *key = a, *entry = b;
+ return strcasecmp(key->name, entry->name);
+}
+
+XKB_EXPORT int
+xkb_keysym_get_name(xkb_keysym_t ks, char *buffer, size_t size)
+{
+ const struct name_keysym search = { .name = NULL, .keysym = ks };
+ const struct name_keysym *entry;
+
+ if ((ks & ((unsigned long) ~0x1fffffff)) != 0) {
+ snprintf(buffer, size, "Invalid");
+ return -1;
+ }
+
+ entry = bsearch(&search, keysym_to_name,
+ ARRAY_SIZE(keysym_to_name),
+ sizeof(*keysym_to_name),
+ compare_by_keysym);
+ if (entry)
+ return snprintf(buffer, size, "%s", entry->name);
+
+ /* Unnamed Unicode codepoint. */
+ if (ks >= 0x01000100 && ks <= 0x0110ffff) {
+ const int width = (ks & 0xff0000UL) ? 8 : 4;
+ return snprintf(buffer, size, "U%0*lX", width, ks & 0xffffffUL);
+ }
+
+ /* Unnamed, non-Unicode, symbol (shouldn't generally happen). */
+ return snprintf(buffer, size, "0x%08x", ks);
+}
+
+/*
+ * Find the correct keysym if one case-insensitive match is given.
+ *
+ * The name_to_keysym table is sorted by strcasecmp(). So bsearch() may return
+ * _any_ of all possible case-insensitive duplicates. This function searches the
+ * returned entry @entry, all previous and all next entries that match by
+ * case-insensitive comparison and returns the exact match to @name. If @icase
+ * is true, then this returns the best case-insensitive match instead of a
+ * correct match.
+ * The "best" case-insensitive match is the lower-case keysym which we find with
+ * the help of xkb_keysym_is_lower().
+ * The only keysyms that only differ by letter-case are keysyms that are
+ * available as lower-case and upper-case variant (like KEY_a and KEY_A). So
+ * returning the first lower-case match is enough in this case.
+ */
+static const struct name_keysym *
+find_sym(const struct name_keysym *entry, const char *name, bool icase)
+{
+ const struct name_keysym *iter, *last;
+ size_t len = ARRAY_SIZE(name_to_keysym);
+
+ if (!entry)
+ return NULL;
+
+ if (!icase && strcmp(entry->name, name) == 0)
+ return entry;
+ if (icase && xkb_keysym_is_lower(entry->keysym))
+ return entry;
+
+ for (iter = entry - 1; iter >= name_to_keysym; --iter) {
+ if (!icase && strcmp(iter->name, name) == 0)
+ return iter;
+ if (strcasecmp(iter->name, entry->name) != 0)
+ break;
+ if (icase && xkb_keysym_is_lower(iter->keysym))
+ return iter;
+ }
+
+ last = name_to_keysym + len;
+ for (iter = entry + 1; iter < last; --iter) {
+ if (!icase && strcmp(iter->name, name) == 0)
+ return iter;
+ if (strcasecmp(iter->name, entry->name) != 0)
+ break;
+ if (icase && xkb_keysym_is_lower(iter->keysym))
+ return iter;
+ }
+
+ if (icase)
+ return entry;
+ return NULL;
+}
+
+XKB_EXPORT xkb_keysym_t
+xkb_keysym_from_name(const char *s, enum xkb_keysym_flags flags)
+{
+ const struct name_keysym search = { .name = s, .keysym = 0 };
+ const struct name_keysym *entry;
+ char *tmp;
+ xkb_keysym_t val;
+ bool icase = !!(flags & XKB_KEYSYM_CASE_INSENSITIVE);
+
+ if (flags & ~XKB_KEYSYM_CASE_INSENSITIVE)
+ return XKB_KEY_NoSymbol;
+
+ entry = bsearch(&search, name_to_keysym,
+ ARRAY_SIZE(name_to_keysym),
+ sizeof(*name_to_keysym),
+ compare_by_name);
+ entry = find_sym(entry, s, icase);
+ if (entry)
+ return entry->keysym;
+
+ if (*s == 'U' || (icase && *s == 'u')) {
+ val = strtoul(&s[1], &tmp, 16);
+ if (tmp && *tmp != '\0')
+ return XKB_KEY_NoSymbol;
+
+ if (val < 0x20 || (val > 0x7e && val < 0xa0))
+ return XKB_KEY_NoSymbol;
+ if (val < 0x100)
+ return val;
+ if (val > 0x10ffff)
+ return XKB_KEY_NoSymbol;
+ return val | 0x01000000;
+ }
+ else if (s[0] == '0' && (s[1] == 'x' || (icase && s[1] == 'X'))) {
+ val = strtoul(&s[2], &tmp, 16);
+ if (tmp && *tmp != '\0')
+ return XKB_KEY_NoSymbol;
+
+ return val;
+ }
+
+ /* Stupid inconsistency between the headers and XKeysymDB: the former has
+ * no separating underscore, while some XF86* syms in the latter did.
+ * As a last ditch effort, try without. */
+ if (strncmp(s, "XF86_", 5) == 0 ||
+ (icase && strncasecmp(s, "XF86_", 5) == 0)) {
+ xkb_keysym_t ret;
+ tmp = strdup(s);
+ if (!tmp)
+ return XKB_KEY_NoSymbol;
+ memmove(&tmp[4], &tmp[5], strlen(s) - 5 + 1);
+ ret = xkb_keysym_from_name(tmp, flags);
+ free(tmp);
+ return ret;
+ }
+
+ return XKB_KEY_NoSymbol;
+}
+
+bool
+xkb_keysym_is_keypad(xkb_keysym_t keysym)
+{
+ return keysym >= XKB_KEY_KP_Space && keysym <= XKB_KEY_KP_Equal;
+}
+
+static void
+XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper);
+
+bool
+xkb_keysym_is_lower(xkb_keysym_t ks)
+{
+ xkb_keysym_t lower, upper;
+
+ XConvertCase(ks, &lower, &upper);
+
+ if (lower == upper)
+ return false;
+
+ return (ks == lower ? true : false);
+}
+
+bool
+xkb_keysym_is_upper(xkb_keysym_t ks)
+{
+ xkb_keysym_t lower, upper;
+
+ XConvertCase(ks, &lower, &upper);
+
+ if (lower == upper)
+ return false;
+
+ return (ks == upper ? true : false);
+}
+
+/*
+ * The following is copied verbatim from libX11:src/KeyBind.c, commit
+ * d45b3fc19fbe95c41afc4e51d768df6d42332010, with the following changes:
+ * - unsigned -> uint32_t
+ * - unsigend short -> uint16_t
+ * - s/XK_/XKB_KEY_
+ *
+ * XXX: If newlocale() and iswlower_l()/iswupper_l() interface ever
+ * become portable, we should use that in conjunction with
+ * xkb_keysym_to_utf32(), instead of all this stuff. We should
+ * be sure to give the same results as libX11, though, and be
+ * locale independent; this information is used by xkbcomp to
+ * find the automatic type to assign to key groups.
+ */
+
+static void
+UCSConvertCase(uint32_t code, xkb_keysym_t *lower, xkb_keysym_t *upper)
+{
+ /* Case conversion for UCS, as in Unicode Data version 4.0.0 */
+ /* NB: Only converts simple one-to-one mappings. */
+
+ /* Tables are used where they take less space than */
+ /* the code to work out the mappings. Zero values mean */
+ /* undefined code points. */
+
+ static uint16_t const IPAExt_upper_mapping[] = { /* part only */
+ 0x0181, 0x0186, 0x0255, 0x0189, 0x018A,
+ 0x0258, 0x018F, 0x025A, 0x0190, 0x025C, 0x025D, 0x025E, 0x025F,
+ 0x0193, 0x0261, 0x0262, 0x0194, 0x0264, 0x0265, 0x0266, 0x0267,
+ 0x0197, 0x0196, 0x026A, 0x026B, 0x026C, 0x026D, 0x026E, 0x019C,
+ 0x0270, 0x0271, 0x019D, 0x0273, 0x0274, 0x019F, 0x0276, 0x0277,
+ 0x0278, 0x0279, 0x027A, 0x027B, 0x027C, 0x027D, 0x027E, 0x027F,
+ 0x01A6, 0x0281, 0x0282, 0x01A9, 0x0284, 0x0285, 0x0286, 0x0287,
+ 0x01AE, 0x0289, 0x01B1, 0x01B2, 0x028C, 0x028D, 0x028E, 0x028F,
+ 0x0290, 0x0291, 0x01B7
+ };
+
+ static uint16_t const LatinExtB_upper_mapping[] = { /* first part only */
+ 0x0180, 0x0181, 0x0182, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187,
+ 0x0187, 0x0189, 0x018A, 0x018B, 0x018B, 0x018D, 0x018E, 0x018F,
+ 0x0190, 0x0191, 0x0191, 0x0193, 0x0194, 0x01F6, 0x0196, 0x0197,
+ 0x0198, 0x0198, 0x019A, 0x019B, 0x019C, 0x019D, 0x0220, 0x019F,
+ 0x01A0, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, 0x01A6, 0x01A7,
+ 0x01A7, 0x01A9, 0x01AA, 0x01AB, 0x01AC, 0x01AC, 0x01AE, 0x01AF,
+ 0x01AF, 0x01B1, 0x01B2, 0x01B3, 0x01B3, 0x01B5, 0x01B5, 0x01B7,
+ 0x01B8, 0x01B8, 0x01BA, 0x01BB, 0x01BC, 0x01BC, 0x01BE, 0x01F7,
+ 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C4, 0x01C4, 0x01C4, 0x01C7,
+ 0x01C7, 0x01C7, 0x01CA, 0x01CA, 0x01CA
+ };
+
+ static uint16_t const LatinExtB_lower_mapping[] = { /* first part only */
+ 0x0180, 0x0253, 0x0183, 0x0183, 0x0185, 0x0185, 0x0254, 0x0188,
+ 0x0188, 0x0256, 0x0257, 0x018C, 0x018C, 0x018D, 0x01DD, 0x0259,
+ 0x025B, 0x0192, 0x0192, 0x0260, 0x0263, 0x0195, 0x0269, 0x0268,
+ 0x0199, 0x0199, 0x019A, 0x019B, 0x026F, 0x0272, 0x019E, 0x0275,
+ 0x01A1, 0x01A1, 0x01A3, 0x01A3, 0x01A5, 0x01A5, 0x0280, 0x01A8,
+ 0x01A8, 0x0283, 0x01AA, 0x01AB, 0x01AD, 0x01AD, 0x0288, 0x01B0,
+ 0x01B0, 0x028A, 0x028B, 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x0292,
+ 0x01B9, 0x01B9, 0x01BA, 0x01BB, 0x01BD, 0x01BD, 0x01BE, 0x01BF,
+ 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C6, 0x01C6, 0x01C6, 0x01C9,
+ 0x01C9, 0x01C9, 0x01CC, 0x01CC, 0x01CC
+ };
+
+ static uint16_t const Greek_upper_mapping[] = {
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x037A, 0x0000, 0x0000, 0x0000, 0x037E, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0384, 0x0385, 0x0386, 0x0387,
+ 0x0388, 0x0389, 0x038A, 0x0000, 0x038C, 0x0000, 0x038E, 0x038F,
+ 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+ 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+ 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
+ 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x0386, 0x0388, 0x0389, 0x038A,
+ 0x03B0, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+ 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+ 0x03A0, 0x03A1, 0x03A3, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
+ 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x038C, 0x038E, 0x038F, 0x0000,
+ 0x0392, 0x0398, 0x03D2, 0x03D3, 0x03D4, 0x03A6, 0x03A0, 0x03D7,
+ 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE,
+ 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6,
+ 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE,
+ 0x039A, 0x03A1, 0x03F9, 0x03F3, 0x03F4, 0x0395, 0x03F6, 0x03F7,
+ 0x03F7, 0x03F9, 0x03FA, 0x03FA, 0x0000, 0x0000, 0x0000, 0x0000
+ };
+
+ static uint16_t const Greek_lower_mapping[] = {
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x037A, 0x0000, 0x0000, 0x0000, 0x037E, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0384, 0x0385, 0x03AC, 0x0387,
+ 0x03AD, 0x03AE, 0x03AF, 0x0000, 0x03CC, 0x0000, 0x03CD, 0x03CE,
+ 0x0390, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+ 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+ 0x03C0, 0x03C1, 0x0000, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
+ 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
+ 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+ 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
+ 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000,
+ 0x03D0, 0x03D1, 0x03D2, 0x03D3, 0x03D4, 0x03D5, 0x03D6, 0x03D7,
+ 0x03D9, 0x03D9, 0x03DB, 0x03DB, 0x03DD, 0x03DD, 0x03DF, 0x03DF,
+ 0x03E1, 0x03E1, 0x03E3, 0x03E3, 0x03E5, 0x03E5, 0x03E7, 0x03E7,
+ 0x03E9, 0x03E9, 0x03EB, 0x03EB, 0x03ED, 0x03ED, 0x03EF, 0x03EF,
+ 0x03F0, 0x03F1, 0x03F2, 0x03F3, 0x03B8, 0x03F5, 0x03F6, 0x03F8,
+ 0x03F8, 0x03F2, 0x03FB, 0x03FB, 0x0000, 0x0000, 0x0000, 0x0000
+ };
+
+ static uint16_t const GreekExt_lower_mapping[] = {
+ 0x1F00, 0x1F01, 0x1F02, 0x1F03, 0x1F04, 0x1F05, 0x1F06, 0x1F07,
+ 0x1F00, 0x1F01, 0x1F02, 0x1F03, 0x1F04, 0x1F05, 0x1F06, 0x1F07,
+ 0x1F10, 0x1F11, 0x1F12, 0x1F13, 0x1F14, 0x1F15, 0x0000, 0x0000,
+ 0x1F10, 0x1F11, 0x1F12, 0x1F13, 0x1F14, 0x1F15, 0x0000, 0x0000,
+ 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27,
+ 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27,
+ 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37,
+ 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37,
+ 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F45, 0x0000, 0x0000,
+ 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F45, 0x0000, 0x0000,
+ 0x1F50, 0x1F51, 0x1F52, 0x1F53, 0x1F54, 0x1F55, 0x1F56, 0x1F57,
+ 0x0000, 0x1F51, 0x0000, 0x1F53, 0x0000, 0x1F55, 0x0000, 0x1F57,
+ 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67,
+ 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67,
+ 0x1F70, 0x1F71, 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1F76, 0x1F77,
+ 0x1F78, 0x1F79, 0x1F7A, 0x1F7B, 0x1F7C, 0x1F7D, 0x0000, 0x0000,
+ 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87,
+ 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87,
+ 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97,
+ 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97,
+ 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7,
+ 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7,
+ 0x1FB0, 0x1FB1, 0x1FB2, 0x1FB3, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7,
+ 0x1FB0, 0x1FB1, 0x1F70, 0x1F71, 0x1FB3, 0x1FBD, 0x1FBE, 0x1FBF,
+ 0x1FC0, 0x1FC1, 0x1FC2, 0x1FC3, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7,
+ 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1FC3, 0x1FCD, 0x1FCE, 0x1FCF,
+ 0x1FD0, 0x1FD1, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7,
+ 0x1FD0, 0x1FD1, 0x1F76, 0x1F77, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF,
+ 0x1FE0, 0x1FE1, 0x1FE2, 0x1FE3, 0x1FE4, 0x1FE5, 0x1FE6, 0x1FE7,
+ 0x1FE0, 0x1FE1, 0x1F7A, 0x1F7B, 0x1FE5, 0x1FED, 0x1FEE, 0x1FEF,
+ 0x0000, 0x0000, 0x1FF2, 0x1FF3, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7,
+ 0x1F78, 0x1F79, 0x1F7C, 0x1F7D, 0x1FF3, 0x1FFD, 0x1FFE, 0x0000
+ };
+
+ static uint16_t const GreekExt_upper_mapping[] = {
+ 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F,
+ 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F,
+ 0x1F18, 0x1F19, 0x1F1A, 0x1F1B, 0x1F1C, 0x1F1D, 0x0000, 0x0000,
+ 0x1F18, 0x1F19, 0x1F1A, 0x1F1B, 0x1F1C, 0x1F1D, 0x0000, 0x0000,
+ 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F,
+ 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F,
+ 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F,
+ 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F,
+ 0x1F48, 0x1F49, 0x1F4A, 0x1F4B, 0x1F4C, 0x1F4D, 0x0000, 0x0000,
+ 0x1F48, 0x1F49, 0x1F4A, 0x1F4B, 0x1F4C, 0x1F4D, 0x0000, 0x0000,
+ 0x1F50, 0x1F59, 0x1F52, 0x1F5B, 0x1F54, 0x1F5D, 0x1F56, 0x1F5F,
+ 0x0000, 0x1F59, 0x0000, 0x1F5B, 0x0000, 0x1F5D, 0x0000, 0x1F5F,
+ 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F,
+ 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F,
+ 0x1FBA, 0x1FBB, 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FDA, 0x1FDB,
+ 0x1FF8, 0x1FF9, 0x1FEA, 0x1FEB, 0x1FFA, 0x1FFB, 0x0000, 0x0000,
+ 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F,
+ 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F,
+ 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F,
+ 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F,
+ 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF,
+ 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF,
+ 0x1FB8, 0x1FB9, 0x1FB2, 0x1FBC, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7,
+ 0x1FB8, 0x1FB9, 0x1FBA, 0x1FBB, 0x1FBC, 0x1FBD, 0x0399, 0x1FBF,
+ 0x1FC0, 0x1FC1, 0x1FC2, 0x1FCC, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7,
+ 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FCC, 0x1FCD, 0x1FCE, 0x1FCF,
+ 0x1FD8, 0x1FD9, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7,
+ 0x1FD8, 0x1FD9, 0x1FDA, 0x1FDB, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF,
+ 0x1FE8, 0x1FE9, 0x1FE2, 0x1FE3, 0x1FE4, 0x1FEC, 0x1FE6, 0x1FE7,
+ 0x1FE8, 0x1FE9, 0x1FEA, 0x1FEB, 0x1FEC, 0x1FED, 0x1FEE, 0x1FEF,
+ 0x0000, 0x0000, 0x1FF2, 0x1FFC, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7,
+ 0x1FF8, 0x1FF9, 0x1FFA, 0x1FFB, 0x1FFC, 0x1FFD, 0x1FFE, 0x0000
+ };
+
+ *lower = code;
+ *upper = code;
+
+ /* Basic Latin and Latin-1 Supplement, U+0000 to U+00FF */
+ if (code <= 0x00ff) {
+ if (code >= 0x0041 && code <= 0x005a) /* A-Z */
+ *lower += 0x20;
+ else if (code >= 0x0061 && code <= 0x007a) /* a-z */
+ *upper -= 0x20;
+ else if ( (code >= 0x00c0 && code <= 0x00d6) ||
+ (code >= 0x00d8 && code <= 0x00de) )
+ *lower += 0x20;
+ else if ( (code >= 0x00e0 && code <= 0x00f6) ||
+ (code >= 0x00f8 && code <= 0x00fe) )
+ *upper -= 0x20;
+ else if (code == 0x00ff) /* y with diaeresis */
+ *upper = 0x0178;
+ else if (code == 0x00b5) /* micro sign */
+ *upper = 0x039c;
+ return;
+ }
+
+ /* Latin Extended-A, U+0100 to U+017F */
+ if (code >= 0x0100 && code <= 0x017f) {
+ if ( (code >= 0x0100 && code <= 0x012f) ||
+ (code >= 0x0132 && code <= 0x0137) ||
+ (code >= 0x014a && code <= 0x0177) ) {
+ *upper = code & ~1;
+ *lower = code | 1;
+ }
+ else if ( (code >= 0x0139 && code <= 0x0148) ||
+ (code >= 0x0179 && code <= 0x017e) ) {
+ if (code & 1)
+ *lower += 1;
+ else
+ *upper -= 1;
+ }
+ else if (code == 0x0130)
+ *lower = 0x0069;
+ else if (code == 0x0131)
+ *upper = 0x0049;
+ else if (code == 0x0178)
+ *lower = 0x00ff;
+ else if (code == 0x017f)
+ *upper = 0x0053;
+ return;
+ }
+
+ /* Latin Extended-B, U+0180 to U+024F */
+ if (code >= 0x0180 && code <= 0x024f) {
+ if (code >= 0x01cd && code <= 0x01dc) {
+ if (code & 1)
+ *lower += 1;
+ else
+ *upper -= 1;
+ }
+ else if ( (code >= 0x01de && code <= 0x01ef) ||
+ (code >= 0x01f4 && code <= 0x01f5) ||
+ (code >= 0x01f8 && code <= 0x021f) ||
+ (code >= 0x0222 && code <= 0x0233) ) {
+ *lower |= 1;
+ *upper &= ~1;
+ }
+ else if (code >= 0x0180 && code <= 0x01cc) {
+ *lower = LatinExtB_lower_mapping[code - 0x0180];
+ *upper = LatinExtB_upper_mapping[code - 0x0180];
+ }
+ else if (code == 0x01dd)
+ *upper = 0x018e;
+ else if (code == 0x01f1 || code == 0x01f2) {
+ *lower = 0x01f3;
+ *upper = 0x01f1;
+ }
+ else if (code == 0x01f3)
+ *upper = 0x01f1;
+ else if (code == 0x01f6)
+ *lower = 0x0195;
+ else if (code == 0x01f7)
+ *lower = 0x01bf;
+ else if (code == 0x0220)
+ *lower = 0x019e;
+ return;
+ }
+
+ /* IPA Extensions, U+0250 to U+02AF */
+ if (code >= 0x0253 && code <= 0x0292) {
+ *upper = IPAExt_upper_mapping[code - 0x0253];
+ }
+
+ /* Combining Diacritical Marks, U+0300 to U+036F */
+ if (code == 0x0345) {
+ *upper = 0x0399;
+ }
+
+ /* Greek and Coptic, U+0370 to U+03FF */
+ if (code >= 0x0370 && code <= 0x03ff) {
+ *lower = Greek_lower_mapping[code - 0x0370];
+ *upper = Greek_upper_mapping[code - 0x0370];
+ if (*upper == 0)
+ *upper = code;
+ if (*lower == 0)
+ *lower = code;
+ }
+
+ /* Cyrillic and Cyrillic Supplementary, U+0400 to U+052F */
+ if ( (code >= 0x0400 && code <= 0x04ff) ||
+ (code >= 0x0500 && code <= 0x052f) ) {
+ if (code >= 0x0400 && code <= 0x040f)
+ *lower += 0x50;
+ else if (code >= 0x0410 && code <= 0x042f)
+ *lower += 0x20;
+ else if (code >= 0x0430 && code <= 0x044f)
+ *upper -= 0x20;
+ else if (code >= 0x0450 && code <= 0x045f)
+ *upper -= 0x50;
+ else if ( (code >= 0x0460 && code <= 0x0481) ||
+ (code >= 0x048a && code <= 0x04bf) ||
+ (code >= 0x04d0 && code <= 0x04f5) ||
+ (code >= 0x04f8 && code <= 0x04f9) ||
+ (code >= 0x0500 && code <= 0x050f) ) {
+ *upper &= ~1;
+ *lower |= 1;
+ }
+ else if (code >= 0x04c1 && code <= 0x04ce) {
+ if (code & 1)
+ *lower += 1;
+ else
+ *upper -= 1;
+ }
+ }
+
+ /* Armenian, U+0530 to U+058F */
+ if (code >= 0x0530 && code <= 0x058f) {
+ if (code >= 0x0531 && code <= 0x0556)
+ *lower += 0x30;
+ else if (code >=0x0561 && code <= 0x0586)
+ *upper -= 0x30;
+ }
+
+ /* Latin Extended Additional, U+1E00 to U+1EFF */
+ if (code >= 0x1e00 && code <= 0x1eff) {
+ if ( (code >= 0x1e00 && code <= 0x1e95) ||
+ (code >= 0x1ea0 && code <= 0x1ef9) ) {
+ *upper &= ~1;
+ *lower |= 1;
+ }
+ else if (code == 0x1e9b)
+ *upper = 0x1e60;
+ }
+
+ /* Greek Extended, U+1F00 to U+1FFF */
+ if (code >= 0x1f00 && code <= 0x1fff) {
+ *lower = GreekExt_lower_mapping[code - 0x1f00];
+ *upper = GreekExt_upper_mapping[code - 0x1f00];
+ if (*upper == 0)
+ *upper = code;
+ if (*lower == 0)
+ *lower = code;
+ }
+
+ /* Letterlike Symbols, U+2100 to U+214F */
+ if (code >= 0x2100 && code <= 0x214f) {
+ switch (code) {
+ case 0x2126: *lower = 0x03c9; break;
+ case 0x212a: *lower = 0x006b; break;
+ case 0x212b: *lower = 0x00e5; break;
+ }
+ }
+ /* Number Forms, U+2150 to U+218F */
+ else if (code >= 0x2160 && code <= 0x216f)
+ *lower += 0x10;
+ else if (code >= 0x2170 && code <= 0x217f)
+ *upper -= 0x10;
+ /* Enclosed Alphanumerics, U+2460 to U+24FF */
+ else if (code >= 0x24b6 && code <= 0x24cf)
+ *lower += 0x1a;
+ else if (code >= 0x24d0 && code <= 0x24e9)
+ *upper -= 0x1a;
+ /* Halfwidth and Fullwidth Forms, U+FF00 to U+FFEF */
+ else if (code >= 0xff21 && code <= 0xff3a)
+ *lower += 0x20;
+ else if (code >= 0xff41 && code <= 0xff5a)
+ *upper -= 0x20;
+ /* Deseret, U+10400 to U+104FF */
+ else if (code >= 0x10400 && code <= 0x10427)
+ *lower += 0x28;
+ else if (code >= 0x10428 && code <= 0x1044f)
+ *upper -= 0x28;
+}
+
+static void
+XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper)
+{
+ /* Latin 1 keysym */
+ if (sym < 0x100) {
+ UCSConvertCase(sym, lower, upper);
+ return;
+ }
+
+ /* Unicode keysym */
+ if ((sym & 0xff000000) == 0x01000000) {
+ UCSConvertCase((sym & 0x00ffffff), lower, upper);
+ *upper |= 0x01000000;
+ *lower |= 0x01000000;
+ return;
+ }
+
+ /* Legacy keysym */
+
+ *lower = sym;
+ *upper = sym;
+
+ switch(sym >> 8) {
+ case 1: /* Latin 2 */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym == XKB_KEY_Aogonek)
+ *lower = XKB_KEY_aogonek;
+ else if (sym >= XKB_KEY_Lstroke && sym <= XKB_KEY_Sacute)
+ *lower += (XKB_KEY_lstroke - XKB_KEY_Lstroke);
+ else if (sym >= XKB_KEY_Scaron && sym <= XKB_KEY_Zacute)
+ *lower += (XKB_KEY_scaron - XKB_KEY_Scaron);
+ else if (sym >= XKB_KEY_Zcaron && sym <= XKB_KEY_Zabovedot)
+ *lower += (XKB_KEY_zcaron - XKB_KEY_Zcaron);
+ else if (sym == XKB_KEY_aogonek)
+ *upper = XKB_KEY_Aogonek;
+ else if (sym >= XKB_KEY_lstroke && sym <= XKB_KEY_sacute)
+ *upper -= (XKB_KEY_lstroke - XKB_KEY_Lstroke);
+ else if (sym >= XKB_KEY_scaron && sym <= XKB_KEY_zacute)
+ *upper -= (XKB_KEY_scaron - XKB_KEY_Scaron);
+ else if (sym >= XKB_KEY_zcaron && sym <= XKB_KEY_zabovedot)
+ *upper -= (XKB_KEY_zcaron - XKB_KEY_Zcaron);
+ else if (sym >= XKB_KEY_Racute && sym <= XKB_KEY_Tcedilla)
+ *lower += (XKB_KEY_racute - XKB_KEY_Racute);
+ else if (sym >= XKB_KEY_racute && sym <= XKB_KEY_tcedilla)
+ *upper -= (XKB_KEY_racute - XKB_KEY_Racute);
+ break;
+ case 2: /* Latin 3 */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym >= XKB_KEY_Hstroke && sym <= XKB_KEY_Hcircumflex)
+ *lower += (XKB_KEY_hstroke - XKB_KEY_Hstroke);
+ else if (sym >= XKB_KEY_Gbreve && sym <= XKB_KEY_Jcircumflex)
+ *lower += (XKB_KEY_gbreve - XKB_KEY_Gbreve);
+ else if (sym >= XKB_KEY_hstroke && sym <= XKB_KEY_hcircumflex)
+ *upper -= (XKB_KEY_hstroke - XKB_KEY_Hstroke);
+ else if (sym >= XKB_KEY_gbreve && sym <= XKB_KEY_jcircumflex)
+ *upper -= (XKB_KEY_gbreve - XKB_KEY_Gbreve);
+ else if (sym >= XKB_KEY_Cabovedot && sym <= XKB_KEY_Scircumflex)
+ *lower += (XKB_KEY_cabovedot - XKB_KEY_Cabovedot);
+ else if (sym >= XKB_KEY_cabovedot && sym <= XKB_KEY_scircumflex)
+ *upper -= (XKB_KEY_cabovedot - XKB_KEY_Cabovedot);
+ break;
+ case 3: /* Latin 4 */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym >= XKB_KEY_Rcedilla && sym <= XKB_KEY_Tslash)
+ *lower += (XKB_KEY_rcedilla - XKB_KEY_Rcedilla);
+ else if (sym >= XKB_KEY_rcedilla && sym <= XKB_KEY_tslash)
+ *upper -= (XKB_KEY_rcedilla - XKB_KEY_Rcedilla);
+ else if (sym == XKB_KEY_ENG)
+ *lower = XKB_KEY_eng;
+ else if (sym == XKB_KEY_eng)
+ *upper = XKB_KEY_ENG;
+ else if (sym >= XKB_KEY_Amacron && sym <= XKB_KEY_Umacron)
+ *lower += (XKB_KEY_amacron - XKB_KEY_Amacron);
+ else if (sym >= XKB_KEY_amacron && sym <= XKB_KEY_umacron)
+ *upper -= (XKB_KEY_amacron - XKB_KEY_Amacron);
+ break;
+ case 6: /* Cyrillic */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym >= XKB_KEY_Serbian_DJE && sym <= XKB_KEY_Serbian_DZE)
+ *lower -= (XKB_KEY_Serbian_DJE - XKB_KEY_Serbian_dje);
+ else if (sym >= XKB_KEY_Serbian_dje && sym <= XKB_KEY_Serbian_dze)
+ *upper += (XKB_KEY_Serbian_DJE - XKB_KEY_Serbian_dje);
+ else if (sym >= XKB_KEY_Cyrillic_YU && sym <= XKB_KEY_Cyrillic_HARDSIGN)
+ *lower -= (XKB_KEY_Cyrillic_YU - XKB_KEY_Cyrillic_yu);
+ else if (sym >= XKB_KEY_Cyrillic_yu && sym <= XKB_KEY_Cyrillic_hardsign)
+ *upper += (XKB_KEY_Cyrillic_YU - XKB_KEY_Cyrillic_yu);
+ break;
+ case 7: /* Greek */
+ /* Assume the KeySym is a legal value (ignore discontinuities) */
+ if (sym >= XKB_KEY_Greek_ALPHAaccent && sym <= XKB_KEY_Greek_OMEGAaccent)
+ *lower += (XKB_KEY_Greek_alphaaccent - XKB_KEY_Greek_ALPHAaccent);
+ else if (sym >= XKB_KEY_Greek_alphaaccent && sym <= XKB_KEY_Greek_omegaaccent &&
+ sym != XKB_KEY_Greek_iotaaccentdieresis &&
+ sym != XKB_KEY_Greek_upsilonaccentdieresis)
+ *upper -= (XKB_KEY_Greek_alphaaccent - XKB_KEY_Greek_ALPHAaccent);
+ else if (sym >= XKB_KEY_Greek_ALPHA && sym <= XKB_KEY_Greek_OMEGA)
+ *lower += (XKB_KEY_Greek_alpha - XKB_KEY_Greek_ALPHA);
+ else if (sym >= XKB_KEY_Greek_alpha && sym <= XKB_KEY_Greek_omega &&
+ sym != XKB_KEY_Greek_finalsmallsigma)
+ *upper -= (XKB_KEY_Greek_alpha - XKB_KEY_Greek_ALPHA);
+ break;
+ case 0x13: /* Latin 9 */
+ if (sym == XKB_KEY_OE)
+ *lower = XKB_KEY_oe;
+ else if (sym == XKB_KEY_oe)
+ *upper = XKB_KEY_OE;
+ else if (sym == XKB_KEY_Ydiaeresis)
+ *lower = XKB_KEY_ydiaeresis;
+ break;
+ }
+}
diff --git a/src/3rdparty/xkbcommon/src/keysym.h b/src/3rdparty/xkbcommon/src/keysym.h
new file mode 100644
index 0000000000..6f2280bfd4
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/keysym.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright 1985, 1987, 1990, 1998 The Open Group
+ *
+ * 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.
+ */
+
+/*
+ * Copyright © 2009 Dan Nicholson
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef KEYSYM_H
+#define KEYSYM_H
+
+bool
+xkb_keysym_is_lower(xkb_keysym_t keysym);
+
+bool
+xkb_keysym_is_upper(xkb_keysym_t keysym);
+
+bool
+xkb_keysym_is_keypad(xkb_keysym_t keysym);
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/ks_tables.h b/src/3rdparty/xkbcommon/src/ks_tables.h
new file mode 100644
index 0000000000..a7e2b4705f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/ks_tables.h
@@ -0,0 +1,4681 @@
+/* This file is autogenerated from Makefile.am; please do not commit directly. */
+
+struct name_keysym {
+ const char *name;
+ xkb_keysym_t keysym;
+};
+
+static const struct name_keysym name_to_keysym[] = {
+ { "0", XKB_KEY_0 },
+ { "1", XKB_KEY_1 },
+ { "2", XKB_KEY_2 },
+ { "3", XKB_KEY_3 },
+ { "3270_AltCursor", XKB_KEY_3270_AltCursor },
+ { "3270_Attn", XKB_KEY_3270_Attn },
+ { "3270_BackTab", XKB_KEY_3270_BackTab },
+ { "3270_ChangeScreen", XKB_KEY_3270_ChangeScreen },
+ { "3270_Copy", XKB_KEY_3270_Copy },
+ { "3270_CursorBlink", XKB_KEY_3270_CursorBlink },
+ { "3270_CursorSelect", XKB_KEY_3270_CursorSelect },
+ { "3270_DeleteWord", XKB_KEY_3270_DeleteWord },
+ { "3270_Duplicate", XKB_KEY_3270_Duplicate },
+ { "3270_Enter", XKB_KEY_3270_Enter },
+ { "3270_EraseEOF", XKB_KEY_3270_EraseEOF },
+ { "3270_EraseInput", XKB_KEY_3270_EraseInput },
+ { "3270_ExSelect", XKB_KEY_3270_ExSelect },
+ { "3270_FieldMark", XKB_KEY_3270_FieldMark },
+ { "3270_Ident", XKB_KEY_3270_Ident },
+ { "3270_Jump", XKB_KEY_3270_Jump },
+ { "3270_KeyClick", XKB_KEY_3270_KeyClick },
+ { "3270_Left2", XKB_KEY_3270_Left2 },
+ { "3270_PA1", XKB_KEY_3270_PA1 },
+ { "3270_PA2", XKB_KEY_3270_PA2 },
+ { "3270_PA3", XKB_KEY_3270_PA3 },
+ { "3270_Play", XKB_KEY_3270_Play },
+ { "3270_PrintScreen", XKB_KEY_3270_PrintScreen },
+ { "3270_Quit", XKB_KEY_3270_Quit },
+ { "3270_Record", XKB_KEY_3270_Record },
+ { "3270_Reset", XKB_KEY_3270_Reset },
+ { "3270_Right2", XKB_KEY_3270_Right2 },
+ { "3270_Rule", XKB_KEY_3270_Rule },
+ { "3270_Setup", XKB_KEY_3270_Setup },
+ { "3270_Test", XKB_KEY_3270_Test },
+ { "4", XKB_KEY_4 },
+ { "5", XKB_KEY_5 },
+ { "6", XKB_KEY_6 },
+ { "7", XKB_KEY_7 },
+ { "8", XKB_KEY_8 },
+ { "9", XKB_KEY_9 },
+ { "A", XKB_KEY_A },
+ { "a", XKB_KEY_a },
+ { "Aacute", XKB_KEY_Aacute },
+ { "aacute", XKB_KEY_aacute },
+ { "Abelowdot", XKB_KEY_Abelowdot },
+ { "abelowdot", XKB_KEY_abelowdot },
+ { "abovedot", XKB_KEY_abovedot },
+ { "Abreve", XKB_KEY_Abreve },
+ { "abreve", XKB_KEY_abreve },
+ { "Abreveacute", XKB_KEY_Abreveacute },
+ { "abreveacute", XKB_KEY_abreveacute },
+ { "Abrevebelowdot", XKB_KEY_Abrevebelowdot },
+ { "abrevebelowdot", XKB_KEY_abrevebelowdot },
+ { "Abrevegrave", XKB_KEY_Abrevegrave },
+ { "abrevegrave", XKB_KEY_abrevegrave },
+ { "Abrevehook", XKB_KEY_Abrevehook },
+ { "abrevehook", XKB_KEY_abrevehook },
+ { "Abrevetilde", XKB_KEY_Abrevetilde },
+ { "abrevetilde", XKB_KEY_abrevetilde },
+ { "AccessX_Enable", XKB_KEY_AccessX_Enable },
+ { "AccessX_Feedback_Enable", XKB_KEY_AccessX_Feedback_Enable },
+ { "Acircumflex", XKB_KEY_Acircumflex },
+ { "acircumflex", XKB_KEY_acircumflex },
+ { "Acircumflexacute", XKB_KEY_Acircumflexacute },
+ { "acircumflexacute", XKB_KEY_acircumflexacute },
+ { "Acircumflexbelowdot", XKB_KEY_Acircumflexbelowdot },
+ { "acircumflexbelowdot", XKB_KEY_acircumflexbelowdot },
+ { "Acircumflexgrave", XKB_KEY_Acircumflexgrave },
+ { "acircumflexgrave", XKB_KEY_acircumflexgrave },
+ { "Acircumflexhook", XKB_KEY_Acircumflexhook },
+ { "acircumflexhook", XKB_KEY_acircumflexhook },
+ { "Acircumflextilde", XKB_KEY_Acircumflextilde },
+ { "acircumflextilde", XKB_KEY_acircumflextilde },
+ { "acute", XKB_KEY_acute },
+ { "Adiaeresis", XKB_KEY_Adiaeresis },
+ { "adiaeresis", XKB_KEY_adiaeresis },
+ { "AE", XKB_KEY_AE },
+ { "ae", XKB_KEY_ae },
+ { "Agrave", XKB_KEY_Agrave },
+ { "agrave", XKB_KEY_agrave },
+ { "Ahook", XKB_KEY_Ahook },
+ { "ahook", XKB_KEY_ahook },
+ { "Alt_L", XKB_KEY_Alt_L },
+ { "Alt_R", XKB_KEY_Alt_R },
+ { "Amacron", XKB_KEY_Amacron },
+ { "amacron", XKB_KEY_amacron },
+ { "ampersand", XKB_KEY_ampersand },
+ { "Aogonek", XKB_KEY_Aogonek },
+ { "aogonek", XKB_KEY_aogonek },
+ { "apostrophe", XKB_KEY_apostrophe },
+ { "approxeq", XKB_KEY_approxeq },
+ { "approximate", XKB_KEY_approximate },
+ { "Arabic_0", XKB_KEY_Arabic_0 },
+ { "Arabic_1", XKB_KEY_Arabic_1 },
+ { "Arabic_2", XKB_KEY_Arabic_2 },
+ { "Arabic_3", XKB_KEY_Arabic_3 },
+ { "Arabic_4", XKB_KEY_Arabic_4 },
+ { "Arabic_5", XKB_KEY_Arabic_5 },
+ { "Arabic_6", XKB_KEY_Arabic_6 },
+ { "Arabic_7", XKB_KEY_Arabic_7 },
+ { "Arabic_8", XKB_KEY_Arabic_8 },
+ { "Arabic_9", XKB_KEY_Arabic_9 },
+ { "Arabic_ain", XKB_KEY_Arabic_ain },
+ { "Arabic_alef", XKB_KEY_Arabic_alef },
+ { "Arabic_alefmaksura", XKB_KEY_Arabic_alefmaksura },
+ { "Arabic_beh", XKB_KEY_Arabic_beh },
+ { "Arabic_comma", XKB_KEY_Arabic_comma },
+ { "Arabic_dad", XKB_KEY_Arabic_dad },
+ { "Arabic_dal", XKB_KEY_Arabic_dal },
+ { "Arabic_damma", XKB_KEY_Arabic_damma },
+ { "Arabic_dammatan", XKB_KEY_Arabic_dammatan },
+ { "Arabic_ddal", XKB_KEY_Arabic_ddal },
+ { "Arabic_farsi_yeh", XKB_KEY_Arabic_farsi_yeh },
+ { "Arabic_fatha", XKB_KEY_Arabic_fatha },
+ { "Arabic_fathatan", XKB_KEY_Arabic_fathatan },
+ { "Arabic_feh", XKB_KEY_Arabic_feh },
+ { "Arabic_fullstop", XKB_KEY_Arabic_fullstop },
+ { "Arabic_gaf", XKB_KEY_Arabic_gaf },
+ { "Arabic_ghain", XKB_KEY_Arabic_ghain },
+ { "Arabic_ha", XKB_KEY_Arabic_ha },
+ { "Arabic_hah", XKB_KEY_Arabic_hah },
+ { "Arabic_hamza", XKB_KEY_Arabic_hamza },
+ { "Arabic_hamza_above", XKB_KEY_Arabic_hamza_above },
+ { "Arabic_hamza_below", XKB_KEY_Arabic_hamza_below },
+ { "Arabic_hamzaonalef", XKB_KEY_Arabic_hamzaonalef },
+ { "Arabic_hamzaonwaw", XKB_KEY_Arabic_hamzaonwaw },
+ { "Arabic_hamzaonyeh", XKB_KEY_Arabic_hamzaonyeh },
+ { "Arabic_hamzaunderalef", XKB_KEY_Arabic_hamzaunderalef },
+ { "Arabic_heh", XKB_KEY_Arabic_heh },
+ { "Arabic_heh_doachashmee", XKB_KEY_Arabic_heh_doachashmee },
+ { "Arabic_heh_goal", XKB_KEY_Arabic_heh_goal },
+ { "Arabic_jeem", XKB_KEY_Arabic_jeem },
+ { "Arabic_jeh", XKB_KEY_Arabic_jeh },
+ { "Arabic_kaf", XKB_KEY_Arabic_kaf },
+ { "Arabic_kasra", XKB_KEY_Arabic_kasra },
+ { "Arabic_kasratan", XKB_KEY_Arabic_kasratan },
+ { "Arabic_keheh", XKB_KEY_Arabic_keheh },
+ { "Arabic_khah", XKB_KEY_Arabic_khah },
+ { "Arabic_lam", XKB_KEY_Arabic_lam },
+ { "Arabic_madda_above", XKB_KEY_Arabic_madda_above },
+ { "Arabic_maddaonalef", XKB_KEY_Arabic_maddaonalef },
+ { "Arabic_meem", XKB_KEY_Arabic_meem },
+ { "Arabic_noon", XKB_KEY_Arabic_noon },
+ { "Arabic_noon_ghunna", XKB_KEY_Arabic_noon_ghunna },
+ { "Arabic_peh", XKB_KEY_Arabic_peh },
+ { "Arabic_percent", XKB_KEY_Arabic_percent },
+ { "Arabic_qaf", XKB_KEY_Arabic_qaf },
+ { "Arabic_question_mark", XKB_KEY_Arabic_question_mark },
+ { "Arabic_ra", XKB_KEY_Arabic_ra },
+ { "Arabic_rreh", XKB_KEY_Arabic_rreh },
+ { "Arabic_sad", XKB_KEY_Arabic_sad },
+ { "Arabic_seen", XKB_KEY_Arabic_seen },
+ { "Arabic_semicolon", XKB_KEY_Arabic_semicolon },
+ { "Arabic_shadda", XKB_KEY_Arabic_shadda },
+ { "Arabic_sheen", XKB_KEY_Arabic_sheen },
+ { "Arabic_sukun", XKB_KEY_Arabic_sukun },
+ { "Arabic_superscript_alef", XKB_KEY_Arabic_superscript_alef },
+ { "Arabic_switch", XKB_KEY_Arabic_switch },
+ { "Arabic_tah", XKB_KEY_Arabic_tah },
+ { "Arabic_tatweel", XKB_KEY_Arabic_tatweel },
+ { "Arabic_tcheh", XKB_KEY_Arabic_tcheh },
+ { "Arabic_teh", XKB_KEY_Arabic_teh },
+ { "Arabic_tehmarbuta", XKB_KEY_Arabic_tehmarbuta },
+ { "Arabic_thal", XKB_KEY_Arabic_thal },
+ { "Arabic_theh", XKB_KEY_Arabic_theh },
+ { "Arabic_tteh", XKB_KEY_Arabic_tteh },
+ { "Arabic_veh", XKB_KEY_Arabic_veh },
+ { "Arabic_waw", XKB_KEY_Arabic_waw },
+ { "Arabic_yeh", XKB_KEY_Arabic_yeh },
+ { "Arabic_yeh_baree", XKB_KEY_Arabic_yeh_baree },
+ { "Arabic_zah", XKB_KEY_Arabic_zah },
+ { "Arabic_zain", XKB_KEY_Arabic_zain },
+ { "Aring", XKB_KEY_Aring },
+ { "aring", XKB_KEY_aring },
+ { "Armenian_accent", XKB_KEY_Armenian_accent },
+ { "Armenian_amanak", XKB_KEY_Armenian_amanak },
+ { "Armenian_apostrophe", XKB_KEY_Armenian_apostrophe },
+ { "Armenian_AT", XKB_KEY_Armenian_AT },
+ { "Armenian_at", XKB_KEY_Armenian_at },
+ { "Armenian_AYB", XKB_KEY_Armenian_AYB },
+ { "Armenian_ayb", XKB_KEY_Armenian_ayb },
+ { "Armenian_BEN", XKB_KEY_Armenian_BEN },
+ { "Armenian_ben", XKB_KEY_Armenian_ben },
+ { "Armenian_but", XKB_KEY_Armenian_but },
+ { "Armenian_CHA", XKB_KEY_Armenian_CHA },
+ { "Armenian_cha", XKB_KEY_Armenian_cha },
+ { "Armenian_DA", XKB_KEY_Armenian_DA },
+ { "Armenian_da", XKB_KEY_Armenian_da },
+ { "Armenian_DZA", XKB_KEY_Armenian_DZA },
+ { "Armenian_dza", XKB_KEY_Armenian_dza },
+ { "Armenian_E", XKB_KEY_Armenian_E },
+ { "Armenian_e", XKB_KEY_Armenian_e },
+ { "Armenian_exclam", XKB_KEY_Armenian_exclam },
+ { "Armenian_FE", XKB_KEY_Armenian_FE },
+ { "Armenian_fe", XKB_KEY_Armenian_fe },
+ { "Armenian_full_stop", XKB_KEY_Armenian_full_stop },
+ { "Armenian_GHAT", XKB_KEY_Armenian_GHAT },
+ { "Armenian_ghat", XKB_KEY_Armenian_ghat },
+ { "Armenian_GIM", XKB_KEY_Armenian_GIM },
+ { "Armenian_gim", XKB_KEY_Armenian_gim },
+ { "Armenian_HI", XKB_KEY_Armenian_HI },
+ { "Armenian_hi", XKB_KEY_Armenian_hi },
+ { "Armenian_HO", XKB_KEY_Armenian_HO },
+ { "Armenian_ho", XKB_KEY_Armenian_ho },
+ { "Armenian_hyphen", XKB_KEY_Armenian_hyphen },
+ { "Armenian_INI", XKB_KEY_Armenian_INI },
+ { "Armenian_ini", XKB_KEY_Armenian_ini },
+ { "Armenian_JE", XKB_KEY_Armenian_JE },
+ { "Armenian_je", XKB_KEY_Armenian_je },
+ { "Armenian_KE", XKB_KEY_Armenian_KE },
+ { "Armenian_ke", XKB_KEY_Armenian_ke },
+ { "Armenian_KEN", XKB_KEY_Armenian_KEN },
+ { "Armenian_ken", XKB_KEY_Armenian_ken },
+ { "Armenian_KHE", XKB_KEY_Armenian_KHE },
+ { "Armenian_khe", XKB_KEY_Armenian_khe },
+ { "Armenian_ligature_ew", XKB_KEY_Armenian_ligature_ew },
+ { "Armenian_LYUN", XKB_KEY_Armenian_LYUN },
+ { "Armenian_lyun", XKB_KEY_Armenian_lyun },
+ { "Armenian_MEN", XKB_KEY_Armenian_MEN },
+ { "Armenian_men", XKB_KEY_Armenian_men },
+ { "Armenian_NU", XKB_KEY_Armenian_NU },
+ { "Armenian_nu", XKB_KEY_Armenian_nu },
+ { "Armenian_O", XKB_KEY_Armenian_O },
+ { "Armenian_o", XKB_KEY_Armenian_o },
+ { "Armenian_paruyk", XKB_KEY_Armenian_paruyk },
+ { "Armenian_PE", XKB_KEY_Armenian_PE },
+ { "Armenian_pe", XKB_KEY_Armenian_pe },
+ { "Armenian_PYUR", XKB_KEY_Armenian_PYUR },
+ { "Armenian_pyur", XKB_KEY_Armenian_pyur },
+ { "Armenian_question", XKB_KEY_Armenian_question },
+ { "Armenian_RA", XKB_KEY_Armenian_RA },
+ { "Armenian_ra", XKB_KEY_Armenian_ra },
+ { "Armenian_RE", XKB_KEY_Armenian_RE },
+ { "Armenian_re", XKB_KEY_Armenian_re },
+ { "Armenian_SE", XKB_KEY_Armenian_SE },
+ { "Armenian_se", XKB_KEY_Armenian_se },
+ { "Armenian_separation_mark", XKB_KEY_Armenian_separation_mark },
+ { "Armenian_SHA", XKB_KEY_Armenian_SHA },
+ { "Armenian_sha", XKB_KEY_Armenian_sha },
+ { "Armenian_shesht", XKB_KEY_Armenian_shesht },
+ { "Armenian_TCHE", XKB_KEY_Armenian_TCHE },
+ { "Armenian_tche", XKB_KEY_Armenian_tche },
+ { "Armenian_TO", XKB_KEY_Armenian_TO },
+ { "Armenian_to", XKB_KEY_Armenian_to },
+ { "Armenian_TSA", XKB_KEY_Armenian_TSA },
+ { "Armenian_tsa", XKB_KEY_Armenian_tsa },
+ { "Armenian_TSO", XKB_KEY_Armenian_TSO },
+ { "Armenian_tso", XKB_KEY_Armenian_tso },
+ { "Armenian_TYUN", XKB_KEY_Armenian_TYUN },
+ { "Armenian_tyun", XKB_KEY_Armenian_tyun },
+ { "Armenian_verjaket", XKB_KEY_Armenian_verjaket },
+ { "Armenian_VEV", XKB_KEY_Armenian_VEV },
+ { "Armenian_vev", XKB_KEY_Armenian_vev },
+ { "Armenian_VO", XKB_KEY_Armenian_VO },
+ { "Armenian_vo", XKB_KEY_Armenian_vo },
+ { "Armenian_VYUN", XKB_KEY_Armenian_VYUN },
+ { "Armenian_vyun", XKB_KEY_Armenian_vyun },
+ { "Armenian_YECH", XKB_KEY_Armenian_YECH },
+ { "Armenian_yech", XKB_KEY_Armenian_yech },
+ { "Armenian_yentamna", XKB_KEY_Armenian_yentamna },
+ { "Armenian_ZA", XKB_KEY_Armenian_ZA },
+ { "Armenian_za", XKB_KEY_Armenian_za },
+ { "Armenian_ZHE", XKB_KEY_Armenian_ZHE },
+ { "Armenian_zhe", XKB_KEY_Armenian_zhe },
+ { "asciicircum", XKB_KEY_asciicircum },
+ { "asciitilde", XKB_KEY_asciitilde },
+ { "asterisk", XKB_KEY_asterisk },
+ { "at", XKB_KEY_at },
+ { "Atilde", XKB_KEY_Atilde },
+ { "atilde", XKB_KEY_atilde },
+ { "AudibleBell_Enable", XKB_KEY_AudibleBell_Enable },
+ { "B", XKB_KEY_B },
+ { "b", XKB_KEY_b },
+ { "Babovedot", XKB_KEY_Babovedot },
+ { "babovedot", XKB_KEY_babovedot },
+ { "backslash", XKB_KEY_backslash },
+ { "BackSpace", XKB_KEY_BackSpace },
+ { "BackTab", XKB_KEY_BackTab },
+ { "ballotcross", XKB_KEY_ballotcross },
+ { "bar", XKB_KEY_bar },
+ { "because", XKB_KEY_because },
+ { "Begin", XKB_KEY_Begin },
+ { "blank", XKB_KEY_blank },
+ { "block", XKB_KEY_block },
+ { "botintegral", XKB_KEY_botintegral },
+ { "botleftparens", XKB_KEY_botleftparens },
+ { "botleftsqbracket", XKB_KEY_botleftsqbracket },
+ { "botleftsummation", XKB_KEY_botleftsummation },
+ { "botrightparens", XKB_KEY_botrightparens },
+ { "botrightsqbracket", XKB_KEY_botrightsqbracket },
+ { "botrightsummation", XKB_KEY_botrightsummation },
+ { "bott", XKB_KEY_bott },
+ { "botvertsummationconnector", XKB_KEY_botvertsummationconnector },
+ { "BounceKeys_Enable", XKB_KEY_BounceKeys_Enable },
+ { "braceleft", XKB_KEY_braceleft },
+ { "braceright", XKB_KEY_braceright },
+ { "bracketleft", XKB_KEY_bracketleft },
+ { "bracketright", XKB_KEY_bracketright },
+ { "braille_blank", XKB_KEY_braille_blank },
+ { "braille_dot_1", XKB_KEY_braille_dot_1 },
+ { "braille_dot_10", XKB_KEY_braille_dot_10 },
+ { "braille_dot_2", XKB_KEY_braille_dot_2 },
+ { "braille_dot_3", XKB_KEY_braille_dot_3 },
+ { "braille_dot_4", XKB_KEY_braille_dot_4 },
+ { "braille_dot_5", XKB_KEY_braille_dot_5 },
+ { "braille_dot_6", XKB_KEY_braille_dot_6 },
+ { "braille_dot_7", XKB_KEY_braille_dot_7 },
+ { "braille_dot_8", XKB_KEY_braille_dot_8 },
+ { "braille_dot_9", XKB_KEY_braille_dot_9 },
+ { "braille_dots_1", XKB_KEY_braille_dots_1 },
+ { "braille_dots_12", XKB_KEY_braille_dots_12 },
+ { "braille_dots_123", XKB_KEY_braille_dots_123 },
+ { "braille_dots_1234", XKB_KEY_braille_dots_1234 },
+ { "braille_dots_12345", XKB_KEY_braille_dots_12345 },
+ { "braille_dots_123456", XKB_KEY_braille_dots_123456 },
+ { "braille_dots_1234567", XKB_KEY_braille_dots_1234567 },
+ { "braille_dots_12345678", XKB_KEY_braille_dots_12345678 },
+ { "braille_dots_1234568", XKB_KEY_braille_dots_1234568 },
+ { "braille_dots_123457", XKB_KEY_braille_dots_123457 },
+ { "braille_dots_1234578", XKB_KEY_braille_dots_1234578 },
+ { "braille_dots_123458", XKB_KEY_braille_dots_123458 },
+ { "braille_dots_12346", XKB_KEY_braille_dots_12346 },
+ { "braille_dots_123467", XKB_KEY_braille_dots_123467 },
+ { "braille_dots_1234678", XKB_KEY_braille_dots_1234678 },
+ { "braille_dots_123468", XKB_KEY_braille_dots_123468 },
+ { "braille_dots_12347", XKB_KEY_braille_dots_12347 },
+ { "braille_dots_123478", XKB_KEY_braille_dots_123478 },
+ { "braille_dots_12348", XKB_KEY_braille_dots_12348 },
+ { "braille_dots_1235", XKB_KEY_braille_dots_1235 },
+ { "braille_dots_12356", XKB_KEY_braille_dots_12356 },
+ { "braille_dots_123567", XKB_KEY_braille_dots_123567 },
+ { "braille_dots_1235678", XKB_KEY_braille_dots_1235678 },
+ { "braille_dots_123568", XKB_KEY_braille_dots_123568 },
+ { "braille_dots_12357", XKB_KEY_braille_dots_12357 },
+ { "braille_dots_123578", XKB_KEY_braille_dots_123578 },
+ { "braille_dots_12358", XKB_KEY_braille_dots_12358 },
+ { "braille_dots_1236", XKB_KEY_braille_dots_1236 },
+ { "braille_dots_12367", XKB_KEY_braille_dots_12367 },
+ { "braille_dots_123678", XKB_KEY_braille_dots_123678 },
+ { "braille_dots_12368", XKB_KEY_braille_dots_12368 },
+ { "braille_dots_1237", XKB_KEY_braille_dots_1237 },
+ { "braille_dots_12378", XKB_KEY_braille_dots_12378 },
+ { "braille_dots_1238", XKB_KEY_braille_dots_1238 },
+ { "braille_dots_124", XKB_KEY_braille_dots_124 },
+ { "braille_dots_1245", XKB_KEY_braille_dots_1245 },
+ { "braille_dots_12456", XKB_KEY_braille_dots_12456 },
+ { "braille_dots_124567", XKB_KEY_braille_dots_124567 },
+ { "braille_dots_1245678", XKB_KEY_braille_dots_1245678 },
+ { "braille_dots_124568", XKB_KEY_braille_dots_124568 },
+ { "braille_dots_12457", XKB_KEY_braille_dots_12457 },
+ { "braille_dots_124578", XKB_KEY_braille_dots_124578 },
+ { "braille_dots_12458", XKB_KEY_braille_dots_12458 },
+ { "braille_dots_1246", XKB_KEY_braille_dots_1246 },
+ { "braille_dots_12467", XKB_KEY_braille_dots_12467 },
+ { "braille_dots_124678", XKB_KEY_braille_dots_124678 },
+ { "braille_dots_12468", XKB_KEY_braille_dots_12468 },
+ { "braille_dots_1247", XKB_KEY_braille_dots_1247 },
+ { "braille_dots_12478", XKB_KEY_braille_dots_12478 },
+ { "braille_dots_1248", XKB_KEY_braille_dots_1248 },
+ { "braille_dots_125", XKB_KEY_braille_dots_125 },
+ { "braille_dots_1256", XKB_KEY_braille_dots_1256 },
+ { "braille_dots_12567", XKB_KEY_braille_dots_12567 },
+ { "braille_dots_125678", XKB_KEY_braille_dots_125678 },
+ { "braille_dots_12568", XKB_KEY_braille_dots_12568 },
+ { "braille_dots_1257", XKB_KEY_braille_dots_1257 },
+ { "braille_dots_12578", XKB_KEY_braille_dots_12578 },
+ { "braille_dots_1258", XKB_KEY_braille_dots_1258 },
+ { "braille_dots_126", XKB_KEY_braille_dots_126 },
+ { "braille_dots_1267", XKB_KEY_braille_dots_1267 },
+ { "braille_dots_12678", XKB_KEY_braille_dots_12678 },
+ { "braille_dots_1268", XKB_KEY_braille_dots_1268 },
+ { "braille_dots_127", XKB_KEY_braille_dots_127 },
+ { "braille_dots_1278", XKB_KEY_braille_dots_1278 },
+ { "braille_dots_128", XKB_KEY_braille_dots_128 },
+ { "braille_dots_13", XKB_KEY_braille_dots_13 },
+ { "braille_dots_134", XKB_KEY_braille_dots_134 },
+ { "braille_dots_1345", XKB_KEY_braille_dots_1345 },
+ { "braille_dots_13456", XKB_KEY_braille_dots_13456 },
+ { "braille_dots_134567", XKB_KEY_braille_dots_134567 },
+ { "braille_dots_1345678", XKB_KEY_braille_dots_1345678 },
+ { "braille_dots_134568", XKB_KEY_braille_dots_134568 },
+ { "braille_dots_13457", XKB_KEY_braille_dots_13457 },
+ { "braille_dots_134578", XKB_KEY_braille_dots_134578 },
+ { "braille_dots_13458", XKB_KEY_braille_dots_13458 },
+ { "braille_dots_1346", XKB_KEY_braille_dots_1346 },
+ { "braille_dots_13467", XKB_KEY_braille_dots_13467 },
+ { "braille_dots_134678", XKB_KEY_braille_dots_134678 },
+ { "braille_dots_13468", XKB_KEY_braille_dots_13468 },
+ { "braille_dots_1347", XKB_KEY_braille_dots_1347 },
+ { "braille_dots_13478", XKB_KEY_braille_dots_13478 },
+ { "braille_dots_1348", XKB_KEY_braille_dots_1348 },
+ { "braille_dots_135", XKB_KEY_braille_dots_135 },
+ { "braille_dots_1356", XKB_KEY_braille_dots_1356 },
+ { "braille_dots_13567", XKB_KEY_braille_dots_13567 },
+ { "braille_dots_135678", XKB_KEY_braille_dots_135678 },
+ { "braille_dots_13568", XKB_KEY_braille_dots_13568 },
+ { "braille_dots_1357", XKB_KEY_braille_dots_1357 },
+ { "braille_dots_13578", XKB_KEY_braille_dots_13578 },
+ { "braille_dots_1358", XKB_KEY_braille_dots_1358 },
+ { "braille_dots_136", XKB_KEY_braille_dots_136 },
+ { "braille_dots_1367", XKB_KEY_braille_dots_1367 },
+ { "braille_dots_13678", XKB_KEY_braille_dots_13678 },
+ { "braille_dots_1368", XKB_KEY_braille_dots_1368 },
+ { "braille_dots_137", XKB_KEY_braille_dots_137 },
+ { "braille_dots_1378", XKB_KEY_braille_dots_1378 },
+ { "braille_dots_138", XKB_KEY_braille_dots_138 },
+ { "braille_dots_14", XKB_KEY_braille_dots_14 },
+ { "braille_dots_145", XKB_KEY_braille_dots_145 },
+ { "braille_dots_1456", XKB_KEY_braille_dots_1456 },
+ { "braille_dots_14567", XKB_KEY_braille_dots_14567 },
+ { "braille_dots_145678", XKB_KEY_braille_dots_145678 },
+ { "braille_dots_14568", XKB_KEY_braille_dots_14568 },
+ { "braille_dots_1457", XKB_KEY_braille_dots_1457 },
+ { "braille_dots_14578", XKB_KEY_braille_dots_14578 },
+ { "braille_dots_1458", XKB_KEY_braille_dots_1458 },
+ { "braille_dots_146", XKB_KEY_braille_dots_146 },
+ { "braille_dots_1467", XKB_KEY_braille_dots_1467 },
+ { "braille_dots_14678", XKB_KEY_braille_dots_14678 },
+ { "braille_dots_1468", XKB_KEY_braille_dots_1468 },
+ { "braille_dots_147", XKB_KEY_braille_dots_147 },
+ { "braille_dots_1478", XKB_KEY_braille_dots_1478 },
+ { "braille_dots_148", XKB_KEY_braille_dots_148 },
+ { "braille_dots_15", XKB_KEY_braille_dots_15 },
+ { "braille_dots_156", XKB_KEY_braille_dots_156 },
+ { "braille_dots_1567", XKB_KEY_braille_dots_1567 },
+ { "braille_dots_15678", XKB_KEY_braille_dots_15678 },
+ { "braille_dots_1568", XKB_KEY_braille_dots_1568 },
+ { "braille_dots_157", XKB_KEY_braille_dots_157 },
+ { "braille_dots_1578", XKB_KEY_braille_dots_1578 },
+ { "braille_dots_158", XKB_KEY_braille_dots_158 },
+ { "braille_dots_16", XKB_KEY_braille_dots_16 },
+ { "braille_dots_167", XKB_KEY_braille_dots_167 },
+ { "braille_dots_1678", XKB_KEY_braille_dots_1678 },
+ { "braille_dots_168", XKB_KEY_braille_dots_168 },
+ { "braille_dots_17", XKB_KEY_braille_dots_17 },
+ { "braille_dots_178", XKB_KEY_braille_dots_178 },
+ { "braille_dots_18", XKB_KEY_braille_dots_18 },
+ { "braille_dots_2", XKB_KEY_braille_dots_2 },
+ { "braille_dots_23", XKB_KEY_braille_dots_23 },
+ { "braille_dots_234", XKB_KEY_braille_dots_234 },
+ { "braille_dots_2345", XKB_KEY_braille_dots_2345 },
+ { "braille_dots_23456", XKB_KEY_braille_dots_23456 },
+ { "braille_dots_234567", XKB_KEY_braille_dots_234567 },
+ { "braille_dots_2345678", XKB_KEY_braille_dots_2345678 },
+ { "braille_dots_234568", XKB_KEY_braille_dots_234568 },
+ { "braille_dots_23457", XKB_KEY_braille_dots_23457 },
+ { "braille_dots_234578", XKB_KEY_braille_dots_234578 },
+ { "braille_dots_23458", XKB_KEY_braille_dots_23458 },
+ { "braille_dots_2346", XKB_KEY_braille_dots_2346 },
+ { "braille_dots_23467", XKB_KEY_braille_dots_23467 },
+ { "braille_dots_234678", XKB_KEY_braille_dots_234678 },
+ { "braille_dots_23468", XKB_KEY_braille_dots_23468 },
+ { "braille_dots_2347", XKB_KEY_braille_dots_2347 },
+ { "braille_dots_23478", XKB_KEY_braille_dots_23478 },
+ { "braille_dots_2348", XKB_KEY_braille_dots_2348 },
+ { "braille_dots_235", XKB_KEY_braille_dots_235 },
+ { "braille_dots_2356", XKB_KEY_braille_dots_2356 },
+ { "braille_dots_23567", XKB_KEY_braille_dots_23567 },
+ { "braille_dots_235678", XKB_KEY_braille_dots_235678 },
+ { "braille_dots_23568", XKB_KEY_braille_dots_23568 },
+ { "braille_dots_2357", XKB_KEY_braille_dots_2357 },
+ { "braille_dots_23578", XKB_KEY_braille_dots_23578 },
+ { "braille_dots_2358", XKB_KEY_braille_dots_2358 },
+ { "braille_dots_236", XKB_KEY_braille_dots_236 },
+ { "braille_dots_2367", XKB_KEY_braille_dots_2367 },
+ { "braille_dots_23678", XKB_KEY_braille_dots_23678 },
+ { "braille_dots_2368", XKB_KEY_braille_dots_2368 },
+ { "braille_dots_237", XKB_KEY_braille_dots_237 },
+ { "braille_dots_2378", XKB_KEY_braille_dots_2378 },
+ { "braille_dots_238", XKB_KEY_braille_dots_238 },
+ { "braille_dots_24", XKB_KEY_braille_dots_24 },
+ { "braille_dots_245", XKB_KEY_braille_dots_245 },
+ { "braille_dots_2456", XKB_KEY_braille_dots_2456 },
+ { "braille_dots_24567", XKB_KEY_braille_dots_24567 },
+ { "braille_dots_245678", XKB_KEY_braille_dots_245678 },
+ { "braille_dots_24568", XKB_KEY_braille_dots_24568 },
+ { "braille_dots_2457", XKB_KEY_braille_dots_2457 },
+ { "braille_dots_24578", XKB_KEY_braille_dots_24578 },
+ { "braille_dots_2458", XKB_KEY_braille_dots_2458 },
+ { "braille_dots_246", XKB_KEY_braille_dots_246 },
+ { "braille_dots_2467", XKB_KEY_braille_dots_2467 },
+ { "braille_dots_24678", XKB_KEY_braille_dots_24678 },
+ { "braille_dots_2468", XKB_KEY_braille_dots_2468 },
+ { "braille_dots_247", XKB_KEY_braille_dots_247 },
+ { "braille_dots_2478", XKB_KEY_braille_dots_2478 },
+ { "braille_dots_248", XKB_KEY_braille_dots_248 },
+ { "braille_dots_25", XKB_KEY_braille_dots_25 },
+ { "braille_dots_256", XKB_KEY_braille_dots_256 },
+ { "braille_dots_2567", XKB_KEY_braille_dots_2567 },
+ { "braille_dots_25678", XKB_KEY_braille_dots_25678 },
+ { "braille_dots_2568", XKB_KEY_braille_dots_2568 },
+ { "braille_dots_257", XKB_KEY_braille_dots_257 },
+ { "braille_dots_2578", XKB_KEY_braille_dots_2578 },
+ { "braille_dots_258", XKB_KEY_braille_dots_258 },
+ { "braille_dots_26", XKB_KEY_braille_dots_26 },
+ { "braille_dots_267", XKB_KEY_braille_dots_267 },
+ { "braille_dots_2678", XKB_KEY_braille_dots_2678 },
+ { "braille_dots_268", XKB_KEY_braille_dots_268 },
+ { "braille_dots_27", XKB_KEY_braille_dots_27 },
+ { "braille_dots_278", XKB_KEY_braille_dots_278 },
+ { "braille_dots_28", XKB_KEY_braille_dots_28 },
+ { "braille_dots_3", XKB_KEY_braille_dots_3 },
+ { "braille_dots_34", XKB_KEY_braille_dots_34 },
+ { "braille_dots_345", XKB_KEY_braille_dots_345 },
+ { "braille_dots_3456", XKB_KEY_braille_dots_3456 },
+ { "braille_dots_34567", XKB_KEY_braille_dots_34567 },
+ { "braille_dots_345678", XKB_KEY_braille_dots_345678 },
+ { "braille_dots_34568", XKB_KEY_braille_dots_34568 },
+ { "braille_dots_3457", XKB_KEY_braille_dots_3457 },
+ { "braille_dots_34578", XKB_KEY_braille_dots_34578 },
+ { "braille_dots_3458", XKB_KEY_braille_dots_3458 },
+ { "braille_dots_346", XKB_KEY_braille_dots_346 },
+ { "braille_dots_3467", XKB_KEY_braille_dots_3467 },
+ { "braille_dots_34678", XKB_KEY_braille_dots_34678 },
+ { "braille_dots_3468", XKB_KEY_braille_dots_3468 },
+ { "braille_dots_347", XKB_KEY_braille_dots_347 },
+ { "braille_dots_3478", XKB_KEY_braille_dots_3478 },
+ { "braille_dots_348", XKB_KEY_braille_dots_348 },
+ { "braille_dots_35", XKB_KEY_braille_dots_35 },
+ { "braille_dots_356", XKB_KEY_braille_dots_356 },
+ { "braille_dots_3567", XKB_KEY_braille_dots_3567 },
+ { "braille_dots_35678", XKB_KEY_braille_dots_35678 },
+ { "braille_dots_3568", XKB_KEY_braille_dots_3568 },
+ { "braille_dots_357", XKB_KEY_braille_dots_357 },
+ { "braille_dots_3578", XKB_KEY_braille_dots_3578 },
+ { "braille_dots_358", XKB_KEY_braille_dots_358 },
+ { "braille_dots_36", XKB_KEY_braille_dots_36 },
+ { "braille_dots_367", XKB_KEY_braille_dots_367 },
+ { "braille_dots_3678", XKB_KEY_braille_dots_3678 },
+ { "braille_dots_368", XKB_KEY_braille_dots_368 },
+ { "braille_dots_37", XKB_KEY_braille_dots_37 },
+ { "braille_dots_378", XKB_KEY_braille_dots_378 },
+ { "braille_dots_38", XKB_KEY_braille_dots_38 },
+ { "braille_dots_4", XKB_KEY_braille_dots_4 },
+ { "braille_dots_45", XKB_KEY_braille_dots_45 },
+ { "braille_dots_456", XKB_KEY_braille_dots_456 },
+ { "braille_dots_4567", XKB_KEY_braille_dots_4567 },
+ { "braille_dots_45678", XKB_KEY_braille_dots_45678 },
+ { "braille_dots_4568", XKB_KEY_braille_dots_4568 },
+ { "braille_dots_457", XKB_KEY_braille_dots_457 },
+ { "braille_dots_4578", XKB_KEY_braille_dots_4578 },
+ { "braille_dots_458", XKB_KEY_braille_dots_458 },
+ { "braille_dots_46", XKB_KEY_braille_dots_46 },
+ { "braille_dots_467", XKB_KEY_braille_dots_467 },
+ { "braille_dots_4678", XKB_KEY_braille_dots_4678 },
+ { "braille_dots_468", XKB_KEY_braille_dots_468 },
+ { "braille_dots_47", XKB_KEY_braille_dots_47 },
+ { "braille_dots_478", XKB_KEY_braille_dots_478 },
+ { "braille_dots_48", XKB_KEY_braille_dots_48 },
+ { "braille_dots_5", XKB_KEY_braille_dots_5 },
+ { "braille_dots_56", XKB_KEY_braille_dots_56 },
+ { "braille_dots_567", XKB_KEY_braille_dots_567 },
+ { "braille_dots_5678", XKB_KEY_braille_dots_5678 },
+ { "braille_dots_568", XKB_KEY_braille_dots_568 },
+ { "braille_dots_57", XKB_KEY_braille_dots_57 },
+ { "braille_dots_578", XKB_KEY_braille_dots_578 },
+ { "braille_dots_58", XKB_KEY_braille_dots_58 },
+ { "braille_dots_6", XKB_KEY_braille_dots_6 },
+ { "braille_dots_67", XKB_KEY_braille_dots_67 },
+ { "braille_dots_678", XKB_KEY_braille_dots_678 },
+ { "braille_dots_68", XKB_KEY_braille_dots_68 },
+ { "braille_dots_7", XKB_KEY_braille_dots_7 },
+ { "braille_dots_78", XKB_KEY_braille_dots_78 },
+ { "braille_dots_8", XKB_KEY_braille_dots_8 },
+ { "Break", XKB_KEY_Break },
+ { "breve", XKB_KEY_breve },
+ { "brokenbar", XKB_KEY_brokenbar },
+ { "Byelorussian_shortu", XKB_KEY_Byelorussian_shortu },
+ { "Byelorussian_SHORTU", XKB_KEY_Byelorussian_SHORTU },
+ { "C", XKB_KEY_C },
+ { "c", XKB_KEY_c },
+ { "c_h", XKB_KEY_c_h },
+ { "C_h", XKB_KEY_C_h },
+ { "C_H", XKB_KEY_C_H },
+ { "Cabovedot", XKB_KEY_Cabovedot },
+ { "cabovedot", XKB_KEY_cabovedot },
+ { "Cacute", XKB_KEY_Cacute },
+ { "cacute", XKB_KEY_cacute },
+ { "Cancel", XKB_KEY_Cancel },
+ { "Caps_Lock", XKB_KEY_Caps_Lock },
+ { "careof", XKB_KEY_careof },
+ { "caret", XKB_KEY_caret },
+ { "caron", XKB_KEY_caron },
+ { "Ccaron", XKB_KEY_Ccaron },
+ { "ccaron", XKB_KEY_ccaron },
+ { "Ccedilla", XKB_KEY_Ccedilla },
+ { "ccedilla", XKB_KEY_ccedilla },
+ { "Ccircumflex", XKB_KEY_Ccircumflex },
+ { "ccircumflex", XKB_KEY_ccircumflex },
+ { "cedilla", XKB_KEY_cedilla },
+ { "cent", XKB_KEY_cent },
+ { "ch", XKB_KEY_ch },
+ { "Ch", XKB_KEY_Ch },
+ { "CH", XKB_KEY_CH },
+ { "checkerboard", XKB_KEY_checkerboard },
+ { "checkmark", XKB_KEY_checkmark },
+ { "circle", XKB_KEY_circle },
+ { "Clear", XKB_KEY_Clear },
+ { "ClearLine", XKB_KEY_ClearLine },
+ { "club", XKB_KEY_club },
+ { "Codeinput", XKB_KEY_Codeinput },
+ { "colon", XKB_KEY_colon },
+ { "ColonSign", XKB_KEY_ColonSign },
+ { "comma", XKB_KEY_comma },
+ { "containsas", XKB_KEY_containsas },
+ { "Control_L", XKB_KEY_Control_L },
+ { "Control_R", XKB_KEY_Control_R },
+ { "copyright", XKB_KEY_copyright },
+ { "cr", XKB_KEY_cr },
+ { "crossinglines", XKB_KEY_crossinglines },
+ { "CruzeiroSign", XKB_KEY_CruzeiroSign },
+ { "cuberoot", XKB_KEY_cuberoot },
+ { "currency", XKB_KEY_currency },
+ { "cursor", XKB_KEY_cursor },
+ { "Cyrillic_a", XKB_KEY_Cyrillic_a },
+ { "Cyrillic_A", XKB_KEY_Cyrillic_A },
+ { "Cyrillic_be", XKB_KEY_Cyrillic_be },
+ { "Cyrillic_BE", XKB_KEY_Cyrillic_BE },
+ { "Cyrillic_che", XKB_KEY_Cyrillic_che },
+ { "Cyrillic_CHE", XKB_KEY_Cyrillic_CHE },
+ { "Cyrillic_CHE_descender", XKB_KEY_Cyrillic_CHE_descender },
+ { "Cyrillic_che_descender", XKB_KEY_Cyrillic_che_descender },
+ { "Cyrillic_CHE_vertstroke", XKB_KEY_Cyrillic_CHE_vertstroke },
+ { "Cyrillic_che_vertstroke", XKB_KEY_Cyrillic_che_vertstroke },
+ { "Cyrillic_de", XKB_KEY_Cyrillic_de },
+ { "Cyrillic_DE", XKB_KEY_Cyrillic_DE },
+ { "Cyrillic_dzhe", XKB_KEY_Cyrillic_dzhe },
+ { "Cyrillic_DZHE", XKB_KEY_Cyrillic_DZHE },
+ { "Cyrillic_e", XKB_KEY_Cyrillic_e },
+ { "Cyrillic_E", XKB_KEY_Cyrillic_E },
+ { "Cyrillic_ef", XKB_KEY_Cyrillic_ef },
+ { "Cyrillic_EF", XKB_KEY_Cyrillic_EF },
+ { "Cyrillic_el", XKB_KEY_Cyrillic_el },
+ { "Cyrillic_EL", XKB_KEY_Cyrillic_EL },
+ { "Cyrillic_em", XKB_KEY_Cyrillic_em },
+ { "Cyrillic_EM", XKB_KEY_Cyrillic_EM },
+ { "Cyrillic_en", XKB_KEY_Cyrillic_en },
+ { "Cyrillic_EN", XKB_KEY_Cyrillic_EN },
+ { "Cyrillic_EN_descender", XKB_KEY_Cyrillic_EN_descender },
+ { "Cyrillic_en_descender", XKB_KEY_Cyrillic_en_descender },
+ { "Cyrillic_er", XKB_KEY_Cyrillic_er },
+ { "Cyrillic_ER", XKB_KEY_Cyrillic_ER },
+ { "Cyrillic_es", XKB_KEY_Cyrillic_es },
+ { "Cyrillic_ES", XKB_KEY_Cyrillic_ES },
+ { "Cyrillic_ghe", XKB_KEY_Cyrillic_ghe },
+ { "Cyrillic_GHE", XKB_KEY_Cyrillic_GHE },
+ { "Cyrillic_GHE_bar", XKB_KEY_Cyrillic_GHE_bar },
+ { "Cyrillic_ghe_bar", XKB_KEY_Cyrillic_ghe_bar },
+ { "Cyrillic_ha", XKB_KEY_Cyrillic_ha },
+ { "Cyrillic_HA", XKB_KEY_Cyrillic_HA },
+ { "Cyrillic_HA_descender", XKB_KEY_Cyrillic_HA_descender },
+ { "Cyrillic_ha_descender", XKB_KEY_Cyrillic_ha_descender },
+ { "Cyrillic_hardsign", XKB_KEY_Cyrillic_hardsign },
+ { "Cyrillic_HARDSIGN", XKB_KEY_Cyrillic_HARDSIGN },
+ { "Cyrillic_i", XKB_KEY_Cyrillic_i },
+ { "Cyrillic_I", XKB_KEY_Cyrillic_I },
+ { "Cyrillic_I_macron", XKB_KEY_Cyrillic_I_macron },
+ { "Cyrillic_i_macron", XKB_KEY_Cyrillic_i_macron },
+ { "Cyrillic_ie", XKB_KEY_Cyrillic_ie },
+ { "Cyrillic_IE", XKB_KEY_Cyrillic_IE },
+ { "Cyrillic_io", XKB_KEY_Cyrillic_io },
+ { "Cyrillic_IO", XKB_KEY_Cyrillic_IO },
+ { "Cyrillic_je", XKB_KEY_Cyrillic_je },
+ { "Cyrillic_JE", XKB_KEY_Cyrillic_JE },
+ { "Cyrillic_ka", XKB_KEY_Cyrillic_ka },
+ { "Cyrillic_KA", XKB_KEY_Cyrillic_KA },
+ { "Cyrillic_KA_descender", XKB_KEY_Cyrillic_KA_descender },
+ { "Cyrillic_ka_descender", XKB_KEY_Cyrillic_ka_descender },
+ { "Cyrillic_KA_vertstroke", XKB_KEY_Cyrillic_KA_vertstroke },
+ { "Cyrillic_ka_vertstroke", XKB_KEY_Cyrillic_ka_vertstroke },
+ { "Cyrillic_lje", XKB_KEY_Cyrillic_lje },
+ { "Cyrillic_LJE", XKB_KEY_Cyrillic_LJE },
+ { "Cyrillic_nje", XKB_KEY_Cyrillic_nje },
+ { "Cyrillic_NJE", XKB_KEY_Cyrillic_NJE },
+ { "Cyrillic_o", XKB_KEY_Cyrillic_o },
+ { "Cyrillic_O", XKB_KEY_Cyrillic_O },
+ { "Cyrillic_O_bar", XKB_KEY_Cyrillic_O_bar },
+ { "Cyrillic_o_bar", XKB_KEY_Cyrillic_o_bar },
+ { "Cyrillic_pe", XKB_KEY_Cyrillic_pe },
+ { "Cyrillic_PE", XKB_KEY_Cyrillic_PE },
+ { "Cyrillic_SCHWA", XKB_KEY_Cyrillic_SCHWA },
+ { "Cyrillic_schwa", XKB_KEY_Cyrillic_schwa },
+ { "Cyrillic_sha", XKB_KEY_Cyrillic_sha },
+ { "Cyrillic_SHA", XKB_KEY_Cyrillic_SHA },
+ { "Cyrillic_shcha", XKB_KEY_Cyrillic_shcha },
+ { "Cyrillic_SHCHA", XKB_KEY_Cyrillic_SHCHA },
+ { "Cyrillic_SHHA", XKB_KEY_Cyrillic_SHHA },
+ { "Cyrillic_shha", XKB_KEY_Cyrillic_shha },
+ { "Cyrillic_shorti", XKB_KEY_Cyrillic_shorti },
+ { "Cyrillic_SHORTI", XKB_KEY_Cyrillic_SHORTI },
+ { "Cyrillic_softsign", XKB_KEY_Cyrillic_softsign },
+ { "Cyrillic_SOFTSIGN", XKB_KEY_Cyrillic_SOFTSIGN },
+ { "Cyrillic_te", XKB_KEY_Cyrillic_te },
+ { "Cyrillic_TE", XKB_KEY_Cyrillic_TE },
+ { "Cyrillic_tse", XKB_KEY_Cyrillic_tse },
+ { "Cyrillic_TSE", XKB_KEY_Cyrillic_TSE },
+ { "Cyrillic_u", XKB_KEY_Cyrillic_u },
+ { "Cyrillic_U", XKB_KEY_Cyrillic_U },
+ { "Cyrillic_U_macron", XKB_KEY_Cyrillic_U_macron },
+ { "Cyrillic_u_macron", XKB_KEY_Cyrillic_u_macron },
+ { "Cyrillic_U_straight", XKB_KEY_Cyrillic_U_straight },
+ { "Cyrillic_u_straight", XKB_KEY_Cyrillic_u_straight },
+ { "Cyrillic_U_straight_bar", XKB_KEY_Cyrillic_U_straight_bar },
+ { "Cyrillic_u_straight_bar", XKB_KEY_Cyrillic_u_straight_bar },
+ { "Cyrillic_ve", XKB_KEY_Cyrillic_ve },
+ { "Cyrillic_VE", XKB_KEY_Cyrillic_VE },
+ { "Cyrillic_ya", XKB_KEY_Cyrillic_ya },
+ { "Cyrillic_YA", XKB_KEY_Cyrillic_YA },
+ { "Cyrillic_yeru", XKB_KEY_Cyrillic_yeru },
+ { "Cyrillic_YERU", XKB_KEY_Cyrillic_YERU },
+ { "Cyrillic_yu", XKB_KEY_Cyrillic_yu },
+ { "Cyrillic_YU", XKB_KEY_Cyrillic_YU },
+ { "Cyrillic_ze", XKB_KEY_Cyrillic_ze },
+ { "Cyrillic_ZE", XKB_KEY_Cyrillic_ZE },
+ { "Cyrillic_zhe", XKB_KEY_Cyrillic_zhe },
+ { "Cyrillic_ZHE", XKB_KEY_Cyrillic_ZHE },
+ { "Cyrillic_ZHE_descender", XKB_KEY_Cyrillic_ZHE_descender },
+ { "Cyrillic_zhe_descender", XKB_KEY_Cyrillic_zhe_descender },
+ { "D", XKB_KEY_D },
+ { "d", XKB_KEY_d },
+ { "Dabovedot", XKB_KEY_Dabovedot },
+ { "dabovedot", XKB_KEY_dabovedot },
+ { "Dacute_accent", XKB_KEY_Dacute_accent },
+ { "dagger", XKB_KEY_dagger },
+ { "Dcaron", XKB_KEY_Dcaron },
+ { "dcaron", XKB_KEY_dcaron },
+ { "Dcedilla_accent", XKB_KEY_Dcedilla_accent },
+ { "Dcircumflex_accent", XKB_KEY_Dcircumflex_accent },
+ { "Ddiaeresis", XKB_KEY_Ddiaeresis },
+ { "dead_a", XKB_KEY_dead_a },
+ { "dead_A", XKB_KEY_dead_A },
+ { "dead_abovecomma", XKB_KEY_dead_abovecomma },
+ { "dead_abovedot", XKB_KEY_dead_abovedot },
+ { "dead_abovereversedcomma", XKB_KEY_dead_abovereversedcomma },
+ { "dead_abovering", XKB_KEY_dead_abovering },
+ { "dead_acute", XKB_KEY_dead_acute },
+ { "dead_belowbreve", XKB_KEY_dead_belowbreve },
+ { "dead_belowcircumflex", XKB_KEY_dead_belowcircumflex },
+ { "dead_belowcomma", XKB_KEY_dead_belowcomma },
+ { "dead_belowdiaeresis", XKB_KEY_dead_belowdiaeresis },
+ { "dead_belowdot", XKB_KEY_dead_belowdot },
+ { "dead_belowmacron", XKB_KEY_dead_belowmacron },
+ { "dead_belowring", XKB_KEY_dead_belowring },
+ { "dead_belowtilde", XKB_KEY_dead_belowtilde },
+ { "dead_breve", XKB_KEY_dead_breve },
+ { "dead_capital_schwa", XKB_KEY_dead_capital_schwa },
+ { "dead_caron", XKB_KEY_dead_caron },
+ { "dead_cedilla", XKB_KEY_dead_cedilla },
+ { "dead_circumflex", XKB_KEY_dead_circumflex },
+ { "dead_currency", XKB_KEY_dead_currency },
+ { "dead_dasia", XKB_KEY_dead_dasia },
+ { "dead_diaeresis", XKB_KEY_dead_diaeresis },
+ { "dead_doubleacute", XKB_KEY_dead_doubleacute },
+ { "dead_doublegrave", XKB_KEY_dead_doublegrave },
+ { "dead_e", XKB_KEY_dead_e },
+ { "dead_E", XKB_KEY_dead_E },
+ { "dead_grave", XKB_KEY_dead_grave },
+ { "dead_greek", XKB_KEY_dead_greek },
+ { "dead_hook", XKB_KEY_dead_hook },
+ { "dead_horn", XKB_KEY_dead_horn },
+ { "dead_i", XKB_KEY_dead_i },
+ { "dead_I", XKB_KEY_dead_I },
+ { "dead_invertedbreve", XKB_KEY_dead_invertedbreve },
+ { "dead_iota", XKB_KEY_dead_iota },
+ { "dead_macron", XKB_KEY_dead_macron },
+ { "dead_o", XKB_KEY_dead_o },
+ { "dead_O", XKB_KEY_dead_O },
+ { "dead_ogonek", XKB_KEY_dead_ogonek },
+ { "dead_perispomeni", XKB_KEY_dead_perispomeni },
+ { "dead_psili", XKB_KEY_dead_psili },
+ { "dead_semivoiced_sound", XKB_KEY_dead_semivoiced_sound },
+ { "dead_small_schwa", XKB_KEY_dead_small_schwa },
+ { "dead_stroke", XKB_KEY_dead_stroke },
+ { "dead_tilde", XKB_KEY_dead_tilde },
+ { "dead_u", XKB_KEY_dead_u },
+ { "dead_U", XKB_KEY_dead_U },
+ { "dead_voiced_sound", XKB_KEY_dead_voiced_sound },
+ { "decimalpoint", XKB_KEY_decimalpoint },
+ { "degree", XKB_KEY_degree },
+ { "Delete", XKB_KEY_Delete },
+ { "DeleteChar", XKB_KEY_DeleteChar },
+ { "DeleteLine", XKB_KEY_DeleteLine },
+ { "Dgrave_accent", XKB_KEY_Dgrave_accent },
+ { "diaeresis", XKB_KEY_diaeresis },
+ { "diamond", XKB_KEY_diamond },
+ { "digitspace", XKB_KEY_digitspace },
+ { "dintegral", XKB_KEY_dintegral },
+ { "division", XKB_KEY_division },
+ { "dollar", XKB_KEY_dollar },
+ { "DongSign", XKB_KEY_DongSign },
+ { "doubbaselinedot", XKB_KEY_doubbaselinedot },
+ { "doubleacute", XKB_KEY_doubleacute },
+ { "doubledagger", XKB_KEY_doubledagger },
+ { "doublelowquotemark", XKB_KEY_doublelowquotemark },
+ { "Down", XKB_KEY_Down },
+ { "downarrow", XKB_KEY_downarrow },
+ { "downcaret", XKB_KEY_downcaret },
+ { "downshoe", XKB_KEY_downshoe },
+ { "downstile", XKB_KEY_downstile },
+ { "downtack", XKB_KEY_downtack },
+ { "DRemove", XKB_KEY_DRemove },
+ { "Dring_accent", XKB_KEY_Dring_accent },
+ { "Dstroke", XKB_KEY_Dstroke },
+ { "dstroke", XKB_KEY_dstroke },
+ { "Dtilde", XKB_KEY_Dtilde },
+ { "E", XKB_KEY_E },
+ { "e", XKB_KEY_e },
+ { "Eabovedot", XKB_KEY_Eabovedot },
+ { "eabovedot", XKB_KEY_eabovedot },
+ { "Eacute", XKB_KEY_Eacute },
+ { "eacute", XKB_KEY_eacute },
+ { "Ebelowdot", XKB_KEY_Ebelowdot },
+ { "ebelowdot", XKB_KEY_ebelowdot },
+ { "Ecaron", XKB_KEY_Ecaron },
+ { "ecaron", XKB_KEY_ecaron },
+ { "Ecircumflex", XKB_KEY_Ecircumflex },
+ { "ecircumflex", XKB_KEY_ecircumflex },
+ { "Ecircumflexacute", XKB_KEY_Ecircumflexacute },
+ { "ecircumflexacute", XKB_KEY_ecircumflexacute },
+ { "Ecircumflexbelowdot", XKB_KEY_Ecircumflexbelowdot },
+ { "ecircumflexbelowdot", XKB_KEY_ecircumflexbelowdot },
+ { "Ecircumflexgrave", XKB_KEY_Ecircumflexgrave },
+ { "ecircumflexgrave", XKB_KEY_ecircumflexgrave },
+ { "Ecircumflexhook", XKB_KEY_Ecircumflexhook },
+ { "ecircumflexhook", XKB_KEY_ecircumflexhook },
+ { "Ecircumflextilde", XKB_KEY_Ecircumflextilde },
+ { "ecircumflextilde", XKB_KEY_ecircumflextilde },
+ { "EcuSign", XKB_KEY_EcuSign },
+ { "Ediaeresis", XKB_KEY_Ediaeresis },
+ { "ediaeresis", XKB_KEY_ediaeresis },
+ { "Egrave", XKB_KEY_Egrave },
+ { "egrave", XKB_KEY_egrave },
+ { "Ehook", XKB_KEY_Ehook },
+ { "ehook", XKB_KEY_ehook },
+ { "eightsubscript", XKB_KEY_eightsubscript },
+ { "eightsuperior", XKB_KEY_eightsuperior },
+ { "Eisu_Shift", XKB_KEY_Eisu_Shift },
+ { "Eisu_toggle", XKB_KEY_Eisu_toggle },
+ { "elementof", XKB_KEY_elementof },
+ { "ellipsis", XKB_KEY_ellipsis },
+ { "em3space", XKB_KEY_em3space },
+ { "em4space", XKB_KEY_em4space },
+ { "Emacron", XKB_KEY_Emacron },
+ { "emacron", XKB_KEY_emacron },
+ { "emdash", XKB_KEY_emdash },
+ { "emfilledcircle", XKB_KEY_emfilledcircle },
+ { "emfilledrect", XKB_KEY_emfilledrect },
+ { "emopencircle", XKB_KEY_emopencircle },
+ { "emopenrectangle", XKB_KEY_emopenrectangle },
+ { "emptyset", XKB_KEY_emptyset },
+ { "emspace", XKB_KEY_emspace },
+ { "End", XKB_KEY_End },
+ { "endash", XKB_KEY_endash },
+ { "enfilledcircbullet", XKB_KEY_enfilledcircbullet },
+ { "enfilledsqbullet", XKB_KEY_enfilledsqbullet },
+ { "ENG", XKB_KEY_ENG },
+ { "eng", XKB_KEY_eng },
+ { "enopencircbullet", XKB_KEY_enopencircbullet },
+ { "enopensquarebullet", XKB_KEY_enopensquarebullet },
+ { "enspace", XKB_KEY_enspace },
+ { "Eogonek", XKB_KEY_Eogonek },
+ { "eogonek", XKB_KEY_eogonek },
+ { "equal", XKB_KEY_equal },
+ { "Escape", XKB_KEY_Escape },
+ { "ETH", XKB_KEY_ETH },
+ { "Eth", XKB_KEY_Eth },
+ { "eth", XKB_KEY_eth },
+ { "Etilde", XKB_KEY_Etilde },
+ { "etilde", XKB_KEY_etilde },
+ { "EuroSign", XKB_KEY_EuroSign },
+ { "exclam", XKB_KEY_exclam },
+ { "exclamdown", XKB_KEY_exclamdown },
+ { "Execute", XKB_KEY_Execute },
+ { "Ext16bit_L", XKB_KEY_Ext16bit_L },
+ { "Ext16bit_R", XKB_KEY_Ext16bit_R },
+ { "EZH", XKB_KEY_EZH },
+ { "ezh", XKB_KEY_ezh },
+ { "F", XKB_KEY_F },
+ { "f", XKB_KEY_f },
+ { "F1", XKB_KEY_F1 },
+ { "F10", XKB_KEY_F10 },
+ { "F11", XKB_KEY_F11 },
+ { "F12", XKB_KEY_F12 },
+ { "F13", XKB_KEY_F13 },
+ { "F14", XKB_KEY_F14 },
+ { "F15", XKB_KEY_F15 },
+ { "F16", XKB_KEY_F16 },
+ { "F17", XKB_KEY_F17 },
+ { "F18", XKB_KEY_F18 },
+ { "F19", XKB_KEY_F19 },
+ { "F2", XKB_KEY_F2 },
+ { "F20", XKB_KEY_F20 },
+ { "F21", XKB_KEY_F21 },
+ { "F22", XKB_KEY_F22 },
+ { "F23", XKB_KEY_F23 },
+ { "F24", XKB_KEY_F24 },
+ { "F25", XKB_KEY_F25 },
+ { "F26", XKB_KEY_F26 },
+ { "F27", XKB_KEY_F27 },
+ { "F28", XKB_KEY_F28 },
+ { "F29", XKB_KEY_F29 },
+ { "F3", XKB_KEY_F3 },
+ { "F30", XKB_KEY_F30 },
+ { "F31", XKB_KEY_F31 },
+ { "F32", XKB_KEY_F32 },
+ { "F33", XKB_KEY_F33 },
+ { "F34", XKB_KEY_F34 },
+ { "F35", XKB_KEY_F35 },
+ { "F4", XKB_KEY_F4 },
+ { "F5", XKB_KEY_F5 },
+ { "F6", XKB_KEY_F6 },
+ { "F7", XKB_KEY_F7 },
+ { "F8", XKB_KEY_F8 },
+ { "F9", XKB_KEY_F9 },
+ { "Fabovedot", XKB_KEY_Fabovedot },
+ { "fabovedot", XKB_KEY_fabovedot },
+ { "Farsi_0", XKB_KEY_Farsi_0 },
+ { "Farsi_1", XKB_KEY_Farsi_1 },
+ { "Farsi_2", XKB_KEY_Farsi_2 },
+ { "Farsi_3", XKB_KEY_Farsi_3 },
+ { "Farsi_4", XKB_KEY_Farsi_4 },
+ { "Farsi_5", XKB_KEY_Farsi_5 },
+ { "Farsi_6", XKB_KEY_Farsi_6 },
+ { "Farsi_7", XKB_KEY_Farsi_7 },
+ { "Farsi_8", XKB_KEY_Farsi_8 },
+ { "Farsi_9", XKB_KEY_Farsi_9 },
+ { "Farsi_yeh", XKB_KEY_Farsi_yeh },
+ { "femalesymbol", XKB_KEY_femalesymbol },
+ { "ff", XKB_KEY_ff },
+ { "FFrancSign", XKB_KEY_FFrancSign },
+ { "figdash", XKB_KEY_figdash },
+ { "filledlefttribullet", XKB_KEY_filledlefttribullet },
+ { "filledrectbullet", XKB_KEY_filledrectbullet },
+ { "filledrighttribullet", XKB_KEY_filledrighttribullet },
+ { "filledtribulletdown", XKB_KEY_filledtribulletdown },
+ { "filledtribulletup", XKB_KEY_filledtribulletup },
+ { "Find", XKB_KEY_Find },
+ { "First_Virtual_Screen", XKB_KEY_First_Virtual_Screen },
+ { "fiveeighths", XKB_KEY_fiveeighths },
+ { "fivesixths", XKB_KEY_fivesixths },
+ { "fivesubscript", XKB_KEY_fivesubscript },
+ { "fivesuperior", XKB_KEY_fivesuperior },
+ { "fourfifths", XKB_KEY_fourfifths },
+ { "foursubscript", XKB_KEY_foursubscript },
+ { "foursuperior", XKB_KEY_foursuperior },
+ { "fourthroot", XKB_KEY_fourthroot },
+ { "function", XKB_KEY_function },
+ { "G", XKB_KEY_G },
+ { "g", XKB_KEY_g },
+ { "Gabovedot", XKB_KEY_Gabovedot },
+ { "gabovedot", XKB_KEY_gabovedot },
+ { "Gbreve", XKB_KEY_Gbreve },
+ { "gbreve", XKB_KEY_gbreve },
+ { "Gcaron", XKB_KEY_Gcaron },
+ { "gcaron", XKB_KEY_gcaron },
+ { "Gcedilla", XKB_KEY_Gcedilla },
+ { "gcedilla", XKB_KEY_gcedilla },
+ { "Gcircumflex", XKB_KEY_Gcircumflex },
+ { "gcircumflex", XKB_KEY_gcircumflex },
+ { "Georgian_an", XKB_KEY_Georgian_an },
+ { "Georgian_ban", XKB_KEY_Georgian_ban },
+ { "Georgian_can", XKB_KEY_Georgian_can },
+ { "Georgian_char", XKB_KEY_Georgian_char },
+ { "Georgian_chin", XKB_KEY_Georgian_chin },
+ { "Georgian_cil", XKB_KEY_Georgian_cil },
+ { "Georgian_don", XKB_KEY_Georgian_don },
+ { "Georgian_en", XKB_KEY_Georgian_en },
+ { "Georgian_fi", XKB_KEY_Georgian_fi },
+ { "Georgian_gan", XKB_KEY_Georgian_gan },
+ { "Georgian_ghan", XKB_KEY_Georgian_ghan },
+ { "Georgian_hae", XKB_KEY_Georgian_hae },
+ { "Georgian_har", XKB_KEY_Georgian_har },
+ { "Georgian_he", XKB_KEY_Georgian_he },
+ { "Georgian_hie", XKB_KEY_Georgian_hie },
+ { "Georgian_hoe", XKB_KEY_Georgian_hoe },
+ { "Georgian_in", XKB_KEY_Georgian_in },
+ { "Georgian_jhan", XKB_KEY_Georgian_jhan },
+ { "Georgian_jil", XKB_KEY_Georgian_jil },
+ { "Georgian_kan", XKB_KEY_Georgian_kan },
+ { "Georgian_khar", XKB_KEY_Georgian_khar },
+ { "Georgian_las", XKB_KEY_Georgian_las },
+ { "Georgian_man", XKB_KEY_Georgian_man },
+ { "Georgian_nar", XKB_KEY_Georgian_nar },
+ { "Georgian_on", XKB_KEY_Georgian_on },
+ { "Georgian_par", XKB_KEY_Georgian_par },
+ { "Georgian_phar", XKB_KEY_Georgian_phar },
+ { "Georgian_qar", XKB_KEY_Georgian_qar },
+ { "Georgian_rae", XKB_KEY_Georgian_rae },
+ { "Georgian_san", XKB_KEY_Georgian_san },
+ { "Georgian_shin", XKB_KEY_Georgian_shin },
+ { "Georgian_tan", XKB_KEY_Georgian_tan },
+ { "Georgian_tar", XKB_KEY_Georgian_tar },
+ { "Georgian_un", XKB_KEY_Georgian_un },
+ { "Georgian_vin", XKB_KEY_Georgian_vin },
+ { "Georgian_we", XKB_KEY_Georgian_we },
+ { "Georgian_xan", XKB_KEY_Georgian_xan },
+ { "Georgian_zen", XKB_KEY_Georgian_zen },
+ { "Georgian_zhar", XKB_KEY_Georgian_zhar },
+ { "grave", XKB_KEY_grave },
+ { "greater", XKB_KEY_greater },
+ { "greaterthanequal", XKB_KEY_greaterthanequal },
+ { "Greek_accentdieresis", XKB_KEY_Greek_accentdieresis },
+ { "Greek_ALPHA", XKB_KEY_Greek_ALPHA },
+ { "Greek_alpha", XKB_KEY_Greek_alpha },
+ { "Greek_ALPHAaccent", XKB_KEY_Greek_ALPHAaccent },
+ { "Greek_alphaaccent", XKB_KEY_Greek_alphaaccent },
+ { "Greek_BETA", XKB_KEY_Greek_BETA },
+ { "Greek_beta", XKB_KEY_Greek_beta },
+ { "Greek_CHI", XKB_KEY_Greek_CHI },
+ { "Greek_chi", XKB_KEY_Greek_chi },
+ { "Greek_DELTA", XKB_KEY_Greek_DELTA },
+ { "Greek_delta", XKB_KEY_Greek_delta },
+ { "Greek_EPSILON", XKB_KEY_Greek_EPSILON },
+ { "Greek_epsilon", XKB_KEY_Greek_epsilon },
+ { "Greek_EPSILONaccent", XKB_KEY_Greek_EPSILONaccent },
+ { "Greek_epsilonaccent", XKB_KEY_Greek_epsilonaccent },
+ { "Greek_ETA", XKB_KEY_Greek_ETA },
+ { "Greek_eta", XKB_KEY_Greek_eta },
+ { "Greek_ETAaccent", XKB_KEY_Greek_ETAaccent },
+ { "Greek_etaaccent", XKB_KEY_Greek_etaaccent },
+ { "Greek_finalsmallsigma", XKB_KEY_Greek_finalsmallsigma },
+ { "Greek_GAMMA", XKB_KEY_Greek_GAMMA },
+ { "Greek_gamma", XKB_KEY_Greek_gamma },
+ { "Greek_horizbar", XKB_KEY_Greek_horizbar },
+ { "Greek_IOTA", XKB_KEY_Greek_IOTA },
+ { "Greek_iota", XKB_KEY_Greek_iota },
+ { "Greek_IOTAaccent", XKB_KEY_Greek_IOTAaccent },
+ { "Greek_iotaaccent", XKB_KEY_Greek_iotaaccent },
+ { "Greek_iotaaccentdieresis", XKB_KEY_Greek_iotaaccentdieresis },
+ { "Greek_IOTAdiaeresis", XKB_KEY_Greek_IOTAdiaeresis },
+ { "Greek_IOTAdieresis", XKB_KEY_Greek_IOTAdieresis },
+ { "Greek_iotadieresis", XKB_KEY_Greek_iotadieresis },
+ { "Greek_KAPPA", XKB_KEY_Greek_KAPPA },
+ { "Greek_kappa", XKB_KEY_Greek_kappa },
+ { "Greek_LAMBDA", XKB_KEY_Greek_LAMBDA },
+ { "Greek_lambda", XKB_KEY_Greek_lambda },
+ { "Greek_LAMDA", XKB_KEY_Greek_LAMDA },
+ { "Greek_lamda", XKB_KEY_Greek_lamda },
+ { "Greek_MU", XKB_KEY_Greek_MU },
+ { "Greek_mu", XKB_KEY_Greek_mu },
+ { "Greek_NU", XKB_KEY_Greek_NU },
+ { "Greek_nu", XKB_KEY_Greek_nu },
+ { "Greek_OMEGA", XKB_KEY_Greek_OMEGA },
+ { "Greek_omega", XKB_KEY_Greek_omega },
+ { "Greek_OMEGAaccent", XKB_KEY_Greek_OMEGAaccent },
+ { "Greek_omegaaccent", XKB_KEY_Greek_omegaaccent },
+ { "Greek_OMICRON", XKB_KEY_Greek_OMICRON },
+ { "Greek_omicron", XKB_KEY_Greek_omicron },
+ { "Greek_OMICRONaccent", XKB_KEY_Greek_OMICRONaccent },
+ { "Greek_omicronaccent", XKB_KEY_Greek_omicronaccent },
+ { "Greek_PHI", XKB_KEY_Greek_PHI },
+ { "Greek_phi", XKB_KEY_Greek_phi },
+ { "Greek_PI", XKB_KEY_Greek_PI },
+ { "Greek_pi", XKB_KEY_Greek_pi },
+ { "Greek_PSI", XKB_KEY_Greek_PSI },
+ { "Greek_psi", XKB_KEY_Greek_psi },
+ { "Greek_RHO", XKB_KEY_Greek_RHO },
+ { "Greek_rho", XKB_KEY_Greek_rho },
+ { "Greek_SIGMA", XKB_KEY_Greek_SIGMA },
+ { "Greek_sigma", XKB_KEY_Greek_sigma },
+ { "Greek_switch", XKB_KEY_Greek_switch },
+ { "Greek_TAU", XKB_KEY_Greek_TAU },
+ { "Greek_tau", XKB_KEY_Greek_tau },
+ { "Greek_THETA", XKB_KEY_Greek_THETA },
+ { "Greek_theta", XKB_KEY_Greek_theta },
+ { "Greek_UPSILON", XKB_KEY_Greek_UPSILON },
+ { "Greek_upsilon", XKB_KEY_Greek_upsilon },
+ { "Greek_UPSILONaccent", XKB_KEY_Greek_UPSILONaccent },
+ { "Greek_upsilonaccent", XKB_KEY_Greek_upsilonaccent },
+ { "Greek_upsilonaccentdieresis", XKB_KEY_Greek_upsilonaccentdieresis },
+ { "Greek_UPSILONdieresis", XKB_KEY_Greek_UPSILONdieresis },
+ { "Greek_upsilondieresis", XKB_KEY_Greek_upsilondieresis },
+ { "Greek_XI", XKB_KEY_Greek_XI },
+ { "Greek_xi", XKB_KEY_Greek_xi },
+ { "Greek_ZETA", XKB_KEY_Greek_ZETA },
+ { "Greek_zeta", XKB_KEY_Greek_zeta },
+ { "guilder", XKB_KEY_guilder },
+ { "guillemotleft", XKB_KEY_guillemotleft },
+ { "guillemotright", XKB_KEY_guillemotright },
+ { "H", XKB_KEY_H },
+ { "h", XKB_KEY_h },
+ { "hairspace", XKB_KEY_hairspace },
+ { "Hangul", XKB_KEY_Hangul },
+ { "Hangul_A", XKB_KEY_Hangul_A },
+ { "Hangul_AE", XKB_KEY_Hangul_AE },
+ { "Hangul_AraeA", XKB_KEY_Hangul_AraeA },
+ { "Hangul_AraeAE", XKB_KEY_Hangul_AraeAE },
+ { "Hangul_Banja", XKB_KEY_Hangul_Banja },
+ { "Hangul_Cieuc", XKB_KEY_Hangul_Cieuc },
+ { "Hangul_Codeinput", XKB_KEY_Hangul_Codeinput },
+ { "Hangul_Dikeud", XKB_KEY_Hangul_Dikeud },
+ { "Hangul_E", XKB_KEY_Hangul_E },
+ { "Hangul_End", XKB_KEY_Hangul_End },
+ { "Hangul_EO", XKB_KEY_Hangul_EO },
+ { "Hangul_EU", XKB_KEY_Hangul_EU },
+ { "Hangul_Hanja", XKB_KEY_Hangul_Hanja },
+ { "Hangul_Hieuh", XKB_KEY_Hangul_Hieuh },
+ { "Hangul_I", XKB_KEY_Hangul_I },
+ { "Hangul_Ieung", XKB_KEY_Hangul_Ieung },
+ { "Hangul_J_Cieuc", XKB_KEY_Hangul_J_Cieuc },
+ { "Hangul_J_Dikeud", XKB_KEY_Hangul_J_Dikeud },
+ { "Hangul_J_Hieuh", XKB_KEY_Hangul_J_Hieuh },
+ { "Hangul_J_Ieung", XKB_KEY_Hangul_J_Ieung },
+ { "Hangul_J_Jieuj", XKB_KEY_Hangul_J_Jieuj },
+ { "Hangul_J_Khieuq", XKB_KEY_Hangul_J_Khieuq },
+ { "Hangul_J_Kiyeog", XKB_KEY_Hangul_J_Kiyeog },
+ { "Hangul_J_KiyeogSios", XKB_KEY_Hangul_J_KiyeogSios },
+ { "Hangul_J_KkogjiDalrinIeung", XKB_KEY_Hangul_J_KkogjiDalrinIeung },
+ { "Hangul_J_Mieum", XKB_KEY_Hangul_J_Mieum },
+ { "Hangul_J_Nieun", XKB_KEY_Hangul_J_Nieun },
+ { "Hangul_J_NieunHieuh", XKB_KEY_Hangul_J_NieunHieuh },
+ { "Hangul_J_NieunJieuj", XKB_KEY_Hangul_J_NieunJieuj },
+ { "Hangul_J_PanSios", XKB_KEY_Hangul_J_PanSios },
+ { "Hangul_J_Phieuf", XKB_KEY_Hangul_J_Phieuf },
+ { "Hangul_J_Pieub", XKB_KEY_Hangul_J_Pieub },
+ { "Hangul_J_PieubSios", XKB_KEY_Hangul_J_PieubSios },
+ { "Hangul_J_Rieul", XKB_KEY_Hangul_J_Rieul },
+ { "Hangul_J_RieulHieuh", XKB_KEY_Hangul_J_RieulHieuh },
+ { "Hangul_J_RieulKiyeog", XKB_KEY_Hangul_J_RieulKiyeog },
+ { "Hangul_J_RieulMieum", XKB_KEY_Hangul_J_RieulMieum },
+ { "Hangul_J_RieulPhieuf", XKB_KEY_Hangul_J_RieulPhieuf },
+ { "Hangul_J_RieulPieub", XKB_KEY_Hangul_J_RieulPieub },
+ { "Hangul_J_RieulSios", XKB_KEY_Hangul_J_RieulSios },
+ { "Hangul_J_RieulTieut", XKB_KEY_Hangul_J_RieulTieut },
+ { "Hangul_J_Sios", XKB_KEY_Hangul_J_Sios },
+ { "Hangul_J_SsangKiyeog", XKB_KEY_Hangul_J_SsangKiyeog },
+ { "Hangul_J_SsangSios", XKB_KEY_Hangul_J_SsangSios },
+ { "Hangul_J_Tieut", XKB_KEY_Hangul_J_Tieut },
+ { "Hangul_J_YeorinHieuh", XKB_KEY_Hangul_J_YeorinHieuh },
+ { "Hangul_Jamo", XKB_KEY_Hangul_Jamo },
+ { "Hangul_Jeonja", XKB_KEY_Hangul_Jeonja },
+ { "Hangul_Jieuj", XKB_KEY_Hangul_Jieuj },
+ { "Hangul_Khieuq", XKB_KEY_Hangul_Khieuq },
+ { "Hangul_Kiyeog", XKB_KEY_Hangul_Kiyeog },
+ { "Hangul_KiyeogSios", XKB_KEY_Hangul_KiyeogSios },
+ { "Hangul_KkogjiDalrinIeung", XKB_KEY_Hangul_KkogjiDalrinIeung },
+ { "Hangul_Mieum", XKB_KEY_Hangul_Mieum },
+ { "Hangul_MultipleCandidate", XKB_KEY_Hangul_MultipleCandidate },
+ { "Hangul_Nieun", XKB_KEY_Hangul_Nieun },
+ { "Hangul_NieunHieuh", XKB_KEY_Hangul_NieunHieuh },
+ { "Hangul_NieunJieuj", XKB_KEY_Hangul_NieunJieuj },
+ { "Hangul_O", XKB_KEY_Hangul_O },
+ { "Hangul_OE", XKB_KEY_Hangul_OE },
+ { "Hangul_PanSios", XKB_KEY_Hangul_PanSios },
+ { "Hangul_Phieuf", XKB_KEY_Hangul_Phieuf },
+ { "Hangul_Pieub", XKB_KEY_Hangul_Pieub },
+ { "Hangul_PieubSios", XKB_KEY_Hangul_PieubSios },
+ { "Hangul_PostHanja", XKB_KEY_Hangul_PostHanja },
+ { "Hangul_PreHanja", XKB_KEY_Hangul_PreHanja },
+ { "Hangul_PreviousCandidate", XKB_KEY_Hangul_PreviousCandidate },
+ { "Hangul_Rieul", XKB_KEY_Hangul_Rieul },
+ { "Hangul_RieulHieuh", XKB_KEY_Hangul_RieulHieuh },
+ { "Hangul_RieulKiyeog", XKB_KEY_Hangul_RieulKiyeog },
+ { "Hangul_RieulMieum", XKB_KEY_Hangul_RieulMieum },
+ { "Hangul_RieulPhieuf", XKB_KEY_Hangul_RieulPhieuf },
+ { "Hangul_RieulPieub", XKB_KEY_Hangul_RieulPieub },
+ { "Hangul_RieulSios", XKB_KEY_Hangul_RieulSios },
+ { "Hangul_RieulTieut", XKB_KEY_Hangul_RieulTieut },
+ { "Hangul_RieulYeorinHieuh", XKB_KEY_Hangul_RieulYeorinHieuh },
+ { "Hangul_Romaja", XKB_KEY_Hangul_Romaja },
+ { "Hangul_SingleCandidate", XKB_KEY_Hangul_SingleCandidate },
+ { "Hangul_Sios", XKB_KEY_Hangul_Sios },
+ { "Hangul_Special", XKB_KEY_Hangul_Special },
+ { "Hangul_SsangDikeud", XKB_KEY_Hangul_SsangDikeud },
+ { "Hangul_SsangJieuj", XKB_KEY_Hangul_SsangJieuj },
+ { "Hangul_SsangKiyeog", XKB_KEY_Hangul_SsangKiyeog },
+ { "Hangul_SsangPieub", XKB_KEY_Hangul_SsangPieub },
+ { "Hangul_SsangSios", XKB_KEY_Hangul_SsangSios },
+ { "Hangul_Start", XKB_KEY_Hangul_Start },
+ { "Hangul_SunkyeongeumMieum", XKB_KEY_Hangul_SunkyeongeumMieum },
+ { "Hangul_SunkyeongeumPhieuf", XKB_KEY_Hangul_SunkyeongeumPhieuf },
+ { "Hangul_SunkyeongeumPieub", XKB_KEY_Hangul_SunkyeongeumPieub },
+ { "Hangul_switch", XKB_KEY_Hangul_switch },
+ { "Hangul_Tieut", XKB_KEY_Hangul_Tieut },
+ { "Hangul_U", XKB_KEY_Hangul_U },
+ { "Hangul_WA", XKB_KEY_Hangul_WA },
+ { "Hangul_WAE", XKB_KEY_Hangul_WAE },
+ { "Hangul_WE", XKB_KEY_Hangul_WE },
+ { "Hangul_WEO", XKB_KEY_Hangul_WEO },
+ { "Hangul_WI", XKB_KEY_Hangul_WI },
+ { "Hangul_YA", XKB_KEY_Hangul_YA },
+ { "Hangul_YAE", XKB_KEY_Hangul_YAE },
+ { "Hangul_YE", XKB_KEY_Hangul_YE },
+ { "Hangul_YEO", XKB_KEY_Hangul_YEO },
+ { "Hangul_YeorinHieuh", XKB_KEY_Hangul_YeorinHieuh },
+ { "Hangul_YI", XKB_KEY_Hangul_YI },
+ { "Hangul_YO", XKB_KEY_Hangul_YO },
+ { "Hangul_YU", XKB_KEY_Hangul_YU },
+ { "Hankaku", XKB_KEY_Hankaku },
+ { "Hcircumflex", XKB_KEY_Hcircumflex },
+ { "hcircumflex", XKB_KEY_hcircumflex },
+ { "heart", XKB_KEY_heart },
+ { "hebrew_aleph", XKB_KEY_hebrew_aleph },
+ { "hebrew_ayin", XKB_KEY_hebrew_ayin },
+ { "hebrew_bet", XKB_KEY_hebrew_bet },
+ { "hebrew_beth", XKB_KEY_hebrew_beth },
+ { "hebrew_chet", XKB_KEY_hebrew_chet },
+ { "hebrew_dalet", XKB_KEY_hebrew_dalet },
+ { "hebrew_daleth", XKB_KEY_hebrew_daleth },
+ { "hebrew_doublelowline", XKB_KEY_hebrew_doublelowline },
+ { "hebrew_finalkaph", XKB_KEY_hebrew_finalkaph },
+ { "hebrew_finalmem", XKB_KEY_hebrew_finalmem },
+ { "hebrew_finalnun", XKB_KEY_hebrew_finalnun },
+ { "hebrew_finalpe", XKB_KEY_hebrew_finalpe },
+ { "hebrew_finalzade", XKB_KEY_hebrew_finalzade },
+ { "hebrew_finalzadi", XKB_KEY_hebrew_finalzadi },
+ { "hebrew_gimel", XKB_KEY_hebrew_gimel },
+ { "hebrew_gimmel", XKB_KEY_hebrew_gimmel },
+ { "hebrew_he", XKB_KEY_hebrew_he },
+ { "hebrew_het", XKB_KEY_hebrew_het },
+ { "hebrew_kaph", XKB_KEY_hebrew_kaph },
+ { "hebrew_kuf", XKB_KEY_hebrew_kuf },
+ { "hebrew_lamed", XKB_KEY_hebrew_lamed },
+ { "hebrew_mem", XKB_KEY_hebrew_mem },
+ { "hebrew_nun", XKB_KEY_hebrew_nun },
+ { "hebrew_pe", XKB_KEY_hebrew_pe },
+ { "hebrew_qoph", XKB_KEY_hebrew_qoph },
+ { "hebrew_resh", XKB_KEY_hebrew_resh },
+ { "hebrew_samech", XKB_KEY_hebrew_samech },
+ { "hebrew_samekh", XKB_KEY_hebrew_samekh },
+ { "hebrew_shin", XKB_KEY_hebrew_shin },
+ { "Hebrew_switch", XKB_KEY_Hebrew_switch },
+ { "hebrew_taf", XKB_KEY_hebrew_taf },
+ { "hebrew_taw", XKB_KEY_hebrew_taw },
+ { "hebrew_tet", XKB_KEY_hebrew_tet },
+ { "hebrew_teth", XKB_KEY_hebrew_teth },
+ { "hebrew_waw", XKB_KEY_hebrew_waw },
+ { "hebrew_yod", XKB_KEY_hebrew_yod },
+ { "hebrew_zade", XKB_KEY_hebrew_zade },
+ { "hebrew_zadi", XKB_KEY_hebrew_zadi },
+ { "hebrew_zain", XKB_KEY_hebrew_zain },
+ { "hebrew_zayin", XKB_KEY_hebrew_zayin },
+ { "Help", XKB_KEY_Help },
+ { "Henkan", XKB_KEY_Henkan },
+ { "Henkan_Mode", XKB_KEY_Henkan_Mode },
+ { "hexagram", XKB_KEY_hexagram },
+ { "Hiragana", XKB_KEY_Hiragana },
+ { "Hiragana_Katakana", XKB_KEY_Hiragana_Katakana },
+ { "Home", XKB_KEY_Home },
+ { "horizconnector", XKB_KEY_horizconnector },
+ { "horizlinescan1", XKB_KEY_horizlinescan1 },
+ { "horizlinescan3", XKB_KEY_horizlinescan3 },
+ { "horizlinescan5", XKB_KEY_horizlinescan5 },
+ { "horizlinescan7", XKB_KEY_horizlinescan7 },
+ { "horizlinescan9", XKB_KEY_horizlinescan9 },
+ { "hpBackTab", XKB_KEY_hpBackTab },
+ { "hpblock", XKB_KEY_hpblock },
+ { "hpClearLine", XKB_KEY_hpClearLine },
+ { "hpDeleteChar", XKB_KEY_hpDeleteChar },
+ { "hpDeleteLine", XKB_KEY_hpDeleteLine },
+ { "hpguilder", XKB_KEY_hpguilder },
+ { "hpInsertChar", XKB_KEY_hpInsertChar },
+ { "hpInsertLine", XKB_KEY_hpInsertLine },
+ { "hpIO", XKB_KEY_hpIO },
+ { "hpKP_BackTab", XKB_KEY_hpKP_BackTab },
+ { "hplira", XKB_KEY_hplira },
+ { "hplongminus", XKB_KEY_hplongminus },
+ { "hpModelock1", XKB_KEY_hpModelock1 },
+ { "hpModelock2", XKB_KEY_hpModelock2 },
+ { "hpmute_acute", XKB_KEY_hpmute_acute },
+ { "hpmute_asciicircum", XKB_KEY_hpmute_asciicircum },
+ { "hpmute_asciitilde", XKB_KEY_hpmute_asciitilde },
+ { "hpmute_diaeresis", XKB_KEY_hpmute_diaeresis },
+ { "hpmute_grave", XKB_KEY_hpmute_grave },
+ { "hpReset", XKB_KEY_hpReset },
+ { "hpSystem", XKB_KEY_hpSystem },
+ { "hpUser", XKB_KEY_hpUser },
+ { "hpYdiaeresis", XKB_KEY_hpYdiaeresis },
+ { "Hstroke", XKB_KEY_Hstroke },
+ { "hstroke", XKB_KEY_hstroke },
+ { "ht", XKB_KEY_ht },
+ { "Hyper_L", XKB_KEY_Hyper_L },
+ { "Hyper_R", XKB_KEY_Hyper_R },
+ { "hyphen", XKB_KEY_hyphen },
+ { "I", XKB_KEY_I },
+ { "i", XKB_KEY_i },
+ { "Iabovedot", XKB_KEY_Iabovedot },
+ { "Iacute", XKB_KEY_Iacute },
+ { "iacute", XKB_KEY_iacute },
+ { "Ibelowdot", XKB_KEY_Ibelowdot },
+ { "ibelowdot", XKB_KEY_ibelowdot },
+ { "Ibreve", XKB_KEY_Ibreve },
+ { "ibreve", XKB_KEY_ibreve },
+ { "Icircumflex", XKB_KEY_Icircumflex },
+ { "icircumflex", XKB_KEY_icircumflex },
+ { "identical", XKB_KEY_identical },
+ { "Idiaeresis", XKB_KEY_Idiaeresis },
+ { "idiaeresis", XKB_KEY_idiaeresis },
+ { "idotless", XKB_KEY_idotless },
+ { "ifonlyif", XKB_KEY_ifonlyif },
+ { "Igrave", XKB_KEY_Igrave },
+ { "igrave", XKB_KEY_igrave },
+ { "Ihook", XKB_KEY_Ihook },
+ { "ihook", XKB_KEY_ihook },
+ { "Imacron", XKB_KEY_Imacron },
+ { "imacron", XKB_KEY_imacron },
+ { "implies", XKB_KEY_implies },
+ { "includedin", XKB_KEY_includedin },
+ { "includes", XKB_KEY_includes },
+ { "infinity", XKB_KEY_infinity },
+ { "Insert", XKB_KEY_Insert },
+ { "InsertChar", XKB_KEY_InsertChar },
+ { "InsertLine", XKB_KEY_InsertLine },
+ { "integral", XKB_KEY_integral },
+ { "intersection", XKB_KEY_intersection },
+ { "IO", XKB_KEY_IO },
+ { "Iogonek", XKB_KEY_Iogonek },
+ { "iogonek", XKB_KEY_iogonek },
+ { "ISO_Center_Object", XKB_KEY_ISO_Center_Object },
+ { "ISO_Continuous_Underline", XKB_KEY_ISO_Continuous_Underline },
+ { "ISO_Discontinuous_Underline", XKB_KEY_ISO_Discontinuous_Underline },
+ { "ISO_Emphasize", XKB_KEY_ISO_Emphasize },
+ { "ISO_Enter", XKB_KEY_ISO_Enter },
+ { "ISO_Fast_Cursor_Down", XKB_KEY_ISO_Fast_Cursor_Down },
+ { "ISO_Fast_Cursor_Left", XKB_KEY_ISO_Fast_Cursor_Left },
+ { "ISO_Fast_Cursor_Right", XKB_KEY_ISO_Fast_Cursor_Right },
+ { "ISO_Fast_Cursor_Up", XKB_KEY_ISO_Fast_Cursor_Up },
+ { "ISO_First_Group", XKB_KEY_ISO_First_Group },
+ { "ISO_First_Group_Lock", XKB_KEY_ISO_First_Group_Lock },
+ { "ISO_Group_Latch", XKB_KEY_ISO_Group_Latch },
+ { "ISO_Group_Lock", XKB_KEY_ISO_Group_Lock },
+ { "ISO_Group_Shift", XKB_KEY_ISO_Group_Shift },
+ { "ISO_Last_Group", XKB_KEY_ISO_Last_Group },
+ { "ISO_Last_Group_Lock", XKB_KEY_ISO_Last_Group_Lock },
+ { "ISO_Left_Tab", XKB_KEY_ISO_Left_Tab },
+ { "ISO_Level2_Latch", XKB_KEY_ISO_Level2_Latch },
+ { "ISO_Level3_Latch", XKB_KEY_ISO_Level3_Latch },
+ { "ISO_Level3_Lock", XKB_KEY_ISO_Level3_Lock },
+ { "ISO_Level3_Shift", XKB_KEY_ISO_Level3_Shift },
+ { "ISO_Level5_Latch", XKB_KEY_ISO_Level5_Latch },
+ { "ISO_Level5_Lock", XKB_KEY_ISO_Level5_Lock },
+ { "ISO_Level5_Shift", XKB_KEY_ISO_Level5_Shift },
+ { "ISO_Lock", XKB_KEY_ISO_Lock },
+ { "ISO_Move_Line_Down", XKB_KEY_ISO_Move_Line_Down },
+ { "ISO_Move_Line_Up", XKB_KEY_ISO_Move_Line_Up },
+ { "ISO_Next_Group", XKB_KEY_ISO_Next_Group },
+ { "ISO_Next_Group_Lock", XKB_KEY_ISO_Next_Group_Lock },
+ { "ISO_Partial_Line_Down", XKB_KEY_ISO_Partial_Line_Down },
+ { "ISO_Partial_Line_Up", XKB_KEY_ISO_Partial_Line_Up },
+ { "ISO_Partial_Space_Left", XKB_KEY_ISO_Partial_Space_Left },
+ { "ISO_Partial_Space_Right", XKB_KEY_ISO_Partial_Space_Right },
+ { "ISO_Prev_Group", XKB_KEY_ISO_Prev_Group },
+ { "ISO_Prev_Group_Lock", XKB_KEY_ISO_Prev_Group_Lock },
+ { "ISO_Release_Both_Margins", XKB_KEY_ISO_Release_Both_Margins },
+ { "ISO_Release_Margin_Left", XKB_KEY_ISO_Release_Margin_Left },
+ { "ISO_Release_Margin_Right", XKB_KEY_ISO_Release_Margin_Right },
+ { "ISO_Set_Margin_Left", XKB_KEY_ISO_Set_Margin_Left },
+ { "ISO_Set_Margin_Right", XKB_KEY_ISO_Set_Margin_Right },
+ { "Itilde", XKB_KEY_Itilde },
+ { "itilde", XKB_KEY_itilde },
+ { "J", XKB_KEY_J },
+ { "j", XKB_KEY_j },
+ { "Jcircumflex", XKB_KEY_Jcircumflex },
+ { "jcircumflex", XKB_KEY_jcircumflex },
+ { "jot", XKB_KEY_jot },
+ { "K", XKB_KEY_K },
+ { "k", XKB_KEY_k },
+ { "kana_a", XKB_KEY_kana_a },
+ { "kana_A", XKB_KEY_kana_A },
+ { "kana_CHI", XKB_KEY_kana_CHI },
+ { "kana_closingbracket", XKB_KEY_kana_closingbracket },
+ { "kana_comma", XKB_KEY_kana_comma },
+ { "kana_conjunctive", XKB_KEY_kana_conjunctive },
+ { "kana_e", XKB_KEY_kana_e },
+ { "kana_E", XKB_KEY_kana_E },
+ { "kana_FU", XKB_KEY_kana_FU },
+ { "kana_fullstop", XKB_KEY_kana_fullstop },
+ { "kana_HA", XKB_KEY_kana_HA },
+ { "kana_HE", XKB_KEY_kana_HE },
+ { "kana_HI", XKB_KEY_kana_HI },
+ { "kana_HO", XKB_KEY_kana_HO },
+ { "kana_HU", XKB_KEY_kana_HU },
+ { "kana_i", XKB_KEY_kana_i },
+ { "kana_I", XKB_KEY_kana_I },
+ { "kana_KA", XKB_KEY_kana_KA },
+ { "kana_KE", XKB_KEY_kana_KE },
+ { "kana_KI", XKB_KEY_kana_KI },
+ { "kana_KO", XKB_KEY_kana_KO },
+ { "kana_KU", XKB_KEY_kana_KU },
+ { "Kana_Lock", XKB_KEY_Kana_Lock },
+ { "kana_MA", XKB_KEY_kana_MA },
+ { "kana_ME", XKB_KEY_kana_ME },
+ { "kana_MI", XKB_KEY_kana_MI },
+ { "kana_middledot", XKB_KEY_kana_middledot },
+ { "kana_MO", XKB_KEY_kana_MO },
+ { "kana_MU", XKB_KEY_kana_MU },
+ { "kana_N", XKB_KEY_kana_N },
+ { "kana_NA", XKB_KEY_kana_NA },
+ { "kana_NE", XKB_KEY_kana_NE },
+ { "kana_NI", XKB_KEY_kana_NI },
+ { "kana_NO", XKB_KEY_kana_NO },
+ { "kana_NU", XKB_KEY_kana_NU },
+ { "kana_o", XKB_KEY_kana_o },
+ { "kana_O", XKB_KEY_kana_O },
+ { "kana_openingbracket", XKB_KEY_kana_openingbracket },
+ { "kana_RA", XKB_KEY_kana_RA },
+ { "kana_RE", XKB_KEY_kana_RE },
+ { "kana_RI", XKB_KEY_kana_RI },
+ { "kana_RO", XKB_KEY_kana_RO },
+ { "kana_RU", XKB_KEY_kana_RU },
+ { "kana_SA", XKB_KEY_kana_SA },
+ { "kana_SE", XKB_KEY_kana_SE },
+ { "kana_SHI", XKB_KEY_kana_SHI },
+ { "Kana_Shift", XKB_KEY_Kana_Shift },
+ { "kana_SO", XKB_KEY_kana_SO },
+ { "kana_SU", XKB_KEY_kana_SU },
+ { "kana_switch", XKB_KEY_kana_switch },
+ { "kana_TA", XKB_KEY_kana_TA },
+ { "kana_TE", XKB_KEY_kana_TE },
+ { "kana_TI", XKB_KEY_kana_TI },
+ { "kana_TO", XKB_KEY_kana_TO },
+ { "kana_tsu", XKB_KEY_kana_tsu },
+ { "kana_TSU", XKB_KEY_kana_TSU },
+ { "kana_tu", XKB_KEY_kana_tu },
+ { "kana_TU", XKB_KEY_kana_TU },
+ { "kana_u", XKB_KEY_kana_u },
+ { "kana_U", XKB_KEY_kana_U },
+ { "kana_WA", XKB_KEY_kana_WA },
+ { "kana_WO", XKB_KEY_kana_WO },
+ { "kana_ya", XKB_KEY_kana_ya },
+ { "kana_YA", XKB_KEY_kana_YA },
+ { "kana_yo", XKB_KEY_kana_yo },
+ { "kana_YO", XKB_KEY_kana_YO },
+ { "kana_yu", XKB_KEY_kana_yu },
+ { "kana_YU", XKB_KEY_kana_YU },
+ { "Kanji", XKB_KEY_Kanji },
+ { "Kanji_Bangou", XKB_KEY_Kanji_Bangou },
+ { "kappa", XKB_KEY_kappa },
+ { "Katakana", XKB_KEY_Katakana },
+ { "Kcedilla", XKB_KEY_Kcedilla },
+ { "kcedilla", XKB_KEY_kcedilla },
+ { "Korean_Won", XKB_KEY_Korean_Won },
+ { "KP_0", XKB_KEY_KP_0 },
+ { "KP_1", XKB_KEY_KP_1 },
+ { "KP_2", XKB_KEY_KP_2 },
+ { "KP_3", XKB_KEY_KP_3 },
+ { "KP_4", XKB_KEY_KP_4 },
+ { "KP_5", XKB_KEY_KP_5 },
+ { "KP_6", XKB_KEY_KP_6 },
+ { "KP_7", XKB_KEY_KP_7 },
+ { "KP_8", XKB_KEY_KP_8 },
+ { "KP_9", XKB_KEY_KP_9 },
+ { "KP_Add", XKB_KEY_KP_Add },
+ { "KP_BackTab", XKB_KEY_KP_BackTab },
+ { "KP_Begin", XKB_KEY_KP_Begin },
+ { "KP_Decimal", XKB_KEY_KP_Decimal },
+ { "KP_Delete", XKB_KEY_KP_Delete },
+ { "KP_Divide", XKB_KEY_KP_Divide },
+ { "KP_Down", XKB_KEY_KP_Down },
+ { "KP_End", XKB_KEY_KP_End },
+ { "KP_Enter", XKB_KEY_KP_Enter },
+ { "KP_Equal", XKB_KEY_KP_Equal },
+ { "KP_F1", XKB_KEY_KP_F1 },
+ { "KP_F2", XKB_KEY_KP_F2 },
+ { "KP_F3", XKB_KEY_KP_F3 },
+ { "KP_F4", XKB_KEY_KP_F4 },
+ { "KP_Home", XKB_KEY_KP_Home },
+ { "KP_Insert", XKB_KEY_KP_Insert },
+ { "KP_Left", XKB_KEY_KP_Left },
+ { "KP_Multiply", XKB_KEY_KP_Multiply },
+ { "KP_Next", XKB_KEY_KP_Next },
+ { "KP_Page_Down", XKB_KEY_KP_Page_Down },
+ { "KP_Page_Up", XKB_KEY_KP_Page_Up },
+ { "KP_Prior", XKB_KEY_KP_Prior },
+ { "KP_Right", XKB_KEY_KP_Right },
+ { "KP_Separator", XKB_KEY_KP_Separator },
+ { "KP_Space", XKB_KEY_KP_Space },
+ { "KP_Subtract", XKB_KEY_KP_Subtract },
+ { "KP_Tab", XKB_KEY_KP_Tab },
+ { "KP_Up", XKB_KEY_KP_Up },
+ { "kra", XKB_KEY_kra },
+ { "L", XKB_KEY_L },
+ { "l", XKB_KEY_l },
+ { "L1", XKB_KEY_L1 },
+ { "L10", XKB_KEY_L10 },
+ { "L2", XKB_KEY_L2 },
+ { "L3", XKB_KEY_L3 },
+ { "L4", XKB_KEY_L4 },
+ { "L5", XKB_KEY_L5 },
+ { "L6", XKB_KEY_L6 },
+ { "L7", XKB_KEY_L7 },
+ { "L8", XKB_KEY_L8 },
+ { "L9", XKB_KEY_L9 },
+ { "Lacute", XKB_KEY_Lacute },
+ { "lacute", XKB_KEY_lacute },
+ { "Last_Virtual_Screen", XKB_KEY_Last_Virtual_Screen },
+ { "latincross", XKB_KEY_latincross },
+ { "Lbelowdot", XKB_KEY_Lbelowdot },
+ { "lbelowdot", XKB_KEY_lbelowdot },
+ { "Lcaron", XKB_KEY_Lcaron },
+ { "lcaron", XKB_KEY_lcaron },
+ { "Lcedilla", XKB_KEY_Lcedilla },
+ { "lcedilla", XKB_KEY_lcedilla },
+ { "Left", XKB_KEY_Left },
+ { "leftanglebracket", XKB_KEY_leftanglebracket },
+ { "leftarrow", XKB_KEY_leftarrow },
+ { "leftcaret", XKB_KEY_leftcaret },
+ { "leftdoublequotemark", XKB_KEY_leftdoublequotemark },
+ { "leftmiddlecurlybrace", XKB_KEY_leftmiddlecurlybrace },
+ { "leftopentriangle", XKB_KEY_leftopentriangle },
+ { "leftpointer", XKB_KEY_leftpointer },
+ { "leftradical", XKB_KEY_leftradical },
+ { "leftshoe", XKB_KEY_leftshoe },
+ { "leftsinglequotemark", XKB_KEY_leftsinglequotemark },
+ { "leftt", XKB_KEY_leftt },
+ { "lefttack", XKB_KEY_lefttack },
+ { "less", XKB_KEY_less },
+ { "lessthanequal", XKB_KEY_lessthanequal },
+ { "lf", XKB_KEY_lf },
+ { "Linefeed", XKB_KEY_Linefeed },
+ { "lira", XKB_KEY_lira },
+ { "LiraSign", XKB_KEY_LiraSign },
+ { "logicaland", XKB_KEY_logicaland },
+ { "logicalor", XKB_KEY_logicalor },
+ { "longminus", XKB_KEY_longminus },
+ { "lowleftcorner", XKB_KEY_lowleftcorner },
+ { "lowrightcorner", XKB_KEY_lowrightcorner },
+ { "Lstroke", XKB_KEY_Lstroke },
+ { "lstroke", XKB_KEY_lstroke },
+ { "M", XKB_KEY_M },
+ { "m", XKB_KEY_m },
+ { "Mabovedot", XKB_KEY_Mabovedot },
+ { "mabovedot", XKB_KEY_mabovedot },
+ { "Macedonia_dse", XKB_KEY_Macedonia_dse },
+ { "Macedonia_DSE", XKB_KEY_Macedonia_DSE },
+ { "Macedonia_gje", XKB_KEY_Macedonia_gje },
+ { "Macedonia_GJE", XKB_KEY_Macedonia_GJE },
+ { "Macedonia_kje", XKB_KEY_Macedonia_kje },
+ { "Macedonia_KJE", XKB_KEY_Macedonia_KJE },
+ { "macron", XKB_KEY_macron },
+ { "Mae_Koho", XKB_KEY_Mae_Koho },
+ { "malesymbol", XKB_KEY_malesymbol },
+ { "maltesecross", XKB_KEY_maltesecross },
+ { "marker", XKB_KEY_marker },
+ { "masculine", XKB_KEY_masculine },
+ { "Massyo", XKB_KEY_Massyo },
+ { "Menu", XKB_KEY_Menu },
+ { "Meta_L", XKB_KEY_Meta_L },
+ { "Meta_R", XKB_KEY_Meta_R },
+ { "MillSign", XKB_KEY_MillSign },
+ { "minus", XKB_KEY_minus },
+ { "minutes", XKB_KEY_minutes },
+ { "Mode_switch", XKB_KEY_Mode_switch },
+ { "MouseKeys_Accel_Enable", XKB_KEY_MouseKeys_Accel_Enable },
+ { "MouseKeys_Enable", XKB_KEY_MouseKeys_Enable },
+ { "mu", XKB_KEY_mu },
+ { "Muhenkan", XKB_KEY_Muhenkan },
+ { "Multi_key", XKB_KEY_Multi_key },
+ { "MultipleCandidate", XKB_KEY_MultipleCandidate },
+ { "multiply", XKB_KEY_multiply },
+ { "musicalflat", XKB_KEY_musicalflat },
+ { "musicalsharp", XKB_KEY_musicalsharp },
+ { "mute_acute", XKB_KEY_mute_acute },
+ { "mute_asciicircum", XKB_KEY_mute_asciicircum },
+ { "mute_asciitilde", XKB_KEY_mute_asciitilde },
+ { "mute_diaeresis", XKB_KEY_mute_diaeresis },
+ { "mute_grave", XKB_KEY_mute_grave },
+ { "N", XKB_KEY_N },
+ { "n", XKB_KEY_n },
+ { "nabla", XKB_KEY_nabla },
+ { "Nacute", XKB_KEY_Nacute },
+ { "nacute", XKB_KEY_nacute },
+ { "NairaSign", XKB_KEY_NairaSign },
+ { "Ncaron", XKB_KEY_Ncaron },
+ { "ncaron", XKB_KEY_ncaron },
+ { "Ncedilla", XKB_KEY_Ncedilla },
+ { "ncedilla", XKB_KEY_ncedilla },
+ { "NewSheqelSign", XKB_KEY_NewSheqelSign },
+ { "Next", XKB_KEY_Next },
+ { "Next_Virtual_Screen", XKB_KEY_Next_Virtual_Screen },
+ { "ninesubscript", XKB_KEY_ninesubscript },
+ { "ninesuperior", XKB_KEY_ninesuperior },
+ { "nl", XKB_KEY_nl },
+ { "nobreakspace", XKB_KEY_nobreakspace },
+ { "NoSymbol", XKB_KEY_NoSymbol },
+ { "notapproxeq", XKB_KEY_notapproxeq },
+ { "notelementof", XKB_KEY_notelementof },
+ { "notequal", XKB_KEY_notequal },
+ { "notidentical", XKB_KEY_notidentical },
+ { "notsign", XKB_KEY_notsign },
+ { "Ntilde", XKB_KEY_Ntilde },
+ { "ntilde", XKB_KEY_ntilde },
+ { "Num_Lock", XKB_KEY_Num_Lock },
+ { "numbersign", XKB_KEY_numbersign },
+ { "numerosign", XKB_KEY_numerosign },
+ { "O", XKB_KEY_O },
+ { "o", XKB_KEY_o },
+ { "Oacute", XKB_KEY_Oacute },
+ { "oacute", XKB_KEY_oacute },
+ { "Obarred", XKB_KEY_Obarred },
+ { "obarred", XKB_KEY_obarred },
+ { "Obelowdot", XKB_KEY_Obelowdot },
+ { "obelowdot", XKB_KEY_obelowdot },
+ { "Ocaron", XKB_KEY_Ocaron },
+ { "ocaron", XKB_KEY_ocaron },
+ { "Ocircumflex", XKB_KEY_Ocircumflex },
+ { "ocircumflex", XKB_KEY_ocircumflex },
+ { "Ocircumflexacute", XKB_KEY_Ocircumflexacute },
+ { "ocircumflexacute", XKB_KEY_ocircumflexacute },
+ { "Ocircumflexbelowdot", XKB_KEY_Ocircumflexbelowdot },
+ { "ocircumflexbelowdot", XKB_KEY_ocircumflexbelowdot },
+ { "Ocircumflexgrave", XKB_KEY_Ocircumflexgrave },
+ { "ocircumflexgrave", XKB_KEY_ocircumflexgrave },
+ { "Ocircumflexhook", XKB_KEY_Ocircumflexhook },
+ { "ocircumflexhook", XKB_KEY_ocircumflexhook },
+ { "Ocircumflextilde", XKB_KEY_Ocircumflextilde },
+ { "ocircumflextilde", XKB_KEY_ocircumflextilde },
+ { "Odiaeresis", XKB_KEY_Odiaeresis },
+ { "odiaeresis", XKB_KEY_odiaeresis },
+ { "Odoubleacute", XKB_KEY_Odoubleacute },
+ { "odoubleacute", XKB_KEY_odoubleacute },
+ { "OE", XKB_KEY_OE },
+ { "oe", XKB_KEY_oe },
+ { "ogonek", XKB_KEY_ogonek },
+ { "Ograve", XKB_KEY_Ograve },
+ { "ograve", XKB_KEY_ograve },
+ { "Ohook", XKB_KEY_Ohook },
+ { "ohook", XKB_KEY_ohook },
+ { "Ohorn", XKB_KEY_Ohorn },
+ { "ohorn", XKB_KEY_ohorn },
+ { "Ohornacute", XKB_KEY_Ohornacute },
+ { "ohornacute", XKB_KEY_ohornacute },
+ { "Ohornbelowdot", XKB_KEY_Ohornbelowdot },
+ { "ohornbelowdot", XKB_KEY_ohornbelowdot },
+ { "Ohorngrave", XKB_KEY_Ohorngrave },
+ { "ohorngrave", XKB_KEY_ohorngrave },
+ { "Ohornhook", XKB_KEY_Ohornhook },
+ { "ohornhook", XKB_KEY_ohornhook },
+ { "Ohorntilde", XKB_KEY_Ohorntilde },
+ { "ohorntilde", XKB_KEY_ohorntilde },
+ { "Omacron", XKB_KEY_Omacron },
+ { "omacron", XKB_KEY_omacron },
+ { "oneeighth", XKB_KEY_oneeighth },
+ { "onefifth", XKB_KEY_onefifth },
+ { "onehalf", XKB_KEY_onehalf },
+ { "onequarter", XKB_KEY_onequarter },
+ { "onesixth", XKB_KEY_onesixth },
+ { "onesubscript", XKB_KEY_onesubscript },
+ { "onesuperior", XKB_KEY_onesuperior },
+ { "onethird", XKB_KEY_onethird },
+ { "Ooblique", XKB_KEY_Ooblique },
+ { "ooblique", XKB_KEY_ooblique },
+ { "openrectbullet", XKB_KEY_openrectbullet },
+ { "openstar", XKB_KEY_openstar },
+ { "opentribulletdown", XKB_KEY_opentribulletdown },
+ { "opentribulletup", XKB_KEY_opentribulletup },
+ { "ordfeminine", XKB_KEY_ordfeminine },
+ { "osfActivate", XKB_KEY_osfActivate },
+ { "osfAddMode", XKB_KEY_osfAddMode },
+ { "osfBackSpace", XKB_KEY_osfBackSpace },
+ { "osfBackTab", XKB_KEY_osfBackTab },
+ { "osfBeginData", XKB_KEY_osfBeginData },
+ { "osfBeginLine", XKB_KEY_osfBeginLine },
+ { "osfCancel", XKB_KEY_osfCancel },
+ { "osfClear", XKB_KEY_osfClear },
+ { "osfCopy", XKB_KEY_osfCopy },
+ { "osfCut", XKB_KEY_osfCut },
+ { "osfDelete", XKB_KEY_osfDelete },
+ { "osfDeselectAll", XKB_KEY_osfDeselectAll },
+ { "osfDown", XKB_KEY_osfDown },
+ { "osfEndData", XKB_KEY_osfEndData },
+ { "osfEndLine", XKB_KEY_osfEndLine },
+ { "osfEscape", XKB_KEY_osfEscape },
+ { "osfExtend", XKB_KEY_osfExtend },
+ { "osfHelp", XKB_KEY_osfHelp },
+ { "osfInsert", XKB_KEY_osfInsert },
+ { "osfLeft", XKB_KEY_osfLeft },
+ { "osfMenu", XKB_KEY_osfMenu },
+ { "osfMenuBar", XKB_KEY_osfMenuBar },
+ { "osfNextField", XKB_KEY_osfNextField },
+ { "osfNextMenu", XKB_KEY_osfNextMenu },
+ { "osfPageDown", XKB_KEY_osfPageDown },
+ { "osfPageLeft", XKB_KEY_osfPageLeft },
+ { "osfPageRight", XKB_KEY_osfPageRight },
+ { "osfPageUp", XKB_KEY_osfPageUp },
+ { "osfPaste", XKB_KEY_osfPaste },
+ { "osfPrevField", XKB_KEY_osfPrevField },
+ { "osfPrevMenu", XKB_KEY_osfPrevMenu },
+ { "osfPrimaryPaste", XKB_KEY_osfPrimaryPaste },
+ { "osfQuickPaste", XKB_KEY_osfQuickPaste },
+ { "osfReselect", XKB_KEY_osfReselect },
+ { "osfRestore", XKB_KEY_osfRestore },
+ { "osfRight", XKB_KEY_osfRight },
+ { "osfSelect", XKB_KEY_osfSelect },
+ { "osfSelectAll", XKB_KEY_osfSelectAll },
+ { "osfUndo", XKB_KEY_osfUndo },
+ { "osfUp", XKB_KEY_osfUp },
+ { "Oslash", XKB_KEY_Oslash },
+ { "oslash", XKB_KEY_oslash },
+ { "Otilde", XKB_KEY_Otilde },
+ { "otilde", XKB_KEY_otilde },
+ { "overbar", XKB_KEY_overbar },
+ { "Overlay1_Enable", XKB_KEY_Overlay1_Enable },
+ { "Overlay2_Enable", XKB_KEY_Overlay2_Enable },
+ { "overline", XKB_KEY_overline },
+ { "P", XKB_KEY_P },
+ { "p", XKB_KEY_p },
+ { "Pabovedot", XKB_KEY_Pabovedot },
+ { "pabovedot", XKB_KEY_pabovedot },
+ { "Page_Down", XKB_KEY_Page_Down },
+ { "Page_Up", XKB_KEY_Page_Up },
+ { "paragraph", XKB_KEY_paragraph },
+ { "parenleft", XKB_KEY_parenleft },
+ { "parenright", XKB_KEY_parenright },
+ { "partdifferential", XKB_KEY_partdifferential },
+ { "partialderivative", XKB_KEY_partialderivative },
+ { "Pause", XKB_KEY_Pause },
+ { "percent", XKB_KEY_percent },
+ { "period", XKB_KEY_period },
+ { "periodcentered", XKB_KEY_periodcentered },
+ { "permille", XKB_KEY_permille },
+ { "PesetaSign", XKB_KEY_PesetaSign },
+ { "phonographcopyright", XKB_KEY_phonographcopyright },
+ { "plus", XKB_KEY_plus },
+ { "plusminus", XKB_KEY_plusminus },
+ { "Pointer_Accelerate", XKB_KEY_Pointer_Accelerate },
+ { "Pointer_Button1", XKB_KEY_Pointer_Button1 },
+ { "Pointer_Button2", XKB_KEY_Pointer_Button2 },
+ { "Pointer_Button3", XKB_KEY_Pointer_Button3 },
+ { "Pointer_Button4", XKB_KEY_Pointer_Button4 },
+ { "Pointer_Button5", XKB_KEY_Pointer_Button5 },
+ { "Pointer_Button_Dflt", XKB_KEY_Pointer_Button_Dflt },
+ { "Pointer_DblClick1", XKB_KEY_Pointer_DblClick1 },
+ { "Pointer_DblClick2", XKB_KEY_Pointer_DblClick2 },
+ { "Pointer_DblClick3", XKB_KEY_Pointer_DblClick3 },
+ { "Pointer_DblClick4", XKB_KEY_Pointer_DblClick4 },
+ { "Pointer_DblClick5", XKB_KEY_Pointer_DblClick5 },
+ { "Pointer_DblClick_Dflt", XKB_KEY_Pointer_DblClick_Dflt },
+ { "Pointer_DfltBtnNext", XKB_KEY_Pointer_DfltBtnNext },
+ { "Pointer_DfltBtnPrev", XKB_KEY_Pointer_DfltBtnPrev },
+ { "Pointer_Down", XKB_KEY_Pointer_Down },
+ { "Pointer_DownLeft", XKB_KEY_Pointer_DownLeft },
+ { "Pointer_DownRight", XKB_KEY_Pointer_DownRight },
+ { "Pointer_Drag1", XKB_KEY_Pointer_Drag1 },
+ { "Pointer_Drag2", XKB_KEY_Pointer_Drag2 },
+ { "Pointer_Drag3", XKB_KEY_Pointer_Drag3 },
+ { "Pointer_Drag4", XKB_KEY_Pointer_Drag4 },
+ { "Pointer_Drag5", XKB_KEY_Pointer_Drag5 },
+ { "Pointer_Drag_Dflt", XKB_KEY_Pointer_Drag_Dflt },
+ { "Pointer_EnableKeys", XKB_KEY_Pointer_EnableKeys },
+ { "Pointer_Left", XKB_KEY_Pointer_Left },
+ { "Pointer_Right", XKB_KEY_Pointer_Right },
+ { "Pointer_Up", XKB_KEY_Pointer_Up },
+ { "Pointer_UpLeft", XKB_KEY_Pointer_UpLeft },
+ { "Pointer_UpRight", XKB_KEY_Pointer_UpRight },
+ { "prescription", XKB_KEY_prescription },
+ { "Prev_Virtual_Screen", XKB_KEY_Prev_Virtual_Screen },
+ { "PreviousCandidate", XKB_KEY_PreviousCandidate },
+ { "Print", XKB_KEY_Print },
+ { "Prior", XKB_KEY_Prior },
+ { "prolongedsound", XKB_KEY_prolongedsound },
+ { "punctspace", XKB_KEY_punctspace },
+ { "Q", XKB_KEY_Q },
+ { "q", XKB_KEY_q },
+ { "quad", XKB_KEY_quad },
+ { "question", XKB_KEY_question },
+ { "questiondown", XKB_KEY_questiondown },
+ { "quotedbl", XKB_KEY_quotedbl },
+ { "quoteleft", XKB_KEY_quoteleft },
+ { "quoteright", XKB_KEY_quoteright },
+ { "R", XKB_KEY_R },
+ { "r", XKB_KEY_r },
+ { "R1", XKB_KEY_R1 },
+ { "R10", XKB_KEY_R10 },
+ { "R11", XKB_KEY_R11 },
+ { "R12", XKB_KEY_R12 },
+ { "R13", XKB_KEY_R13 },
+ { "R14", XKB_KEY_R14 },
+ { "R15", XKB_KEY_R15 },
+ { "R2", XKB_KEY_R2 },
+ { "R3", XKB_KEY_R3 },
+ { "R4", XKB_KEY_R4 },
+ { "R5", XKB_KEY_R5 },
+ { "R6", XKB_KEY_R6 },
+ { "R7", XKB_KEY_R7 },
+ { "R8", XKB_KEY_R8 },
+ { "R9", XKB_KEY_R9 },
+ { "Racute", XKB_KEY_Racute },
+ { "racute", XKB_KEY_racute },
+ { "radical", XKB_KEY_radical },
+ { "Rcaron", XKB_KEY_Rcaron },
+ { "rcaron", XKB_KEY_rcaron },
+ { "Rcedilla", XKB_KEY_Rcedilla },
+ { "rcedilla", XKB_KEY_rcedilla },
+ { "Redo", XKB_KEY_Redo },
+ { "registered", XKB_KEY_registered },
+ { "RepeatKeys_Enable", XKB_KEY_RepeatKeys_Enable },
+ { "Reset", XKB_KEY_Reset },
+ { "Return", XKB_KEY_Return },
+ { "Right", XKB_KEY_Right },
+ { "rightanglebracket", XKB_KEY_rightanglebracket },
+ { "rightarrow", XKB_KEY_rightarrow },
+ { "rightcaret", XKB_KEY_rightcaret },
+ { "rightdoublequotemark", XKB_KEY_rightdoublequotemark },
+ { "rightmiddlecurlybrace", XKB_KEY_rightmiddlecurlybrace },
+ { "rightmiddlesummation", XKB_KEY_rightmiddlesummation },
+ { "rightopentriangle", XKB_KEY_rightopentriangle },
+ { "rightpointer", XKB_KEY_rightpointer },
+ { "rightshoe", XKB_KEY_rightshoe },
+ { "rightsinglequotemark", XKB_KEY_rightsinglequotemark },
+ { "rightt", XKB_KEY_rightt },
+ { "righttack", XKB_KEY_righttack },
+ { "Romaji", XKB_KEY_Romaji },
+ { "RupeeSign", XKB_KEY_RupeeSign },
+ { "S", XKB_KEY_S },
+ { "s", XKB_KEY_s },
+ { "Sabovedot", XKB_KEY_Sabovedot },
+ { "sabovedot", XKB_KEY_sabovedot },
+ { "Sacute", XKB_KEY_Sacute },
+ { "sacute", XKB_KEY_sacute },
+ { "Scaron", XKB_KEY_Scaron },
+ { "scaron", XKB_KEY_scaron },
+ { "Scedilla", XKB_KEY_Scedilla },
+ { "scedilla", XKB_KEY_scedilla },
+ { "SCHWA", XKB_KEY_SCHWA },
+ { "schwa", XKB_KEY_schwa },
+ { "Scircumflex", XKB_KEY_Scircumflex },
+ { "scircumflex", XKB_KEY_scircumflex },
+ { "script_switch", XKB_KEY_script_switch },
+ { "Scroll_Lock", XKB_KEY_Scroll_Lock },
+ { "seconds", XKB_KEY_seconds },
+ { "section", XKB_KEY_section },
+ { "Select", XKB_KEY_Select },
+ { "semicolon", XKB_KEY_semicolon },
+ { "semivoicedsound", XKB_KEY_semivoicedsound },
+ { "Serbian_dje", XKB_KEY_Serbian_dje },
+ { "Serbian_DJE", XKB_KEY_Serbian_DJE },
+ { "Serbian_dze", XKB_KEY_Serbian_dze },
+ { "Serbian_DZE", XKB_KEY_Serbian_DZE },
+ { "Serbian_je", XKB_KEY_Serbian_je },
+ { "Serbian_JE", XKB_KEY_Serbian_JE },
+ { "Serbian_lje", XKB_KEY_Serbian_lje },
+ { "Serbian_LJE", XKB_KEY_Serbian_LJE },
+ { "Serbian_nje", XKB_KEY_Serbian_nje },
+ { "Serbian_NJE", XKB_KEY_Serbian_NJE },
+ { "Serbian_tshe", XKB_KEY_Serbian_tshe },
+ { "Serbian_TSHE", XKB_KEY_Serbian_TSHE },
+ { "seveneighths", XKB_KEY_seveneighths },
+ { "sevensubscript", XKB_KEY_sevensubscript },
+ { "sevensuperior", XKB_KEY_sevensuperior },
+ { "Shift_L", XKB_KEY_Shift_L },
+ { "Shift_Lock", XKB_KEY_Shift_Lock },
+ { "Shift_R", XKB_KEY_Shift_R },
+ { "signaturemark", XKB_KEY_signaturemark },
+ { "signifblank", XKB_KEY_signifblank },
+ { "similarequal", XKB_KEY_similarequal },
+ { "SingleCandidate", XKB_KEY_SingleCandidate },
+ { "singlelowquotemark", XKB_KEY_singlelowquotemark },
+ { "Sinh_a", XKB_KEY_Sinh_a },
+ { "Sinh_aa", XKB_KEY_Sinh_aa },
+ { "Sinh_aa2", XKB_KEY_Sinh_aa2 },
+ { "Sinh_ae", XKB_KEY_Sinh_ae },
+ { "Sinh_ae2", XKB_KEY_Sinh_ae2 },
+ { "Sinh_aee", XKB_KEY_Sinh_aee },
+ { "Sinh_aee2", XKB_KEY_Sinh_aee2 },
+ { "Sinh_ai", XKB_KEY_Sinh_ai },
+ { "Sinh_ai2", XKB_KEY_Sinh_ai2 },
+ { "Sinh_al", XKB_KEY_Sinh_al },
+ { "Sinh_au", XKB_KEY_Sinh_au },
+ { "Sinh_au2", XKB_KEY_Sinh_au2 },
+ { "Sinh_ba", XKB_KEY_Sinh_ba },
+ { "Sinh_bha", XKB_KEY_Sinh_bha },
+ { "Sinh_ca", XKB_KEY_Sinh_ca },
+ { "Sinh_cha", XKB_KEY_Sinh_cha },
+ { "Sinh_dda", XKB_KEY_Sinh_dda },
+ { "Sinh_ddha", XKB_KEY_Sinh_ddha },
+ { "Sinh_dha", XKB_KEY_Sinh_dha },
+ { "Sinh_dhha", XKB_KEY_Sinh_dhha },
+ { "Sinh_e", XKB_KEY_Sinh_e },
+ { "Sinh_e2", XKB_KEY_Sinh_e2 },
+ { "Sinh_ee", XKB_KEY_Sinh_ee },
+ { "Sinh_ee2", XKB_KEY_Sinh_ee2 },
+ { "Sinh_fa", XKB_KEY_Sinh_fa },
+ { "Sinh_ga", XKB_KEY_Sinh_ga },
+ { "Sinh_gha", XKB_KEY_Sinh_gha },
+ { "Sinh_h2", XKB_KEY_Sinh_h2 },
+ { "Sinh_ha", XKB_KEY_Sinh_ha },
+ { "Sinh_i", XKB_KEY_Sinh_i },
+ { "Sinh_i2", XKB_KEY_Sinh_i2 },
+ { "Sinh_ii", XKB_KEY_Sinh_ii },
+ { "Sinh_ii2", XKB_KEY_Sinh_ii2 },
+ { "Sinh_ja", XKB_KEY_Sinh_ja },
+ { "Sinh_jha", XKB_KEY_Sinh_jha },
+ { "Sinh_jnya", XKB_KEY_Sinh_jnya },
+ { "Sinh_ka", XKB_KEY_Sinh_ka },
+ { "Sinh_kha", XKB_KEY_Sinh_kha },
+ { "Sinh_kunddaliya", XKB_KEY_Sinh_kunddaliya },
+ { "Sinh_la", XKB_KEY_Sinh_la },
+ { "Sinh_lla", XKB_KEY_Sinh_lla },
+ { "Sinh_lu", XKB_KEY_Sinh_lu },
+ { "Sinh_lu2", XKB_KEY_Sinh_lu2 },
+ { "Sinh_luu", XKB_KEY_Sinh_luu },
+ { "Sinh_luu2", XKB_KEY_Sinh_luu2 },
+ { "Sinh_ma", XKB_KEY_Sinh_ma },
+ { "Sinh_mba", XKB_KEY_Sinh_mba },
+ { "Sinh_na", XKB_KEY_Sinh_na },
+ { "Sinh_ndda", XKB_KEY_Sinh_ndda },
+ { "Sinh_ndha", XKB_KEY_Sinh_ndha },
+ { "Sinh_ng", XKB_KEY_Sinh_ng },
+ { "Sinh_ng2", XKB_KEY_Sinh_ng2 },
+ { "Sinh_nga", XKB_KEY_Sinh_nga },
+ { "Sinh_nja", XKB_KEY_Sinh_nja },
+ { "Sinh_nna", XKB_KEY_Sinh_nna },
+ { "Sinh_nya", XKB_KEY_Sinh_nya },
+ { "Sinh_o", XKB_KEY_Sinh_o },
+ { "Sinh_o2", XKB_KEY_Sinh_o2 },
+ { "Sinh_oo", XKB_KEY_Sinh_oo },
+ { "Sinh_oo2", XKB_KEY_Sinh_oo2 },
+ { "Sinh_pa", XKB_KEY_Sinh_pa },
+ { "Sinh_pha", XKB_KEY_Sinh_pha },
+ { "Sinh_ra", XKB_KEY_Sinh_ra },
+ { "Sinh_ri", XKB_KEY_Sinh_ri },
+ { "Sinh_rii", XKB_KEY_Sinh_rii },
+ { "Sinh_ru2", XKB_KEY_Sinh_ru2 },
+ { "Sinh_ruu2", XKB_KEY_Sinh_ruu2 },
+ { "Sinh_sa", XKB_KEY_Sinh_sa },
+ { "Sinh_sha", XKB_KEY_Sinh_sha },
+ { "Sinh_ssha", XKB_KEY_Sinh_ssha },
+ { "Sinh_tha", XKB_KEY_Sinh_tha },
+ { "Sinh_thha", XKB_KEY_Sinh_thha },
+ { "Sinh_tta", XKB_KEY_Sinh_tta },
+ { "Sinh_ttha", XKB_KEY_Sinh_ttha },
+ { "Sinh_u", XKB_KEY_Sinh_u },
+ { "Sinh_u2", XKB_KEY_Sinh_u2 },
+ { "Sinh_uu", XKB_KEY_Sinh_uu },
+ { "Sinh_uu2", XKB_KEY_Sinh_uu2 },
+ { "Sinh_va", XKB_KEY_Sinh_va },
+ { "Sinh_ya", XKB_KEY_Sinh_ya },
+ { "sixsubscript", XKB_KEY_sixsubscript },
+ { "sixsuperior", XKB_KEY_sixsuperior },
+ { "slash", XKB_KEY_slash },
+ { "SlowKeys_Enable", XKB_KEY_SlowKeys_Enable },
+ { "soliddiamond", XKB_KEY_soliddiamond },
+ { "space", XKB_KEY_space },
+ { "squareroot", XKB_KEY_squareroot },
+ { "ssharp", XKB_KEY_ssharp },
+ { "sterling", XKB_KEY_sterling },
+ { "StickyKeys_Enable", XKB_KEY_StickyKeys_Enable },
+ { "stricteq", XKB_KEY_stricteq },
+ { "SunAgain", XKB_KEY_SunAgain },
+ { "SunAltGraph", XKB_KEY_SunAltGraph },
+ { "SunAudioLowerVolume", XKB_KEY_SunAudioLowerVolume },
+ { "SunAudioMute", XKB_KEY_SunAudioMute },
+ { "SunAudioRaiseVolume", XKB_KEY_SunAudioRaiseVolume },
+ { "SunCompose", XKB_KEY_SunCompose },
+ { "SunCopy", XKB_KEY_SunCopy },
+ { "SunCut", XKB_KEY_SunCut },
+ { "SunF36", XKB_KEY_SunF36 },
+ { "SunF37", XKB_KEY_SunF37 },
+ { "SunFA_Acute", XKB_KEY_SunFA_Acute },
+ { "SunFA_Cedilla", XKB_KEY_SunFA_Cedilla },
+ { "SunFA_Circum", XKB_KEY_SunFA_Circum },
+ { "SunFA_Diaeresis", XKB_KEY_SunFA_Diaeresis },
+ { "SunFA_Grave", XKB_KEY_SunFA_Grave },
+ { "SunFA_Tilde", XKB_KEY_SunFA_Tilde },
+ { "SunFind", XKB_KEY_SunFind },
+ { "SunFront", XKB_KEY_SunFront },
+ { "SunOpen", XKB_KEY_SunOpen },
+ { "SunPageDown", XKB_KEY_SunPageDown },
+ { "SunPageUp", XKB_KEY_SunPageUp },
+ { "SunPaste", XKB_KEY_SunPaste },
+ { "SunPowerSwitch", XKB_KEY_SunPowerSwitch },
+ { "SunPowerSwitchShift", XKB_KEY_SunPowerSwitchShift },
+ { "SunPrint_Screen", XKB_KEY_SunPrint_Screen },
+ { "SunProps", XKB_KEY_SunProps },
+ { "SunStop", XKB_KEY_SunStop },
+ { "SunSys_Req", XKB_KEY_SunSys_Req },
+ { "SunUndo", XKB_KEY_SunUndo },
+ { "SunVideoDegauss", XKB_KEY_SunVideoDegauss },
+ { "SunVideoLowerBrightness", XKB_KEY_SunVideoLowerBrightness },
+ { "SunVideoRaiseBrightness", XKB_KEY_SunVideoRaiseBrightness },
+ { "Super_L", XKB_KEY_Super_L },
+ { "Super_R", XKB_KEY_Super_R },
+ { "Sys_Req", XKB_KEY_Sys_Req },
+ { "System", XKB_KEY_System },
+ { "T", XKB_KEY_T },
+ { "t", XKB_KEY_t },
+ { "Tab", XKB_KEY_Tab },
+ { "Tabovedot", XKB_KEY_Tabovedot },
+ { "tabovedot", XKB_KEY_tabovedot },
+ { "Tcaron", XKB_KEY_Tcaron },
+ { "tcaron", XKB_KEY_tcaron },
+ { "Tcedilla", XKB_KEY_Tcedilla },
+ { "tcedilla", XKB_KEY_tcedilla },
+ { "telephone", XKB_KEY_telephone },
+ { "telephonerecorder", XKB_KEY_telephonerecorder },
+ { "Terminate_Server", XKB_KEY_Terminate_Server },
+ { "Thai_baht", XKB_KEY_Thai_baht },
+ { "Thai_bobaimai", XKB_KEY_Thai_bobaimai },
+ { "Thai_chochan", XKB_KEY_Thai_chochan },
+ { "Thai_chochang", XKB_KEY_Thai_chochang },
+ { "Thai_choching", XKB_KEY_Thai_choching },
+ { "Thai_chochoe", XKB_KEY_Thai_chochoe },
+ { "Thai_dochada", XKB_KEY_Thai_dochada },
+ { "Thai_dodek", XKB_KEY_Thai_dodek },
+ { "Thai_fofa", XKB_KEY_Thai_fofa },
+ { "Thai_fofan", XKB_KEY_Thai_fofan },
+ { "Thai_hohip", XKB_KEY_Thai_hohip },
+ { "Thai_honokhuk", XKB_KEY_Thai_honokhuk },
+ { "Thai_khokhai", XKB_KEY_Thai_khokhai },
+ { "Thai_khokhon", XKB_KEY_Thai_khokhon },
+ { "Thai_khokhuat", XKB_KEY_Thai_khokhuat },
+ { "Thai_khokhwai", XKB_KEY_Thai_khokhwai },
+ { "Thai_khorakhang", XKB_KEY_Thai_khorakhang },
+ { "Thai_kokai", XKB_KEY_Thai_kokai },
+ { "Thai_lakkhangyao", XKB_KEY_Thai_lakkhangyao },
+ { "Thai_lekchet", XKB_KEY_Thai_lekchet },
+ { "Thai_lekha", XKB_KEY_Thai_lekha },
+ { "Thai_lekhok", XKB_KEY_Thai_lekhok },
+ { "Thai_lekkao", XKB_KEY_Thai_lekkao },
+ { "Thai_leknung", XKB_KEY_Thai_leknung },
+ { "Thai_lekpaet", XKB_KEY_Thai_lekpaet },
+ { "Thai_leksam", XKB_KEY_Thai_leksam },
+ { "Thai_leksi", XKB_KEY_Thai_leksi },
+ { "Thai_leksong", XKB_KEY_Thai_leksong },
+ { "Thai_leksun", XKB_KEY_Thai_leksun },
+ { "Thai_lochula", XKB_KEY_Thai_lochula },
+ { "Thai_loling", XKB_KEY_Thai_loling },
+ { "Thai_lu", XKB_KEY_Thai_lu },
+ { "Thai_maichattawa", XKB_KEY_Thai_maichattawa },
+ { "Thai_maiek", XKB_KEY_Thai_maiek },
+ { "Thai_maihanakat", XKB_KEY_Thai_maihanakat },
+ { "Thai_maihanakat_maitho", XKB_KEY_Thai_maihanakat_maitho },
+ { "Thai_maitaikhu", XKB_KEY_Thai_maitaikhu },
+ { "Thai_maitho", XKB_KEY_Thai_maitho },
+ { "Thai_maitri", XKB_KEY_Thai_maitri },
+ { "Thai_maiyamok", XKB_KEY_Thai_maiyamok },
+ { "Thai_moma", XKB_KEY_Thai_moma },
+ { "Thai_ngongu", XKB_KEY_Thai_ngongu },
+ { "Thai_nikhahit", XKB_KEY_Thai_nikhahit },
+ { "Thai_nonen", XKB_KEY_Thai_nonen },
+ { "Thai_nonu", XKB_KEY_Thai_nonu },
+ { "Thai_oang", XKB_KEY_Thai_oang },
+ { "Thai_paiyannoi", XKB_KEY_Thai_paiyannoi },
+ { "Thai_phinthu", XKB_KEY_Thai_phinthu },
+ { "Thai_phophan", XKB_KEY_Thai_phophan },
+ { "Thai_phophung", XKB_KEY_Thai_phophung },
+ { "Thai_phosamphao", XKB_KEY_Thai_phosamphao },
+ { "Thai_popla", XKB_KEY_Thai_popla },
+ { "Thai_rorua", XKB_KEY_Thai_rorua },
+ { "Thai_ru", XKB_KEY_Thai_ru },
+ { "Thai_saraa", XKB_KEY_Thai_saraa },
+ { "Thai_saraaa", XKB_KEY_Thai_saraaa },
+ { "Thai_saraae", XKB_KEY_Thai_saraae },
+ { "Thai_saraaimaimalai", XKB_KEY_Thai_saraaimaimalai },
+ { "Thai_saraaimaimuan", XKB_KEY_Thai_saraaimaimuan },
+ { "Thai_saraam", XKB_KEY_Thai_saraam },
+ { "Thai_sarae", XKB_KEY_Thai_sarae },
+ { "Thai_sarai", XKB_KEY_Thai_sarai },
+ { "Thai_saraii", XKB_KEY_Thai_saraii },
+ { "Thai_sarao", XKB_KEY_Thai_sarao },
+ { "Thai_sarau", XKB_KEY_Thai_sarau },
+ { "Thai_saraue", XKB_KEY_Thai_saraue },
+ { "Thai_sarauee", XKB_KEY_Thai_sarauee },
+ { "Thai_sarauu", XKB_KEY_Thai_sarauu },
+ { "Thai_sorusi", XKB_KEY_Thai_sorusi },
+ { "Thai_sosala", XKB_KEY_Thai_sosala },
+ { "Thai_soso", XKB_KEY_Thai_soso },
+ { "Thai_sosua", XKB_KEY_Thai_sosua },
+ { "Thai_thanthakhat", XKB_KEY_Thai_thanthakhat },
+ { "Thai_thonangmontho", XKB_KEY_Thai_thonangmontho },
+ { "Thai_thophuthao", XKB_KEY_Thai_thophuthao },
+ { "Thai_thothahan", XKB_KEY_Thai_thothahan },
+ { "Thai_thothan", XKB_KEY_Thai_thothan },
+ { "Thai_thothong", XKB_KEY_Thai_thothong },
+ { "Thai_thothung", XKB_KEY_Thai_thothung },
+ { "Thai_topatak", XKB_KEY_Thai_topatak },
+ { "Thai_totao", XKB_KEY_Thai_totao },
+ { "Thai_wowaen", XKB_KEY_Thai_wowaen },
+ { "Thai_yoyak", XKB_KEY_Thai_yoyak },
+ { "Thai_yoying", XKB_KEY_Thai_yoying },
+ { "therefore", XKB_KEY_therefore },
+ { "thinspace", XKB_KEY_thinspace },
+ { "THORN", XKB_KEY_THORN },
+ { "Thorn", XKB_KEY_Thorn },
+ { "thorn", XKB_KEY_thorn },
+ { "threeeighths", XKB_KEY_threeeighths },
+ { "threefifths", XKB_KEY_threefifths },
+ { "threequarters", XKB_KEY_threequarters },
+ { "threesubscript", XKB_KEY_threesubscript },
+ { "threesuperior", XKB_KEY_threesuperior },
+ { "tintegral", XKB_KEY_tintegral },
+ { "topintegral", XKB_KEY_topintegral },
+ { "topleftparens", XKB_KEY_topleftparens },
+ { "topleftradical", XKB_KEY_topleftradical },
+ { "topleftsqbracket", XKB_KEY_topleftsqbracket },
+ { "topleftsummation", XKB_KEY_topleftsummation },
+ { "toprightparens", XKB_KEY_toprightparens },
+ { "toprightsqbracket", XKB_KEY_toprightsqbracket },
+ { "toprightsummation", XKB_KEY_toprightsummation },
+ { "topt", XKB_KEY_topt },
+ { "topvertsummationconnector", XKB_KEY_topvertsummationconnector },
+ { "Touroku", XKB_KEY_Touroku },
+ { "trademark", XKB_KEY_trademark },
+ { "trademarkincircle", XKB_KEY_trademarkincircle },
+ { "Tslash", XKB_KEY_Tslash },
+ { "tslash", XKB_KEY_tslash },
+ { "twofifths", XKB_KEY_twofifths },
+ { "twosubscript", XKB_KEY_twosubscript },
+ { "twosuperior", XKB_KEY_twosuperior },
+ { "twothirds", XKB_KEY_twothirds },
+ { "U", XKB_KEY_U },
+ { "u", XKB_KEY_u },
+ { "Uacute", XKB_KEY_Uacute },
+ { "uacute", XKB_KEY_uacute },
+ { "Ubelowdot", XKB_KEY_Ubelowdot },
+ { "ubelowdot", XKB_KEY_ubelowdot },
+ { "Ubreve", XKB_KEY_Ubreve },
+ { "ubreve", XKB_KEY_ubreve },
+ { "Ucircumflex", XKB_KEY_Ucircumflex },
+ { "ucircumflex", XKB_KEY_ucircumflex },
+ { "Udiaeresis", XKB_KEY_Udiaeresis },
+ { "udiaeresis", XKB_KEY_udiaeresis },
+ { "Udoubleacute", XKB_KEY_Udoubleacute },
+ { "udoubleacute", XKB_KEY_udoubleacute },
+ { "Ugrave", XKB_KEY_Ugrave },
+ { "ugrave", XKB_KEY_ugrave },
+ { "Uhook", XKB_KEY_Uhook },
+ { "uhook", XKB_KEY_uhook },
+ { "Uhorn", XKB_KEY_Uhorn },
+ { "uhorn", XKB_KEY_uhorn },
+ { "Uhornacute", XKB_KEY_Uhornacute },
+ { "uhornacute", XKB_KEY_uhornacute },
+ { "Uhornbelowdot", XKB_KEY_Uhornbelowdot },
+ { "uhornbelowdot", XKB_KEY_uhornbelowdot },
+ { "Uhorngrave", XKB_KEY_Uhorngrave },
+ { "uhorngrave", XKB_KEY_uhorngrave },
+ { "Uhornhook", XKB_KEY_Uhornhook },
+ { "uhornhook", XKB_KEY_uhornhook },
+ { "Uhorntilde", XKB_KEY_Uhorntilde },
+ { "uhorntilde", XKB_KEY_uhorntilde },
+ { "Ukrainian_ghe_with_upturn", XKB_KEY_Ukrainian_ghe_with_upturn },
+ { "Ukrainian_GHE_WITH_UPTURN", XKB_KEY_Ukrainian_GHE_WITH_UPTURN },
+ { "Ukrainian_i", XKB_KEY_Ukrainian_i },
+ { "Ukrainian_I", XKB_KEY_Ukrainian_I },
+ { "Ukrainian_ie", XKB_KEY_Ukrainian_ie },
+ { "Ukrainian_IE", XKB_KEY_Ukrainian_IE },
+ { "Ukrainian_yi", XKB_KEY_Ukrainian_yi },
+ { "Ukrainian_YI", XKB_KEY_Ukrainian_YI },
+ { "Ukranian_i", XKB_KEY_Ukranian_i },
+ { "Ukranian_I", XKB_KEY_Ukranian_I },
+ { "Ukranian_je", XKB_KEY_Ukranian_je },
+ { "Ukranian_JE", XKB_KEY_Ukranian_JE },
+ { "Ukranian_yi", XKB_KEY_Ukranian_yi },
+ { "Ukranian_YI", XKB_KEY_Ukranian_YI },
+ { "Umacron", XKB_KEY_Umacron },
+ { "umacron", XKB_KEY_umacron },
+ { "underbar", XKB_KEY_underbar },
+ { "underscore", XKB_KEY_underscore },
+ { "Undo", XKB_KEY_Undo },
+ { "union", XKB_KEY_union },
+ { "Uogonek", XKB_KEY_Uogonek },
+ { "uogonek", XKB_KEY_uogonek },
+ { "Up", XKB_KEY_Up },
+ { "uparrow", XKB_KEY_uparrow },
+ { "upcaret", XKB_KEY_upcaret },
+ { "upleftcorner", XKB_KEY_upleftcorner },
+ { "uprightcorner", XKB_KEY_uprightcorner },
+ { "upshoe", XKB_KEY_upshoe },
+ { "upstile", XKB_KEY_upstile },
+ { "uptack", XKB_KEY_uptack },
+ { "Uring", XKB_KEY_Uring },
+ { "uring", XKB_KEY_uring },
+ { "User", XKB_KEY_User },
+ { "Utilde", XKB_KEY_Utilde },
+ { "utilde", XKB_KEY_utilde },
+ { "V", XKB_KEY_V },
+ { "v", XKB_KEY_v },
+ { "variation", XKB_KEY_variation },
+ { "vertbar", XKB_KEY_vertbar },
+ { "vertconnector", XKB_KEY_vertconnector },
+ { "voicedsound", XKB_KEY_voicedsound },
+ { "VoidSymbol", XKB_KEY_VoidSymbol },
+ { "vt", XKB_KEY_vt },
+ { "W", XKB_KEY_W },
+ { "w", XKB_KEY_w },
+ { "Wacute", XKB_KEY_Wacute },
+ { "wacute", XKB_KEY_wacute },
+ { "Wcircumflex", XKB_KEY_Wcircumflex },
+ { "wcircumflex", XKB_KEY_wcircumflex },
+ { "Wdiaeresis", XKB_KEY_Wdiaeresis },
+ { "wdiaeresis", XKB_KEY_wdiaeresis },
+ { "Wgrave", XKB_KEY_Wgrave },
+ { "wgrave", XKB_KEY_wgrave },
+ { "WonSign", XKB_KEY_WonSign },
+ { "X", XKB_KEY_X },
+ { "x", XKB_KEY_x },
+ { "Xabovedot", XKB_KEY_Xabovedot },
+ { "xabovedot", XKB_KEY_xabovedot },
+ { "XF86AddFavorite", XKB_KEY_XF86AddFavorite },
+ { "XF86ApplicationLeft", XKB_KEY_XF86ApplicationLeft },
+ { "XF86ApplicationRight", XKB_KEY_XF86ApplicationRight },
+ { "XF86AudioCycleTrack", XKB_KEY_XF86AudioCycleTrack },
+ { "XF86AudioForward", XKB_KEY_XF86AudioForward },
+ { "XF86AudioLowerVolume", XKB_KEY_XF86AudioLowerVolume },
+ { "XF86AudioMedia", XKB_KEY_XF86AudioMedia },
+ { "XF86AudioMute", XKB_KEY_XF86AudioMute },
+ { "XF86AudioNext", XKB_KEY_XF86AudioNext },
+ { "XF86AudioPause", XKB_KEY_XF86AudioPause },
+ { "XF86AudioPlay", XKB_KEY_XF86AudioPlay },
+ { "XF86AudioPrev", XKB_KEY_XF86AudioPrev },
+ { "XF86AudioRaiseVolume", XKB_KEY_XF86AudioRaiseVolume },
+ { "XF86AudioRandomPlay", XKB_KEY_XF86AudioRandomPlay },
+ { "XF86AudioRecord", XKB_KEY_XF86AudioRecord },
+ { "XF86AudioRepeat", XKB_KEY_XF86AudioRepeat },
+ { "XF86AudioRewind", XKB_KEY_XF86AudioRewind },
+ { "XF86AudioStop", XKB_KEY_XF86AudioStop },
+ { "XF86Away", XKB_KEY_XF86Away },
+ { "XF86Back", XKB_KEY_XF86Back },
+ { "XF86BackForward", XKB_KEY_XF86BackForward },
+ { "XF86Battery", XKB_KEY_XF86Battery },
+ { "XF86Blue", XKB_KEY_XF86Blue },
+ { "XF86Bluetooth", XKB_KEY_XF86Bluetooth },
+ { "XF86Book", XKB_KEY_XF86Book },
+ { "XF86BrightnessAdjust", XKB_KEY_XF86BrightnessAdjust },
+ { "XF86Calculater", XKB_KEY_XF86Calculater },
+ { "XF86Calculator", XKB_KEY_XF86Calculator },
+ { "XF86Calendar", XKB_KEY_XF86Calendar },
+ { "XF86CD", XKB_KEY_XF86CD },
+ { "XF86Clear", XKB_KEY_XF86Clear },
+ { "XF86ClearGrab", XKB_KEY_XF86ClearGrab },
+ { "XF86Close", XKB_KEY_XF86Close },
+ { "XF86Community", XKB_KEY_XF86Community },
+ { "XF86ContrastAdjust", XKB_KEY_XF86ContrastAdjust },
+ { "XF86Copy", XKB_KEY_XF86Copy },
+ { "XF86Cut", XKB_KEY_XF86Cut },
+ { "XF86CycleAngle", XKB_KEY_XF86CycleAngle },
+ { "XF86Display", XKB_KEY_XF86Display },
+ { "XF86Documents", XKB_KEY_XF86Documents },
+ { "XF86DOS", XKB_KEY_XF86DOS },
+ { "XF86Eject", XKB_KEY_XF86Eject },
+ { "XF86Excel", XKB_KEY_XF86Excel },
+ { "XF86Explorer", XKB_KEY_XF86Explorer },
+ { "XF86Favorites", XKB_KEY_XF86Favorites },
+ { "XF86Finance", XKB_KEY_XF86Finance },
+ { "XF86Forward", XKB_KEY_XF86Forward },
+ { "XF86FrameBack", XKB_KEY_XF86FrameBack },
+ { "XF86FrameForward", XKB_KEY_XF86FrameForward },
+ { "XF86Game", XKB_KEY_XF86Game },
+ { "XF86Go", XKB_KEY_XF86Go },
+ { "XF86Green", XKB_KEY_XF86Green },
+ { "XF86Hibernate", XKB_KEY_XF86Hibernate },
+ { "XF86History", XKB_KEY_XF86History },
+ { "XF86HomePage", XKB_KEY_XF86HomePage },
+ { "XF86HotLinks", XKB_KEY_XF86HotLinks },
+ { "XF86iTouch", XKB_KEY_XF86iTouch },
+ { "XF86KbdBrightnessDown", XKB_KEY_XF86KbdBrightnessDown },
+ { "XF86KbdBrightnessUp", XKB_KEY_XF86KbdBrightnessUp },
+ { "XF86KbdLightOnOff", XKB_KEY_XF86KbdLightOnOff },
+ { "XF86Launch0", XKB_KEY_XF86Launch0 },
+ { "XF86Launch1", XKB_KEY_XF86Launch1 },
+ { "XF86Launch2", XKB_KEY_XF86Launch2 },
+ { "XF86Launch3", XKB_KEY_XF86Launch3 },
+ { "XF86Launch4", XKB_KEY_XF86Launch4 },
+ { "XF86Launch5", XKB_KEY_XF86Launch5 },
+ { "XF86Launch6", XKB_KEY_XF86Launch6 },
+ { "XF86Launch7", XKB_KEY_XF86Launch7 },
+ { "XF86Launch8", XKB_KEY_XF86Launch8 },
+ { "XF86Launch9", XKB_KEY_XF86Launch9 },
+ { "XF86LaunchA", XKB_KEY_XF86LaunchA },
+ { "XF86LaunchB", XKB_KEY_XF86LaunchB },
+ { "XF86LaunchC", XKB_KEY_XF86LaunchC },
+ { "XF86LaunchD", XKB_KEY_XF86LaunchD },
+ { "XF86LaunchE", XKB_KEY_XF86LaunchE },
+ { "XF86LaunchF", XKB_KEY_XF86LaunchF },
+ { "XF86LightBulb", XKB_KEY_XF86LightBulb },
+ { "XF86LogGrabInfo", XKB_KEY_XF86LogGrabInfo },
+ { "XF86LogOff", XKB_KEY_XF86LogOff },
+ { "XF86LogWindowTree", XKB_KEY_XF86LogWindowTree },
+ { "XF86Mail", XKB_KEY_XF86Mail },
+ { "XF86MailForward", XKB_KEY_XF86MailForward },
+ { "XF86Market", XKB_KEY_XF86Market },
+ { "XF86Meeting", XKB_KEY_XF86Meeting },
+ { "XF86Memo", XKB_KEY_XF86Memo },
+ { "XF86MenuKB", XKB_KEY_XF86MenuKB },
+ { "XF86MenuPB", XKB_KEY_XF86MenuPB },
+ { "XF86Messenger", XKB_KEY_XF86Messenger },
+ { "XF86ModeLock", XKB_KEY_XF86ModeLock },
+ { "XF86MonBrightnessDown", XKB_KEY_XF86MonBrightnessDown },
+ { "XF86MonBrightnessUp", XKB_KEY_XF86MonBrightnessUp },
+ { "XF86Music", XKB_KEY_XF86Music },
+ { "XF86MyComputer", XKB_KEY_XF86MyComputer },
+ { "XF86MySites", XKB_KEY_XF86MySites },
+ { "XF86New", XKB_KEY_XF86New },
+ { "XF86News", XKB_KEY_XF86News },
+ { "XF86Next_VMode", XKB_KEY_XF86Next_VMode },
+ { "XF86OfficeHome", XKB_KEY_XF86OfficeHome },
+ { "XF86Open", XKB_KEY_XF86Open },
+ { "XF86OpenURL", XKB_KEY_XF86OpenURL },
+ { "XF86Option", XKB_KEY_XF86Option },
+ { "XF86Paste", XKB_KEY_XF86Paste },
+ { "XF86Phone", XKB_KEY_XF86Phone },
+ { "XF86Pictures", XKB_KEY_XF86Pictures },
+ { "XF86PowerDown", XKB_KEY_XF86PowerDown },
+ { "XF86PowerOff", XKB_KEY_XF86PowerOff },
+ { "XF86Prev_VMode", XKB_KEY_XF86Prev_VMode },
+ { "XF86Q", XKB_KEY_XF86Q },
+ { "XF86Red", XKB_KEY_XF86Red },
+ { "XF86Refresh", XKB_KEY_XF86Refresh },
+ { "XF86Reload", XKB_KEY_XF86Reload },
+ { "XF86Reply", XKB_KEY_XF86Reply },
+ { "XF86RockerDown", XKB_KEY_XF86RockerDown },
+ { "XF86RockerEnter", XKB_KEY_XF86RockerEnter },
+ { "XF86RockerUp", XKB_KEY_XF86RockerUp },
+ { "XF86RotateWindows", XKB_KEY_XF86RotateWindows },
+ { "XF86RotationKB", XKB_KEY_XF86RotationKB },
+ { "XF86RotationPB", XKB_KEY_XF86RotationPB },
+ { "XF86Save", XKB_KEY_XF86Save },
+ { "XF86ScreenSaver", XKB_KEY_XF86ScreenSaver },
+ { "XF86ScrollClick", XKB_KEY_XF86ScrollClick },
+ { "XF86ScrollDown", XKB_KEY_XF86ScrollDown },
+ { "XF86ScrollUp", XKB_KEY_XF86ScrollUp },
+ { "XF86Search", XKB_KEY_XF86Search },
+ { "XF86Select", XKB_KEY_XF86Select },
+ { "XF86Send", XKB_KEY_XF86Send },
+ { "XF86Shop", XKB_KEY_XF86Shop },
+ { "XF86Sleep", XKB_KEY_XF86Sleep },
+ { "XF86Spell", XKB_KEY_XF86Spell },
+ { "XF86SplitScreen", XKB_KEY_XF86SplitScreen },
+ { "XF86Standby", XKB_KEY_XF86Standby },
+ { "XF86Start", XKB_KEY_XF86Start },
+ { "XF86Stop", XKB_KEY_XF86Stop },
+ { "XF86Subtitle", XKB_KEY_XF86Subtitle },
+ { "XF86Support", XKB_KEY_XF86Support },
+ { "XF86Suspend", XKB_KEY_XF86Suspend },
+ { "XF86Switch_VT_1", XKB_KEY_XF86Switch_VT_1 },
+ { "XF86Switch_VT_10", XKB_KEY_XF86Switch_VT_10 },
+ { "XF86Switch_VT_11", XKB_KEY_XF86Switch_VT_11 },
+ { "XF86Switch_VT_12", XKB_KEY_XF86Switch_VT_12 },
+ { "XF86Switch_VT_2", XKB_KEY_XF86Switch_VT_2 },
+ { "XF86Switch_VT_3", XKB_KEY_XF86Switch_VT_3 },
+ { "XF86Switch_VT_4", XKB_KEY_XF86Switch_VT_4 },
+ { "XF86Switch_VT_5", XKB_KEY_XF86Switch_VT_5 },
+ { "XF86Switch_VT_6", XKB_KEY_XF86Switch_VT_6 },
+ { "XF86Switch_VT_7", XKB_KEY_XF86Switch_VT_7 },
+ { "XF86Switch_VT_8", XKB_KEY_XF86Switch_VT_8 },
+ { "XF86Switch_VT_9", XKB_KEY_XF86Switch_VT_9 },
+ { "XF86TaskPane", XKB_KEY_XF86TaskPane },
+ { "XF86Terminal", XKB_KEY_XF86Terminal },
+ { "XF86Time", XKB_KEY_XF86Time },
+ { "XF86ToDoList", XKB_KEY_XF86ToDoList },
+ { "XF86Tools", XKB_KEY_XF86Tools },
+ { "XF86TopMenu", XKB_KEY_XF86TopMenu },
+ { "XF86TouchpadOff", XKB_KEY_XF86TouchpadOff },
+ { "XF86TouchpadOn", XKB_KEY_XF86TouchpadOn },
+ { "XF86TouchpadToggle", XKB_KEY_XF86TouchpadToggle },
+ { "XF86Travel", XKB_KEY_XF86Travel },
+ { "XF86Ungrab", XKB_KEY_XF86Ungrab },
+ { "XF86User1KB", XKB_KEY_XF86User1KB },
+ { "XF86User2KB", XKB_KEY_XF86User2KB },
+ { "XF86UserPB", XKB_KEY_XF86UserPB },
+ { "XF86UWB", XKB_KEY_XF86UWB },
+ { "XF86VendorHome", XKB_KEY_XF86VendorHome },
+ { "XF86Video", XKB_KEY_XF86Video },
+ { "XF86View", XKB_KEY_XF86View },
+ { "XF86WakeUp", XKB_KEY_XF86WakeUp },
+ { "XF86WebCam", XKB_KEY_XF86WebCam },
+ { "XF86WheelButton", XKB_KEY_XF86WheelButton },
+ { "XF86WLAN", XKB_KEY_XF86WLAN },
+ { "XF86Word", XKB_KEY_XF86Word },
+ { "XF86WWW", XKB_KEY_XF86WWW },
+ { "XF86Xfer", XKB_KEY_XF86Xfer },
+ { "XF86Yellow", XKB_KEY_XF86Yellow },
+ { "XF86ZoomIn", XKB_KEY_XF86ZoomIn },
+ { "XF86ZoomOut", XKB_KEY_XF86ZoomOut },
+ { "Y", XKB_KEY_Y },
+ { "y", XKB_KEY_y },
+ { "Yacute", XKB_KEY_Yacute },
+ { "yacute", XKB_KEY_yacute },
+ { "Ybelowdot", XKB_KEY_Ybelowdot },
+ { "ybelowdot", XKB_KEY_ybelowdot },
+ { "Ycircumflex", XKB_KEY_Ycircumflex },
+ { "ycircumflex", XKB_KEY_ycircumflex },
+ { "ydiaeresis", XKB_KEY_ydiaeresis },
+ { "Ydiaeresis", XKB_KEY_Ydiaeresis },
+ { "yen", XKB_KEY_yen },
+ { "Ygrave", XKB_KEY_Ygrave },
+ { "ygrave", XKB_KEY_ygrave },
+ { "Yhook", XKB_KEY_Yhook },
+ { "yhook", XKB_KEY_yhook },
+ { "Ytilde", XKB_KEY_Ytilde },
+ { "ytilde", XKB_KEY_ytilde },
+ { "Z", XKB_KEY_Z },
+ { "z", XKB_KEY_z },
+ { "Zabovedot", XKB_KEY_Zabovedot },
+ { "zabovedot", XKB_KEY_zabovedot },
+ { "Zacute", XKB_KEY_Zacute },
+ { "zacute", XKB_KEY_zacute },
+ { "Zcaron", XKB_KEY_Zcaron },
+ { "zcaron", XKB_KEY_zcaron },
+ { "Zen_Koho", XKB_KEY_Zen_Koho },
+ { "Zenkaku", XKB_KEY_Zenkaku },
+ { "Zenkaku_Hankaku", XKB_KEY_Zenkaku_Hankaku },
+ { "zerosubscript", XKB_KEY_zerosubscript },
+ { "zerosuperior", XKB_KEY_zerosuperior },
+ { "Zstroke", XKB_KEY_Zstroke },
+ { "zstroke", XKB_KEY_zstroke },
+};
+
+static const struct name_keysym keysym_to_name[] = {
+ { "NoSymbol", XKB_KEY_NoSymbol },
+ { "space", XKB_KEY_space },
+ { "exclam", XKB_KEY_exclam },
+ { "quotedbl", XKB_KEY_quotedbl },
+ { "numbersign", XKB_KEY_numbersign },
+ { "dollar", XKB_KEY_dollar },
+ { "percent", XKB_KEY_percent },
+ { "ampersand", XKB_KEY_ampersand },
+ { "apostrophe", XKB_KEY_apostrophe },
+ { "parenleft", XKB_KEY_parenleft },
+ { "parenright", XKB_KEY_parenright },
+ { "asterisk", XKB_KEY_asterisk },
+ { "plus", XKB_KEY_plus },
+ { "comma", XKB_KEY_comma },
+ { "minus", XKB_KEY_minus },
+ { "period", XKB_KEY_period },
+ { "slash", XKB_KEY_slash },
+ { "0", XKB_KEY_0 },
+ { "1", XKB_KEY_1 },
+ { "2", XKB_KEY_2 },
+ { "3", XKB_KEY_3 },
+ { "4", XKB_KEY_4 },
+ { "5", XKB_KEY_5 },
+ { "6", XKB_KEY_6 },
+ { "7", XKB_KEY_7 },
+ { "8", XKB_KEY_8 },
+ { "9", XKB_KEY_9 },
+ { "colon", XKB_KEY_colon },
+ { "semicolon", XKB_KEY_semicolon },
+ { "less", XKB_KEY_less },
+ { "equal", XKB_KEY_equal },
+ { "greater", XKB_KEY_greater },
+ { "question", XKB_KEY_question },
+ { "at", XKB_KEY_at },
+ { "A", XKB_KEY_A },
+ { "B", XKB_KEY_B },
+ { "C", XKB_KEY_C },
+ { "D", XKB_KEY_D },
+ { "E", XKB_KEY_E },
+ { "F", XKB_KEY_F },
+ { "G", XKB_KEY_G },
+ { "H", XKB_KEY_H },
+ { "I", XKB_KEY_I },
+ { "J", XKB_KEY_J },
+ { "K", XKB_KEY_K },
+ { "L", XKB_KEY_L },
+ { "M", XKB_KEY_M },
+ { "N", XKB_KEY_N },
+ { "O", XKB_KEY_O },
+ { "P", XKB_KEY_P },
+ { "Q", XKB_KEY_Q },
+ { "R", XKB_KEY_R },
+ { "S", XKB_KEY_S },
+ { "T", XKB_KEY_T },
+ { "U", XKB_KEY_U },
+ { "V", XKB_KEY_V },
+ { "W", XKB_KEY_W },
+ { "X", XKB_KEY_X },
+ { "Y", XKB_KEY_Y },
+ { "Z", XKB_KEY_Z },
+ { "bracketleft", XKB_KEY_bracketleft },
+ { "backslash", XKB_KEY_backslash },
+ { "bracketright", XKB_KEY_bracketright },
+ { "asciicircum", XKB_KEY_asciicircum },
+ { "underscore", XKB_KEY_underscore },
+ { "grave", XKB_KEY_grave },
+ { "a", XKB_KEY_a },
+ { "b", XKB_KEY_b },
+ { "c", XKB_KEY_c },
+ { "d", XKB_KEY_d },
+ { "e", XKB_KEY_e },
+ { "f", XKB_KEY_f },
+ { "g", XKB_KEY_g },
+ { "h", XKB_KEY_h },
+ { "i", XKB_KEY_i },
+ { "j", XKB_KEY_j },
+ { "k", XKB_KEY_k },
+ { "l", XKB_KEY_l },
+ { "m", XKB_KEY_m },
+ { "n", XKB_KEY_n },
+ { "o", XKB_KEY_o },
+ { "p", XKB_KEY_p },
+ { "q", XKB_KEY_q },
+ { "r", XKB_KEY_r },
+ { "s", XKB_KEY_s },
+ { "t", XKB_KEY_t },
+ { "u", XKB_KEY_u },
+ { "v", XKB_KEY_v },
+ { "w", XKB_KEY_w },
+ { "x", XKB_KEY_x },
+ { "y", XKB_KEY_y },
+ { "z", XKB_KEY_z },
+ { "braceleft", XKB_KEY_braceleft },
+ { "bar", XKB_KEY_bar },
+ { "braceright", XKB_KEY_braceright },
+ { "asciitilde", XKB_KEY_asciitilde },
+ { "nobreakspace", XKB_KEY_nobreakspace },
+ { "exclamdown", XKB_KEY_exclamdown },
+ { "cent", XKB_KEY_cent },
+ { "sterling", XKB_KEY_sterling },
+ { "currency", XKB_KEY_currency },
+ { "yen", XKB_KEY_yen },
+ { "brokenbar", XKB_KEY_brokenbar },
+ { "section", XKB_KEY_section },
+ { "diaeresis", XKB_KEY_diaeresis },
+ { "copyright", XKB_KEY_copyright },
+ { "ordfeminine", XKB_KEY_ordfeminine },
+ { "guillemotleft", XKB_KEY_guillemotleft },
+ { "notsign", XKB_KEY_notsign },
+ { "hyphen", XKB_KEY_hyphen },
+ { "registered", XKB_KEY_registered },
+ { "macron", XKB_KEY_macron },
+ { "degree", XKB_KEY_degree },
+ { "plusminus", XKB_KEY_plusminus },
+ { "twosuperior", XKB_KEY_twosuperior },
+ { "threesuperior", XKB_KEY_threesuperior },
+ { "acute", XKB_KEY_acute },
+ { "mu", XKB_KEY_mu },
+ { "paragraph", XKB_KEY_paragraph },
+ { "periodcentered", XKB_KEY_periodcentered },
+ { "cedilla", XKB_KEY_cedilla },
+ { "onesuperior", XKB_KEY_onesuperior },
+ { "masculine", XKB_KEY_masculine },
+ { "guillemotright", XKB_KEY_guillemotright },
+ { "onequarter", XKB_KEY_onequarter },
+ { "onehalf", XKB_KEY_onehalf },
+ { "threequarters", XKB_KEY_threequarters },
+ { "questiondown", XKB_KEY_questiondown },
+ { "Agrave", XKB_KEY_Agrave },
+ { "Aacute", XKB_KEY_Aacute },
+ { "Acircumflex", XKB_KEY_Acircumflex },
+ { "Atilde", XKB_KEY_Atilde },
+ { "Adiaeresis", XKB_KEY_Adiaeresis },
+ { "Aring", XKB_KEY_Aring },
+ { "AE", XKB_KEY_AE },
+ { "Ccedilla", XKB_KEY_Ccedilla },
+ { "Egrave", XKB_KEY_Egrave },
+ { "Eacute", XKB_KEY_Eacute },
+ { "Ecircumflex", XKB_KEY_Ecircumflex },
+ { "Ediaeresis", XKB_KEY_Ediaeresis },
+ { "Igrave", XKB_KEY_Igrave },
+ { "Iacute", XKB_KEY_Iacute },
+ { "Icircumflex", XKB_KEY_Icircumflex },
+ { "Idiaeresis", XKB_KEY_Idiaeresis },
+ { "ETH", XKB_KEY_ETH },
+ { "Ntilde", XKB_KEY_Ntilde },
+ { "Ograve", XKB_KEY_Ograve },
+ { "Oacute", XKB_KEY_Oacute },
+ { "Ocircumflex", XKB_KEY_Ocircumflex },
+ { "Otilde", XKB_KEY_Otilde },
+ { "Odiaeresis", XKB_KEY_Odiaeresis },
+ { "multiply", XKB_KEY_multiply },
+ { "Oslash", XKB_KEY_Oslash },
+ { "Ugrave", XKB_KEY_Ugrave },
+ { "Uacute", XKB_KEY_Uacute },
+ { "Ucircumflex", XKB_KEY_Ucircumflex },
+ { "Udiaeresis", XKB_KEY_Udiaeresis },
+ { "Yacute", XKB_KEY_Yacute },
+ { "THORN", XKB_KEY_THORN },
+ { "ssharp", XKB_KEY_ssharp },
+ { "agrave", XKB_KEY_agrave },
+ { "aacute", XKB_KEY_aacute },
+ { "acircumflex", XKB_KEY_acircumflex },
+ { "atilde", XKB_KEY_atilde },
+ { "adiaeresis", XKB_KEY_adiaeresis },
+ { "aring", XKB_KEY_aring },
+ { "ae", XKB_KEY_ae },
+ { "ccedilla", XKB_KEY_ccedilla },
+ { "egrave", XKB_KEY_egrave },
+ { "eacute", XKB_KEY_eacute },
+ { "ecircumflex", XKB_KEY_ecircumflex },
+ { "ediaeresis", XKB_KEY_ediaeresis },
+ { "igrave", XKB_KEY_igrave },
+ { "iacute", XKB_KEY_iacute },
+ { "icircumflex", XKB_KEY_icircumflex },
+ { "idiaeresis", XKB_KEY_idiaeresis },
+ { "eth", XKB_KEY_eth },
+ { "ntilde", XKB_KEY_ntilde },
+ { "ograve", XKB_KEY_ograve },
+ { "oacute", XKB_KEY_oacute },
+ { "ocircumflex", XKB_KEY_ocircumflex },
+ { "otilde", XKB_KEY_otilde },
+ { "odiaeresis", XKB_KEY_odiaeresis },
+ { "division", XKB_KEY_division },
+ { "oslash", XKB_KEY_oslash },
+ { "ugrave", XKB_KEY_ugrave },
+ { "uacute", XKB_KEY_uacute },
+ { "ucircumflex", XKB_KEY_ucircumflex },
+ { "udiaeresis", XKB_KEY_udiaeresis },
+ { "yacute", XKB_KEY_yacute },
+ { "thorn", XKB_KEY_thorn },
+ { "ydiaeresis", XKB_KEY_ydiaeresis },
+ { "Aogonek", XKB_KEY_Aogonek },
+ { "breve", XKB_KEY_breve },
+ { "Lstroke", XKB_KEY_Lstroke },
+ { "Lcaron", XKB_KEY_Lcaron },
+ { "Sacute", XKB_KEY_Sacute },
+ { "Scaron", XKB_KEY_Scaron },
+ { "Scedilla", XKB_KEY_Scedilla },
+ { "Tcaron", XKB_KEY_Tcaron },
+ { "Zacute", XKB_KEY_Zacute },
+ { "Zcaron", XKB_KEY_Zcaron },
+ { "Zabovedot", XKB_KEY_Zabovedot },
+ { "aogonek", XKB_KEY_aogonek },
+ { "ogonek", XKB_KEY_ogonek },
+ { "lstroke", XKB_KEY_lstroke },
+ { "lcaron", XKB_KEY_lcaron },
+ { "sacute", XKB_KEY_sacute },
+ { "caron", XKB_KEY_caron },
+ { "scaron", XKB_KEY_scaron },
+ { "scedilla", XKB_KEY_scedilla },
+ { "tcaron", XKB_KEY_tcaron },
+ { "zacute", XKB_KEY_zacute },
+ { "doubleacute", XKB_KEY_doubleacute },
+ { "zcaron", XKB_KEY_zcaron },
+ { "zabovedot", XKB_KEY_zabovedot },
+ { "Racute", XKB_KEY_Racute },
+ { "Abreve", XKB_KEY_Abreve },
+ { "Lacute", XKB_KEY_Lacute },
+ { "Cacute", XKB_KEY_Cacute },
+ { "Ccaron", XKB_KEY_Ccaron },
+ { "Eogonek", XKB_KEY_Eogonek },
+ { "Ecaron", XKB_KEY_Ecaron },
+ { "Dcaron", XKB_KEY_Dcaron },
+ { "Dstroke", XKB_KEY_Dstroke },
+ { "Nacute", XKB_KEY_Nacute },
+ { "Ncaron", XKB_KEY_Ncaron },
+ { "Odoubleacute", XKB_KEY_Odoubleacute },
+ { "Rcaron", XKB_KEY_Rcaron },
+ { "Uring", XKB_KEY_Uring },
+ { "Udoubleacute", XKB_KEY_Udoubleacute },
+ { "Tcedilla", XKB_KEY_Tcedilla },
+ { "racute", XKB_KEY_racute },
+ { "abreve", XKB_KEY_abreve },
+ { "lacute", XKB_KEY_lacute },
+ { "cacute", XKB_KEY_cacute },
+ { "ccaron", XKB_KEY_ccaron },
+ { "eogonek", XKB_KEY_eogonek },
+ { "ecaron", XKB_KEY_ecaron },
+ { "dcaron", XKB_KEY_dcaron },
+ { "dstroke", XKB_KEY_dstroke },
+ { "nacute", XKB_KEY_nacute },
+ { "ncaron", XKB_KEY_ncaron },
+ { "odoubleacute", XKB_KEY_odoubleacute },
+ { "rcaron", XKB_KEY_rcaron },
+ { "uring", XKB_KEY_uring },
+ { "udoubleacute", XKB_KEY_udoubleacute },
+ { "tcedilla", XKB_KEY_tcedilla },
+ { "abovedot", XKB_KEY_abovedot },
+ { "Hstroke", XKB_KEY_Hstroke },
+ { "Hcircumflex", XKB_KEY_Hcircumflex },
+ { "Iabovedot", XKB_KEY_Iabovedot },
+ { "Gbreve", XKB_KEY_Gbreve },
+ { "Jcircumflex", XKB_KEY_Jcircumflex },
+ { "hstroke", XKB_KEY_hstroke },
+ { "hcircumflex", XKB_KEY_hcircumflex },
+ { "idotless", XKB_KEY_idotless },
+ { "gbreve", XKB_KEY_gbreve },
+ { "jcircumflex", XKB_KEY_jcircumflex },
+ { "Cabovedot", XKB_KEY_Cabovedot },
+ { "Ccircumflex", XKB_KEY_Ccircumflex },
+ { "Gabovedot", XKB_KEY_Gabovedot },
+ { "Gcircumflex", XKB_KEY_Gcircumflex },
+ { "Ubreve", XKB_KEY_Ubreve },
+ { "Scircumflex", XKB_KEY_Scircumflex },
+ { "cabovedot", XKB_KEY_cabovedot },
+ { "ccircumflex", XKB_KEY_ccircumflex },
+ { "gabovedot", XKB_KEY_gabovedot },
+ { "gcircumflex", XKB_KEY_gcircumflex },
+ { "ubreve", XKB_KEY_ubreve },
+ { "scircumflex", XKB_KEY_scircumflex },
+ { "kra", XKB_KEY_kra },
+ { "Rcedilla", XKB_KEY_Rcedilla },
+ { "Itilde", XKB_KEY_Itilde },
+ { "Lcedilla", XKB_KEY_Lcedilla },
+ { "Emacron", XKB_KEY_Emacron },
+ { "Gcedilla", XKB_KEY_Gcedilla },
+ { "Tslash", XKB_KEY_Tslash },
+ { "rcedilla", XKB_KEY_rcedilla },
+ { "itilde", XKB_KEY_itilde },
+ { "lcedilla", XKB_KEY_lcedilla },
+ { "emacron", XKB_KEY_emacron },
+ { "gcedilla", XKB_KEY_gcedilla },
+ { "tslash", XKB_KEY_tslash },
+ { "ENG", XKB_KEY_ENG },
+ { "eng", XKB_KEY_eng },
+ { "Amacron", XKB_KEY_Amacron },
+ { "Iogonek", XKB_KEY_Iogonek },
+ { "Eabovedot", XKB_KEY_Eabovedot },
+ { "Imacron", XKB_KEY_Imacron },
+ { "Ncedilla", XKB_KEY_Ncedilla },
+ { "Omacron", XKB_KEY_Omacron },
+ { "Kcedilla", XKB_KEY_Kcedilla },
+ { "Uogonek", XKB_KEY_Uogonek },
+ { "Utilde", XKB_KEY_Utilde },
+ { "Umacron", XKB_KEY_Umacron },
+ { "amacron", XKB_KEY_amacron },
+ { "iogonek", XKB_KEY_iogonek },
+ { "eabovedot", XKB_KEY_eabovedot },
+ { "imacron", XKB_KEY_imacron },
+ { "ncedilla", XKB_KEY_ncedilla },
+ { "omacron", XKB_KEY_omacron },
+ { "kcedilla", XKB_KEY_kcedilla },
+ { "uogonek", XKB_KEY_uogonek },
+ { "utilde", XKB_KEY_utilde },
+ { "umacron", XKB_KEY_umacron },
+ { "overline", XKB_KEY_overline },
+ { "kana_fullstop", XKB_KEY_kana_fullstop },
+ { "kana_openingbracket", XKB_KEY_kana_openingbracket },
+ { "kana_closingbracket", XKB_KEY_kana_closingbracket },
+ { "kana_comma", XKB_KEY_kana_comma },
+ { "kana_conjunctive", XKB_KEY_kana_conjunctive },
+ { "kana_WO", XKB_KEY_kana_WO },
+ { "kana_a", XKB_KEY_kana_a },
+ { "kana_i", XKB_KEY_kana_i },
+ { "kana_u", XKB_KEY_kana_u },
+ { "kana_e", XKB_KEY_kana_e },
+ { "kana_o", XKB_KEY_kana_o },
+ { "kana_ya", XKB_KEY_kana_ya },
+ { "kana_yu", XKB_KEY_kana_yu },
+ { "kana_yo", XKB_KEY_kana_yo },
+ { "kana_tsu", XKB_KEY_kana_tsu },
+ { "prolongedsound", XKB_KEY_prolongedsound },
+ { "kana_A", XKB_KEY_kana_A },
+ { "kana_I", XKB_KEY_kana_I },
+ { "kana_U", XKB_KEY_kana_U },
+ { "kana_E", XKB_KEY_kana_E },
+ { "kana_O", XKB_KEY_kana_O },
+ { "kana_KA", XKB_KEY_kana_KA },
+ { "kana_KI", XKB_KEY_kana_KI },
+ { "kana_KU", XKB_KEY_kana_KU },
+ { "kana_KE", XKB_KEY_kana_KE },
+ { "kana_KO", XKB_KEY_kana_KO },
+ { "kana_SA", XKB_KEY_kana_SA },
+ { "kana_SHI", XKB_KEY_kana_SHI },
+ { "kana_SU", XKB_KEY_kana_SU },
+ { "kana_SE", XKB_KEY_kana_SE },
+ { "kana_SO", XKB_KEY_kana_SO },
+ { "kana_TA", XKB_KEY_kana_TA },
+ { "kana_CHI", XKB_KEY_kana_CHI },
+ { "kana_TSU", XKB_KEY_kana_TSU },
+ { "kana_TE", XKB_KEY_kana_TE },
+ { "kana_TO", XKB_KEY_kana_TO },
+ { "kana_NA", XKB_KEY_kana_NA },
+ { "kana_NI", XKB_KEY_kana_NI },
+ { "kana_NU", XKB_KEY_kana_NU },
+ { "kana_NE", XKB_KEY_kana_NE },
+ { "kana_NO", XKB_KEY_kana_NO },
+ { "kana_HA", XKB_KEY_kana_HA },
+ { "kana_HI", XKB_KEY_kana_HI },
+ { "kana_FU", XKB_KEY_kana_FU },
+ { "kana_HE", XKB_KEY_kana_HE },
+ { "kana_HO", XKB_KEY_kana_HO },
+ { "kana_MA", XKB_KEY_kana_MA },
+ { "kana_MI", XKB_KEY_kana_MI },
+ { "kana_MU", XKB_KEY_kana_MU },
+ { "kana_ME", XKB_KEY_kana_ME },
+ { "kana_MO", XKB_KEY_kana_MO },
+ { "kana_YA", XKB_KEY_kana_YA },
+ { "kana_YU", XKB_KEY_kana_YU },
+ { "kana_YO", XKB_KEY_kana_YO },
+ { "kana_RA", XKB_KEY_kana_RA },
+ { "kana_RI", XKB_KEY_kana_RI },
+ { "kana_RU", XKB_KEY_kana_RU },
+ { "kana_RE", XKB_KEY_kana_RE },
+ { "kana_RO", XKB_KEY_kana_RO },
+ { "kana_WA", XKB_KEY_kana_WA },
+ { "kana_N", XKB_KEY_kana_N },
+ { "voicedsound", XKB_KEY_voicedsound },
+ { "semivoicedsound", XKB_KEY_semivoicedsound },
+ { "Arabic_comma", XKB_KEY_Arabic_comma },
+ { "Arabic_semicolon", XKB_KEY_Arabic_semicolon },
+ { "Arabic_question_mark", XKB_KEY_Arabic_question_mark },
+ { "Arabic_hamza", XKB_KEY_Arabic_hamza },
+ { "Arabic_maddaonalef", XKB_KEY_Arabic_maddaonalef },
+ { "Arabic_hamzaonalef", XKB_KEY_Arabic_hamzaonalef },
+ { "Arabic_hamzaonwaw", XKB_KEY_Arabic_hamzaonwaw },
+ { "Arabic_hamzaunderalef", XKB_KEY_Arabic_hamzaunderalef },
+ { "Arabic_hamzaonyeh", XKB_KEY_Arabic_hamzaonyeh },
+ { "Arabic_alef", XKB_KEY_Arabic_alef },
+ { "Arabic_beh", XKB_KEY_Arabic_beh },
+ { "Arabic_tehmarbuta", XKB_KEY_Arabic_tehmarbuta },
+ { "Arabic_teh", XKB_KEY_Arabic_teh },
+ { "Arabic_theh", XKB_KEY_Arabic_theh },
+ { "Arabic_jeem", XKB_KEY_Arabic_jeem },
+ { "Arabic_hah", XKB_KEY_Arabic_hah },
+ { "Arabic_khah", XKB_KEY_Arabic_khah },
+ { "Arabic_dal", XKB_KEY_Arabic_dal },
+ { "Arabic_thal", XKB_KEY_Arabic_thal },
+ { "Arabic_ra", XKB_KEY_Arabic_ra },
+ { "Arabic_zain", XKB_KEY_Arabic_zain },
+ { "Arabic_seen", XKB_KEY_Arabic_seen },
+ { "Arabic_sheen", XKB_KEY_Arabic_sheen },
+ { "Arabic_sad", XKB_KEY_Arabic_sad },
+ { "Arabic_dad", XKB_KEY_Arabic_dad },
+ { "Arabic_tah", XKB_KEY_Arabic_tah },
+ { "Arabic_zah", XKB_KEY_Arabic_zah },
+ { "Arabic_ain", XKB_KEY_Arabic_ain },
+ { "Arabic_ghain", XKB_KEY_Arabic_ghain },
+ { "Arabic_tatweel", XKB_KEY_Arabic_tatweel },
+ { "Arabic_feh", XKB_KEY_Arabic_feh },
+ { "Arabic_qaf", XKB_KEY_Arabic_qaf },
+ { "Arabic_kaf", XKB_KEY_Arabic_kaf },
+ { "Arabic_lam", XKB_KEY_Arabic_lam },
+ { "Arabic_meem", XKB_KEY_Arabic_meem },
+ { "Arabic_noon", XKB_KEY_Arabic_noon },
+ { "Arabic_ha", XKB_KEY_Arabic_ha },
+ { "Arabic_waw", XKB_KEY_Arabic_waw },
+ { "Arabic_alefmaksura", XKB_KEY_Arabic_alefmaksura },
+ { "Arabic_yeh", XKB_KEY_Arabic_yeh },
+ { "Arabic_fathatan", XKB_KEY_Arabic_fathatan },
+ { "Arabic_dammatan", XKB_KEY_Arabic_dammatan },
+ { "Arabic_kasratan", XKB_KEY_Arabic_kasratan },
+ { "Arabic_fatha", XKB_KEY_Arabic_fatha },
+ { "Arabic_damma", XKB_KEY_Arabic_damma },
+ { "Arabic_kasra", XKB_KEY_Arabic_kasra },
+ { "Arabic_shadda", XKB_KEY_Arabic_shadda },
+ { "Arabic_sukun", XKB_KEY_Arabic_sukun },
+ { "Serbian_dje", XKB_KEY_Serbian_dje },
+ { "Macedonia_gje", XKB_KEY_Macedonia_gje },
+ { "Cyrillic_io", XKB_KEY_Cyrillic_io },
+ { "Ukrainian_ie", XKB_KEY_Ukrainian_ie },
+ { "Macedonia_dse", XKB_KEY_Macedonia_dse },
+ { "Ukrainian_i", XKB_KEY_Ukrainian_i },
+ { "Ukrainian_yi", XKB_KEY_Ukrainian_yi },
+ { "Cyrillic_je", XKB_KEY_Cyrillic_je },
+ { "Cyrillic_lje", XKB_KEY_Cyrillic_lje },
+ { "Cyrillic_nje", XKB_KEY_Cyrillic_nje },
+ { "Serbian_tshe", XKB_KEY_Serbian_tshe },
+ { "Macedonia_kje", XKB_KEY_Macedonia_kje },
+ { "Ukrainian_ghe_with_upturn", XKB_KEY_Ukrainian_ghe_with_upturn },
+ { "Byelorussian_shortu", XKB_KEY_Byelorussian_shortu },
+ { "Cyrillic_dzhe", XKB_KEY_Cyrillic_dzhe },
+ { "numerosign", XKB_KEY_numerosign },
+ { "Serbian_DJE", XKB_KEY_Serbian_DJE },
+ { "Macedonia_GJE", XKB_KEY_Macedonia_GJE },
+ { "Cyrillic_IO", XKB_KEY_Cyrillic_IO },
+ { "Ukrainian_IE", XKB_KEY_Ukrainian_IE },
+ { "Macedonia_DSE", XKB_KEY_Macedonia_DSE },
+ { "Ukrainian_I", XKB_KEY_Ukrainian_I },
+ { "Ukrainian_YI", XKB_KEY_Ukrainian_YI },
+ { "Cyrillic_JE", XKB_KEY_Cyrillic_JE },
+ { "Cyrillic_LJE", XKB_KEY_Cyrillic_LJE },
+ { "Cyrillic_NJE", XKB_KEY_Cyrillic_NJE },
+ { "Serbian_TSHE", XKB_KEY_Serbian_TSHE },
+ { "Macedonia_KJE", XKB_KEY_Macedonia_KJE },
+ { "Ukrainian_GHE_WITH_UPTURN", XKB_KEY_Ukrainian_GHE_WITH_UPTURN },
+ { "Byelorussian_SHORTU", XKB_KEY_Byelorussian_SHORTU },
+ { "Cyrillic_DZHE", XKB_KEY_Cyrillic_DZHE },
+ { "Cyrillic_yu", XKB_KEY_Cyrillic_yu },
+ { "Cyrillic_a", XKB_KEY_Cyrillic_a },
+ { "Cyrillic_be", XKB_KEY_Cyrillic_be },
+ { "Cyrillic_tse", XKB_KEY_Cyrillic_tse },
+ { "Cyrillic_de", XKB_KEY_Cyrillic_de },
+ { "Cyrillic_ie", XKB_KEY_Cyrillic_ie },
+ { "Cyrillic_ef", XKB_KEY_Cyrillic_ef },
+ { "Cyrillic_ghe", XKB_KEY_Cyrillic_ghe },
+ { "Cyrillic_ha", XKB_KEY_Cyrillic_ha },
+ { "Cyrillic_i", XKB_KEY_Cyrillic_i },
+ { "Cyrillic_shorti", XKB_KEY_Cyrillic_shorti },
+ { "Cyrillic_ka", XKB_KEY_Cyrillic_ka },
+ { "Cyrillic_el", XKB_KEY_Cyrillic_el },
+ { "Cyrillic_em", XKB_KEY_Cyrillic_em },
+ { "Cyrillic_en", XKB_KEY_Cyrillic_en },
+ { "Cyrillic_o", XKB_KEY_Cyrillic_o },
+ { "Cyrillic_pe", XKB_KEY_Cyrillic_pe },
+ { "Cyrillic_ya", XKB_KEY_Cyrillic_ya },
+ { "Cyrillic_er", XKB_KEY_Cyrillic_er },
+ { "Cyrillic_es", XKB_KEY_Cyrillic_es },
+ { "Cyrillic_te", XKB_KEY_Cyrillic_te },
+ { "Cyrillic_u", XKB_KEY_Cyrillic_u },
+ { "Cyrillic_zhe", XKB_KEY_Cyrillic_zhe },
+ { "Cyrillic_ve", XKB_KEY_Cyrillic_ve },
+ { "Cyrillic_softsign", XKB_KEY_Cyrillic_softsign },
+ { "Cyrillic_yeru", XKB_KEY_Cyrillic_yeru },
+ { "Cyrillic_ze", XKB_KEY_Cyrillic_ze },
+ { "Cyrillic_sha", XKB_KEY_Cyrillic_sha },
+ { "Cyrillic_e", XKB_KEY_Cyrillic_e },
+ { "Cyrillic_shcha", XKB_KEY_Cyrillic_shcha },
+ { "Cyrillic_che", XKB_KEY_Cyrillic_che },
+ { "Cyrillic_hardsign", XKB_KEY_Cyrillic_hardsign },
+ { "Cyrillic_YU", XKB_KEY_Cyrillic_YU },
+ { "Cyrillic_A", XKB_KEY_Cyrillic_A },
+ { "Cyrillic_BE", XKB_KEY_Cyrillic_BE },
+ { "Cyrillic_TSE", XKB_KEY_Cyrillic_TSE },
+ { "Cyrillic_DE", XKB_KEY_Cyrillic_DE },
+ { "Cyrillic_IE", XKB_KEY_Cyrillic_IE },
+ { "Cyrillic_EF", XKB_KEY_Cyrillic_EF },
+ { "Cyrillic_GHE", XKB_KEY_Cyrillic_GHE },
+ { "Cyrillic_HA", XKB_KEY_Cyrillic_HA },
+ { "Cyrillic_I", XKB_KEY_Cyrillic_I },
+ { "Cyrillic_SHORTI", XKB_KEY_Cyrillic_SHORTI },
+ { "Cyrillic_KA", XKB_KEY_Cyrillic_KA },
+ { "Cyrillic_EL", XKB_KEY_Cyrillic_EL },
+ { "Cyrillic_EM", XKB_KEY_Cyrillic_EM },
+ { "Cyrillic_EN", XKB_KEY_Cyrillic_EN },
+ { "Cyrillic_O", XKB_KEY_Cyrillic_O },
+ { "Cyrillic_PE", XKB_KEY_Cyrillic_PE },
+ { "Cyrillic_YA", XKB_KEY_Cyrillic_YA },
+ { "Cyrillic_ER", XKB_KEY_Cyrillic_ER },
+ { "Cyrillic_ES", XKB_KEY_Cyrillic_ES },
+ { "Cyrillic_TE", XKB_KEY_Cyrillic_TE },
+ { "Cyrillic_U", XKB_KEY_Cyrillic_U },
+ { "Cyrillic_ZHE", XKB_KEY_Cyrillic_ZHE },
+ { "Cyrillic_VE", XKB_KEY_Cyrillic_VE },
+ { "Cyrillic_SOFTSIGN", XKB_KEY_Cyrillic_SOFTSIGN },
+ { "Cyrillic_YERU", XKB_KEY_Cyrillic_YERU },
+ { "Cyrillic_ZE", XKB_KEY_Cyrillic_ZE },
+ { "Cyrillic_SHA", XKB_KEY_Cyrillic_SHA },
+ { "Cyrillic_E", XKB_KEY_Cyrillic_E },
+ { "Cyrillic_SHCHA", XKB_KEY_Cyrillic_SHCHA },
+ { "Cyrillic_CHE", XKB_KEY_Cyrillic_CHE },
+ { "Cyrillic_HARDSIGN", XKB_KEY_Cyrillic_HARDSIGN },
+ { "Greek_ALPHAaccent", XKB_KEY_Greek_ALPHAaccent },
+ { "Greek_EPSILONaccent", XKB_KEY_Greek_EPSILONaccent },
+ { "Greek_ETAaccent", XKB_KEY_Greek_ETAaccent },
+ { "Greek_IOTAaccent", XKB_KEY_Greek_IOTAaccent },
+ { "Greek_IOTAdieresis", XKB_KEY_Greek_IOTAdieresis },
+ { "Greek_OMICRONaccent", XKB_KEY_Greek_OMICRONaccent },
+ { "Greek_UPSILONaccent", XKB_KEY_Greek_UPSILONaccent },
+ { "Greek_UPSILONdieresis", XKB_KEY_Greek_UPSILONdieresis },
+ { "Greek_OMEGAaccent", XKB_KEY_Greek_OMEGAaccent },
+ { "Greek_accentdieresis", XKB_KEY_Greek_accentdieresis },
+ { "Greek_horizbar", XKB_KEY_Greek_horizbar },
+ { "Greek_alphaaccent", XKB_KEY_Greek_alphaaccent },
+ { "Greek_epsilonaccent", XKB_KEY_Greek_epsilonaccent },
+ { "Greek_etaaccent", XKB_KEY_Greek_etaaccent },
+ { "Greek_iotaaccent", XKB_KEY_Greek_iotaaccent },
+ { "Greek_iotadieresis", XKB_KEY_Greek_iotadieresis },
+ { "Greek_iotaaccentdieresis", XKB_KEY_Greek_iotaaccentdieresis },
+ { "Greek_omicronaccent", XKB_KEY_Greek_omicronaccent },
+ { "Greek_upsilonaccent", XKB_KEY_Greek_upsilonaccent },
+ { "Greek_upsilondieresis", XKB_KEY_Greek_upsilondieresis },
+ { "Greek_upsilonaccentdieresis", XKB_KEY_Greek_upsilonaccentdieresis },
+ { "Greek_omegaaccent", XKB_KEY_Greek_omegaaccent },
+ { "Greek_ALPHA", XKB_KEY_Greek_ALPHA },
+ { "Greek_BETA", XKB_KEY_Greek_BETA },
+ { "Greek_GAMMA", XKB_KEY_Greek_GAMMA },
+ { "Greek_DELTA", XKB_KEY_Greek_DELTA },
+ { "Greek_EPSILON", XKB_KEY_Greek_EPSILON },
+ { "Greek_ZETA", XKB_KEY_Greek_ZETA },
+ { "Greek_ETA", XKB_KEY_Greek_ETA },
+ { "Greek_THETA", XKB_KEY_Greek_THETA },
+ { "Greek_IOTA", XKB_KEY_Greek_IOTA },
+ { "Greek_KAPPA", XKB_KEY_Greek_KAPPA },
+ { "Greek_LAMDA", XKB_KEY_Greek_LAMDA },
+ { "Greek_MU", XKB_KEY_Greek_MU },
+ { "Greek_NU", XKB_KEY_Greek_NU },
+ { "Greek_XI", XKB_KEY_Greek_XI },
+ { "Greek_OMICRON", XKB_KEY_Greek_OMICRON },
+ { "Greek_PI", XKB_KEY_Greek_PI },
+ { "Greek_RHO", XKB_KEY_Greek_RHO },
+ { "Greek_SIGMA", XKB_KEY_Greek_SIGMA },
+ { "Greek_TAU", XKB_KEY_Greek_TAU },
+ { "Greek_UPSILON", XKB_KEY_Greek_UPSILON },
+ { "Greek_PHI", XKB_KEY_Greek_PHI },
+ { "Greek_CHI", XKB_KEY_Greek_CHI },
+ { "Greek_PSI", XKB_KEY_Greek_PSI },
+ { "Greek_OMEGA", XKB_KEY_Greek_OMEGA },
+ { "Greek_alpha", XKB_KEY_Greek_alpha },
+ { "Greek_beta", XKB_KEY_Greek_beta },
+ { "Greek_gamma", XKB_KEY_Greek_gamma },
+ { "Greek_delta", XKB_KEY_Greek_delta },
+ { "Greek_epsilon", XKB_KEY_Greek_epsilon },
+ { "Greek_zeta", XKB_KEY_Greek_zeta },
+ { "Greek_eta", XKB_KEY_Greek_eta },
+ { "Greek_theta", XKB_KEY_Greek_theta },
+ { "Greek_iota", XKB_KEY_Greek_iota },
+ { "Greek_kappa", XKB_KEY_Greek_kappa },
+ { "Greek_lamda", XKB_KEY_Greek_lamda },
+ { "Greek_mu", XKB_KEY_Greek_mu },
+ { "Greek_nu", XKB_KEY_Greek_nu },
+ { "Greek_xi", XKB_KEY_Greek_xi },
+ { "Greek_omicron", XKB_KEY_Greek_omicron },
+ { "Greek_pi", XKB_KEY_Greek_pi },
+ { "Greek_rho", XKB_KEY_Greek_rho },
+ { "Greek_sigma", XKB_KEY_Greek_sigma },
+ { "Greek_finalsmallsigma", XKB_KEY_Greek_finalsmallsigma },
+ { "Greek_tau", XKB_KEY_Greek_tau },
+ { "Greek_upsilon", XKB_KEY_Greek_upsilon },
+ { "Greek_phi", XKB_KEY_Greek_phi },
+ { "Greek_chi", XKB_KEY_Greek_chi },
+ { "Greek_psi", XKB_KEY_Greek_psi },
+ { "Greek_omega", XKB_KEY_Greek_omega },
+ { "leftradical", XKB_KEY_leftradical },
+ { "topleftradical", XKB_KEY_topleftradical },
+ { "horizconnector", XKB_KEY_horizconnector },
+ { "topintegral", XKB_KEY_topintegral },
+ { "botintegral", XKB_KEY_botintegral },
+ { "vertconnector", XKB_KEY_vertconnector },
+ { "topleftsqbracket", XKB_KEY_topleftsqbracket },
+ { "botleftsqbracket", XKB_KEY_botleftsqbracket },
+ { "toprightsqbracket", XKB_KEY_toprightsqbracket },
+ { "botrightsqbracket", XKB_KEY_botrightsqbracket },
+ { "topleftparens", XKB_KEY_topleftparens },
+ { "botleftparens", XKB_KEY_botleftparens },
+ { "toprightparens", XKB_KEY_toprightparens },
+ { "botrightparens", XKB_KEY_botrightparens },
+ { "leftmiddlecurlybrace", XKB_KEY_leftmiddlecurlybrace },
+ { "rightmiddlecurlybrace", XKB_KEY_rightmiddlecurlybrace },
+ { "topleftsummation", XKB_KEY_topleftsummation },
+ { "botleftsummation", XKB_KEY_botleftsummation },
+ { "topvertsummationconnector", XKB_KEY_topvertsummationconnector },
+ { "botvertsummationconnector", XKB_KEY_botvertsummationconnector },
+ { "toprightsummation", XKB_KEY_toprightsummation },
+ { "botrightsummation", XKB_KEY_botrightsummation },
+ { "rightmiddlesummation", XKB_KEY_rightmiddlesummation },
+ { "lessthanequal", XKB_KEY_lessthanequal },
+ { "notequal", XKB_KEY_notequal },
+ { "greaterthanequal", XKB_KEY_greaterthanequal },
+ { "integral", XKB_KEY_integral },
+ { "therefore", XKB_KEY_therefore },
+ { "variation", XKB_KEY_variation },
+ { "infinity", XKB_KEY_infinity },
+ { "nabla", XKB_KEY_nabla },
+ { "approximate", XKB_KEY_approximate },
+ { "similarequal", XKB_KEY_similarequal },
+ { "ifonlyif", XKB_KEY_ifonlyif },
+ { "implies", XKB_KEY_implies },
+ { "identical", XKB_KEY_identical },
+ { "radical", XKB_KEY_radical },
+ { "includedin", XKB_KEY_includedin },
+ { "includes", XKB_KEY_includes },
+ { "intersection", XKB_KEY_intersection },
+ { "union", XKB_KEY_union },
+ { "logicaland", XKB_KEY_logicaland },
+ { "logicalor", XKB_KEY_logicalor },
+ { "partialderivative", XKB_KEY_partialderivative },
+ { "function", XKB_KEY_function },
+ { "leftarrow", XKB_KEY_leftarrow },
+ { "uparrow", XKB_KEY_uparrow },
+ { "rightarrow", XKB_KEY_rightarrow },
+ { "downarrow", XKB_KEY_downarrow },
+ { "blank", XKB_KEY_blank },
+ { "soliddiamond", XKB_KEY_soliddiamond },
+ { "checkerboard", XKB_KEY_checkerboard },
+ { "ht", XKB_KEY_ht },
+ { "ff", XKB_KEY_ff },
+ { "cr", XKB_KEY_cr },
+ { "lf", XKB_KEY_lf },
+ { "nl", XKB_KEY_nl },
+ { "vt", XKB_KEY_vt },
+ { "lowrightcorner", XKB_KEY_lowrightcorner },
+ { "uprightcorner", XKB_KEY_uprightcorner },
+ { "upleftcorner", XKB_KEY_upleftcorner },
+ { "lowleftcorner", XKB_KEY_lowleftcorner },
+ { "crossinglines", XKB_KEY_crossinglines },
+ { "horizlinescan1", XKB_KEY_horizlinescan1 },
+ { "horizlinescan3", XKB_KEY_horizlinescan3 },
+ { "horizlinescan5", XKB_KEY_horizlinescan5 },
+ { "horizlinescan7", XKB_KEY_horizlinescan7 },
+ { "horizlinescan9", XKB_KEY_horizlinescan9 },
+ { "leftt", XKB_KEY_leftt },
+ { "rightt", XKB_KEY_rightt },
+ { "bott", XKB_KEY_bott },
+ { "topt", XKB_KEY_topt },
+ { "vertbar", XKB_KEY_vertbar },
+ { "emspace", XKB_KEY_emspace },
+ { "enspace", XKB_KEY_enspace },
+ { "em3space", XKB_KEY_em3space },
+ { "em4space", XKB_KEY_em4space },
+ { "digitspace", XKB_KEY_digitspace },
+ { "punctspace", XKB_KEY_punctspace },
+ { "thinspace", XKB_KEY_thinspace },
+ { "hairspace", XKB_KEY_hairspace },
+ { "emdash", XKB_KEY_emdash },
+ { "endash", XKB_KEY_endash },
+ { "signifblank", XKB_KEY_signifblank },
+ { "ellipsis", XKB_KEY_ellipsis },
+ { "doubbaselinedot", XKB_KEY_doubbaselinedot },
+ { "onethird", XKB_KEY_onethird },
+ { "twothirds", XKB_KEY_twothirds },
+ { "onefifth", XKB_KEY_onefifth },
+ { "twofifths", XKB_KEY_twofifths },
+ { "threefifths", XKB_KEY_threefifths },
+ { "fourfifths", XKB_KEY_fourfifths },
+ { "onesixth", XKB_KEY_onesixth },
+ { "fivesixths", XKB_KEY_fivesixths },
+ { "careof", XKB_KEY_careof },
+ { "figdash", XKB_KEY_figdash },
+ { "leftanglebracket", XKB_KEY_leftanglebracket },
+ { "decimalpoint", XKB_KEY_decimalpoint },
+ { "rightanglebracket", XKB_KEY_rightanglebracket },
+ { "marker", XKB_KEY_marker },
+ { "oneeighth", XKB_KEY_oneeighth },
+ { "threeeighths", XKB_KEY_threeeighths },
+ { "fiveeighths", XKB_KEY_fiveeighths },
+ { "seveneighths", XKB_KEY_seveneighths },
+ { "trademark", XKB_KEY_trademark },
+ { "signaturemark", XKB_KEY_signaturemark },
+ { "trademarkincircle", XKB_KEY_trademarkincircle },
+ { "leftopentriangle", XKB_KEY_leftopentriangle },
+ { "rightopentriangle", XKB_KEY_rightopentriangle },
+ { "emopencircle", XKB_KEY_emopencircle },
+ { "emopenrectangle", XKB_KEY_emopenrectangle },
+ { "leftsinglequotemark", XKB_KEY_leftsinglequotemark },
+ { "rightsinglequotemark", XKB_KEY_rightsinglequotemark },
+ { "leftdoublequotemark", XKB_KEY_leftdoublequotemark },
+ { "rightdoublequotemark", XKB_KEY_rightdoublequotemark },
+ { "prescription", XKB_KEY_prescription },
+ { "permille", XKB_KEY_permille },
+ { "minutes", XKB_KEY_minutes },
+ { "seconds", XKB_KEY_seconds },
+ { "latincross", XKB_KEY_latincross },
+ { "hexagram", XKB_KEY_hexagram },
+ { "filledrectbullet", XKB_KEY_filledrectbullet },
+ { "filledlefttribullet", XKB_KEY_filledlefttribullet },
+ { "filledrighttribullet", XKB_KEY_filledrighttribullet },
+ { "emfilledcircle", XKB_KEY_emfilledcircle },
+ { "emfilledrect", XKB_KEY_emfilledrect },
+ { "enopencircbullet", XKB_KEY_enopencircbullet },
+ { "enopensquarebullet", XKB_KEY_enopensquarebullet },
+ { "openrectbullet", XKB_KEY_openrectbullet },
+ { "opentribulletup", XKB_KEY_opentribulletup },
+ { "opentribulletdown", XKB_KEY_opentribulletdown },
+ { "openstar", XKB_KEY_openstar },
+ { "enfilledcircbullet", XKB_KEY_enfilledcircbullet },
+ { "enfilledsqbullet", XKB_KEY_enfilledsqbullet },
+ { "filledtribulletup", XKB_KEY_filledtribulletup },
+ { "filledtribulletdown", XKB_KEY_filledtribulletdown },
+ { "leftpointer", XKB_KEY_leftpointer },
+ { "rightpointer", XKB_KEY_rightpointer },
+ { "club", XKB_KEY_club },
+ { "diamond", XKB_KEY_diamond },
+ { "heart", XKB_KEY_heart },
+ { "maltesecross", XKB_KEY_maltesecross },
+ { "dagger", XKB_KEY_dagger },
+ { "doubledagger", XKB_KEY_doubledagger },
+ { "checkmark", XKB_KEY_checkmark },
+ { "ballotcross", XKB_KEY_ballotcross },
+ { "musicalsharp", XKB_KEY_musicalsharp },
+ { "musicalflat", XKB_KEY_musicalflat },
+ { "malesymbol", XKB_KEY_malesymbol },
+ { "femalesymbol", XKB_KEY_femalesymbol },
+ { "telephone", XKB_KEY_telephone },
+ { "telephonerecorder", XKB_KEY_telephonerecorder },
+ { "phonographcopyright", XKB_KEY_phonographcopyright },
+ { "caret", XKB_KEY_caret },
+ { "singlelowquotemark", XKB_KEY_singlelowquotemark },
+ { "doublelowquotemark", XKB_KEY_doublelowquotemark },
+ { "cursor", XKB_KEY_cursor },
+ { "leftcaret", XKB_KEY_leftcaret },
+ { "rightcaret", XKB_KEY_rightcaret },
+ { "downcaret", XKB_KEY_downcaret },
+ { "upcaret", XKB_KEY_upcaret },
+ { "overbar", XKB_KEY_overbar },
+ { "downtack", XKB_KEY_downtack },
+ { "upshoe", XKB_KEY_upshoe },
+ { "downstile", XKB_KEY_downstile },
+ { "underbar", XKB_KEY_underbar },
+ { "jot", XKB_KEY_jot },
+ { "quad", XKB_KEY_quad },
+ { "uptack", XKB_KEY_uptack },
+ { "circle", XKB_KEY_circle },
+ { "upstile", XKB_KEY_upstile },
+ { "downshoe", XKB_KEY_downshoe },
+ { "rightshoe", XKB_KEY_rightshoe },
+ { "leftshoe", XKB_KEY_leftshoe },
+ { "lefttack", XKB_KEY_lefttack },
+ { "righttack", XKB_KEY_righttack },
+ { "hebrew_doublelowline", XKB_KEY_hebrew_doublelowline },
+ { "hebrew_aleph", XKB_KEY_hebrew_aleph },
+ { "hebrew_bet", XKB_KEY_hebrew_bet },
+ { "hebrew_gimel", XKB_KEY_hebrew_gimel },
+ { "hebrew_dalet", XKB_KEY_hebrew_dalet },
+ { "hebrew_he", XKB_KEY_hebrew_he },
+ { "hebrew_waw", XKB_KEY_hebrew_waw },
+ { "hebrew_zain", XKB_KEY_hebrew_zain },
+ { "hebrew_chet", XKB_KEY_hebrew_chet },
+ { "hebrew_tet", XKB_KEY_hebrew_tet },
+ { "hebrew_yod", XKB_KEY_hebrew_yod },
+ { "hebrew_finalkaph", XKB_KEY_hebrew_finalkaph },
+ { "hebrew_kaph", XKB_KEY_hebrew_kaph },
+ { "hebrew_lamed", XKB_KEY_hebrew_lamed },
+ { "hebrew_finalmem", XKB_KEY_hebrew_finalmem },
+ { "hebrew_mem", XKB_KEY_hebrew_mem },
+ { "hebrew_finalnun", XKB_KEY_hebrew_finalnun },
+ { "hebrew_nun", XKB_KEY_hebrew_nun },
+ { "hebrew_samech", XKB_KEY_hebrew_samech },
+ { "hebrew_ayin", XKB_KEY_hebrew_ayin },
+ { "hebrew_finalpe", XKB_KEY_hebrew_finalpe },
+ { "hebrew_pe", XKB_KEY_hebrew_pe },
+ { "hebrew_finalzade", XKB_KEY_hebrew_finalzade },
+ { "hebrew_zade", XKB_KEY_hebrew_zade },
+ { "hebrew_qoph", XKB_KEY_hebrew_qoph },
+ { "hebrew_resh", XKB_KEY_hebrew_resh },
+ { "hebrew_shin", XKB_KEY_hebrew_shin },
+ { "hebrew_taw", XKB_KEY_hebrew_taw },
+ { "Thai_kokai", XKB_KEY_Thai_kokai },
+ { "Thai_khokhai", XKB_KEY_Thai_khokhai },
+ { "Thai_khokhuat", XKB_KEY_Thai_khokhuat },
+ { "Thai_khokhwai", XKB_KEY_Thai_khokhwai },
+ { "Thai_khokhon", XKB_KEY_Thai_khokhon },
+ { "Thai_khorakhang", XKB_KEY_Thai_khorakhang },
+ { "Thai_ngongu", XKB_KEY_Thai_ngongu },
+ { "Thai_chochan", XKB_KEY_Thai_chochan },
+ { "Thai_choching", XKB_KEY_Thai_choching },
+ { "Thai_chochang", XKB_KEY_Thai_chochang },
+ { "Thai_soso", XKB_KEY_Thai_soso },
+ { "Thai_chochoe", XKB_KEY_Thai_chochoe },
+ { "Thai_yoying", XKB_KEY_Thai_yoying },
+ { "Thai_dochada", XKB_KEY_Thai_dochada },
+ { "Thai_topatak", XKB_KEY_Thai_topatak },
+ { "Thai_thothan", XKB_KEY_Thai_thothan },
+ { "Thai_thonangmontho", XKB_KEY_Thai_thonangmontho },
+ { "Thai_thophuthao", XKB_KEY_Thai_thophuthao },
+ { "Thai_nonen", XKB_KEY_Thai_nonen },
+ { "Thai_dodek", XKB_KEY_Thai_dodek },
+ { "Thai_totao", XKB_KEY_Thai_totao },
+ { "Thai_thothung", XKB_KEY_Thai_thothung },
+ { "Thai_thothahan", XKB_KEY_Thai_thothahan },
+ { "Thai_thothong", XKB_KEY_Thai_thothong },
+ { "Thai_nonu", XKB_KEY_Thai_nonu },
+ { "Thai_bobaimai", XKB_KEY_Thai_bobaimai },
+ { "Thai_popla", XKB_KEY_Thai_popla },
+ { "Thai_phophung", XKB_KEY_Thai_phophung },
+ { "Thai_fofa", XKB_KEY_Thai_fofa },
+ { "Thai_phophan", XKB_KEY_Thai_phophan },
+ { "Thai_fofan", XKB_KEY_Thai_fofan },
+ { "Thai_phosamphao", XKB_KEY_Thai_phosamphao },
+ { "Thai_moma", XKB_KEY_Thai_moma },
+ { "Thai_yoyak", XKB_KEY_Thai_yoyak },
+ { "Thai_rorua", XKB_KEY_Thai_rorua },
+ { "Thai_ru", XKB_KEY_Thai_ru },
+ { "Thai_loling", XKB_KEY_Thai_loling },
+ { "Thai_lu", XKB_KEY_Thai_lu },
+ { "Thai_wowaen", XKB_KEY_Thai_wowaen },
+ { "Thai_sosala", XKB_KEY_Thai_sosala },
+ { "Thai_sorusi", XKB_KEY_Thai_sorusi },
+ { "Thai_sosua", XKB_KEY_Thai_sosua },
+ { "Thai_hohip", XKB_KEY_Thai_hohip },
+ { "Thai_lochula", XKB_KEY_Thai_lochula },
+ { "Thai_oang", XKB_KEY_Thai_oang },
+ { "Thai_honokhuk", XKB_KEY_Thai_honokhuk },
+ { "Thai_paiyannoi", XKB_KEY_Thai_paiyannoi },
+ { "Thai_saraa", XKB_KEY_Thai_saraa },
+ { "Thai_maihanakat", XKB_KEY_Thai_maihanakat },
+ { "Thai_saraaa", XKB_KEY_Thai_saraaa },
+ { "Thai_saraam", XKB_KEY_Thai_saraam },
+ { "Thai_sarai", XKB_KEY_Thai_sarai },
+ { "Thai_saraii", XKB_KEY_Thai_saraii },
+ { "Thai_saraue", XKB_KEY_Thai_saraue },
+ { "Thai_sarauee", XKB_KEY_Thai_sarauee },
+ { "Thai_sarau", XKB_KEY_Thai_sarau },
+ { "Thai_sarauu", XKB_KEY_Thai_sarauu },
+ { "Thai_phinthu", XKB_KEY_Thai_phinthu },
+ { "Thai_maihanakat_maitho", XKB_KEY_Thai_maihanakat_maitho },
+ { "Thai_baht", XKB_KEY_Thai_baht },
+ { "Thai_sarae", XKB_KEY_Thai_sarae },
+ { "Thai_saraae", XKB_KEY_Thai_saraae },
+ { "Thai_sarao", XKB_KEY_Thai_sarao },
+ { "Thai_saraaimaimuan", XKB_KEY_Thai_saraaimaimuan },
+ { "Thai_saraaimaimalai", XKB_KEY_Thai_saraaimaimalai },
+ { "Thai_lakkhangyao", XKB_KEY_Thai_lakkhangyao },
+ { "Thai_maiyamok", XKB_KEY_Thai_maiyamok },
+ { "Thai_maitaikhu", XKB_KEY_Thai_maitaikhu },
+ { "Thai_maiek", XKB_KEY_Thai_maiek },
+ { "Thai_maitho", XKB_KEY_Thai_maitho },
+ { "Thai_maitri", XKB_KEY_Thai_maitri },
+ { "Thai_maichattawa", XKB_KEY_Thai_maichattawa },
+ { "Thai_thanthakhat", XKB_KEY_Thai_thanthakhat },
+ { "Thai_nikhahit", XKB_KEY_Thai_nikhahit },
+ { "Thai_leksun", XKB_KEY_Thai_leksun },
+ { "Thai_leknung", XKB_KEY_Thai_leknung },
+ { "Thai_leksong", XKB_KEY_Thai_leksong },
+ { "Thai_leksam", XKB_KEY_Thai_leksam },
+ { "Thai_leksi", XKB_KEY_Thai_leksi },
+ { "Thai_lekha", XKB_KEY_Thai_lekha },
+ { "Thai_lekhok", XKB_KEY_Thai_lekhok },
+ { "Thai_lekchet", XKB_KEY_Thai_lekchet },
+ { "Thai_lekpaet", XKB_KEY_Thai_lekpaet },
+ { "Thai_lekkao", XKB_KEY_Thai_lekkao },
+ { "Hangul_Kiyeog", XKB_KEY_Hangul_Kiyeog },
+ { "Hangul_SsangKiyeog", XKB_KEY_Hangul_SsangKiyeog },
+ { "Hangul_KiyeogSios", XKB_KEY_Hangul_KiyeogSios },
+ { "Hangul_Nieun", XKB_KEY_Hangul_Nieun },
+ { "Hangul_NieunJieuj", XKB_KEY_Hangul_NieunJieuj },
+ { "Hangul_NieunHieuh", XKB_KEY_Hangul_NieunHieuh },
+ { "Hangul_Dikeud", XKB_KEY_Hangul_Dikeud },
+ { "Hangul_SsangDikeud", XKB_KEY_Hangul_SsangDikeud },
+ { "Hangul_Rieul", XKB_KEY_Hangul_Rieul },
+ { "Hangul_RieulKiyeog", XKB_KEY_Hangul_RieulKiyeog },
+ { "Hangul_RieulMieum", XKB_KEY_Hangul_RieulMieum },
+ { "Hangul_RieulPieub", XKB_KEY_Hangul_RieulPieub },
+ { "Hangul_RieulSios", XKB_KEY_Hangul_RieulSios },
+ { "Hangul_RieulTieut", XKB_KEY_Hangul_RieulTieut },
+ { "Hangul_RieulPhieuf", XKB_KEY_Hangul_RieulPhieuf },
+ { "Hangul_RieulHieuh", XKB_KEY_Hangul_RieulHieuh },
+ { "Hangul_Mieum", XKB_KEY_Hangul_Mieum },
+ { "Hangul_Pieub", XKB_KEY_Hangul_Pieub },
+ { "Hangul_SsangPieub", XKB_KEY_Hangul_SsangPieub },
+ { "Hangul_PieubSios", XKB_KEY_Hangul_PieubSios },
+ { "Hangul_Sios", XKB_KEY_Hangul_Sios },
+ { "Hangul_SsangSios", XKB_KEY_Hangul_SsangSios },
+ { "Hangul_Ieung", XKB_KEY_Hangul_Ieung },
+ { "Hangul_Jieuj", XKB_KEY_Hangul_Jieuj },
+ { "Hangul_SsangJieuj", XKB_KEY_Hangul_SsangJieuj },
+ { "Hangul_Cieuc", XKB_KEY_Hangul_Cieuc },
+ { "Hangul_Khieuq", XKB_KEY_Hangul_Khieuq },
+ { "Hangul_Tieut", XKB_KEY_Hangul_Tieut },
+ { "Hangul_Phieuf", XKB_KEY_Hangul_Phieuf },
+ { "Hangul_Hieuh", XKB_KEY_Hangul_Hieuh },
+ { "Hangul_A", XKB_KEY_Hangul_A },
+ { "Hangul_AE", XKB_KEY_Hangul_AE },
+ { "Hangul_YA", XKB_KEY_Hangul_YA },
+ { "Hangul_YAE", XKB_KEY_Hangul_YAE },
+ { "Hangul_EO", XKB_KEY_Hangul_EO },
+ { "Hangul_E", XKB_KEY_Hangul_E },
+ { "Hangul_YEO", XKB_KEY_Hangul_YEO },
+ { "Hangul_YE", XKB_KEY_Hangul_YE },
+ { "Hangul_O", XKB_KEY_Hangul_O },
+ { "Hangul_WA", XKB_KEY_Hangul_WA },
+ { "Hangul_WAE", XKB_KEY_Hangul_WAE },
+ { "Hangul_OE", XKB_KEY_Hangul_OE },
+ { "Hangul_YO", XKB_KEY_Hangul_YO },
+ { "Hangul_U", XKB_KEY_Hangul_U },
+ { "Hangul_WEO", XKB_KEY_Hangul_WEO },
+ { "Hangul_WE", XKB_KEY_Hangul_WE },
+ { "Hangul_WI", XKB_KEY_Hangul_WI },
+ { "Hangul_YU", XKB_KEY_Hangul_YU },
+ { "Hangul_EU", XKB_KEY_Hangul_EU },
+ { "Hangul_YI", XKB_KEY_Hangul_YI },
+ { "Hangul_I", XKB_KEY_Hangul_I },
+ { "Hangul_J_Kiyeog", XKB_KEY_Hangul_J_Kiyeog },
+ { "Hangul_J_SsangKiyeog", XKB_KEY_Hangul_J_SsangKiyeog },
+ { "Hangul_J_KiyeogSios", XKB_KEY_Hangul_J_KiyeogSios },
+ { "Hangul_J_Nieun", XKB_KEY_Hangul_J_Nieun },
+ { "Hangul_J_NieunJieuj", XKB_KEY_Hangul_J_NieunJieuj },
+ { "Hangul_J_NieunHieuh", XKB_KEY_Hangul_J_NieunHieuh },
+ { "Hangul_J_Dikeud", XKB_KEY_Hangul_J_Dikeud },
+ { "Hangul_J_Rieul", XKB_KEY_Hangul_J_Rieul },
+ { "Hangul_J_RieulKiyeog", XKB_KEY_Hangul_J_RieulKiyeog },
+ { "Hangul_J_RieulMieum", XKB_KEY_Hangul_J_RieulMieum },
+ { "Hangul_J_RieulPieub", XKB_KEY_Hangul_J_RieulPieub },
+ { "Hangul_J_RieulSios", XKB_KEY_Hangul_J_RieulSios },
+ { "Hangul_J_RieulTieut", XKB_KEY_Hangul_J_RieulTieut },
+ { "Hangul_J_RieulPhieuf", XKB_KEY_Hangul_J_RieulPhieuf },
+ { "Hangul_J_RieulHieuh", XKB_KEY_Hangul_J_RieulHieuh },
+ { "Hangul_J_Mieum", XKB_KEY_Hangul_J_Mieum },
+ { "Hangul_J_Pieub", XKB_KEY_Hangul_J_Pieub },
+ { "Hangul_J_PieubSios", XKB_KEY_Hangul_J_PieubSios },
+ { "Hangul_J_Sios", XKB_KEY_Hangul_J_Sios },
+ { "Hangul_J_SsangSios", XKB_KEY_Hangul_J_SsangSios },
+ { "Hangul_J_Ieung", XKB_KEY_Hangul_J_Ieung },
+ { "Hangul_J_Jieuj", XKB_KEY_Hangul_J_Jieuj },
+ { "Hangul_J_Cieuc", XKB_KEY_Hangul_J_Cieuc },
+ { "Hangul_J_Khieuq", XKB_KEY_Hangul_J_Khieuq },
+ { "Hangul_J_Tieut", XKB_KEY_Hangul_J_Tieut },
+ { "Hangul_J_Phieuf", XKB_KEY_Hangul_J_Phieuf },
+ { "Hangul_J_Hieuh", XKB_KEY_Hangul_J_Hieuh },
+ { "Hangul_RieulYeorinHieuh", XKB_KEY_Hangul_RieulYeorinHieuh },
+ { "Hangul_SunkyeongeumMieum", XKB_KEY_Hangul_SunkyeongeumMieum },
+ { "Hangul_SunkyeongeumPieub", XKB_KEY_Hangul_SunkyeongeumPieub },
+ { "Hangul_PanSios", XKB_KEY_Hangul_PanSios },
+ { "Hangul_KkogjiDalrinIeung", XKB_KEY_Hangul_KkogjiDalrinIeung },
+ { "Hangul_SunkyeongeumPhieuf", XKB_KEY_Hangul_SunkyeongeumPhieuf },
+ { "Hangul_YeorinHieuh", XKB_KEY_Hangul_YeorinHieuh },
+ { "Hangul_AraeA", XKB_KEY_Hangul_AraeA },
+ { "Hangul_AraeAE", XKB_KEY_Hangul_AraeAE },
+ { "Hangul_J_PanSios", XKB_KEY_Hangul_J_PanSios },
+ { "Hangul_J_KkogjiDalrinIeung", XKB_KEY_Hangul_J_KkogjiDalrinIeung },
+ { "Hangul_J_YeorinHieuh", XKB_KEY_Hangul_J_YeorinHieuh },
+ { "Korean_Won", XKB_KEY_Korean_Won },
+ { "OE", XKB_KEY_OE },
+ { "oe", XKB_KEY_oe },
+ { "Ydiaeresis", XKB_KEY_Ydiaeresis },
+ { "EuroSign", XKB_KEY_EuroSign },
+ { "3270_Duplicate", XKB_KEY_3270_Duplicate },
+ { "3270_FieldMark", XKB_KEY_3270_FieldMark },
+ { "3270_Right2", XKB_KEY_3270_Right2 },
+ { "3270_Left2", XKB_KEY_3270_Left2 },
+ { "3270_BackTab", XKB_KEY_3270_BackTab },
+ { "3270_EraseEOF", XKB_KEY_3270_EraseEOF },
+ { "3270_EraseInput", XKB_KEY_3270_EraseInput },
+ { "3270_Reset", XKB_KEY_3270_Reset },
+ { "3270_Quit", XKB_KEY_3270_Quit },
+ { "3270_PA1", XKB_KEY_3270_PA1 },
+ { "3270_PA2", XKB_KEY_3270_PA2 },
+ { "3270_PA3", XKB_KEY_3270_PA3 },
+ { "3270_Test", XKB_KEY_3270_Test },
+ { "3270_Attn", XKB_KEY_3270_Attn },
+ { "3270_CursorBlink", XKB_KEY_3270_CursorBlink },
+ { "3270_AltCursor", XKB_KEY_3270_AltCursor },
+ { "3270_KeyClick", XKB_KEY_3270_KeyClick },
+ { "3270_Jump", XKB_KEY_3270_Jump },
+ { "3270_Ident", XKB_KEY_3270_Ident },
+ { "3270_Rule", XKB_KEY_3270_Rule },
+ { "3270_Copy", XKB_KEY_3270_Copy },
+ { "3270_Play", XKB_KEY_3270_Play },
+ { "3270_Setup", XKB_KEY_3270_Setup },
+ { "3270_Record", XKB_KEY_3270_Record },
+ { "3270_ChangeScreen", XKB_KEY_3270_ChangeScreen },
+ { "3270_DeleteWord", XKB_KEY_3270_DeleteWord },
+ { "3270_ExSelect", XKB_KEY_3270_ExSelect },
+ { "3270_CursorSelect", XKB_KEY_3270_CursorSelect },
+ { "3270_PrintScreen", XKB_KEY_3270_PrintScreen },
+ { "3270_Enter", XKB_KEY_3270_Enter },
+ { "ISO_Lock", XKB_KEY_ISO_Lock },
+ { "ISO_Level2_Latch", XKB_KEY_ISO_Level2_Latch },
+ { "ISO_Level3_Shift", XKB_KEY_ISO_Level3_Shift },
+ { "ISO_Level3_Latch", XKB_KEY_ISO_Level3_Latch },
+ { "ISO_Level3_Lock", XKB_KEY_ISO_Level3_Lock },
+ { "ISO_Group_Latch", XKB_KEY_ISO_Group_Latch },
+ { "ISO_Group_Lock", XKB_KEY_ISO_Group_Lock },
+ { "ISO_Next_Group", XKB_KEY_ISO_Next_Group },
+ { "ISO_Next_Group_Lock", XKB_KEY_ISO_Next_Group_Lock },
+ { "ISO_Prev_Group", XKB_KEY_ISO_Prev_Group },
+ { "ISO_Prev_Group_Lock", XKB_KEY_ISO_Prev_Group_Lock },
+ { "ISO_First_Group", XKB_KEY_ISO_First_Group },
+ { "ISO_First_Group_Lock", XKB_KEY_ISO_First_Group_Lock },
+ { "ISO_Last_Group", XKB_KEY_ISO_Last_Group },
+ { "ISO_Last_Group_Lock", XKB_KEY_ISO_Last_Group_Lock },
+ { "ISO_Level5_Shift", XKB_KEY_ISO_Level5_Shift },
+ { "ISO_Level5_Latch", XKB_KEY_ISO_Level5_Latch },
+ { "ISO_Level5_Lock", XKB_KEY_ISO_Level5_Lock },
+ { "ISO_Left_Tab", XKB_KEY_ISO_Left_Tab },
+ { "ISO_Move_Line_Up", XKB_KEY_ISO_Move_Line_Up },
+ { "ISO_Move_Line_Down", XKB_KEY_ISO_Move_Line_Down },
+ { "ISO_Partial_Line_Up", XKB_KEY_ISO_Partial_Line_Up },
+ { "ISO_Partial_Line_Down", XKB_KEY_ISO_Partial_Line_Down },
+ { "ISO_Partial_Space_Left", XKB_KEY_ISO_Partial_Space_Left },
+ { "ISO_Partial_Space_Right", XKB_KEY_ISO_Partial_Space_Right },
+ { "ISO_Set_Margin_Left", XKB_KEY_ISO_Set_Margin_Left },
+ { "ISO_Set_Margin_Right", XKB_KEY_ISO_Set_Margin_Right },
+ { "ISO_Release_Margin_Left", XKB_KEY_ISO_Release_Margin_Left },
+ { "ISO_Release_Margin_Right", XKB_KEY_ISO_Release_Margin_Right },
+ { "ISO_Release_Both_Margins", XKB_KEY_ISO_Release_Both_Margins },
+ { "ISO_Fast_Cursor_Left", XKB_KEY_ISO_Fast_Cursor_Left },
+ { "ISO_Fast_Cursor_Right", XKB_KEY_ISO_Fast_Cursor_Right },
+ { "ISO_Fast_Cursor_Up", XKB_KEY_ISO_Fast_Cursor_Up },
+ { "ISO_Fast_Cursor_Down", XKB_KEY_ISO_Fast_Cursor_Down },
+ { "ISO_Continuous_Underline", XKB_KEY_ISO_Continuous_Underline },
+ { "ISO_Discontinuous_Underline", XKB_KEY_ISO_Discontinuous_Underline },
+ { "ISO_Emphasize", XKB_KEY_ISO_Emphasize },
+ { "ISO_Center_Object", XKB_KEY_ISO_Center_Object },
+ { "ISO_Enter", XKB_KEY_ISO_Enter },
+ { "dead_grave", XKB_KEY_dead_grave },
+ { "dead_acute", XKB_KEY_dead_acute },
+ { "dead_circumflex", XKB_KEY_dead_circumflex },
+ { "dead_tilde", XKB_KEY_dead_tilde },
+ { "dead_macron", XKB_KEY_dead_macron },
+ { "dead_breve", XKB_KEY_dead_breve },
+ { "dead_abovedot", XKB_KEY_dead_abovedot },
+ { "dead_diaeresis", XKB_KEY_dead_diaeresis },
+ { "dead_abovering", XKB_KEY_dead_abovering },
+ { "dead_doubleacute", XKB_KEY_dead_doubleacute },
+ { "dead_caron", XKB_KEY_dead_caron },
+ { "dead_cedilla", XKB_KEY_dead_cedilla },
+ { "dead_ogonek", XKB_KEY_dead_ogonek },
+ { "dead_iota", XKB_KEY_dead_iota },
+ { "dead_voiced_sound", XKB_KEY_dead_voiced_sound },
+ { "dead_semivoiced_sound", XKB_KEY_dead_semivoiced_sound },
+ { "dead_belowdot", XKB_KEY_dead_belowdot },
+ { "dead_hook", XKB_KEY_dead_hook },
+ { "dead_horn", XKB_KEY_dead_horn },
+ { "dead_stroke", XKB_KEY_dead_stroke },
+ { "dead_abovecomma", XKB_KEY_dead_abovecomma },
+ { "dead_abovereversedcomma", XKB_KEY_dead_abovereversedcomma },
+ { "dead_doublegrave", XKB_KEY_dead_doublegrave },
+ { "dead_belowring", XKB_KEY_dead_belowring },
+ { "dead_belowmacron", XKB_KEY_dead_belowmacron },
+ { "dead_belowcircumflex", XKB_KEY_dead_belowcircumflex },
+ { "dead_belowtilde", XKB_KEY_dead_belowtilde },
+ { "dead_belowbreve", XKB_KEY_dead_belowbreve },
+ { "dead_belowdiaeresis", XKB_KEY_dead_belowdiaeresis },
+ { "dead_invertedbreve", XKB_KEY_dead_invertedbreve },
+ { "dead_belowcomma", XKB_KEY_dead_belowcomma },
+ { "dead_currency", XKB_KEY_dead_currency },
+ { "AccessX_Enable", XKB_KEY_AccessX_Enable },
+ { "AccessX_Feedback_Enable", XKB_KEY_AccessX_Feedback_Enable },
+ { "RepeatKeys_Enable", XKB_KEY_RepeatKeys_Enable },
+ { "SlowKeys_Enable", XKB_KEY_SlowKeys_Enable },
+ { "BounceKeys_Enable", XKB_KEY_BounceKeys_Enable },
+ { "StickyKeys_Enable", XKB_KEY_StickyKeys_Enable },
+ { "MouseKeys_Enable", XKB_KEY_MouseKeys_Enable },
+ { "MouseKeys_Accel_Enable", XKB_KEY_MouseKeys_Accel_Enable },
+ { "Overlay1_Enable", XKB_KEY_Overlay1_Enable },
+ { "Overlay2_Enable", XKB_KEY_Overlay2_Enable },
+ { "AudibleBell_Enable", XKB_KEY_AudibleBell_Enable },
+ { "dead_a", XKB_KEY_dead_a },
+ { "dead_A", XKB_KEY_dead_A },
+ { "dead_e", XKB_KEY_dead_e },
+ { "dead_E", XKB_KEY_dead_E },
+ { "dead_i", XKB_KEY_dead_i },
+ { "dead_I", XKB_KEY_dead_I },
+ { "dead_o", XKB_KEY_dead_o },
+ { "dead_O", XKB_KEY_dead_O },
+ { "dead_u", XKB_KEY_dead_u },
+ { "dead_U", XKB_KEY_dead_U },
+ { "dead_small_schwa", XKB_KEY_dead_small_schwa },
+ { "dead_capital_schwa", XKB_KEY_dead_capital_schwa },
+ { "dead_greek", XKB_KEY_dead_greek },
+ { "ch", XKB_KEY_ch },
+ { "Ch", XKB_KEY_Ch },
+ { "CH", XKB_KEY_CH },
+ { "c_h", XKB_KEY_c_h },
+ { "C_h", XKB_KEY_C_h },
+ { "C_H", XKB_KEY_C_H },
+ { "First_Virtual_Screen", XKB_KEY_First_Virtual_Screen },
+ { "Prev_Virtual_Screen", XKB_KEY_Prev_Virtual_Screen },
+ { "Next_Virtual_Screen", XKB_KEY_Next_Virtual_Screen },
+ { "Last_Virtual_Screen", XKB_KEY_Last_Virtual_Screen },
+ { "Terminate_Server", XKB_KEY_Terminate_Server },
+ { "Pointer_Left", XKB_KEY_Pointer_Left },
+ { "Pointer_Right", XKB_KEY_Pointer_Right },
+ { "Pointer_Up", XKB_KEY_Pointer_Up },
+ { "Pointer_Down", XKB_KEY_Pointer_Down },
+ { "Pointer_UpLeft", XKB_KEY_Pointer_UpLeft },
+ { "Pointer_UpRight", XKB_KEY_Pointer_UpRight },
+ { "Pointer_DownLeft", XKB_KEY_Pointer_DownLeft },
+ { "Pointer_DownRight", XKB_KEY_Pointer_DownRight },
+ { "Pointer_Button_Dflt", XKB_KEY_Pointer_Button_Dflt },
+ { "Pointer_Button1", XKB_KEY_Pointer_Button1 },
+ { "Pointer_Button2", XKB_KEY_Pointer_Button2 },
+ { "Pointer_Button3", XKB_KEY_Pointer_Button3 },
+ { "Pointer_Button4", XKB_KEY_Pointer_Button4 },
+ { "Pointer_Button5", XKB_KEY_Pointer_Button5 },
+ { "Pointer_DblClick_Dflt", XKB_KEY_Pointer_DblClick_Dflt },
+ { "Pointer_DblClick1", XKB_KEY_Pointer_DblClick1 },
+ { "Pointer_DblClick2", XKB_KEY_Pointer_DblClick2 },
+ { "Pointer_DblClick3", XKB_KEY_Pointer_DblClick3 },
+ { "Pointer_DblClick4", XKB_KEY_Pointer_DblClick4 },
+ { "Pointer_DblClick5", XKB_KEY_Pointer_DblClick5 },
+ { "Pointer_Drag_Dflt", XKB_KEY_Pointer_Drag_Dflt },
+ { "Pointer_Drag1", XKB_KEY_Pointer_Drag1 },
+ { "Pointer_Drag2", XKB_KEY_Pointer_Drag2 },
+ { "Pointer_Drag3", XKB_KEY_Pointer_Drag3 },
+ { "Pointer_Drag4", XKB_KEY_Pointer_Drag4 },
+ { "Pointer_EnableKeys", XKB_KEY_Pointer_EnableKeys },
+ { "Pointer_Accelerate", XKB_KEY_Pointer_Accelerate },
+ { "Pointer_DfltBtnNext", XKB_KEY_Pointer_DfltBtnNext },
+ { "Pointer_DfltBtnPrev", XKB_KEY_Pointer_DfltBtnPrev },
+ { "Pointer_Drag5", XKB_KEY_Pointer_Drag5 },
+ { "BackSpace", XKB_KEY_BackSpace },
+ { "Tab", XKB_KEY_Tab },
+ { "Linefeed", XKB_KEY_Linefeed },
+ { "Clear", XKB_KEY_Clear },
+ { "Return", XKB_KEY_Return },
+ { "Pause", XKB_KEY_Pause },
+ { "Scroll_Lock", XKB_KEY_Scroll_Lock },
+ { "Sys_Req", XKB_KEY_Sys_Req },
+ { "Escape", XKB_KEY_Escape },
+ { "Multi_key", XKB_KEY_Multi_key },
+ { "Kanji", XKB_KEY_Kanji },
+ { "Muhenkan", XKB_KEY_Muhenkan },
+ { "Henkan_Mode", XKB_KEY_Henkan_Mode },
+ { "Romaji", XKB_KEY_Romaji },
+ { "Hiragana", XKB_KEY_Hiragana },
+ { "Katakana", XKB_KEY_Katakana },
+ { "Hiragana_Katakana", XKB_KEY_Hiragana_Katakana },
+ { "Zenkaku", XKB_KEY_Zenkaku },
+ { "Hankaku", XKB_KEY_Hankaku },
+ { "Zenkaku_Hankaku", XKB_KEY_Zenkaku_Hankaku },
+ { "Touroku", XKB_KEY_Touroku },
+ { "Massyo", XKB_KEY_Massyo },
+ { "Kana_Lock", XKB_KEY_Kana_Lock },
+ { "Kana_Shift", XKB_KEY_Kana_Shift },
+ { "Eisu_Shift", XKB_KEY_Eisu_Shift },
+ { "Eisu_toggle", XKB_KEY_Eisu_toggle },
+ { "Hangul", XKB_KEY_Hangul },
+ { "Hangul_Start", XKB_KEY_Hangul_Start },
+ { "Hangul_End", XKB_KEY_Hangul_End },
+ { "Hangul_Hanja", XKB_KEY_Hangul_Hanja },
+ { "Hangul_Jamo", XKB_KEY_Hangul_Jamo },
+ { "Hangul_Romaja", XKB_KEY_Hangul_Romaja },
+ { "Codeinput", XKB_KEY_Codeinput },
+ { "Hangul_Jeonja", XKB_KEY_Hangul_Jeonja },
+ { "Hangul_Banja", XKB_KEY_Hangul_Banja },
+ { "Hangul_PreHanja", XKB_KEY_Hangul_PreHanja },
+ { "Hangul_PostHanja", XKB_KEY_Hangul_PostHanja },
+ { "SingleCandidate", XKB_KEY_SingleCandidate },
+ { "MultipleCandidate", XKB_KEY_MultipleCandidate },
+ { "PreviousCandidate", XKB_KEY_PreviousCandidate },
+ { "Hangul_Special", XKB_KEY_Hangul_Special },
+ { "Home", XKB_KEY_Home },
+ { "Left", XKB_KEY_Left },
+ { "Up", XKB_KEY_Up },
+ { "Right", XKB_KEY_Right },
+ { "Down", XKB_KEY_Down },
+ { "Prior", XKB_KEY_Prior },
+ { "Next", XKB_KEY_Next },
+ { "End", XKB_KEY_End },
+ { "Begin", XKB_KEY_Begin },
+ { "Select", XKB_KEY_Select },
+ { "Print", XKB_KEY_Print },
+ { "Execute", XKB_KEY_Execute },
+ { "Insert", XKB_KEY_Insert },
+ { "Undo", XKB_KEY_Undo },
+ { "Redo", XKB_KEY_Redo },
+ { "Menu", XKB_KEY_Menu },
+ { "Find", XKB_KEY_Find },
+ { "Cancel", XKB_KEY_Cancel },
+ { "Help", XKB_KEY_Help },
+ { "Break", XKB_KEY_Break },
+ { "Mode_switch", XKB_KEY_Mode_switch },
+ { "Num_Lock", XKB_KEY_Num_Lock },
+ { "KP_Space", XKB_KEY_KP_Space },
+ { "KP_Tab", XKB_KEY_KP_Tab },
+ { "KP_Enter", XKB_KEY_KP_Enter },
+ { "KP_F1", XKB_KEY_KP_F1 },
+ { "KP_F2", XKB_KEY_KP_F2 },
+ { "KP_F3", XKB_KEY_KP_F3 },
+ { "KP_F4", XKB_KEY_KP_F4 },
+ { "KP_Home", XKB_KEY_KP_Home },
+ { "KP_Left", XKB_KEY_KP_Left },
+ { "KP_Up", XKB_KEY_KP_Up },
+ { "KP_Right", XKB_KEY_KP_Right },
+ { "KP_Down", XKB_KEY_KP_Down },
+ { "KP_Prior", XKB_KEY_KP_Prior },
+ { "KP_Next", XKB_KEY_KP_Next },
+ { "KP_End", XKB_KEY_KP_End },
+ { "KP_Begin", XKB_KEY_KP_Begin },
+ { "KP_Insert", XKB_KEY_KP_Insert },
+ { "KP_Delete", XKB_KEY_KP_Delete },
+ { "KP_Multiply", XKB_KEY_KP_Multiply },
+ { "KP_Add", XKB_KEY_KP_Add },
+ { "KP_Separator", XKB_KEY_KP_Separator },
+ { "KP_Subtract", XKB_KEY_KP_Subtract },
+ { "KP_Decimal", XKB_KEY_KP_Decimal },
+ { "KP_Divide", XKB_KEY_KP_Divide },
+ { "KP_0", XKB_KEY_KP_0 },
+ { "KP_1", XKB_KEY_KP_1 },
+ { "KP_2", XKB_KEY_KP_2 },
+ { "KP_3", XKB_KEY_KP_3 },
+ { "KP_4", XKB_KEY_KP_4 },
+ { "KP_5", XKB_KEY_KP_5 },
+ { "KP_6", XKB_KEY_KP_6 },
+ { "KP_7", XKB_KEY_KP_7 },
+ { "KP_8", XKB_KEY_KP_8 },
+ { "KP_9", XKB_KEY_KP_9 },
+ { "KP_Equal", XKB_KEY_KP_Equal },
+ { "F1", XKB_KEY_F1 },
+ { "F2", XKB_KEY_F2 },
+ { "F3", XKB_KEY_F3 },
+ { "F4", XKB_KEY_F4 },
+ { "F5", XKB_KEY_F5 },
+ { "F6", XKB_KEY_F6 },
+ { "F7", XKB_KEY_F7 },
+ { "F8", XKB_KEY_F8 },
+ { "F9", XKB_KEY_F9 },
+ { "F10", XKB_KEY_F10 },
+ { "F11", XKB_KEY_F11 },
+ { "F12", XKB_KEY_F12 },
+ { "F13", XKB_KEY_F13 },
+ { "F14", XKB_KEY_F14 },
+ { "F15", XKB_KEY_F15 },
+ { "F16", XKB_KEY_F16 },
+ { "F17", XKB_KEY_F17 },
+ { "F18", XKB_KEY_F18 },
+ { "F19", XKB_KEY_F19 },
+ { "F20", XKB_KEY_F20 },
+ { "F21", XKB_KEY_F21 },
+ { "F22", XKB_KEY_F22 },
+ { "F23", XKB_KEY_F23 },
+ { "F24", XKB_KEY_F24 },
+ { "F25", XKB_KEY_F25 },
+ { "F26", XKB_KEY_F26 },
+ { "F27", XKB_KEY_F27 },
+ { "F28", XKB_KEY_F28 },
+ { "F29", XKB_KEY_F29 },
+ { "F30", XKB_KEY_F30 },
+ { "F31", XKB_KEY_F31 },
+ { "F32", XKB_KEY_F32 },
+ { "F33", XKB_KEY_F33 },
+ { "F34", XKB_KEY_F34 },
+ { "F35", XKB_KEY_F35 },
+ { "Shift_L", XKB_KEY_Shift_L },
+ { "Shift_R", XKB_KEY_Shift_R },
+ { "Control_L", XKB_KEY_Control_L },
+ { "Control_R", XKB_KEY_Control_R },
+ { "Caps_Lock", XKB_KEY_Caps_Lock },
+ { "Shift_Lock", XKB_KEY_Shift_Lock },
+ { "Meta_L", XKB_KEY_Meta_L },
+ { "Meta_R", XKB_KEY_Meta_R },
+ { "Alt_L", XKB_KEY_Alt_L },
+ { "Alt_R", XKB_KEY_Alt_R },
+ { "Super_L", XKB_KEY_Super_L },
+ { "Super_R", XKB_KEY_Super_R },
+ { "Hyper_L", XKB_KEY_Hyper_L },
+ { "Hyper_R", XKB_KEY_Hyper_R },
+ { "braille_dot_1", XKB_KEY_braille_dot_1 },
+ { "braille_dot_2", XKB_KEY_braille_dot_2 },
+ { "braille_dot_3", XKB_KEY_braille_dot_3 },
+ { "braille_dot_4", XKB_KEY_braille_dot_4 },
+ { "braille_dot_5", XKB_KEY_braille_dot_5 },
+ { "braille_dot_6", XKB_KEY_braille_dot_6 },
+ { "braille_dot_7", XKB_KEY_braille_dot_7 },
+ { "braille_dot_8", XKB_KEY_braille_dot_8 },
+ { "braille_dot_9", XKB_KEY_braille_dot_9 },
+ { "braille_dot_10", XKB_KEY_braille_dot_10 },
+ { "Delete", XKB_KEY_Delete },
+ { "VoidSymbol", XKB_KEY_VoidSymbol },
+ { "Ibreve", XKB_KEY_Ibreve },
+ { "ibreve", XKB_KEY_ibreve },
+ { "Wcircumflex", XKB_KEY_Wcircumflex },
+ { "wcircumflex", XKB_KEY_wcircumflex },
+ { "Ycircumflex", XKB_KEY_Ycircumflex },
+ { "ycircumflex", XKB_KEY_ycircumflex },
+ { "SCHWA", XKB_KEY_SCHWA },
+ { "Obarred", XKB_KEY_Obarred },
+ { "Ohorn", XKB_KEY_Ohorn },
+ { "ohorn", XKB_KEY_ohorn },
+ { "Uhorn", XKB_KEY_Uhorn },
+ { "uhorn", XKB_KEY_uhorn },
+ { "Zstroke", XKB_KEY_Zstroke },
+ { "zstroke", XKB_KEY_zstroke },
+ { "EZH", XKB_KEY_EZH },
+ { "Ocaron", XKB_KEY_Ocaron },
+ { "ocaron", XKB_KEY_ocaron },
+ { "Gcaron", XKB_KEY_Gcaron },
+ { "gcaron", XKB_KEY_gcaron },
+ { "schwa", XKB_KEY_schwa },
+ { "obarred", XKB_KEY_obarred },
+ { "ezh", XKB_KEY_ezh },
+ { "Cyrillic_GHE_bar", XKB_KEY_Cyrillic_GHE_bar },
+ { "Cyrillic_ghe_bar", XKB_KEY_Cyrillic_ghe_bar },
+ { "Cyrillic_ZHE_descender", XKB_KEY_Cyrillic_ZHE_descender },
+ { "Cyrillic_zhe_descender", XKB_KEY_Cyrillic_zhe_descender },
+ { "Cyrillic_KA_descender", XKB_KEY_Cyrillic_KA_descender },
+ { "Cyrillic_ka_descender", XKB_KEY_Cyrillic_ka_descender },
+ { "Cyrillic_KA_vertstroke", XKB_KEY_Cyrillic_KA_vertstroke },
+ { "Cyrillic_ka_vertstroke", XKB_KEY_Cyrillic_ka_vertstroke },
+ { "Cyrillic_EN_descender", XKB_KEY_Cyrillic_EN_descender },
+ { "Cyrillic_en_descender", XKB_KEY_Cyrillic_en_descender },
+ { "Cyrillic_U_straight", XKB_KEY_Cyrillic_U_straight },
+ { "Cyrillic_u_straight", XKB_KEY_Cyrillic_u_straight },
+ { "Cyrillic_U_straight_bar", XKB_KEY_Cyrillic_U_straight_bar },
+ { "Cyrillic_u_straight_bar", XKB_KEY_Cyrillic_u_straight_bar },
+ { "Cyrillic_HA_descender", XKB_KEY_Cyrillic_HA_descender },
+ { "Cyrillic_ha_descender", XKB_KEY_Cyrillic_ha_descender },
+ { "Cyrillic_CHE_descender", XKB_KEY_Cyrillic_CHE_descender },
+ { "Cyrillic_che_descender", XKB_KEY_Cyrillic_che_descender },
+ { "Cyrillic_CHE_vertstroke", XKB_KEY_Cyrillic_CHE_vertstroke },
+ { "Cyrillic_che_vertstroke", XKB_KEY_Cyrillic_che_vertstroke },
+ { "Cyrillic_SHHA", XKB_KEY_Cyrillic_SHHA },
+ { "Cyrillic_shha", XKB_KEY_Cyrillic_shha },
+ { "Cyrillic_SCHWA", XKB_KEY_Cyrillic_SCHWA },
+ { "Cyrillic_schwa", XKB_KEY_Cyrillic_schwa },
+ { "Cyrillic_I_macron", XKB_KEY_Cyrillic_I_macron },
+ { "Cyrillic_i_macron", XKB_KEY_Cyrillic_i_macron },
+ { "Cyrillic_O_bar", XKB_KEY_Cyrillic_O_bar },
+ { "Cyrillic_o_bar", XKB_KEY_Cyrillic_o_bar },
+ { "Cyrillic_U_macron", XKB_KEY_Cyrillic_U_macron },
+ { "Cyrillic_u_macron", XKB_KEY_Cyrillic_u_macron },
+ { "Armenian_AYB", XKB_KEY_Armenian_AYB },
+ { "Armenian_BEN", XKB_KEY_Armenian_BEN },
+ { "Armenian_GIM", XKB_KEY_Armenian_GIM },
+ { "Armenian_DA", XKB_KEY_Armenian_DA },
+ { "Armenian_YECH", XKB_KEY_Armenian_YECH },
+ { "Armenian_ZA", XKB_KEY_Armenian_ZA },
+ { "Armenian_E", XKB_KEY_Armenian_E },
+ { "Armenian_AT", XKB_KEY_Armenian_AT },
+ { "Armenian_TO", XKB_KEY_Armenian_TO },
+ { "Armenian_ZHE", XKB_KEY_Armenian_ZHE },
+ { "Armenian_INI", XKB_KEY_Armenian_INI },
+ { "Armenian_LYUN", XKB_KEY_Armenian_LYUN },
+ { "Armenian_KHE", XKB_KEY_Armenian_KHE },
+ { "Armenian_TSA", XKB_KEY_Armenian_TSA },
+ { "Armenian_KEN", XKB_KEY_Armenian_KEN },
+ { "Armenian_HO", XKB_KEY_Armenian_HO },
+ { "Armenian_DZA", XKB_KEY_Armenian_DZA },
+ { "Armenian_GHAT", XKB_KEY_Armenian_GHAT },
+ { "Armenian_TCHE", XKB_KEY_Armenian_TCHE },
+ { "Armenian_MEN", XKB_KEY_Armenian_MEN },
+ { "Armenian_HI", XKB_KEY_Armenian_HI },
+ { "Armenian_NU", XKB_KEY_Armenian_NU },
+ { "Armenian_SHA", XKB_KEY_Armenian_SHA },
+ { "Armenian_VO", XKB_KEY_Armenian_VO },
+ { "Armenian_CHA", XKB_KEY_Armenian_CHA },
+ { "Armenian_PE", XKB_KEY_Armenian_PE },
+ { "Armenian_JE", XKB_KEY_Armenian_JE },
+ { "Armenian_RA", XKB_KEY_Armenian_RA },
+ { "Armenian_SE", XKB_KEY_Armenian_SE },
+ { "Armenian_VEV", XKB_KEY_Armenian_VEV },
+ { "Armenian_TYUN", XKB_KEY_Armenian_TYUN },
+ { "Armenian_RE", XKB_KEY_Armenian_RE },
+ { "Armenian_TSO", XKB_KEY_Armenian_TSO },
+ { "Armenian_VYUN", XKB_KEY_Armenian_VYUN },
+ { "Armenian_PYUR", XKB_KEY_Armenian_PYUR },
+ { "Armenian_KE", XKB_KEY_Armenian_KE },
+ { "Armenian_O", XKB_KEY_Armenian_O },
+ { "Armenian_FE", XKB_KEY_Armenian_FE },
+ { "Armenian_apostrophe", XKB_KEY_Armenian_apostrophe },
+ { "Armenian_accent", XKB_KEY_Armenian_accent },
+ { "Armenian_exclam", XKB_KEY_Armenian_exclam },
+ { "Armenian_separation_mark", XKB_KEY_Armenian_separation_mark },
+ { "Armenian_question", XKB_KEY_Armenian_question },
+ { "Armenian_ayb", XKB_KEY_Armenian_ayb },
+ { "Armenian_ben", XKB_KEY_Armenian_ben },
+ { "Armenian_gim", XKB_KEY_Armenian_gim },
+ { "Armenian_da", XKB_KEY_Armenian_da },
+ { "Armenian_yech", XKB_KEY_Armenian_yech },
+ { "Armenian_za", XKB_KEY_Armenian_za },
+ { "Armenian_e", XKB_KEY_Armenian_e },
+ { "Armenian_at", XKB_KEY_Armenian_at },
+ { "Armenian_to", XKB_KEY_Armenian_to },
+ { "Armenian_zhe", XKB_KEY_Armenian_zhe },
+ { "Armenian_ini", XKB_KEY_Armenian_ini },
+ { "Armenian_lyun", XKB_KEY_Armenian_lyun },
+ { "Armenian_khe", XKB_KEY_Armenian_khe },
+ { "Armenian_tsa", XKB_KEY_Armenian_tsa },
+ { "Armenian_ken", XKB_KEY_Armenian_ken },
+ { "Armenian_ho", XKB_KEY_Armenian_ho },
+ { "Armenian_dza", XKB_KEY_Armenian_dza },
+ { "Armenian_ghat", XKB_KEY_Armenian_ghat },
+ { "Armenian_tche", XKB_KEY_Armenian_tche },
+ { "Armenian_men", XKB_KEY_Armenian_men },
+ { "Armenian_hi", XKB_KEY_Armenian_hi },
+ { "Armenian_nu", XKB_KEY_Armenian_nu },
+ { "Armenian_sha", XKB_KEY_Armenian_sha },
+ { "Armenian_vo", XKB_KEY_Armenian_vo },
+ { "Armenian_cha", XKB_KEY_Armenian_cha },
+ { "Armenian_pe", XKB_KEY_Armenian_pe },
+ { "Armenian_je", XKB_KEY_Armenian_je },
+ { "Armenian_ra", XKB_KEY_Armenian_ra },
+ { "Armenian_se", XKB_KEY_Armenian_se },
+ { "Armenian_vev", XKB_KEY_Armenian_vev },
+ { "Armenian_tyun", XKB_KEY_Armenian_tyun },
+ { "Armenian_re", XKB_KEY_Armenian_re },
+ { "Armenian_tso", XKB_KEY_Armenian_tso },
+ { "Armenian_vyun", XKB_KEY_Armenian_vyun },
+ { "Armenian_pyur", XKB_KEY_Armenian_pyur },
+ { "Armenian_ke", XKB_KEY_Armenian_ke },
+ { "Armenian_o", XKB_KEY_Armenian_o },
+ { "Armenian_fe", XKB_KEY_Armenian_fe },
+ { "Armenian_ligature_ew", XKB_KEY_Armenian_ligature_ew },
+ { "Armenian_full_stop", XKB_KEY_Armenian_full_stop },
+ { "Armenian_hyphen", XKB_KEY_Armenian_hyphen },
+ { "Arabic_madda_above", XKB_KEY_Arabic_madda_above },
+ { "Arabic_hamza_above", XKB_KEY_Arabic_hamza_above },
+ { "Arabic_hamza_below", XKB_KEY_Arabic_hamza_below },
+ { "Arabic_0", XKB_KEY_Arabic_0 },
+ { "Arabic_1", XKB_KEY_Arabic_1 },
+ { "Arabic_2", XKB_KEY_Arabic_2 },
+ { "Arabic_3", XKB_KEY_Arabic_3 },
+ { "Arabic_4", XKB_KEY_Arabic_4 },
+ { "Arabic_5", XKB_KEY_Arabic_5 },
+ { "Arabic_6", XKB_KEY_Arabic_6 },
+ { "Arabic_7", XKB_KEY_Arabic_7 },
+ { "Arabic_8", XKB_KEY_Arabic_8 },
+ { "Arabic_9", XKB_KEY_Arabic_9 },
+ { "Arabic_percent", XKB_KEY_Arabic_percent },
+ { "Arabic_superscript_alef", XKB_KEY_Arabic_superscript_alef },
+ { "Arabic_tteh", XKB_KEY_Arabic_tteh },
+ { "Arabic_peh", XKB_KEY_Arabic_peh },
+ { "Arabic_tcheh", XKB_KEY_Arabic_tcheh },
+ { "Arabic_ddal", XKB_KEY_Arabic_ddal },
+ { "Arabic_rreh", XKB_KEY_Arabic_rreh },
+ { "Arabic_jeh", XKB_KEY_Arabic_jeh },
+ { "Arabic_veh", XKB_KEY_Arabic_veh },
+ { "Arabic_keheh", XKB_KEY_Arabic_keheh },
+ { "Arabic_gaf", XKB_KEY_Arabic_gaf },
+ { "Arabic_noon_ghunna", XKB_KEY_Arabic_noon_ghunna },
+ { "Arabic_heh_doachashmee", XKB_KEY_Arabic_heh_doachashmee },
+ { "Arabic_heh_goal", XKB_KEY_Arabic_heh_goal },
+ { "Farsi_yeh", XKB_KEY_Farsi_yeh },
+ { "Arabic_yeh_baree", XKB_KEY_Arabic_yeh_baree },
+ { "Arabic_fullstop", XKB_KEY_Arabic_fullstop },
+ { "Farsi_0", XKB_KEY_Farsi_0 },
+ { "Farsi_1", XKB_KEY_Farsi_1 },
+ { "Farsi_2", XKB_KEY_Farsi_2 },
+ { "Farsi_3", XKB_KEY_Farsi_3 },
+ { "Farsi_4", XKB_KEY_Farsi_4 },
+ { "Farsi_5", XKB_KEY_Farsi_5 },
+ { "Farsi_6", XKB_KEY_Farsi_6 },
+ { "Farsi_7", XKB_KEY_Farsi_7 },
+ { "Farsi_8", XKB_KEY_Farsi_8 },
+ { "Farsi_9", XKB_KEY_Farsi_9 },
+ { "Sinh_ng", XKB_KEY_Sinh_ng },
+ { "Sinh_h2", XKB_KEY_Sinh_h2 },
+ { "Sinh_a", XKB_KEY_Sinh_a },
+ { "Sinh_aa", XKB_KEY_Sinh_aa },
+ { "Sinh_ae", XKB_KEY_Sinh_ae },
+ { "Sinh_aee", XKB_KEY_Sinh_aee },
+ { "Sinh_i", XKB_KEY_Sinh_i },
+ { "Sinh_ii", XKB_KEY_Sinh_ii },
+ { "Sinh_u", XKB_KEY_Sinh_u },
+ { "Sinh_uu", XKB_KEY_Sinh_uu },
+ { "Sinh_ri", XKB_KEY_Sinh_ri },
+ { "Sinh_rii", XKB_KEY_Sinh_rii },
+ { "Sinh_lu", XKB_KEY_Sinh_lu },
+ { "Sinh_luu", XKB_KEY_Sinh_luu },
+ { "Sinh_e", XKB_KEY_Sinh_e },
+ { "Sinh_ee", XKB_KEY_Sinh_ee },
+ { "Sinh_ai", XKB_KEY_Sinh_ai },
+ { "Sinh_o", XKB_KEY_Sinh_o },
+ { "Sinh_oo", XKB_KEY_Sinh_oo },
+ { "Sinh_au", XKB_KEY_Sinh_au },
+ { "Sinh_ka", XKB_KEY_Sinh_ka },
+ { "Sinh_kha", XKB_KEY_Sinh_kha },
+ { "Sinh_ga", XKB_KEY_Sinh_ga },
+ { "Sinh_gha", XKB_KEY_Sinh_gha },
+ { "Sinh_ng2", XKB_KEY_Sinh_ng2 },
+ { "Sinh_nga", XKB_KEY_Sinh_nga },
+ { "Sinh_ca", XKB_KEY_Sinh_ca },
+ { "Sinh_cha", XKB_KEY_Sinh_cha },
+ { "Sinh_ja", XKB_KEY_Sinh_ja },
+ { "Sinh_jha", XKB_KEY_Sinh_jha },
+ { "Sinh_nya", XKB_KEY_Sinh_nya },
+ { "Sinh_jnya", XKB_KEY_Sinh_jnya },
+ { "Sinh_nja", XKB_KEY_Sinh_nja },
+ { "Sinh_tta", XKB_KEY_Sinh_tta },
+ { "Sinh_ttha", XKB_KEY_Sinh_ttha },
+ { "Sinh_dda", XKB_KEY_Sinh_dda },
+ { "Sinh_ddha", XKB_KEY_Sinh_ddha },
+ { "Sinh_nna", XKB_KEY_Sinh_nna },
+ { "Sinh_ndda", XKB_KEY_Sinh_ndda },
+ { "Sinh_tha", XKB_KEY_Sinh_tha },
+ { "Sinh_thha", XKB_KEY_Sinh_thha },
+ { "Sinh_dha", XKB_KEY_Sinh_dha },
+ { "Sinh_dhha", XKB_KEY_Sinh_dhha },
+ { "Sinh_na", XKB_KEY_Sinh_na },
+ { "Sinh_ndha", XKB_KEY_Sinh_ndha },
+ { "Sinh_pa", XKB_KEY_Sinh_pa },
+ { "Sinh_pha", XKB_KEY_Sinh_pha },
+ { "Sinh_ba", XKB_KEY_Sinh_ba },
+ { "Sinh_bha", XKB_KEY_Sinh_bha },
+ { "Sinh_ma", XKB_KEY_Sinh_ma },
+ { "Sinh_mba", XKB_KEY_Sinh_mba },
+ { "Sinh_ya", XKB_KEY_Sinh_ya },
+ { "Sinh_ra", XKB_KEY_Sinh_ra },
+ { "Sinh_la", XKB_KEY_Sinh_la },
+ { "Sinh_va", XKB_KEY_Sinh_va },
+ { "Sinh_sha", XKB_KEY_Sinh_sha },
+ { "Sinh_ssha", XKB_KEY_Sinh_ssha },
+ { "Sinh_sa", XKB_KEY_Sinh_sa },
+ { "Sinh_ha", XKB_KEY_Sinh_ha },
+ { "Sinh_lla", XKB_KEY_Sinh_lla },
+ { "Sinh_fa", XKB_KEY_Sinh_fa },
+ { "Sinh_al", XKB_KEY_Sinh_al },
+ { "Sinh_aa2", XKB_KEY_Sinh_aa2 },
+ { "Sinh_ae2", XKB_KEY_Sinh_ae2 },
+ { "Sinh_aee2", XKB_KEY_Sinh_aee2 },
+ { "Sinh_i2", XKB_KEY_Sinh_i2 },
+ { "Sinh_ii2", XKB_KEY_Sinh_ii2 },
+ { "Sinh_u2", XKB_KEY_Sinh_u2 },
+ { "Sinh_uu2", XKB_KEY_Sinh_uu2 },
+ { "Sinh_ru2", XKB_KEY_Sinh_ru2 },
+ { "Sinh_e2", XKB_KEY_Sinh_e2 },
+ { "Sinh_ee2", XKB_KEY_Sinh_ee2 },
+ { "Sinh_ai2", XKB_KEY_Sinh_ai2 },
+ { "Sinh_o2", XKB_KEY_Sinh_o2 },
+ { "Sinh_oo2", XKB_KEY_Sinh_oo2 },
+ { "Sinh_au2", XKB_KEY_Sinh_au2 },
+ { "Sinh_lu2", XKB_KEY_Sinh_lu2 },
+ { "Sinh_ruu2", XKB_KEY_Sinh_ruu2 },
+ { "Sinh_luu2", XKB_KEY_Sinh_luu2 },
+ { "Sinh_kunddaliya", XKB_KEY_Sinh_kunddaliya },
+ { "Georgian_an", XKB_KEY_Georgian_an },
+ { "Georgian_ban", XKB_KEY_Georgian_ban },
+ { "Georgian_gan", XKB_KEY_Georgian_gan },
+ { "Georgian_don", XKB_KEY_Georgian_don },
+ { "Georgian_en", XKB_KEY_Georgian_en },
+ { "Georgian_vin", XKB_KEY_Georgian_vin },
+ { "Georgian_zen", XKB_KEY_Georgian_zen },
+ { "Georgian_tan", XKB_KEY_Georgian_tan },
+ { "Georgian_in", XKB_KEY_Georgian_in },
+ { "Georgian_kan", XKB_KEY_Georgian_kan },
+ { "Georgian_las", XKB_KEY_Georgian_las },
+ { "Georgian_man", XKB_KEY_Georgian_man },
+ { "Georgian_nar", XKB_KEY_Georgian_nar },
+ { "Georgian_on", XKB_KEY_Georgian_on },
+ { "Georgian_par", XKB_KEY_Georgian_par },
+ { "Georgian_zhar", XKB_KEY_Georgian_zhar },
+ { "Georgian_rae", XKB_KEY_Georgian_rae },
+ { "Georgian_san", XKB_KEY_Georgian_san },
+ { "Georgian_tar", XKB_KEY_Georgian_tar },
+ { "Georgian_un", XKB_KEY_Georgian_un },
+ { "Georgian_phar", XKB_KEY_Georgian_phar },
+ { "Georgian_khar", XKB_KEY_Georgian_khar },
+ { "Georgian_ghan", XKB_KEY_Georgian_ghan },
+ { "Georgian_qar", XKB_KEY_Georgian_qar },
+ { "Georgian_shin", XKB_KEY_Georgian_shin },
+ { "Georgian_chin", XKB_KEY_Georgian_chin },
+ { "Georgian_can", XKB_KEY_Georgian_can },
+ { "Georgian_jil", XKB_KEY_Georgian_jil },
+ { "Georgian_cil", XKB_KEY_Georgian_cil },
+ { "Georgian_char", XKB_KEY_Georgian_char },
+ { "Georgian_xan", XKB_KEY_Georgian_xan },
+ { "Georgian_jhan", XKB_KEY_Georgian_jhan },
+ { "Georgian_hae", XKB_KEY_Georgian_hae },
+ { "Georgian_he", XKB_KEY_Georgian_he },
+ { "Georgian_hie", XKB_KEY_Georgian_hie },
+ { "Georgian_we", XKB_KEY_Georgian_we },
+ { "Georgian_har", XKB_KEY_Georgian_har },
+ { "Georgian_hoe", XKB_KEY_Georgian_hoe },
+ { "Georgian_fi", XKB_KEY_Georgian_fi },
+ { "Babovedot", XKB_KEY_Babovedot },
+ { "babovedot", XKB_KEY_babovedot },
+ { "Dabovedot", XKB_KEY_Dabovedot },
+ { "dabovedot", XKB_KEY_dabovedot },
+ { "Fabovedot", XKB_KEY_Fabovedot },
+ { "fabovedot", XKB_KEY_fabovedot },
+ { "Lbelowdot", XKB_KEY_Lbelowdot },
+ { "lbelowdot", XKB_KEY_lbelowdot },
+ { "Mabovedot", XKB_KEY_Mabovedot },
+ { "mabovedot", XKB_KEY_mabovedot },
+ { "Pabovedot", XKB_KEY_Pabovedot },
+ { "pabovedot", XKB_KEY_pabovedot },
+ { "Sabovedot", XKB_KEY_Sabovedot },
+ { "sabovedot", XKB_KEY_sabovedot },
+ { "Tabovedot", XKB_KEY_Tabovedot },
+ { "tabovedot", XKB_KEY_tabovedot },
+ { "Wgrave", XKB_KEY_Wgrave },
+ { "wgrave", XKB_KEY_wgrave },
+ { "Wacute", XKB_KEY_Wacute },
+ { "wacute", XKB_KEY_wacute },
+ { "Wdiaeresis", XKB_KEY_Wdiaeresis },
+ { "wdiaeresis", XKB_KEY_wdiaeresis },
+ { "Xabovedot", XKB_KEY_Xabovedot },
+ { "xabovedot", XKB_KEY_xabovedot },
+ { "Abelowdot", XKB_KEY_Abelowdot },
+ { "abelowdot", XKB_KEY_abelowdot },
+ { "Ahook", XKB_KEY_Ahook },
+ { "ahook", XKB_KEY_ahook },
+ { "Acircumflexacute", XKB_KEY_Acircumflexacute },
+ { "acircumflexacute", XKB_KEY_acircumflexacute },
+ { "Acircumflexgrave", XKB_KEY_Acircumflexgrave },
+ { "acircumflexgrave", XKB_KEY_acircumflexgrave },
+ { "Acircumflexhook", XKB_KEY_Acircumflexhook },
+ { "acircumflexhook", XKB_KEY_acircumflexhook },
+ { "Acircumflextilde", XKB_KEY_Acircumflextilde },
+ { "acircumflextilde", XKB_KEY_acircumflextilde },
+ { "Acircumflexbelowdot", XKB_KEY_Acircumflexbelowdot },
+ { "acircumflexbelowdot", XKB_KEY_acircumflexbelowdot },
+ { "Abreveacute", XKB_KEY_Abreveacute },
+ { "abreveacute", XKB_KEY_abreveacute },
+ { "Abrevegrave", XKB_KEY_Abrevegrave },
+ { "abrevegrave", XKB_KEY_abrevegrave },
+ { "Abrevehook", XKB_KEY_Abrevehook },
+ { "abrevehook", XKB_KEY_abrevehook },
+ { "Abrevetilde", XKB_KEY_Abrevetilde },
+ { "abrevetilde", XKB_KEY_abrevetilde },
+ { "Abrevebelowdot", XKB_KEY_Abrevebelowdot },
+ { "abrevebelowdot", XKB_KEY_abrevebelowdot },
+ { "Ebelowdot", XKB_KEY_Ebelowdot },
+ { "ebelowdot", XKB_KEY_ebelowdot },
+ { "Ehook", XKB_KEY_Ehook },
+ { "ehook", XKB_KEY_ehook },
+ { "Etilde", XKB_KEY_Etilde },
+ { "etilde", XKB_KEY_etilde },
+ { "Ecircumflexacute", XKB_KEY_Ecircumflexacute },
+ { "ecircumflexacute", XKB_KEY_ecircumflexacute },
+ { "Ecircumflexgrave", XKB_KEY_Ecircumflexgrave },
+ { "ecircumflexgrave", XKB_KEY_ecircumflexgrave },
+ { "Ecircumflexhook", XKB_KEY_Ecircumflexhook },
+ { "ecircumflexhook", XKB_KEY_ecircumflexhook },
+ { "Ecircumflextilde", XKB_KEY_Ecircumflextilde },
+ { "ecircumflextilde", XKB_KEY_ecircumflextilde },
+ { "Ecircumflexbelowdot", XKB_KEY_Ecircumflexbelowdot },
+ { "ecircumflexbelowdot", XKB_KEY_ecircumflexbelowdot },
+ { "Ihook", XKB_KEY_Ihook },
+ { "ihook", XKB_KEY_ihook },
+ { "Ibelowdot", XKB_KEY_Ibelowdot },
+ { "ibelowdot", XKB_KEY_ibelowdot },
+ { "Obelowdot", XKB_KEY_Obelowdot },
+ { "obelowdot", XKB_KEY_obelowdot },
+ { "Ohook", XKB_KEY_Ohook },
+ { "ohook", XKB_KEY_ohook },
+ { "Ocircumflexacute", XKB_KEY_Ocircumflexacute },
+ { "ocircumflexacute", XKB_KEY_ocircumflexacute },
+ { "Ocircumflexgrave", XKB_KEY_Ocircumflexgrave },
+ { "ocircumflexgrave", XKB_KEY_ocircumflexgrave },
+ { "Ocircumflexhook", XKB_KEY_Ocircumflexhook },
+ { "ocircumflexhook", XKB_KEY_ocircumflexhook },
+ { "Ocircumflextilde", XKB_KEY_Ocircumflextilde },
+ { "ocircumflextilde", XKB_KEY_ocircumflextilde },
+ { "Ocircumflexbelowdot", XKB_KEY_Ocircumflexbelowdot },
+ { "ocircumflexbelowdot", XKB_KEY_ocircumflexbelowdot },
+ { "Ohornacute", XKB_KEY_Ohornacute },
+ { "ohornacute", XKB_KEY_ohornacute },
+ { "Ohorngrave", XKB_KEY_Ohorngrave },
+ { "ohorngrave", XKB_KEY_ohorngrave },
+ { "Ohornhook", XKB_KEY_Ohornhook },
+ { "ohornhook", XKB_KEY_ohornhook },
+ { "Ohorntilde", XKB_KEY_Ohorntilde },
+ { "ohorntilde", XKB_KEY_ohorntilde },
+ { "Ohornbelowdot", XKB_KEY_Ohornbelowdot },
+ { "ohornbelowdot", XKB_KEY_ohornbelowdot },
+ { "Ubelowdot", XKB_KEY_Ubelowdot },
+ { "ubelowdot", XKB_KEY_ubelowdot },
+ { "Uhook", XKB_KEY_Uhook },
+ { "uhook", XKB_KEY_uhook },
+ { "Uhornacute", XKB_KEY_Uhornacute },
+ { "uhornacute", XKB_KEY_uhornacute },
+ { "Uhorngrave", XKB_KEY_Uhorngrave },
+ { "uhorngrave", XKB_KEY_uhorngrave },
+ { "Uhornhook", XKB_KEY_Uhornhook },
+ { "uhornhook", XKB_KEY_uhornhook },
+ { "Uhorntilde", XKB_KEY_Uhorntilde },
+ { "uhorntilde", XKB_KEY_uhorntilde },
+ { "Uhornbelowdot", XKB_KEY_Uhornbelowdot },
+ { "uhornbelowdot", XKB_KEY_uhornbelowdot },
+ { "Ygrave", XKB_KEY_Ygrave },
+ { "ygrave", XKB_KEY_ygrave },
+ { "Ybelowdot", XKB_KEY_Ybelowdot },
+ { "ybelowdot", XKB_KEY_ybelowdot },
+ { "Yhook", XKB_KEY_Yhook },
+ { "yhook", XKB_KEY_yhook },
+ { "Ytilde", XKB_KEY_Ytilde },
+ { "ytilde", XKB_KEY_ytilde },
+ { "zerosuperior", XKB_KEY_zerosuperior },
+ { "foursuperior", XKB_KEY_foursuperior },
+ { "fivesuperior", XKB_KEY_fivesuperior },
+ { "sixsuperior", XKB_KEY_sixsuperior },
+ { "sevensuperior", XKB_KEY_sevensuperior },
+ { "eightsuperior", XKB_KEY_eightsuperior },
+ { "ninesuperior", XKB_KEY_ninesuperior },
+ { "zerosubscript", XKB_KEY_zerosubscript },
+ { "onesubscript", XKB_KEY_onesubscript },
+ { "twosubscript", XKB_KEY_twosubscript },
+ { "threesubscript", XKB_KEY_threesubscript },
+ { "foursubscript", XKB_KEY_foursubscript },
+ { "fivesubscript", XKB_KEY_fivesubscript },
+ { "sixsubscript", XKB_KEY_sixsubscript },
+ { "sevensubscript", XKB_KEY_sevensubscript },
+ { "eightsubscript", XKB_KEY_eightsubscript },
+ { "ninesubscript", XKB_KEY_ninesubscript },
+ { "EcuSign", XKB_KEY_EcuSign },
+ { "ColonSign", XKB_KEY_ColonSign },
+ { "CruzeiroSign", XKB_KEY_CruzeiroSign },
+ { "FFrancSign", XKB_KEY_FFrancSign },
+ { "LiraSign", XKB_KEY_LiraSign },
+ { "MillSign", XKB_KEY_MillSign },
+ { "NairaSign", XKB_KEY_NairaSign },
+ { "PesetaSign", XKB_KEY_PesetaSign },
+ { "RupeeSign", XKB_KEY_RupeeSign },
+ { "WonSign", XKB_KEY_WonSign },
+ { "NewSheqelSign", XKB_KEY_NewSheqelSign },
+ { "DongSign", XKB_KEY_DongSign },
+ { "partdifferential", XKB_KEY_partdifferential },
+ { "emptyset", XKB_KEY_emptyset },
+ { "elementof", XKB_KEY_elementof },
+ { "notelementof", XKB_KEY_notelementof },
+ { "containsas", XKB_KEY_containsas },
+ { "squareroot", XKB_KEY_squareroot },
+ { "cuberoot", XKB_KEY_cuberoot },
+ { "fourthroot", XKB_KEY_fourthroot },
+ { "dintegral", XKB_KEY_dintegral },
+ { "tintegral", XKB_KEY_tintegral },
+ { "because", XKB_KEY_because },
+ { "notapproxeq", XKB_KEY_notapproxeq },
+ { "approxeq", XKB_KEY_approxeq },
+ { "notidentical", XKB_KEY_notidentical },
+ { "stricteq", XKB_KEY_stricteq },
+ { "braille_blank", XKB_KEY_braille_blank },
+ { "braille_dots_1", XKB_KEY_braille_dots_1 },
+ { "braille_dots_2", XKB_KEY_braille_dots_2 },
+ { "braille_dots_12", XKB_KEY_braille_dots_12 },
+ { "braille_dots_3", XKB_KEY_braille_dots_3 },
+ { "braille_dots_13", XKB_KEY_braille_dots_13 },
+ { "braille_dots_23", XKB_KEY_braille_dots_23 },
+ { "braille_dots_123", XKB_KEY_braille_dots_123 },
+ { "braille_dots_4", XKB_KEY_braille_dots_4 },
+ { "braille_dots_14", XKB_KEY_braille_dots_14 },
+ { "braille_dots_24", XKB_KEY_braille_dots_24 },
+ { "braille_dots_124", XKB_KEY_braille_dots_124 },
+ { "braille_dots_34", XKB_KEY_braille_dots_34 },
+ { "braille_dots_134", XKB_KEY_braille_dots_134 },
+ { "braille_dots_234", XKB_KEY_braille_dots_234 },
+ { "braille_dots_1234", XKB_KEY_braille_dots_1234 },
+ { "braille_dots_5", XKB_KEY_braille_dots_5 },
+ { "braille_dots_15", XKB_KEY_braille_dots_15 },
+ { "braille_dots_25", XKB_KEY_braille_dots_25 },
+ { "braille_dots_125", XKB_KEY_braille_dots_125 },
+ { "braille_dots_35", XKB_KEY_braille_dots_35 },
+ { "braille_dots_135", XKB_KEY_braille_dots_135 },
+ { "braille_dots_235", XKB_KEY_braille_dots_235 },
+ { "braille_dots_1235", XKB_KEY_braille_dots_1235 },
+ { "braille_dots_45", XKB_KEY_braille_dots_45 },
+ { "braille_dots_145", XKB_KEY_braille_dots_145 },
+ { "braille_dots_245", XKB_KEY_braille_dots_245 },
+ { "braille_dots_1245", XKB_KEY_braille_dots_1245 },
+ { "braille_dots_345", XKB_KEY_braille_dots_345 },
+ { "braille_dots_1345", XKB_KEY_braille_dots_1345 },
+ { "braille_dots_2345", XKB_KEY_braille_dots_2345 },
+ { "braille_dots_12345", XKB_KEY_braille_dots_12345 },
+ { "braille_dots_6", XKB_KEY_braille_dots_6 },
+ { "braille_dots_16", XKB_KEY_braille_dots_16 },
+ { "braille_dots_26", XKB_KEY_braille_dots_26 },
+ { "braille_dots_126", XKB_KEY_braille_dots_126 },
+ { "braille_dots_36", XKB_KEY_braille_dots_36 },
+ { "braille_dots_136", XKB_KEY_braille_dots_136 },
+ { "braille_dots_236", XKB_KEY_braille_dots_236 },
+ { "braille_dots_1236", XKB_KEY_braille_dots_1236 },
+ { "braille_dots_46", XKB_KEY_braille_dots_46 },
+ { "braille_dots_146", XKB_KEY_braille_dots_146 },
+ { "braille_dots_246", XKB_KEY_braille_dots_246 },
+ { "braille_dots_1246", XKB_KEY_braille_dots_1246 },
+ { "braille_dots_346", XKB_KEY_braille_dots_346 },
+ { "braille_dots_1346", XKB_KEY_braille_dots_1346 },
+ { "braille_dots_2346", XKB_KEY_braille_dots_2346 },
+ { "braille_dots_12346", XKB_KEY_braille_dots_12346 },
+ { "braille_dots_56", XKB_KEY_braille_dots_56 },
+ { "braille_dots_156", XKB_KEY_braille_dots_156 },
+ { "braille_dots_256", XKB_KEY_braille_dots_256 },
+ { "braille_dots_1256", XKB_KEY_braille_dots_1256 },
+ { "braille_dots_356", XKB_KEY_braille_dots_356 },
+ { "braille_dots_1356", XKB_KEY_braille_dots_1356 },
+ { "braille_dots_2356", XKB_KEY_braille_dots_2356 },
+ { "braille_dots_12356", XKB_KEY_braille_dots_12356 },
+ { "braille_dots_456", XKB_KEY_braille_dots_456 },
+ { "braille_dots_1456", XKB_KEY_braille_dots_1456 },
+ { "braille_dots_2456", XKB_KEY_braille_dots_2456 },
+ { "braille_dots_12456", XKB_KEY_braille_dots_12456 },
+ { "braille_dots_3456", XKB_KEY_braille_dots_3456 },
+ { "braille_dots_13456", XKB_KEY_braille_dots_13456 },
+ { "braille_dots_23456", XKB_KEY_braille_dots_23456 },
+ { "braille_dots_123456", XKB_KEY_braille_dots_123456 },
+ { "braille_dots_7", XKB_KEY_braille_dots_7 },
+ { "braille_dots_17", XKB_KEY_braille_dots_17 },
+ { "braille_dots_27", XKB_KEY_braille_dots_27 },
+ { "braille_dots_127", XKB_KEY_braille_dots_127 },
+ { "braille_dots_37", XKB_KEY_braille_dots_37 },
+ { "braille_dots_137", XKB_KEY_braille_dots_137 },
+ { "braille_dots_237", XKB_KEY_braille_dots_237 },
+ { "braille_dots_1237", XKB_KEY_braille_dots_1237 },
+ { "braille_dots_47", XKB_KEY_braille_dots_47 },
+ { "braille_dots_147", XKB_KEY_braille_dots_147 },
+ { "braille_dots_247", XKB_KEY_braille_dots_247 },
+ { "braille_dots_1247", XKB_KEY_braille_dots_1247 },
+ { "braille_dots_347", XKB_KEY_braille_dots_347 },
+ { "braille_dots_1347", XKB_KEY_braille_dots_1347 },
+ { "braille_dots_2347", XKB_KEY_braille_dots_2347 },
+ { "braille_dots_12347", XKB_KEY_braille_dots_12347 },
+ { "braille_dots_57", XKB_KEY_braille_dots_57 },
+ { "braille_dots_157", XKB_KEY_braille_dots_157 },
+ { "braille_dots_257", XKB_KEY_braille_dots_257 },
+ { "braille_dots_1257", XKB_KEY_braille_dots_1257 },
+ { "braille_dots_357", XKB_KEY_braille_dots_357 },
+ { "braille_dots_1357", XKB_KEY_braille_dots_1357 },
+ { "braille_dots_2357", XKB_KEY_braille_dots_2357 },
+ { "braille_dots_12357", XKB_KEY_braille_dots_12357 },
+ { "braille_dots_457", XKB_KEY_braille_dots_457 },
+ { "braille_dots_1457", XKB_KEY_braille_dots_1457 },
+ { "braille_dots_2457", XKB_KEY_braille_dots_2457 },
+ { "braille_dots_12457", XKB_KEY_braille_dots_12457 },
+ { "braille_dots_3457", XKB_KEY_braille_dots_3457 },
+ { "braille_dots_13457", XKB_KEY_braille_dots_13457 },
+ { "braille_dots_23457", XKB_KEY_braille_dots_23457 },
+ { "braille_dots_123457", XKB_KEY_braille_dots_123457 },
+ { "braille_dots_67", XKB_KEY_braille_dots_67 },
+ { "braille_dots_167", XKB_KEY_braille_dots_167 },
+ { "braille_dots_267", XKB_KEY_braille_dots_267 },
+ { "braille_dots_1267", XKB_KEY_braille_dots_1267 },
+ { "braille_dots_367", XKB_KEY_braille_dots_367 },
+ { "braille_dots_1367", XKB_KEY_braille_dots_1367 },
+ { "braille_dots_2367", XKB_KEY_braille_dots_2367 },
+ { "braille_dots_12367", XKB_KEY_braille_dots_12367 },
+ { "braille_dots_467", XKB_KEY_braille_dots_467 },
+ { "braille_dots_1467", XKB_KEY_braille_dots_1467 },
+ { "braille_dots_2467", XKB_KEY_braille_dots_2467 },
+ { "braille_dots_12467", XKB_KEY_braille_dots_12467 },
+ { "braille_dots_3467", XKB_KEY_braille_dots_3467 },
+ { "braille_dots_13467", XKB_KEY_braille_dots_13467 },
+ { "braille_dots_23467", XKB_KEY_braille_dots_23467 },
+ { "braille_dots_123467", XKB_KEY_braille_dots_123467 },
+ { "braille_dots_567", XKB_KEY_braille_dots_567 },
+ { "braille_dots_1567", XKB_KEY_braille_dots_1567 },
+ { "braille_dots_2567", XKB_KEY_braille_dots_2567 },
+ { "braille_dots_12567", XKB_KEY_braille_dots_12567 },
+ { "braille_dots_3567", XKB_KEY_braille_dots_3567 },
+ { "braille_dots_13567", XKB_KEY_braille_dots_13567 },
+ { "braille_dots_23567", XKB_KEY_braille_dots_23567 },
+ { "braille_dots_123567", XKB_KEY_braille_dots_123567 },
+ { "braille_dots_4567", XKB_KEY_braille_dots_4567 },
+ { "braille_dots_14567", XKB_KEY_braille_dots_14567 },
+ { "braille_dots_24567", XKB_KEY_braille_dots_24567 },
+ { "braille_dots_124567", XKB_KEY_braille_dots_124567 },
+ { "braille_dots_34567", XKB_KEY_braille_dots_34567 },
+ { "braille_dots_134567", XKB_KEY_braille_dots_134567 },
+ { "braille_dots_234567", XKB_KEY_braille_dots_234567 },
+ { "braille_dots_1234567", XKB_KEY_braille_dots_1234567 },
+ { "braille_dots_8", XKB_KEY_braille_dots_8 },
+ { "braille_dots_18", XKB_KEY_braille_dots_18 },
+ { "braille_dots_28", XKB_KEY_braille_dots_28 },
+ { "braille_dots_128", XKB_KEY_braille_dots_128 },
+ { "braille_dots_38", XKB_KEY_braille_dots_38 },
+ { "braille_dots_138", XKB_KEY_braille_dots_138 },
+ { "braille_dots_238", XKB_KEY_braille_dots_238 },
+ { "braille_dots_1238", XKB_KEY_braille_dots_1238 },
+ { "braille_dots_48", XKB_KEY_braille_dots_48 },
+ { "braille_dots_148", XKB_KEY_braille_dots_148 },
+ { "braille_dots_248", XKB_KEY_braille_dots_248 },
+ { "braille_dots_1248", XKB_KEY_braille_dots_1248 },
+ { "braille_dots_348", XKB_KEY_braille_dots_348 },
+ { "braille_dots_1348", XKB_KEY_braille_dots_1348 },
+ { "braille_dots_2348", XKB_KEY_braille_dots_2348 },
+ { "braille_dots_12348", XKB_KEY_braille_dots_12348 },
+ { "braille_dots_58", XKB_KEY_braille_dots_58 },
+ { "braille_dots_158", XKB_KEY_braille_dots_158 },
+ { "braille_dots_258", XKB_KEY_braille_dots_258 },
+ { "braille_dots_1258", XKB_KEY_braille_dots_1258 },
+ { "braille_dots_358", XKB_KEY_braille_dots_358 },
+ { "braille_dots_1358", XKB_KEY_braille_dots_1358 },
+ { "braille_dots_2358", XKB_KEY_braille_dots_2358 },
+ { "braille_dots_12358", XKB_KEY_braille_dots_12358 },
+ { "braille_dots_458", XKB_KEY_braille_dots_458 },
+ { "braille_dots_1458", XKB_KEY_braille_dots_1458 },
+ { "braille_dots_2458", XKB_KEY_braille_dots_2458 },
+ { "braille_dots_12458", XKB_KEY_braille_dots_12458 },
+ { "braille_dots_3458", XKB_KEY_braille_dots_3458 },
+ { "braille_dots_13458", XKB_KEY_braille_dots_13458 },
+ { "braille_dots_23458", XKB_KEY_braille_dots_23458 },
+ { "braille_dots_123458", XKB_KEY_braille_dots_123458 },
+ { "braille_dots_68", XKB_KEY_braille_dots_68 },
+ { "braille_dots_168", XKB_KEY_braille_dots_168 },
+ { "braille_dots_268", XKB_KEY_braille_dots_268 },
+ { "braille_dots_1268", XKB_KEY_braille_dots_1268 },
+ { "braille_dots_368", XKB_KEY_braille_dots_368 },
+ { "braille_dots_1368", XKB_KEY_braille_dots_1368 },
+ { "braille_dots_2368", XKB_KEY_braille_dots_2368 },
+ { "braille_dots_12368", XKB_KEY_braille_dots_12368 },
+ { "braille_dots_468", XKB_KEY_braille_dots_468 },
+ { "braille_dots_1468", XKB_KEY_braille_dots_1468 },
+ { "braille_dots_2468", XKB_KEY_braille_dots_2468 },
+ { "braille_dots_12468", XKB_KEY_braille_dots_12468 },
+ { "braille_dots_3468", XKB_KEY_braille_dots_3468 },
+ { "braille_dots_13468", XKB_KEY_braille_dots_13468 },
+ { "braille_dots_23468", XKB_KEY_braille_dots_23468 },
+ { "braille_dots_123468", XKB_KEY_braille_dots_123468 },
+ { "braille_dots_568", XKB_KEY_braille_dots_568 },
+ { "braille_dots_1568", XKB_KEY_braille_dots_1568 },
+ { "braille_dots_2568", XKB_KEY_braille_dots_2568 },
+ { "braille_dots_12568", XKB_KEY_braille_dots_12568 },
+ { "braille_dots_3568", XKB_KEY_braille_dots_3568 },
+ { "braille_dots_13568", XKB_KEY_braille_dots_13568 },
+ { "braille_dots_23568", XKB_KEY_braille_dots_23568 },
+ { "braille_dots_123568", XKB_KEY_braille_dots_123568 },
+ { "braille_dots_4568", XKB_KEY_braille_dots_4568 },
+ { "braille_dots_14568", XKB_KEY_braille_dots_14568 },
+ { "braille_dots_24568", XKB_KEY_braille_dots_24568 },
+ { "braille_dots_124568", XKB_KEY_braille_dots_124568 },
+ { "braille_dots_34568", XKB_KEY_braille_dots_34568 },
+ { "braille_dots_134568", XKB_KEY_braille_dots_134568 },
+ { "braille_dots_234568", XKB_KEY_braille_dots_234568 },
+ { "braille_dots_1234568", XKB_KEY_braille_dots_1234568 },
+ { "braille_dots_78", XKB_KEY_braille_dots_78 },
+ { "braille_dots_178", XKB_KEY_braille_dots_178 },
+ { "braille_dots_278", XKB_KEY_braille_dots_278 },
+ { "braille_dots_1278", XKB_KEY_braille_dots_1278 },
+ { "braille_dots_378", XKB_KEY_braille_dots_378 },
+ { "braille_dots_1378", XKB_KEY_braille_dots_1378 },
+ { "braille_dots_2378", XKB_KEY_braille_dots_2378 },
+ { "braille_dots_12378", XKB_KEY_braille_dots_12378 },
+ { "braille_dots_478", XKB_KEY_braille_dots_478 },
+ { "braille_dots_1478", XKB_KEY_braille_dots_1478 },
+ { "braille_dots_2478", XKB_KEY_braille_dots_2478 },
+ { "braille_dots_12478", XKB_KEY_braille_dots_12478 },
+ { "braille_dots_3478", XKB_KEY_braille_dots_3478 },
+ { "braille_dots_13478", XKB_KEY_braille_dots_13478 },
+ { "braille_dots_23478", XKB_KEY_braille_dots_23478 },
+ { "braille_dots_123478", XKB_KEY_braille_dots_123478 },
+ { "braille_dots_578", XKB_KEY_braille_dots_578 },
+ { "braille_dots_1578", XKB_KEY_braille_dots_1578 },
+ { "braille_dots_2578", XKB_KEY_braille_dots_2578 },
+ { "braille_dots_12578", XKB_KEY_braille_dots_12578 },
+ { "braille_dots_3578", XKB_KEY_braille_dots_3578 },
+ { "braille_dots_13578", XKB_KEY_braille_dots_13578 },
+ { "braille_dots_23578", XKB_KEY_braille_dots_23578 },
+ { "braille_dots_123578", XKB_KEY_braille_dots_123578 },
+ { "braille_dots_4578", XKB_KEY_braille_dots_4578 },
+ { "braille_dots_14578", XKB_KEY_braille_dots_14578 },
+ { "braille_dots_24578", XKB_KEY_braille_dots_24578 },
+ { "braille_dots_124578", XKB_KEY_braille_dots_124578 },
+ { "braille_dots_34578", XKB_KEY_braille_dots_34578 },
+ { "braille_dots_134578", XKB_KEY_braille_dots_134578 },
+ { "braille_dots_234578", XKB_KEY_braille_dots_234578 },
+ { "braille_dots_1234578", XKB_KEY_braille_dots_1234578 },
+ { "braille_dots_678", XKB_KEY_braille_dots_678 },
+ { "braille_dots_1678", XKB_KEY_braille_dots_1678 },
+ { "braille_dots_2678", XKB_KEY_braille_dots_2678 },
+ { "braille_dots_12678", XKB_KEY_braille_dots_12678 },
+ { "braille_dots_3678", XKB_KEY_braille_dots_3678 },
+ { "braille_dots_13678", XKB_KEY_braille_dots_13678 },
+ { "braille_dots_23678", XKB_KEY_braille_dots_23678 },
+ { "braille_dots_123678", XKB_KEY_braille_dots_123678 },
+ { "braille_dots_4678", XKB_KEY_braille_dots_4678 },
+ { "braille_dots_14678", XKB_KEY_braille_dots_14678 },
+ { "braille_dots_24678", XKB_KEY_braille_dots_24678 },
+ { "braille_dots_124678", XKB_KEY_braille_dots_124678 },
+ { "braille_dots_34678", XKB_KEY_braille_dots_34678 },
+ { "braille_dots_134678", XKB_KEY_braille_dots_134678 },
+ { "braille_dots_234678", XKB_KEY_braille_dots_234678 },
+ { "braille_dots_1234678", XKB_KEY_braille_dots_1234678 },
+ { "braille_dots_5678", XKB_KEY_braille_dots_5678 },
+ { "braille_dots_15678", XKB_KEY_braille_dots_15678 },
+ { "braille_dots_25678", XKB_KEY_braille_dots_25678 },
+ { "braille_dots_125678", XKB_KEY_braille_dots_125678 },
+ { "braille_dots_35678", XKB_KEY_braille_dots_35678 },
+ { "braille_dots_135678", XKB_KEY_braille_dots_135678 },
+ { "braille_dots_235678", XKB_KEY_braille_dots_235678 },
+ { "braille_dots_1235678", XKB_KEY_braille_dots_1235678 },
+ { "braille_dots_45678", XKB_KEY_braille_dots_45678 },
+ { "braille_dots_145678", XKB_KEY_braille_dots_145678 },
+ { "braille_dots_245678", XKB_KEY_braille_dots_245678 },
+ { "braille_dots_1245678", XKB_KEY_braille_dots_1245678 },
+ { "braille_dots_345678", XKB_KEY_braille_dots_345678 },
+ { "braille_dots_1345678", XKB_KEY_braille_dots_1345678 },
+ { "braille_dots_2345678", XKB_KEY_braille_dots_2345678 },
+ { "braille_dots_12345678", XKB_KEY_braille_dots_12345678 },
+ { "hpmute_acute", XKB_KEY_hpmute_acute },
+ { "hpmute_grave", XKB_KEY_hpmute_grave },
+ { "hpmute_asciicircum", XKB_KEY_hpmute_asciicircum },
+ { "hpmute_diaeresis", XKB_KEY_hpmute_diaeresis },
+ { "hpmute_asciitilde", XKB_KEY_hpmute_asciitilde },
+ { "hplira", XKB_KEY_hplira },
+ { "hpguilder", XKB_KEY_hpguilder },
+ { "hpYdiaeresis", XKB_KEY_hpYdiaeresis },
+ { "hplongminus", XKB_KEY_hplongminus },
+ { "hpblock", XKB_KEY_hpblock },
+ { "Ddiaeresis", XKB_KEY_Ddiaeresis },
+ { "Dacute_accent", XKB_KEY_Dacute_accent },
+ { "Dcedilla_accent", XKB_KEY_Dcedilla_accent },
+ { "Dcircumflex_accent", XKB_KEY_Dcircumflex_accent },
+ { "Dgrave_accent", XKB_KEY_Dgrave_accent },
+ { "Dtilde", XKB_KEY_Dtilde },
+ { "Dring_accent", XKB_KEY_Dring_accent },
+ { "DRemove", XKB_KEY_DRemove },
+ { "hpModelock1", XKB_KEY_hpModelock1 },
+ { "hpModelock2", XKB_KEY_hpModelock2 },
+ { "hpReset", XKB_KEY_hpReset },
+ { "hpSystem", XKB_KEY_hpSystem },
+ { "hpUser", XKB_KEY_hpUser },
+ { "hpClearLine", XKB_KEY_hpClearLine },
+ { "hpInsertLine", XKB_KEY_hpInsertLine },
+ { "hpDeleteLine", XKB_KEY_hpDeleteLine },
+ { "hpInsertChar", XKB_KEY_hpInsertChar },
+ { "hpDeleteChar", XKB_KEY_hpDeleteChar },
+ { "hpBackTab", XKB_KEY_hpBackTab },
+ { "hpKP_BackTab", XKB_KEY_hpKP_BackTab },
+ { "Ext16bit_L", XKB_KEY_Ext16bit_L },
+ { "Ext16bit_R", XKB_KEY_Ext16bit_R },
+ { "osfCopy", XKB_KEY_osfCopy },
+ { "osfCut", XKB_KEY_osfCut },
+ { "osfPaste", XKB_KEY_osfPaste },
+ { "osfBackTab", XKB_KEY_osfBackTab },
+ { "osfBackSpace", XKB_KEY_osfBackSpace },
+ { "osfClear", XKB_KEY_osfClear },
+ { "osfEscape", XKB_KEY_osfEscape },
+ { "osfAddMode", XKB_KEY_osfAddMode },
+ { "osfPrimaryPaste", XKB_KEY_osfPrimaryPaste },
+ { "osfQuickPaste", XKB_KEY_osfQuickPaste },
+ { "osfPageLeft", XKB_KEY_osfPageLeft },
+ { "osfPageUp", XKB_KEY_osfPageUp },
+ { "osfPageDown", XKB_KEY_osfPageDown },
+ { "osfPageRight", XKB_KEY_osfPageRight },
+ { "osfActivate", XKB_KEY_osfActivate },
+ { "osfMenuBar", XKB_KEY_osfMenuBar },
+ { "osfLeft", XKB_KEY_osfLeft },
+ { "osfUp", XKB_KEY_osfUp },
+ { "osfRight", XKB_KEY_osfRight },
+ { "osfDown", XKB_KEY_osfDown },
+ { "osfEndLine", XKB_KEY_osfEndLine },
+ { "osfBeginLine", XKB_KEY_osfBeginLine },
+ { "osfEndData", XKB_KEY_osfEndData },
+ { "osfBeginData", XKB_KEY_osfBeginData },
+ { "osfPrevMenu", XKB_KEY_osfPrevMenu },
+ { "osfNextMenu", XKB_KEY_osfNextMenu },
+ { "osfPrevField", XKB_KEY_osfPrevField },
+ { "osfNextField", XKB_KEY_osfNextField },
+ { "osfSelect", XKB_KEY_osfSelect },
+ { "osfInsert", XKB_KEY_osfInsert },
+ { "osfUndo", XKB_KEY_osfUndo },
+ { "osfMenu", XKB_KEY_osfMenu },
+ { "osfCancel", XKB_KEY_osfCancel },
+ { "osfHelp", XKB_KEY_osfHelp },
+ { "osfSelectAll", XKB_KEY_osfSelectAll },
+ { "osfDeselectAll", XKB_KEY_osfDeselectAll },
+ { "osfReselect", XKB_KEY_osfReselect },
+ { "osfExtend", XKB_KEY_osfExtend },
+ { "osfRestore", XKB_KEY_osfRestore },
+ { "osfDelete", XKB_KEY_osfDelete },
+ { "SunFA_Grave", XKB_KEY_SunFA_Grave },
+ { "SunFA_Circum", XKB_KEY_SunFA_Circum },
+ { "SunFA_Tilde", XKB_KEY_SunFA_Tilde },
+ { "SunFA_Acute", XKB_KEY_SunFA_Acute },
+ { "SunFA_Diaeresis", XKB_KEY_SunFA_Diaeresis },
+ { "SunFA_Cedilla", XKB_KEY_SunFA_Cedilla },
+ { "SunF36", XKB_KEY_SunF36 },
+ { "SunF37", XKB_KEY_SunF37 },
+ { "SunSys_Req", XKB_KEY_SunSys_Req },
+ { "SunProps", XKB_KEY_SunProps },
+ { "SunFront", XKB_KEY_SunFront },
+ { "SunCopy", XKB_KEY_SunCopy },
+ { "SunOpen", XKB_KEY_SunOpen },
+ { "SunPaste", XKB_KEY_SunPaste },
+ { "SunCut", XKB_KEY_SunCut },
+ { "SunPowerSwitch", XKB_KEY_SunPowerSwitch },
+ { "SunAudioLowerVolume", XKB_KEY_SunAudioLowerVolume },
+ { "SunAudioMute", XKB_KEY_SunAudioMute },
+ { "SunAudioRaiseVolume", XKB_KEY_SunAudioRaiseVolume },
+ { "SunVideoDegauss", XKB_KEY_SunVideoDegauss },
+ { "SunVideoLowerBrightness", XKB_KEY_SunVideoLowerBrightness },
+ { "SunVideoRaiseBrightness", XKB_KEY_SunVideoRaiseBrightness },
+ { "SunPowerSwitchShift", XKB_KEY_SunPowerSwitchShift },
+ { "XF86Switch_VT_1", XKB_KEY_XF86Switch_VT_1 },
+ { "XF86Switch_VT_2", XKB_KEY_XF86Switch_VT_2 },
+ { "XF86Switch_VT_3", XKB_KEY_XF86Switch_VT_3 },
+ { "XF86Switch_VT_4", XKB_KEY_XF86Switch_VT_4 },
+ { "XF86Switch_VT_5", XKB_KEY_XF86Switch_VT_5 },
+ { "XF86Switch_VT_6", XKB_KEY_XF86Switch_VT_6 },
+ { "XF86Switch_VT_7", XKB_KEY_XF86Switch_VT_7 },
+ { "XF86Switch_VT_8", XKB_KEY_XF86Switch_VT_8 },
+ { "XF86Switch_VT_9", XKB_KEY_XF86Switch_VT_9 },
+ { "XF86Switch_VT_10", XKB_KEY_XF86Switch_VT_10 },
+ { "XF86Switch_VT_11", XKB_KEY_XF86Switch_VT_11 },
+ { "XF86Switch_VT_12", XKB_KEY_XF86Switch_VT_12 },
+ { "XF86Ungrab", XKB_KEY_XF86Ungrab },
+ { "XF86ClearGrab", XKB_KEY_XF86ClearGrab },
+ { "XF86Next_VMode", XKB_KEY_XF86Next_VMode },
+ { "XF86Prev_VMode", XKB_KEY_XF86Prev_VMode },
+ { "XF86LogWindowTree", XKB_KEY_XF86LogWindowTree },
+ { "XF86LogGrabInfo", XKB_KEY_XF86LogGrabInfo },
+ { "XF86ModeLock", XKB_KEY_XF86ModeLock },
+ { "XF86MonBrightnessUp", XKB_KEY_XF86MonBrightnessUp },
+ { "XF86MonBrightnessDown", XKB_KEY_XF86MonBrightnessDown },
+ { "XF86KbdLightOnOff", XKB_KEY_XF86KbdLightOnOff },
+ { "XF86KbdBrightnessUp", XKB_KEY_XF86KbdBrightnessUp },
+ { "XF86KbdBrightnessDown", XKB_KEY_XF86KbdBrightnessDown },
+ { "XF86Standby", XKB_KEY_XF86Standby },
+ { "XF86AudioLowerVolume", XKB_KEY_XF86AudioLowerVolume },
+ { "XF86AudioMute", XKB_KEY_XF86AudioMute },
+ { "XF86AudioRaiseVolume", XKB_KEY_XF86AudioRaiseVolume },
+ { "XF86AudioPlay", XKB_KEY_XF86AudioPlay },
+ { "XF86AudioStop", XKB_KEY_XF86AudioStop },
+ { "XF86AudioPrev", XKB_KEY_XF86AudioPrev },
+ { "XF86AudioNext", XKB_KEY_XF86AudioNext },
+ { "XF86HomePage", XKB_KEY_XF86HomePage },
+ { "XF86Mail", XKB_KEY_XF86Mail },
+ { "XF86Start", XKB_KEY_XF86Start },
+ { "XF86Search", XKB_KEY_XF86Search },
+ { "XF86AudioRecord", XKB_KEY_XF86AudioRecord },
+ { "XF86Calculator", XKB_KEY_XF86Calculator },
+ { "XF86Memo", XKB_KEY_XF86Memo },
+ { "XF86ToDoList", XKB_KEY_XF86ToDoList },
+ { "XF86Calendar", XKB_KEY_XF86Calendar },
+ { "XF86PowerDown", XKB_KEY_XF86PowerDown },
+ { "XF86ContrastAdjust", XKB_KEY_XF86ContrastAdjust },
+ { "XF86RockerUp", XKB_KEY_XF86RockerUp },
+ { "XF86RockerDown", XKB_KEY_XF86RockerDown },
+ { "XF86RockerEnter", XKB_KEY_XF86RockerEnter },
+ { "XF86Back", XKB_KEY_XF86Back },
+ { "XF86Forward", XKB_KEY_XF86Forward },
+ { "XF86Stop", XKB_KEY_XF86Stop },
+ { "XF86Refresh", XKB_KEY_XF86Refresh },
+ { "XF86PowerOff", XKB_KEY_XF86PowerOff },
+ { "XF86WakeUp", XKB_KEY_XF86WakeUp },
+ { "XF86Eject", XKB_KEY_XF86Eject },
+ { "XF86ScreenSaver", XKB_KEY_XF86ScreenSaver },
+ { "XF86WWW", XKB_KEY_XF86WWW },
+ { "XF86Sleep", XKB_KEY_XF86Sleep },
+ { "XF86Favorites", XKB_KEY_XF86Favorites },
+ { "XF86AudioPause", XKB_KEY_XF86AudioPause },
+ { "XF86AudioMedia", XKB_KEY_XF86AudioMedia },
+ { "XF86MyComputer", XKB_KEY_XF86MyComputer },
+ { "XF86VendorHome", XKB_KEY_XF86VendorHome },
+ { "XF86LightBulb", XKB_KEY_XF86LightBulb },
+ { "XF86Shop", XKB_KEY_XF86Shop },
+ { "XF86History", XKB_KEY_XF86History },
+ { "XF86OpenURL", XKB_KEY_XF86OpenURL },
+ { "XF86AddFavorite", XKB_KEY_XF86AddFavorite },
+ { "XF86HotLinks", XKB_KEY_XF86HotLinks },
+ { "XF86BrightnessAdjust", XKB_KEY_XF86BrightnessAdjust },
+ { "XF86Finance", XKB_KEY_XF86Finance },
+ { "XF86Community", XKB_KEY_XF86Community },
+ { "XF86AudioRewind", XKB_KEY_XF86AudioRewind },
+ { "XF86BackForward", XKB_KEY_XF86BackForward },
+ { "XF86Launch0", XKB_KEY_XF86Launch0 },
+ { "XF86Launch1", XKB_KEY_XF86Launch1 },
+ { "XF86Launch2", XKB_KEY_XF86Launch2 },
+ { "XF86Launch3", XKB_KEY_XF86Launch3 },
+ { "XF86Launch4", XKB_KEY_XF86Launch4 },
+ { "XF86Launch5", XKB_KEY_XF86Launch5 },
+ { "XF86Launch6", XKB_KEY_XF86Launch6 },
+ { "XF86Launch7", XKB_KEY_XF86Launch7 },
+ { "XF86Launch8", XKB_KEY_XF86Launch8 },
+ { "XF86Launch9", XKB_KEY_XF86Launch9 },
+ { "XF86LaunchA", XKB_KEY_XF86LaunchA },
+ { "XF86LaunchB", XKB_KEY_XF86LaunchB },
+ { "XF86LaunchC", XKB_KEY_XF86LaunchC },
+ { "XF86LaunchD", XKB_KEY_XF86LaunchD },
+ { "XF86LaunchE", XKB_KEY_XF86LaunchE },
+ { "XF86LaunchF", XKB_KEY_XF86LaunchF },
+ { "XF86ApplicationLeft", XKB_KEY_XF86ApplicationLeft },
+ { "XF86ApplicationRight", XKB_KEY_XF86ApplicationRight },
+ { "XF86Book", XKB_KEY_XF86Book },
+ { "XF86CD", XKB_KEY_XF86CD },
+ { "XF86Calculater", XKB_KEY_XF86Calculater },
+ { "XF86Clear", XKB_KEY_XF86Clear },
+ { "XF86Close", XKB_KEY_XF86Close },
+ { "XF86Copy", XKB_KEY_XF86Copy },
+ { "XF86Cut", XKB_KEY_XF86Cut },
+ { "XF86Display", XKB_KEY_XF86Display },
+ { "XF86DOS", XKB_KEY_XF86DOS },
+ { "XF86Documents", XKB_KEY_XF86Documents },
+ { "XF86Excel", XKB_KEY_XF86Excel },
+ { "XF86Explorer", XKB_KEY_XF86Explorer },
+ { "XF86Game", XKB_KEY_XF86Game },
+ { "XF86Go", XKB_KEY_XF86Go },
+ { "XF86iTouch", XKB_KEY_XF86iTouch },
+ { "XF86LogOff", XKB_KEY_XF86LogOff },
+ { "XF86Market", XKB_KEY_XF86Market },
+ { "XF86Meeting", XKB_KEY_XF86Meeting },
+ { "XF86MenuKB", XKB_KEY_XF86MenuKB },
+ { "XF86MenuPB", XKB_KEY_XF86MenuPB },
+ { "XF86MySites", XKB_KEY_XF86MySites },
+ { "XF86New", XKB_KEY_XF86New },
+ { "XF86News", XKB_KEY_XF86News },
+ { "XF86OfficeHome", XKB_KEY_XF86OfficeHome },
+ { "XF86Open", XKB_KEY_XF86Open },
+ { "XF86Option", XKB_KEY_XF86Option },
+ { "XF86Paste", XKB_KEY_XF86Paste },
+ { "XF86Phone", XKB_KEY_XF86Phone },
+ { "XF86Q", XKB_KEY_XF86Q },
+ { "XF86Reply", XKB_KEY_XF86Reply },
+ { "XF86Reload", XKB_KEY_XF86Reload },
+ { "XF86RotateWindows", XKB_KEY_XF86RotateWindows },
+ { "XF86RotationPB", XKB_KEY_XF86RotationPB },
+ { "XF86RotationKB", XKB_KEY_XF86RotationKB },
+ { "XF86Save", XKB_KEY_XF86Save },
+ { "XF86ScrollUp", XKB_KEY_XF86ScrollUp },
+ { "XF86ScrollDown", XKB_KEY_XF86ScrollDown },
+ { "XF86ScrollClick", XKB_KEY_XF86ScrollClick },
+ { "XF86Send", XKB_KEY_XF86Send },
+ { "XF86Spell", XKB_KEY_XF86Spell },
+ { "XF86SplitScreen", XKB_KEY_XF86SplitScreen },
+ { "XF86Support", XKB_KEY_XF86Support },
+ { "XF86TaskPane", XKB_KEY_XF86TaskPane },
+ { "XF86Terminal", XKB_KEY_XF86Terminal },
+ { "XF86Tools", XKB_KEY_XF86Tools },
+ { "XF86Travel", XKB_KEY_XF86Travel },
+ { "XF86UserPB", XKB_KEY_XF86UserPB },
+ { "XF86User1KB", XKB_KEY_XF86User1KB },
+ { "XF86User2KB", XKB_KEY_XF86User2KB },
+ { "XF86Video", XKB_KEY_XF86Video },
+ { "XF86WheelButton", XKB_KEY_XF86WheelButton },
+ { "XF86Word", XKB_KEY_XF86Word },
+ { "XF86Xfer", XKB_KEY_XF86Xfer },
+ { "XF86ZoomIn", XKB_KEY_XF86ZoomIn },
+ { "XF86ZoomOut", XKB_KEY_XF86ZoomOut },
+ { "XF86Away", XKB_KEY_XF86Away },
+ { "XF86Messenger", XKB_KEY_XF86Messenger },
+ { "XF86WebCam", XKB_KEY_XF86WebCam },
+ { "XF86MailForward", XKB_KEY_XF86MailForward },
+ { "XF86Pictures", XKB_KEY_XF86Pictures },
+ { "XF86Music", XKB_KEY_XF86Music },
+ { "XF86Battery", XKB_KEY_XF86Battery },
+ { "XF86Bluetooth", XKB_KEY_XF86Bluetooth },
+ { "XF86WLAN", XKB_KEY_XF86WLAN },
+ { "XF86UWB", XKB_KEY_XF86UWB },
+ { "XF86AudioForward", XKB_KEY_XF86AudioForward },
+ { "XF86AudioRepeat", XKB_KEY_XF86AudioRepeat },
+ { "XF86AudioRandomPlay", XKB_KEY_XF86AudioRandomPlay },
+ { "XF86Subtitle", XKB_KEY_XF86Subtitle },
+ { "XF86AudioCycleTrack", XKB_KEY_XF86AudioCycleTrack },
+ { "XF86CycleAngle", XKB_KEY_XF86CycleAngle },
+ { "XF86FrameBack", XKB_KEY_XF86FrameBack },
+ { "XF86FrameForward", XKB_KEY_XF86FrameForward },
+ { "XF86Time", XKB_KEY_XF86Time },
+ { "XF86Select", XKB_KEY_XF86Select },
+ { "XF86View", XKB_KEY_XF86View },
+ { "XF86TopMenu", XKB_KEY_XF86TopMenu },
+ { "XF86Red", XKB_KEY_XF86Red },
+ { "XF86Green", XKB_KEY_XF86Green },
+ { "XF86Yellow", XKB_KEY_XF86Yellow },
+ { "XF86Blue", XKB_KEY_XF86Blue },
+ { "XF86Suspend", XKB_KEY_XF86Suspend },
+ { "XF86Hibernate", XKB_KEY_XF86Hibernate },
+ { "XF86TouchpadToggle", XKB_KEY_XF86TouchpadToggle },
+ { "XF86TouchpadOn", XKB_KEY_XF86TouchpadOn },
+ { "XF86TouchpadOff", XKB_KEY_XF86TouchpadOff },
+};
diff --git a/src/3rdparty/xkbcommon/src/state.c b/src/3rdparty/xkbcommon/src/state.c
new file mode 100644
index 0000000000..ac4576f5b8
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/state.c
@@ -0,0 +1,1144 @@
+/************************************************************
+ * Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+/*
+ * This is a bastardised version of xkbActions.c from the X server which
+ * does not support, for the moment:
+ * - AccessX sticky/debounce/etc (will come later)
+ * - pointer keys (may come later)
+ * - key redirects (unlikely)
+ * - messages (very unlikely)
+ */
+
+#include "keymap.h"
+
+struct xkb_filter {
+ union xkb_action action;
+ const struct xkb_key *key;
+ uint32_t priv;
+ bool (*func)(struct xkb_state *state,
+ struct xkb_filter *filter,
+ const struct xkb_key *key,
+ enum xkb_key_direction direction);
+ int refcnt;
+};
+
+struct state_components {
+ /* These may be negative, because of -1 group actions. */
+ int32_t base_group; /**< depressed */
+ int32_t latched_group;
+ int32_t locked_group;
+ xkb_layout_index_t group; /**< effective */
+
+ xkb_mod_mask_t base_mods; /**< depressed */
+ xkb_mod_mask_t latched_mods;
+ xkb_mod_mask_t locked_mods;
+ xkb_mod_mask_t mods; /**< effective */
+
+ xkb_led_mask_t leds;
+};
+
+struct xkb_state {
+ /*
+ * Before updating the state, we keep a copy of just this struct. This
+ * allows us to report which components of the state have changed.
+ */
+ struct state_components components;
+
+ /*
+ * At each event, we accumulate all the needed modifications to the base
+ * modifiers, and apply them at the end. These keep track of this state.
+ */
+ xkb_mod_mask_t set_mods;
+ xkb_mod_mask_t clear_mods;
+
+ /*
+ * We mustn't clear a base modifier if there's another depressed key
+ * which affects it, e.g. given this sequence
+ * < Left Shift down, Right Shift down, Left Shift Up >
+ * the modifier should still be set. This keeps the count.
+ */
+ int16_t mod_key_count[sizeof(xkb_mod_mask_t) * 8];
+
+ int refcnt;
+ darray(struct xkb_filter) filters;
+ struct xkb_keymap *keymap;
+};
+
+static const struct xkb_key_type_entry *
+get_entry_for_key_state(struct xkb_state *state, const struct xkb_key *key,
+ xkb_layout_index_t group)
+{
+ const struct xkb_key_type *type = key->groups[group].type;
+ xkb_mod_mask_t active_mods = state->components.mods & type->mods.mask;
+ unsigned int i;
+
+ for (i = 0; i < type->num_entries; i++) {
+ /*
+ * If the virtual modifiers are not bound to anything, we're
+ * supposed to skip the entry (xserver does this with cached
+ * entry->active field).
+ */
+ if (!type->entries[i].mods.mask)
+ continue;
+
+ if (type->entries[i].mods.mask == active_mods)
+ return &type->entries[i];
+ }
+
+ return NULL;
+}
+
+/**
+ * Returns the level to use for the given key and state, or
+ * XKB_LEVEL_INVALID.
+ */
+XKB_EXPORT xkb_level_index_t
+xkb_state_key_get_level(struct xkb_state *state, xkb_keycode_t kc,
+ xkb_layout_index_t layout)
+{
+ const struct xkb_key *key = XkbKey(state->keymap, kc);
+ const struct xkb_key_type_entry *entry;
+
+ if (!key || layout >= key->num_groups)
+ return XKB_LEVEL_INVALID;
+
+ /* If we don't find an explicit match the default is 0. */
+ entry = get_entry_for_key_state(state, key, layout);
+ if (!entry)
+ return 0;
+
+ return entry->level;
+}
+
+xkb_layout_index_t
+wrap_group_into_range(int32_t group,
+ xkb_layout_index_t num_groups,
+ enum xkb_range_exceed_type out_of_range_group_action,
+ xkb_layout_index_t out_of_range_group_number)
+{
+ if (num_groups == 0)
+ return XKB_LAYOUT_INVALID;
+
+ if (group < num_groups)
+ return group;
+
+ switch (out_of_range_group_action) {
+ case RANGE_REDIRECT:
+ if (out_of_range_group_number >= num_groups)
+ return 0;
+ return out_of_range_group_number;
+
+ case RANGE_SATURATE:
+ if (group < 0)
+ return 0;
+ else
+ return num_groups - 1;
+
+ case RANGE_WRAP:
+ default:
+ /*
+ * C99 says a negative dividend in a modulo operation always
+ * gives a negative result.
+ */
+ if (group < 0)
+ return ((int) num_groups + (group % (int) num_groups));
+ else
+ return group % num_groups;
+ }
+}
+
+/**
+ * Returns the layout to use for the given key and state, taking
+ * wrapping/clamping/etc into account, or XKB_LAYOUT_INVALID.
+ */
+XKB_EXPORT xkb_layout_index_t
+xkb_state_key_get_layout(struct xkb_state *state, xkb_keycode_t kc)
+{
+ const struct xkb_key *key = XkbKey(state->keymap, kc);
+
+ if (!key)
+ return XKB_LAYOUT_INVALID;
+
+ return wrap_group_into_range(state->components.group, key->num_groups,
+ key->out_of_range_group_action,
+ key->out_of_range_group_number);
+}
+
+static const union xkb_action fake = { .type = ACTION_TYPE_NONE };
+
+static const union xkb_action *
+xkb_key_get_action(struct xkb_state *state, const struct xkb_key *key)
+{
+ xkb_layout_index_t layout;
+ xkb_level_index_t level;
+
+ layout = xkb_state_key_get_layout(state, key->keycode);
+ if (layout == XKB_LAYOUT_INVALID)
+ return &fake;
+
+ level = xkb_state_key_get_level(state, key->keycode, layout);
+ if (level == XKB_LEVEL_INVALID)
+ return &fake;
+
+ return &key->groups[layout].levels[level].action;
+}
+
+static struct xkb_filter *
+xkb_filter_new(struct xkb_state *state)
+{
+ struct xkb_filter *filter = NULL, *iter;
+
+ darray_foreach(iter, state->filters) {
+ if (iter->func)
+ continue;
+ filter = iter;
+ break;
+ }
+
+ if (!filter) {
+ darray_resize0(state->filters, darray_size(state->filters) + 1);
+ filter = &darray_item(state->filters, darray_size(state->filters) -1);
+ }
+
+ filter->refcnt = 1;
+ return filter;
+}
+
+/***====================================================================***/
+
+static bool
+xkb_filter_group_set_func(struct xkb_state *state,
+ struct xkb_filter *filter,
+ const struct xkb_key *key,
+ enum xkb_key_direction direction)
+{
+ if (key != filter->key) {
+ filter->action.group.flags &= ~ACTION_LOCK_CLEAR;
+ return true;
+ }
+
+ if (direction == XKB_KEY_DOWN) {
+ filter->refcnt++;
+ return false;
+ }
+ else if (--filter->refcnt > 0) {
+ return false;
+ }
+
+ state->components.base_group = filter->priv;
+
+ if (filter->action.group.flags & ACTION_LOCK_CLEAR)
+ state->components.locked_group = 0;
+
+ filter->func = NULL;
+ return true;
+}
+
+static void
+xkb_filter_group_set_new(struct xkb_state *state, struct xkb_filter *filter)
+{
+ filter->priv = state->components.base_group;
+ if (filter->action.group.flags & ACTION_ABSOLUTE_SWITCH)
+ state->components.base_group = filter->action.group.group;
+ else
+ state->components.base_group += filter->action.group.group;
+}
+
+static bool
+xkb_filter_group_lock_func(struct xkb_state *state,
+ struct xkb_filter *filter,
+ const struct xkb_key *key,
+ enum xkb_key_direction direction)
+{
+ if (key != filter->key)
+ return true;
+
+ if (direction == XKB_KEY_DOWN) {
+ filter->refcnt++;
+ return false;
+ }
+ if (--filter->refcnt > 0)
+ return false;
+
+ filter->func = NULL;
+ return true;
+}
+
+static void
+xkb_filter_group_lock_new(struct xkb_state *state, struct xkb_filter *filter)
+{
+ if (filter->action.group.flags & ACTION_ABSOLUTE_SWITCH)
+ state->components.locked_group = filter->action.group.group;
+ else
+ state->components.locked_group += filter->action.group.group;
+}
+
+static bool
+xkb_filter_mod_set_func(struct xkb_state *state,
+ struct xkb_filter *filter,
+ const struct xkb_key *key,
+ enum xkb_key_direction direction)
+{
+ if (key != filter->key) {
+ filter->action.mods.flags &= ~ACTION_LOCK_CLEAR;
+ return true;
+ }
+
+ if (direction == XKB_KEY_DOWN) {
+ filter->refcnt++;
+ return false;
+ }
+ else if (--filter->refcnt > 0) {
+ return false;
+ }
+
+ state->clear_mods = filter->action.mods.mods.mask;
+ if (filter->action.mods.flags & ACTION_LOCK_CLEAR)
+ state->components.locked_mods &= ~filter->action.mods.mods.mask;
+
+ filter->func = NULL;
+ return true;
+}
+
+static void
+xkb_filter_mod_set_new(struct xkb_state *state, struct xkb_filter *filter)
+{
+ state->set_mods = filter->action.mods.mods.mask;
+}
+
+static bool
+xkb_filter_mod_lock_func(struct xkb_state *state,
+ struct xkb_filter *filter,
+ const struct xkb_key *key,
+ enum xkb_key_direction direction)
+{
+ if (key != filter->key)
+ return true;
+
+ if (direction == XKB_KEY_DOWN) {
+ filter->refcnt++;
+ return false;
+ }
+ if (--filter->refcnt > 0)
+ return false;
+
+ state->clear_mods |= filter->action.mods.mods.mask;
+ if (!(filter->action.mods.flags & ACTION_LOCK_NO_UNLOCK))
+ state->components.locked_mods &= ~filter->priv;
+
+ filter->func = NULL;
+ return true;
+}
+
+static void
+xkb_filter_mod_lock_new(struct xkb_state *state, struct xkb_filter *filter)
+{
+ filter->priv = (state->components.locked_mods &
+ filter->action.mods.mods.mask);
+ state->set_mods |= filter->action.mods.mods.mask;
+ if (!(filter->action.mods.flags & ACTION_LOCK_NO_LOCK))
+ state->components.locked_mods |= filter->action.mods.mods.mask;
+}
+
+enum xkb_key_latch_state {
+ NO_LATCH,
+ LATCH_KEY_DOWN,
+ LATCH_PENDING,
+};
+
+static bool
+xkb_action_breaks_latch(const union xkb_action *action)
+{
+ switch (action->type) {
+ case ACTION_TYPE_NONE:
+ case ACTION_TYPE_PTR_BUTTON:
+ case ACTION_TYPE_PTR_LOCK:
+ case ACTION_TYPE_CTRL_SET:
+ case ACTION_TYPE_CTRL_LOCK:
+ case ACTION_TYPE_KEY_REDIRECT:
+ case ACTION_TYPE_SWITCH_VT:
+ case ACTION_TYPE_TERMINATE:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static bool
+xkb_filter_mod_latch_func(struct xkb_state *state,
+ struct xkb_filter *filter,
+ const struct xkb_key *key,
+ enum xkb_key_direction direction)
+{
+ enum xkb_key_latch_state latch = filter->priv;
+
+ if (direction == XKB_KEY_DOWN && latch == LATCH_PENDING) {
+ /* If this is a new keypress and we're awaiting our single latched
+ * keypress, then either break the latch if any random key is pressed,
+ * or promote it to a lock or plain base set if it's the same
+ * modifier. */
+ const union xkb_action *action = xkb_key_get_action(state, key);
+ if (action->type == ACTION_TYPE_MOD_LATCH &&
+ action->mods.flags == filter->action.mods.flags &&
+ action->mods.mods.mask == filter->action.mods.mods.mask) {
+ filter->action = *action;
+ if (filter->action.mods.flags & ACTION_LATCH_TO_LOCK) {
+ filter->action.type = ACTION_TYPE_MOD_LOCK;
+ filter->func = xkb_filter_mod_lock_func;
+ state->components.locked_mods |= filter->action.mods.mods.mask;
+ }
+ else {
+ filter->action.type = ACTION_TYPE_MOD_SET;
+ filter->func = xkb_filter_mod_set_func;
+ state->set_mods = filter->action.mods.mods.mask;
+ }
+ filter->key = key;
+ state->components.latched_mods &= ~filter->action.mods.mods.mask;
+ /* XXX beep beep! */
+ return false;
+ }
+ else if (xkb_action_breaks_latch(action)) {
+ /* XXX: This may be totally broken, we might need to break the
+ * latch in the next run after this press? */
+ state->components.latched_mods &= ~filter->action.mods.mods.mask;
+ filter->func = NULL;
+ return true;
+ }
+ }
+ else if (direction == XKB_KEY_UP && key == filter->key) {
+ /* Our key got released. If we've set it to clear locks, and we
+ * currently have the same modifiers locked, then release them and
+ * don't actually latch. Else we've actually hit the latching
+ * stage, so set PENDING and move our modifier from base to
+ * latched. */
+ if (latch == NO_LATCH ||
+ ((filter->action.mods.flags & ACTION_LOCK_CLEAR) &&
+ (state->components.locked_mods & filter->action.mods.mods.mask) ==
+ filter->action.mods.mods.mask)) {
+ /* XXX: We might be a bit overenthusiastic about clearing
+ * mods other filters have set here? */
+ if (latch == LATCH_PENDING)
+ state->components.latched_mods &=
+ ~filter->action.mods.mods.mask;
+ else
+ state->clear_mods = filter->action.mods.mods.mask;
+ state->components.locked_mods &= ~filter->action.mods.mods.mask;
+ filter->func = NULL;
+ }
+ else {
+ latch = LATCH_PENDING;
+ state->clear_mods = filter->action.mods.mods.mask;
+ state->components.latched_mods |= filter->action.mods.mods.mask;
+ /* XXX beep beep! */
+ }
+ }
+ else if (direction == XKB_KEY_DOWN && latch == LATCH_KEY_DOWN) {
+ /* Someone's pressed another key while we've still got the latching
+ * key held down, so keep the base modifier state active (from
+ * xkb_filter_mod_latch_new), but don't trip the latch, just clear
+ * it as soon as the modifier gets released. */
+ latch = NO_LATCH;
+ }
+
+ filter->priv = latch;
+
+ return true;
+}
+
+static void
+xkb_filter_mod_latch_new(struct xkb_state *state, struct xkb_filter *filter)
+{
+ filter->priv = LATCH_KEY_DOWN;
+ state->set_mods = filter->action.mods.mods.mask;
+}
+
+static const struct {
+ void (*new)(struct xkb_state *state, struct xkb_filter *filter);
+ bool (*func)(struct xkb_state *state, struct xkb_filter *filter,
+ const struct xkb_key *key, enum xkb_key_direction direction);
+} filter_action_funcs[_ACTION_TYPE_NUM_ENTRIES] = {
+ [ACTION_TYPE_MOD_SET] = { xkb_filter_mod_set_new,
+ xkb_filter_mod_set_func },
+ [ACTION_TYPE_MOD_LATCH] = { xkb_filter_mod_latch_new,
+ xkb_filter_mod_latch_func },
+ [ACTION_TYPE_MOD_LOCK] = { xkb_filter_mod_lock_new,
+ xkb_filter_mod_lock_func },
+ [ACTION_TYPE_GROUP_SET] = { xkb_filter_group_set_new,
+ xkb_filter_group_set_func },
+ [ACTION_TYPE_GROUP_LOCK] = { xkb_filter_group_lock_new,
+ xkb_filter_group_lock_func },
+};
+
+/**
+ * Applies any relevant filters to the key, first from the list of filters
+ * that are currently active, then if no filter has claimed the key, possibly
+ * apply a new filter from the key action.
+ */
+static void
+xkb_filter_apply_all(struct xkb_state *state,
+ const struct xkb_key *key,
+ enum xkb_key_direction direction)
+{
+ struct xkb_filter *filter;
+ const union xkb_action *action;
+ bool send = true;
+
+ /* First run through all the currently active filters and see if any of
+ * them have claimed this event. */
+ darray_foreach(filter, state->filters) {
+ if (!filter->func)
+ continue;
+ send = filter->func(state, filter, key, direction) && send;
+ }
+
+ if (!send || direction == XKB_KEY_UP)
+ return;
+
+ action = xkb_key_get_action(state, key);
+
+ /*
+ * It's possible for the keymap to set action->type explicitly, like so:
+ * interpret XF86_Next_VMode {
+ * action = Private(type=0x86, data="+VMode");
+ * };
+ * We don't handle those.
+ */
+ if (action->type >= _ACTION_TYPE_NUM_ENTRIES)
+ return;
+
+ if (!filter_action_funcs[action->type].new)
+ return;
+
+ filter = xkb_filter_new(state);
+ if (!filter)
+ return; /* WSGO */
+
+ filter->key = key;
+ filter->func = filter_action_funcs[action->type].func;
+ filter->action = *action;
+ filter_action_funcs[action->type].new(state, filter);
+}
+
+XKB_EXPORT struct xkb_state *
+xkb_state_new(struct xkb_keymap *keymap)
+{
+ struct xkb_state *ret;
+
+ ret = calloc(sizeof(*ret), 1);
+ if (!ret)
+ return NULL;
+
+ ret->refcnt = 1;
+ ret->keymap = xkb_keymap_ref(keymap);
+
+ return ret;
+}
+
+XKB_EXPORT struct xkb_state *
+xkb_state_ref(struct xkb_state *state)
+{
+ state->refcnt++;
+ return state;
+}
+
+XKB_EXPORT void
+xkb_state_unref(struct xkb_state *state)
+{
+ if (!state || --state->refcnt > 0)
+ return;
+
+ xkb_keymap_unref(state->keymap);
+ darray_free(state->filters);
+ free(state);
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_state_get_keymap(struct xkb_state *state)
+{
+ return state->keymap;
+}
+
+/**
+ * Update the LED state to match the rest of the xkb_state.
+ */
+static void
+xkb_state_led_update_all(struct xkb_state *state)
+{
+ xkb_led_index_t idx;
+ const struct xkb_led *led;
+
+ state->components.leds = 0;
+
+ darray_enumerate(idx, led, state->keymap->leds) {
+ xkb_mod_mask_t mod_mask = 0;
+ xkb_layout_mask_t group_mask = 0;
+
+ if (led->which_mods & XKB_STATE_MODS_EFFECTIVE)
+ mod_mask |= state->components.mods;
+ if (led->which_mods & XKB_STATE_MODS_DEPRESSED)
+ mod_mask |= state->components.base_mods;
+ if (led->which_mods & XKB_STATE_MODS_LATCHED)
+ mod_mask |= state->components.latched_mods;
+ if (led->which_mods & XKB_STATE_MODS_LOCKED)
+ mod_mask |= state->components.locked_mods;
+ if (led->mods.mask & mod_mask)
+ state->components.leds |= (1 << idx);
+
+ if (led->which_groups & XKB_STATE_LAYOUT_EFFECTIVE)
+ group_mask |= (1 << state->components.group);
+ if (led->which_groups & XKB_STATE_LAYOUT_DEPRESSED)
+ group_mask |= (1 << state->components.base_group);
+ if (led->which_groups & XKB_STATE_LAYOUT_LATCHED)
+ group_mask |= (1 << state->components.latched_group);
+ if (led->which_groups & XKB_STATE_LAYOUT_LOCKED)
+ group_mask |= (1 << state->components.locked_group);
+ if (led->groups & group_mask)
+ state->components.leds |= (1 << idx);
+
+ if (led->ctrls & state->keymap->enabled_ctrls)
+ state->components.leds |= (1 << idx);
+ }
+}
+
+/**
+ * Calculates the derived state (effective mods/group and LEDs) from an
+ * up-to-date xkb_state.
+ */
+static void
+xkb_state_update_derived(struct xkb_state *state)
+{
+ state->components.mods = (state->components.base_mods |
+ state->components.latched_mods |
+ state->components.locked_mods);
+
+ /* TODO: Use groups_wrap control instead of always RANGE_WRAP. */
+
+ state->components.locked_group =
+ wrap_group_into_range(state->components.locked_group,
+ state->keymap->num_groups,
+ RANGE_WRAP, 0);
+
+ state->components.group =
+ wrap_group_into_range(state->components.base_group +
+ state->components.latched_group +
+ state->components.locked_group,
+ state->keymap->num_groups,
+ RANGE_WRAP, 0);
+
+ xkb_state_led_update_all(state);
+}
+
+static enum xkb_state_component
+get_state_component_changes(const struct state_components *a,
+ const struct state_components *b)
+{
+ xkb_mod_mask_t mask = 0;
+
+ if (a->group != b->group)
+ mask |= XKB_STATE_LAYOUT_EFFECTIVE;
+ if (a->base_group != b->base_group)
+ mask |= XKB_STATE_LAYOUT_DEPRESSED;
+ if (a->latched_group != b->latched_group)
+ mask |= XKB_STATE_LAYOUT_LATCHED;
+ if (a->locked_group != b->locked_group)
+ mask |= XKB_STATE_LAYOUT_LOCKED;
+ if (a->mods != b->mods)
+ mask |= XKB_STATE_MODS_EFFECTIVE;
+ if (a->base_mods != b->base_mods)
+ mask |= XKB_STATE_MODS_DEPRESSED;
+ if (a->latched_mods != b->latched_mods)
+ mask |= XKB_STATE_MODS_LATCHED;
+ if (a->locked_mods != b->locked_mods)
+ mask |= XKB_STATE_MODS_LOCKED;
+ if (a->leds != b->leds)
+ mask |= XKB_STATE_LEDS;
+
+ return mask;
+}
+
+/**
+ * Given a particular key event, updates the state structure to reflect the
+ * new modifiers.
+ */
+XKB_EXPORT enum xkb_state_component
+xkb_state_update_key(struct xkb_state *state, xkb_keycode_t kc,
+ enum xkb_key_direction direction)
+{
+ xkb_mod_index_t i;
+ xkb_mod_mask_t bit;
+ struct state_components prev_components;
+ const struct xkb_key *key = XkbKey(state->keymap, kc);
+
+ if (!key)
+ return 0;
+
+ prev_components = state->components;
+
+ state->set_mods = 0;
+ state->clear_mods = 0;
+
+ xkb_filter_apply_all(state, key, direction);
+
+ for (i = 0, bit = 1; state->set_mods; i++, bit <<= 1) {
+ if (state->set_mods & bit) {
+ state->mod_key_count[i]++;
+ state->components.base_mods |= bit;
+ state->set_mods &= ~bit;
+ }
+ }
+
+ for (i = 0, bit = 1; state->clear_mods; i++, bit <<= 1) {
+ if (state->clear_mods & bit) {
+ state->mod_key_count[i]--;
+ if (state->mod_key_count[i] <= 0) {
+ state->components.base_mods &= ~bit;
+ state->mod_key_count[i] = 0;
+ }
+ state->clear_mods &= ~bit;
+ }
+ }
+
+ xkb_state_update_derived(state);
+
+ return get_state_component_changes(&prev_components, &state->components);
+}
+
+/**
+ * Updates the state from a set of explicit masks as gained from
+ * xkb_state_serialize_mods and xkb_state_serialize_groups. As noted in the
+ * documentation for these functions in xkbcommon.h, this round-trip is
+ * lossy, and should only be used to update a slave state mirroring the
+ * master, e.g. in a client/server window system.
+ */
+XKB_EXPORT enum xkb_state_component
+xkb_state_update_mask(struct xkb_state *state,
+ xkb_mod_mask_t base_mods,
+ xkb_mod_mask_t latched_mods,
+ xkb_mod_mask_t locked_mods,
+ xkb_layout_index_t base_group,
+ xkb_layout_index_t latched_group,
+ xkb_layout_index_t locked_group)
+{
+ struct state_components prev_components;
+ xkb_mod_index_t num_mods;
+ xkb_mod_index_t idx;
+
+ prev_components = state->components;
+
+ state->components.base_mods = 0;
+ state->components.latched_mods = 0;
+ state->components.locked_mods = 0;
+ num_mods = xkb_keymap_num_mods(state->keymap);
+
+ for (idx = 0; idx < num_mods; idx++) {
+ xkb_mod_mask_t mod = (1 << idx);
+ if (base_mods & mod)
+ state->components.base_mods |= mod;
+ if (latched_mods & mod)
+ state->components.latched_mods |= mod;
+ if (locked_mods & mod)
+ state->components.locked_mods |= mod;
+ }
+
+ state->components.base_group = base_group;
+ state->components.latched_group = latched_group;
+ state->components.locked_group = locked_group;
+
+ xkb_state_update_derived(state);
+
+ return get_state_component_changes(&prev_components, &state->components);
+}
+
+/**
+ * Provides the symbols to use for the given key and state. Returns the
+ * number of symbols pointed to in syms_out.
+ */
+XKB_EXPORT int
+xkb_state_key_get_syms(struct xkb_state *state, xkb_keycode_t kc,
+ const xkb_keysym_t **syms_out)
+{
+ xkb_layout_index_t layout;
+ xkb_level_index_t level;
+
+ layout = xkb_state_key_get_layout(state, kc);
+ if (layout == XKB_LAYOUT_INVALID)
+ goto err;
+
+ level = xkb_state_key_get_level(state, kc, layout);
+ if (level == XKB_LEVEL_INVALID)
+ goto err;
+
+ return xkb_keymap_key_get_syms_by_level(state->keymap, kc, layout, level,
+ syms_out);
+
+err:
+ *syms_out = NULL;
+ return 0;
+}
+
+/**
+ * Provides either exactly one symbol, or XKB_KEY_NoSymbol.
+ */
+XKB_EXPORT xkb_keysym_t
+xkb_state_key_get_one_sym(struct xkb_state *state, xkb_keycode_t kc)
+{
+ const xkb_keysym_t *syms;
+ int num_syms;
+
+ num_syms = xkb_state_key_get_syms(state, kc, &syms);
+ if (num_syms != 1)
+ return XKB_KEY_NoSymbol;
+
+ return syms[0];
+}
+
+/**
+ * Serialises the requested modifier state into an xkb_mod_mask_t, with all
+ * the same disclaimers as in xkb_state_update_mask.
+ */
+XKB_EXPORT xkb_mod_mask_t
+xkb_state_serialize_mods(struct xkb_state *state,
+ enum xkb_state_component type)
+{
+ xkb_mod_mask_t ret = 0;
+
+ if (type & XKB_STATE_MODS_EFFECTIVE)
+ return state->components.mods;
+
+ if (type & XKB_STATE_MODS_DEPRESSED)
+ ret |= state->components.base_mods;
+ if (type & XKB_STATE_MODS_LATCHED)
+ ret |= state->components.latched_mods;
+ if (type & XKB_STATE_MODS_LOCKED)
+ ret |= state->components.locked_mods;
+
+ return ret;
+}
+
+/**
+ * Serialises the requested group state, with all the same disclaimers as
+ * in xkb_state_update_mask.
+ */
+XKB_EXPORT xkb_layout_index_t
+xkb_state_serialize_layout(struct xkb_state *state,
+ enum xkb_state_component type)
+{
+ xkb_layout_index_t ret = 0;
+
+ if (type & XKB_STATE_LAYOUT_EFFECTIVE)
+ return state->components.group;
+
+ if (type & XKB_STATE_LAYOUT_DEPRESSED)
+ ret += state->components.base_group;
+ if (type & XKB_STATE_LAYOUT_LATCHED)
+ ret += state->components.latched_group;
+ if (type & XKB_STATE_LAYOUT_LOCKED)
+ ret += state->components.locked_group;
+
+ return ret;
+}
+
+/**
+ * Returns 1 if the given modifier is active with the specified type(s), 0 if
+ * not, or -1 if the modifier is invalid.
+ */
+XKB_EXPORT int
+xkb_state_mod_index_is_active(struct xkb_state *state,
+ xkb_mod_index_t idx,
+ enum xkb_state_component type)
+{
+ if (idx >= xkb_keymap_num_mods(state->keymap))
+ return -1;
+
+ return !!(xkb_state_serialize_mods(state, type) & (1 << idx));
+}
+
+/**
+ * Helper function for xkb_state_mod_indices_are_active and
+ * xkb_state_mod_names_are_active.
+ */
+static int
+match_mod_masks(struct xkb_state *state,
+ enum xkb_state_component type,
+ enum xkb_state_match match,
+ xkb_mod_mask_t wanted)
+{
+ xkb_mod_mask_t active = xkb_state_serialize_mods(state, type);
+
+ if (!(match & XKB_STATE_MATCH_NON_EXCLUSIVE) && (active & ~wanted))
+ return 0;
+
+ if (match & XKB_STATE_MATCH_ANY)
+ return !!(active & wanted);
+ else
+ return (active & wanted) == wanted;
+
+ return 0;
+}
+
+/**
+ * Returns 1 if the modifiers are active with the specified type(s), 0 if
+ * not, or -1 if any of the modifiers are invalid.
+ */
+XKB_EXPORT int
+xkb_state_mod_indices_are_active(struct xkb_state *state,
+ enum xkb_state_component type,
+ enum xkb_state_match match,
+ ...)
+{
+ va_list ap;
+ xkb_mod_index_t idx = 0;
+ xkb_mod_mask_t wanted = 0;
+ int ret = 0;
+ xkb_mod_index_t num_mods = xkb_keymap_num_mods(state->keymap);
+
+ va_start(ap, match);
+ while (1) {
+ idx = va_arg(ap, xkb_mod_index_t);
+ if (idx == XKB_MOD_INVALID)
+ break;
+ if (idx >= num_mods) {
+ ret = -1;
+ break;
+ }
+ wanted |= (1 << idx);
+ }
+ va_end(ap);
+
+ if (ret == -1)
+ return ret;
+
+ return match_mod_masks(state, type, match, wanted);
+}
+
+/**
+ * Returns 1 if the given modifier is active with the specified type(s), 0 if
+ * not, or -1 if the modifier is invalid.
+ */
+XKB_EXPORT int
+xkb_state_mod_name_is_active(struct xkb_state *state, const char *name,
+ enum xkb_state_component type)
+{
+ xkb_mod_index_t idx = xkb_keymap_mod_get_index(state->keymap, name);
+
+ if (idx == XKB_MOD_INVALID)
+ return -1;
+
+ return xkb_state_mod_index_is_active(state, idx, type);
+}
+
+/**
+ * Returns 1 if the modifiers are active with the specified type(s), 0 if
+ * not, or -1 if any of the modifiers are invalid.
+ */
+XKB_EXPORT ATTR_NULL_SENTINEL int
+xkb_state_mod_names_are_active(struct xkb_state *state,
+ enum xkb_state_component type,
+ enum xkb_state_match match,
+ ...)
+{
+ va_list ap;
+ xkb_mod_index_t idx = 0;
+ const char *str;
+ xkb_mod_mask_t wanted = 0;
+ int ret = 0;
+
+ va_start(ap, match);
+ while (1) {
+ str = va_arg(ap, const char *);
+ if (str == NULL)
+ break;
+ idx = xkb_keymap_mod_get_index(state->keymap, str);
+ if (idx == XKB_MOD_INVALID) {
+ ret = -1;
+ break;
+ }
+ wanted |= (1 << idx);
+ }
+ va_end(ap);
+
+ if (ret == -1)
+ return ret;
+
+ return match_mod_masks(state, type, match, wanted);
+}
+
+/**
+ * Returns 1 if the given group is active with the specified type(s), 0 if
+ * not, or -1 if the group is invalid.
+ */
+XKB_EXPORT int
+xkb_state_layout_index_is_active(struct xkb_state *state,
+ xkb_layout_index_t idx,
+ enum xkb_state_component type)
+{
+ int ret = 0;
+
+ if (idx >= state->keymap->num_groups)
+ return -1;
+
+ if (type & XKB_STATE_LAYOUT_EFFECTIVE)
+ ret |= (state->components.group == idx);
+ if (type & XKB_STATE_LAYOUT_DEPRESSED)
+ ret |= (state->components.base_group == idx);
+ if (type & XKB_STATE_LAYOUT_LATCHED)
+ ret |= (state->components.latched_group == idx);
+ if (type & XKB_STATE_LAYOUT_LOCKED)
+ ret |= (state->components.locked_group == idx);
+
+ return ret;
+}
+
+/**
+ * Returns 1 if the given modifier is active with the specified type(s), 0 if
+ * not, or -1 if the modifier is invalid.
+ */
+XKB_EXPORT int
+xkb_state_layout_name_is_active(struct xkb_state *state, const char *name,
+ enum xkb_state_component type)
+{
+ xkb_layout_index_t idx = xkb_keymap_layout_get_index(state->keymap, name);
+
+ if (idx == XKB_LAYOUT_INVALID)
+ return -1;
+
+ return xkb_state_layout_index_is_active(state, idx, type);
+}
+
+/**
+ * Returns 1 if the given LED is active, 0 if not, or -1 if the LED is invalid.
+ */
+XKB_EXPORT int
+xkb_state_led_index_is_active(struct xkb_state *state, xkb_led_index_t idx)
+{
+ if (idx >= darray_size(state->keymap->leds) ||
+ darray_item(state->keymap->leds, idx).name == XKB_ATOM_NONE)
+ return -1;
+
+ return !!(state->components.leds & (1 << idx));
+}
+
+/**
+ * Returns 1 if the given LED is active, 0 if not, or -1 if the LED is invalid.
+ */
+XKB_EXPORT int
+xkb_state_led_name_is_active(struct xkb_state *state, const char *name)
+{
+ xkb_led_index_t idx = xkb_keymap_led_get_index(state->keymap, name);
+
+ if (idx == XKB_LED_INVALID)
+ return -1;
+
+ return xkb_state_led_index_is_active(state, idx);
+}
+
+static xkb_mod_mask_t
+key_get_consumed(struct xkb_state *state, const struct xkb_key *key)
+{
+ const struct xkb_key_type_entry *entry;
+ xkb_layout_index_t group;
+
+ group = xkb_state_key_get_layout(state, key->keycode);
+ if (group == XKB_LAYOUT_INVALID)
+ return 0;
+
+ entry = get_entry_for_key_state(state, key, group);
+ if (!entry)
+ return 0;
+
+ return entry->mods.mask & ~entry->preserve.mask;
+}
+
+/**
+ * Tests to see if a modifier is used up by our translation of a
+ * keycode to keysyms, taking note of the current modifier state and
+ * the appropriate key type's preserve information, if any. This allows
+ * the user to mask out the modifier in later processing of the
+ * modifiers, e.g. when implementing hot keys or accelerators.
+ *
+ * See also, for example:
+ * - XkbTranslateKeyCode(3), mod_rtrn return value, from libX11.
+ * - gdk_keymap_translate_keyboard_state, consumed_modifiers return value,
+ * from gtk+.
+ */
+XKB_EXPORT int
+xkb_state_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t kc,
+ xkb_mod_index_t idx)
+{
+ const struct xkb_key *key = XkbKey(state->keymap, kc);
+
+ if (!key || idx >= xkb_keymap_num_mods(state->keymap))
+ return -1;
+
+ return !!((1 << idx) & key_get_consumed(state, key));
+}
+
+/**
+ * Calculates which modifiers should be consumed during key processing,
+ * and returns the mask with all these modifiers removed. e.g. if
+ * given a state of Alt and Shift active for a two-level alphabetic
+ * key containing plus and equal on the first and second level
+ * respectively, will return a mask of only Alt, as Shift has been
+ * consumed by the type handling.
+ */
+XKB_EXPORT xkb_mod_mask_t
+xkb_state_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t kc,
+ xkb_mod_mask_t mask)
+{
+ const struct xkb_key *key = XkbKey(state->keymap, kc);
+
+ if (!key)
+ return 0;
+
+ return mask & ~key_get_consumed(state, key);
+}
diff --git a/src/3rdparty/xkbcommon/src/text.c b/src/3rdparty/xkbcommon/src/text.c
new file mode 100644
index 0000000000..4b8ad0984f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/text.c
@@ -0,0 +1,357 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#include "keymap.h"
+#include "text.h"
+
+bool
+LookupString(const LookupEntry tab[], const char *string,
+ unsigned int *value_rtrn)
+{
+ if (!string)
+ return false;
+
+ for (const LookupEntry *entry = tab; entry->name; entry++) {
+ if (istreq(entry->name, string)) {
+ *value_rtrn = entry->value;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+const char *
+LookupValue(const LookupEntry tab[], unsigned int value)
+{
+ for (const LookupEntry *entry = tab; entry->name; entry++)
+ if (entry->value == value)
+ return entry->name;
+
+ return NULL;
+}
+
+const LookupEntry ctrlMaskNames[] = {
+ { "RepeatKeys", CONTROL_REPEAT },
+ { "Repeat", CONTROL_REPEAT },
+ { "AutoRepeat", CONTROL_REPEAT },
+ { "SlowKeys", CONTROL_SLOW },
+ { "BounceKeys", CONTROL_DEBOUNCE },
+ { "StickyKeys", CONTROL_STICKY },
+ { "MouseKeys", CONTROL_MOUSEKEYS },
+ { "MouseKeysAccel", CONTROL_MOUSEKEYS_ACCEL },
+ { "AccessXKeys", CONTROL_AX },
+ { "AccessXTimeout", CONTROL_AX_TIMEOUT },
+ { "AccessXFeedback", CONTROL_AX_FEEDBACK },
+ { "AudibleBell", CONTROL_BELL },
+ { "IgnoreGroupLock", CONTROL_IGNORE_GROUP_LOCK },
+ { "all", CONTROL_ALL },
+ { "none", 0 },
+ { "Overlay1", 0 },
+ { "Overlay2", 0 },
+ { NULL, 0 }
+};
+
+const LookupEntry modComponentMaskNames[] = {
+ { "base", XKB_STATE_MODS_DEPRESSED },
+ { "latched", XKB_STATE_MODS_LATCHED },
+ { "locked", XKB_STATE_MODS_LOCKED },
+ { "effective", XKB_STATE_MODS_EFFECTIVE },
+ { "compat", XKB_STATE_MODS_EFFECTIVE },
+ { "any", XKB_STATE_MODS_EFFECTIVE },
+ { "none", 0 },
+ { NULL, 0 }
+};
+
+const LookupEntry groupComponentMaskNames[] = {
+ { "base", XKB_STATE_LAYOUT_DEPRESSED },
+ { "latched", XKB_STATE_LAYOUT_LATCHED },
+ { "locked", XKB_STATE_LAYOUT_LOCKED },
+ { "effective", XKB_STATE_LAYOUT_EFFECTIVE },
+ { "any", XKB_STATE_LAYOUT_EFFECTIVE },
+ { "none", 0 },
+ { NULL, 0 }
+};
+
+const LookupEntry groupMaskNames[] = {
+ { "Group1", 0x01 },
+ { "Group2", 0x02 },
+ { "Group3", 0x04 },
+ { "Group4", 0x08 },
+ { "Group5", 0x10 },
+ { "Group6", 0x20 },
+ { "Group7", 0x40 },
+ { "Group8", 0x80 },
+ { "none", 0x00 },
+ { "all", 0xff },
+ { NULL, 0 }
+};
+
+const LookupEntry groupNames[] = {
+ { "Group1", 1 },
+ { "Group2", 2 },
+ { "Group3", 3 },
+ { "Group4", 4 },
+ { "Group5", 5 },
+ { "Group6", 6 },
+ { "Group7", 7 },
+ { "Group8", 8 },
+ { NULL, 0 }
+};
+
+const LookupEntry levelNames[] = {
+ { "Level1", 1 },
+ { "Level2", 2 },
+ { "Level3", 3 },
+ { "Level4", 4 },
+ { "Level5", 5 },
+ { "Level6", 6 },
+ { "Level7", 7 },
+ { "Level8", 8 },
+ { NULL, 0 }
+};
+
+const LookupEntry buttonNames[] = {
+ { "Button1", 1 },
+ { "Button2", 2 },
+ { "Button3", 3 },
+ { "Button4", 4 },
+ { "Button5", 5 },
+ { "default", 0 },
+ { NULL, 0 }
+};
+
+const LookupEntry useModMapValueNames[] = {
+ { "LevelOne", 1 },
+ { "Level1", 1 },
+ { "AnyLevel", 0 },
+ { "any", 0 },
+ { NULL, 0 }
+};
+
+const LookupEntry actionTypeNames[] = {
+ { "NoAction", ACTION_TYPE_NONE },
+ { "SetMods", ACTION_TYPE_MOD_SET },
+ { "LatchMods", ACTION_TYPE_MOD_LATCH },
+ { "LockMods", ACTION_TYPE_MOD_LOCK },
+ { "SetGroup", ACTION_TYPE_GROUP_SET },
+ { "LatchGroup", ACTION_TYPE_GROUP_LATCH },
+ { "LockGroup", ACTION_TYPE_GROUP_LOCK },
+ { "MovePtr", ACTION_TYPE_PTR_MOVE },
+ { "MovePointer", ACTION_TYPE_PTR_MOVE },
+ { "PtrBtn", ACTION_TYPE_PTR_BUTTON },
+ { "PointerButton", ACTION_TYPE_PTR_BUTTON },
+ { "LockPtrBtn", ACTION_TYPE_PTR_LOCK },
+ { "LockPtrButton", ACTION_TYPE_PTR_LOCK },
+ { "LockPointerButton", ACTION_TYPE_PTR_LOCK },
+ { "LockPointerBtn", ACTION_TYPE_PTR_LOCK },
+ { "SetPtrDflt", ACTION_TYPE_PTR_DEFAULT },
+ { "SetPointerDefault", ACTION_TYPE_PTR_DEFAULT },
+ { "Terminate", ACTION_TYPE_TERMINATE },
+ { "TerminateServer", ACTION_TYPE_TERMINATE },
+ { "SwitchScreen", ACTION_TYPE_SWITCH_VT },
+ { "SetControls", ACTION_TYPE_CTRL_SET },
+ { "LockControls", ACTION_TYPE_CTRL_LOCK },
+ { "RedirectKey", ACTION_TYPE_KEY_REDIRECT },
+ { "Redirect", ACTION_TYPE_KEY_REDIRECT },
+ { "Private", ACTION_TYPE_PRIVATE },
+ /* deprecated actions below here - unused */
+ { "ISOLock", ACTION_TYPE_NONE },
+ { "ActionMessage", ACTION_TYPE_NONE },
+ { "MessageAction", ACTION_TYPE_NONE },
+ { "Message", ACTION_TYPE_NONE },
+ { "DeviceBtn", ACTION_TYPE_NONE },
+ { "DevBtn", ACTION_TYPE_NONE },
+ { "DevButton", ACTION_TYPE_NONE },
+ { "DeviceButton", ACTION_TYPE_NONE },
+ { "LockDeviceBtn", ACTION_TYPE_NONE },
+ { "LockDevBtn", ACTION_TYPE_NONE },
+ { "LockDevButton", ACTION_TYPE_NONE },
+ { "LockDeviceButton", ACTION_TYPE_NONE },
+ { "DeviceValuator", ACTION_TYPE_NONE },
+ { "DevVal", ACTION_TYPE_NONE },
+ { "DeviceVal", ACTION_TYPE_NONE },
+ { "DevValuator", ACTION_TYPE_NONE },
+ { NULL, 0 },
+};
+
+const LookupEntry symInterpretMatchMaskNames[] = {
+ { "NoneOf", MATCH_NONE },
+ { "AnyOfOrNone", MATCH_ANY_OR_NONE },
+ { "AnyOf", MATCH_ANY },
+ { "AllOf", MATCH_ALL },
+ { "Exactly", MATCH_EXACTLY },
+};
+
+const char *
+ModIndexText(const struct xkb_keymap *keymap, xkb_mod_index_t ndx)
+{
+ if (ndx == XKB_MOD_INVALID)
+ return "none";
+
+ if (ndx >= darray_size(keymap->mods))
+ return NULL;
+
+ return xkb_atom_text(keymap->ctx, darray_item(keymap->mods, ndx).name);
+}
+
+xkb_mod_index_t
+ModNameToIndex(const struct xkb_keymap *keymap, xkb_atom_t name,
+ enum mod_type type)
+{
+ xkb_mod_index_t i;
+ const struct xkb_mod *mod;
+
+ darray_enumerate(i, mod, keymap->mods)
+ if ((mod->type & type) && name == mod->name)
+ return i;
+
+ return XKB_MOD_INVALID;
+}
+
+const char *
+ActionTypeText(enum xkb_action_type type)
+{
+ const char *name = LookupValue(actionTypeNames, type);
+ return name ? name : "Private";
+}
+
+const char *
+KeysymText(struct xkb_context *ctx, xkb_keysym_t sym)
+{
+ char *buffer = xkb_context_get_buffer(ctx, 64);
+ xkb_keysym_get_name(sym, buffer, 64);
+ return buffer;
+}
+
+const char *
+KeyNameText(struct xkb_context *ctx, xkb_atom_t name)
+{
+ const char *sname = xkb_atom_text(ctx, name);
+ size_t len = strlen(sname) + 3;
+ char *buf = xkb_context_get_buffer(ctx, len);
+ snprintf(buf, len, "<%s>", sname);
+ return buf;
+}
+
+const char *
+SIMatchText(enum xkb_match_operation type)
+{
+ return LookupValue(symInterpretMatchMaskNames, type);
+}
+
+const char *
+ModMaskText(const struct xkb_keymap *keymap, xkb_mod_mask_t mask)
+{
+ char buf[1024];
+ size_t pos = 0;
+ xkb_mod_index_t i;
+ const struct xkb_mod *mod;
+
+ if (mask == 0)
+ return "none";
+
+ if (mask == MOD_REAL_MASK_ALL)
+ return "all";
+
+ darray_enumerate(i, mod, keymap->mods) {
+ int ret;
+
+ if (!(mask & (1 << i)))
+ continue;
+
+ ret = snprintf(buf + pos, sizeof(buf) - pos, "%s%s",
+ pos == 0 ? "" : "+",
+ xkb_atom_text(keymap->ctx, mod->name));
+ if (ret <= 0 || pos + ret >= sizeof(buf))
+ break;
+ else
+ pos += ret;
+ }
+
+ return strcpy(xkb_context_get_buffer(keymap->ctx, pos + 1), buf);
+}
+
+const char *
+LedStateMaskText(struct xkb_context *ctx, enum xkb_state_component mask)
+{
+ char buf[1024];
+ size_t pos = 0;
+
+ if (mask == 0)
+ return "0";
+
+ for (unsigned i = 0; mask; i++) {
+ int ret;
+
+ if (!(mask & (1 << i)))
+ continue;
+
+ mask &= ~(1 << i);
+
+ ret = snprintf(buf + pos, sizeof(buf) - pos, "%s%s",
+ pos == 0 ? "" : "+",
+ LookupValue(modComponentMaskNames, 1 << i));
+ if (ret <= 0 || pos + ret >= sizeof(buf))
+ break;
+ else
+ pos += ret;
+ }
+
+ return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf);
+}
+
+const char *
+ControlMaskText(struct xkb_context *ctx, enum xkb_action_controls mask)
+{
+ char buf[1024];
+ size_t pos = 0;
+
+ if (mask == 0)
+ return "none";
+
+ if (mask == CONTROL_ALL)
+ return "all";
+
+ for (unsigned i = 0; mask; i++) {
+ int ret;
+
+ if (!(mask & (1 << i)))
+ continue;
+
+ mask &= ~(1 << i);
+
+ ret = snprintf(buf + pos, sizeof(buf) - pos, "%s%s",
+ pos == 0 ? "" : "+",
+ LookupValue(ctrlMaskNames, 1 << i));
+ if (ret <= 0 || pos + ret >= sizeof(buf))
+ break;
+ else
+ pos += ret;
+ }
+
+ return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf);
+}
diff --git a/src/3rdparty/xkbcommon/src/text.h b/src/3rdparty/xkbcommon/src/text.h
new file mode 100644
index 0000000000..29f73abc95
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/text.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright © 2009 Dan Nicholson
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef TEXT_H
+#define TEXT_H
+
+typedef struct {
+ const char *name;
+ unsigned int value;
+} LookupEntry;
+
+bool
+LookupString(const LookupEntry tab[], const char *string,
+ unsigned int *value_rtrn);
+
+const char *
+LookupValue(const LookupEntry tab[], unsigned int value);
+
+extern const LookupEntry ctrlMaskNames[];
+extern const LookupEntry modComponentMaskNames[];
+extern const LookupEntry groupComponentMaskNames[];
+extern const LookupEntry groupMaskNames[];
+extern const LookupEntry groupNames[];
+extern const LookupEntry levelNames[];
+extern const LookupEntry buttonNames[];
+extern const LookupEntry useModMapValueNames[];
+extern const LookupEntry actionTypeNames[];
+extern const LookupEntry symInterpretMatchMaskNames[];
+
+const char *
+ModMaskText(const struct xkb_keymap *keymap, xkb_mod_mask_t mask);
+
+const char *
+ModIndexText(const struct xkb_keymap *keymap, xkb_mod_index_t ndx);
+
+xkb_mod_index_t
+ModNameToIndex(const struct xkb_keymap *keymap, xkb_atom_t name,
+ enum mod_type type);
+
+const char *
+ActionTypeText(enum xkb_action_type type);
+
+const char *
+KeysymText(struct xkb_context *ctx, xkb_keysym_t sym);
+
+const char *
+KeyNameText(struct xkb_context *ctx, xkb_atom_t name);
+
+const char *
+SIMatchText(enum xkb_match_operation type);
+
+const char *
+LedStateMaskText(struct xkb_context *ctx, enum xkb_state_component mask);
+
+const char *
+ControlMaskText(struct xkb_context *ctx, enum xkb_action_controls mask);
+
+#endif /* TEXT_H */
diff --git a/src/3rdparty/xkbcommon/src/utils.h b/src/3rdparty/xkbcommon/src/utils.h
new file mode 100644
index 0000000000..b4daaddaaa
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/utils.h
@@ -0,0 +1,136 @@
+/*
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef UTILS_H
+#define UTILS_H 1
+
+#include <inttypes.h>
+#include <stdbool.h>
+#include <string.h>
+#include <strings.h>
+
+#include "darray.h"
+
+/*
+ * We sometimes malloc strings and then expose them as const char*'s. This
+ * macro is used when we free these strings in order to avoid -Wcast-qual
+ * errors.
+ */
+#define UNCONSTIFY(const_ptr) ((void *) (uintptr_t) (const_ptr))
+
+static inline bool
+streq(const char *s1, const char *s2)
+{
+ return strcmp(s1, s2) == 0;
+}
+
+static inline bool
+streq_not_null(const char *s1, const char *s2)
+{
+ if (!s1 || !s2)
+ return false;
+ return streq(s1, s2);
+}
+
+static inline bool
+istreq(const char *s1, const char *s2)
+{
+ return strcasecmp(s1, s2) == 0;
+}
+
+static inline bool
+istreq_prefix(const char *s1, const char *s2)
+{
+ return strncasecmp(s1, s2, strlen(s1)) == 0;
+}
+
+static inline char *
+strdup_safe(const char *s)
+{
+ return s ? strdup(s) : NULL;
+}
+
+static inline bool
+isempty(const char *s)
+{
+ return s == NULL || s[0] == '\0';
+}
+
+static inline const char *
+strnull(const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static inline void *
+memdup(const void *mem, size_t nmemb, size_t size)
+{
+ void *p = malloc(nmemb * size);
+ if (p)
+ memcpy(p, mem, nmemb * size);
+ return p;
+}
+
+#define ARRAY_SIZE(arr) ((sizeof(arr) / sizeof(*(arr))))
+
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MIN3(a, b, c) MIN(MIN((a), (b)), (c))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define MAX3(a, b, c) MAX(MAX((a), (b)), (c))
+
+/* Compiler Attributes */
+
+#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__)
+# define XKB_EXPORT __attribute__((visibility("default")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define XKB_EXPORT __global
+#else /* not gcc >= 4 and not Sun Studio >= 8 */
+# define XKB_EXPORT
+#endif
+
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
+# define ATTR_PRINTF(x,y) __attribute__((__format__(__printf__, x, y)))
+#else /* not gcc >= 2.3 */
+# define ATTR_PRINTF(x,y)
+#endif
+
+#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# define ATTR_NORETURN __attribute__((__noreturn__))
+#else
+# define ATTR_NORETURN
+#endif /* GNUC */
+
+#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 296)
+#define ATTR_MALLOC __attribute__((__malloc__))
+#else
+#define ATTR_MALLOC
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define ATTR_NULL_SENTINEL __attribute__((__sentinel__))
+#else
+# define ATTR_NULL_SENTINEL
+#endif /* GNUC >= 4 */
+
+#endif /* UTILS_H */
diff --git a/src/3rdparty/xkbcommon/src/xkb-compat.c b/src/3rdparty/xkbcommon/src/xkb-compat.c
new file mode 100644
index 0000000000..3cc3ab3d6e
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkb-compat.c
@@ -0,0 +1,189 @@
+/*
+ * Copyright © 2012 Daniel Stone
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#define _XKBCOMMON_COMPAT_H /* don't mangle our legacy names! */
+
+#include "xkbcommon/xkbcommon.h"
+#include "utils.h"
+
+/* We don't carry any prototypes for these functions, as we #define them
+ * to their newer versions so people link against those. */
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+
+XKB_EXPORT struct xkb_keymap *
+xkb_map_new_from_names(struct xkb_context *context,
+ const struct xkb_rule_names *names,
+ enum xkb_keymap_compile_flags flags)
+{
+ return xkb_keymap_new_from_names(context, names, flags);
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_map_new_from_file(struct xkb_context *context, FILE *file,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags)
+{
+ return xkb_keymap_new_from_file(context, file, format, flags);
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_map_new_from_string(struct xkb_context *context, const char *string,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags)
+{
+ return xkb_keymap_new_from_string(context, string, format, flags);
+}
+
+XKB_EXPORT char *
+xkb_map_get_as_string(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_get_as_string(keymap, XKB_KEYMAP_FORMAT_TEXT_V1);
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_map_ref(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_ref(keymap);
+}
+
+XKB_EXPORT void
+xkb_map_unref(struct xkb_keymap *keymap)
+{
+ xkb_keymap_unref(keymap);
+}
+
+XKB_EXPORT xkb_mod_index_t
+xkb_map_num_mods(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_num_mods(keymap);
+}
+
+XKB_EXPORT const char *
+xkb_map_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx)
+{
+ return xkb_keymap_mod_get_name(keymap, idx);
+}
+
+XKB_EXPORT xkb_mod_index_t
+xkb_map_mod_get_index(struct xkb_keymap *keymap, const char *name)
+{
+ return xkb_keymap_mod_get_index(keymap, name);
+}
+
+XKB_EXPORT bool
+xkb_key_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t kc,
+ xkb_mod_index_t idx)
+{
+ return xkb_state_mod_index_is_consumed(state, kc, idx);
+}
+
+XKB_EXPORT xkb_mod_mask_t
+xkb_key_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t kc,
+ xkb_mod_mask_t mask)
+{
+ return xkb_state_mod_mask_remove_consumed(state, kc, mask);
+}
+
+XKB_EXPORT xkb_layout_index_t
+xkb_map_num_groups(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_num_layouts(keymap);
+}
+
+XKB_EXPORT xkb_layout_index_t
+xkb_key_num_groups(struct xkb_keymap *keymap, xkb_keycode_t kc)
+{
+ return xkb_keymap_num_layouts_for_key(keymap, kc);
+}
+
+XKB_EXPORT const char *
+xkb_map_group_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx)
+{
+ return xkb_keymap_layout_get_name(keymap, idx);
+}
+
+XKB_EXPORT xkb_layout_index_t
+xkb_map_group_get_index(struct xkb_keymap *keymap, const char *name)
+{
+ return xkb_keymap_layout_get_index(keymap, name);
+}
+
+XKB_EXPORT xkb_led_index_t
+xkb_map_num_leds(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_num_leds(keymap);
+}
+
+XKB_EXPORT const char *
+xkb_map_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx)
+{
+ return xkb_keymap_led_get_name(keymap, idx);
+}
+
+XKB_EXPORT xkb_led_index_t
+xkb_map_led_get_index(struct xkb_keymap *keymap, const char *name)
+{
+ return xkb_keymap_led_get_index(keymap, name);
+}
+
+XKB_EXPORT bool
+xkb_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t kc)
+{
+ return xkb_keymap_key_repeats(keymap, kc);
+}
+
+XKB_EXPORT int
+xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t kc,
+ const xkb_keysym_t **syms_out)
+{
+ return xkb_state_key_get_syms(state, kc, syms_out);
+}
+
+XKB_EXPORT bool
+xkb_state_group_name_is_active(struct xkb_state *state, const char *name,
+ enum xkb_state_component type)
+{
+ return xkb_state_layout_name_is_active(state, name, type);
+}
+
+XKB_EXPORT bool
+xkb_state_group_index_is_active(struct xkb_state *state, xkb_layout_index_t idx,
+ enum xkb_state_component type)
+{
+ return xkb_state_layout_index_is_active(state, idx, type);
+}
+
+XKB_EXPORT xkb_layout_index_t
+xkb_state_serialize_group(struct xkb_state *state,
+ enum xkb_state_component type)
+{
+ return xkb_state_serialize_layout(state, type);
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_state_get_map(struct xkb_state *state)
+{
+ return xkb_state_get_keymap(state);
+}
diff --git a/src/3rdparty/xkbcommon/src/xkb-keymap.c b/src/3rdparty/xkbcommon/src/xkb-keymap.c
new file mode 100644
index 0000000000..3df183a64f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkb-keymap.c
@@ -0,0 +1,555 @@
+/**
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+/************************************************************
+ * Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * ********************************************************/
+
+#include "keymap.h"
+#include "text.h"
+
+static struct xkb_keymap *
+xkb_keymap_new(struct xkb_context *ctx,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags)
+{
+ struct xkb_keymap *keymap;
+
+ keymap = calloc(1, sizeof(*keymap));
+ if (!keymap)
+ return NULL;
+
+ keymap->refcnt = 1;
+ keymap->ctx = xkb_context_ref(ctx);
+
+ keymap->format = format;
+ keymap->flags = flags;
+
+ return keymap;
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_keymap_ref(struct xkb_keymap *keymap)
+{
+ keymap->refcnt++;
+ return keymap;
+}
+
+XKB_EXPORT void
+xkb_keymap_unref(struct xkb_keymap *keymap)
+{
+ unsigned int i, j;
+ struct xkb_key *key;
+
+ if (!keymap || --keymap->refcnt > 0)
+ return;
+
+ if (keymap->keys) {
+ xkb_foreach_key(key, keymap) {
+ for (i = 0; i < key->num_groups; i++) {
+ for (j = 0; j < XkbKeyGroupWidth(key, i); j++)
+ if (key->groups[i].levels[j].num_syms > 1)
+ free(key->groups[i].levels[j].u.syms);
+ free(key->groups[i].levels);
+ }
+ free(key->groups);
+ }
+ free(keymap->keys);
+ }
+ for (i = 0; i < keymap->num_types; i++) {
+ free(keymap->types[i].entries);
+ free(keymap->types[i].level_names);
+ }
+ free(keymap->types);
+ darray_free(keymap->sym_interprets);
+ free(keymap->key_aliases);
+ free(keymap->group_names);
+ darray_free(keymap->mods);
+ darray_free(keymap->leds);
+ free(keymap->keycodes_section_name);
+ free(keymap->symbols_section_name);
+ free(keymap->types_section_name);
+ free(keymap->compat_section_name);
+ xkb_context_unref(keymap->ctx);
+ free(keymap);
+}
+
+static const struct xkb_keymap_format_ops *
+get_keymap_format_ops(enum xkb_keymap_format format)
+{
+ static const struct xkb_keymap_format_ops *keymap_format_ops[] = {
+ [XKB_KEYMAP_FORMAT_TEXT_V1] = &text_v1_keymap_format_ops,
+ };
+
+ if ((int) format < 0 || (int) format >= ARRAY_SIZE(keymap_format_ops))
+ return NULL;
+
+ return keymap_format_ops[format];
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_keymap_new_from_names(struct xkb_context *ctx,
+ const struct xkb_rule_names *rmlvo_in,
+ enum xkb_keymap_compile_flags flags)
+{
+ struct xkb_keymap *keymap;
+ struct xkb_rule_names rmlvo;
+ const enum xkb_keymap_format format = XKB_KEYMAP_FORMAT_TEXT_V1;
+ const struct xkb_keymap_format_ops *ops;
+
+ ops = get_keymap_format_ops(format);
+ if (!ops || !ops->keymap_new_from_names) {
+ log_err_func(ctx, "unsupported keymap format: %d\n", format);
+ return NULL;
+ }
+
+ if (flags & ~(XKB_MAP_COMPILE_PLACEHOLDER)) {
+ log_err_func(ctx, "unrecognized flags: %#x\n", flags);
+ return NULL;
+ }
+
+ if (rmlvo_in)
+ rmlvo = *rmlvo_in;
+ else
+ memset(&rmlvo, 0, sizeof(rmlvo));
+
+ if (isempty(rmlvo.rules))
+ rmlvo.rules = xkb_context_get_default_rules(ctx);
+ if (isempty(rmlvo.model))
+ rmlvo.model = xkb_context_get_default_model(ctx);
+ /* Layout and variant are tied together, so don't try to use one from
+ * the caller and one from the environment. */
+ if (isempty(rmlvo.layout)) {
+ rmlvo.layout = xkb_context_get_default_layout(ctx);
+ rmlvo.variant = xkb_context_get_default_variant(ctx);
+ }
+ /* Options can be empty, so respect that if passed in. */
+ if (rmlvo.options == NULL)
+ rmlvo.options = xkb_context_get_default_options(ctx);
+
+ keymap = xkb_keymap_new(ctx, format, flags);
+ if (!keymap)
+ return NULL;
+
+ if (!ops->keymap_new_from_names(keymap, &rmlvo)) {
+ xkb_keymap_unref(keymap);
+ return NULL;
+ }
+
+ return keymap;
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_keymap_new_from_string(struct xkb_context *ctx,
+ const char *string,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags)
+{
+ struct xkb_keymap *keymap;
+ const struct xkb_keymap_format_ops *ops;
+
+ ops = get_keymap_format_ops(format);
+ if (!ops || !ops->keymap_new_from_string) {
+ log_err_func(ctx, "unsupported keymap format: %d\n", format);
+ return NULL;
+ }
+
+ if (flags & ~(XKB_MAP_COMPILE_PLACEHOLDER)) {
+ log_err_func(ctx, "unrecognized flags: %#x\n", flags);
+ return NULL;
+ }
+
+ if (!string) {
+ log_err_func1(ctx, "no string specified\n");
+ return NULL;
+ }
+
+ keymap = xkb_keymap_new(ctx, format, flags);
+ if (!keymap)
+ return NULL;
+
+ if (!ops->keymap_new_from_string(keymap, string)) {
+ xkb_keymap_unref(keymap);
+ return NULL;
+ }
+
+ return keymap;
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_keymap_new_from_buffer(struct xkb_context *ctx,
+ const char *buffer, size_t length,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags)
+{
+ struct xkb_keymap *keymap;
+ const struct xkb_keymap_format_ops *ops;
+
+ ops = get_keymap_format_ops(format);
+ if (!ops || !ops->keymap_new_from_string) {
+ log_err_func(ctx, "unsupported keymap format: %d\n", format);
+ return NULL;
+ }
+
+ if (flags & ~(XKB_MAP_COMPILE_PLACEHOLDER)) {
+ log_err_func(ctx, "unrecognized flags: %#x\n", flags);
+ return NULL;
+ }
+
+ if (!buffer) {
+ log_err_func1(ctx, "no buffer specified\n");
+ return NULL;
+ }
+
+ keymap = xkb_keymap_new(ctx, format, flags);
+ if (!keymap)
+ return NULL;
+
+ if (!ops->keymap_new_from_buffer(keymap, buffer, length)) {
+ xkb_keymap_unref(keymap);
+ return NULL;
+ }
+
+ return keymap;
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_keymap_new_from_file(struct xkb_context *ctx,
+ FILE *file,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags)
+{
+ struct xkb_keymap *keymap;
+ const struct xkb_keymap_format_ops *ops;
+
+ ops = get_keymap_format_ops(format);
+ if (!ops || !ops->keymap_new_from_file) {
+ log_err_func(ctx, "unsupported keymap format: %d\n", format);
+ return NULL;
+ }
+
+ if (flags & ~(XKB_MAP_COMPILE_PLACEHOLDER)) {
+ log_err_func(ctx, "unrecognized flags: %#x\n", flags);
+ return NULL;
+ }
+
+ if (!file) {
+ log_err_func1(ctx, "no file specified\n");
+ return NULL;
+ }
+
+ keymap = xkb_keymap_new(ctx, format, flags);
+ if (!keymap)
+ return NULL;
+
+ if (!ops->keymap_new_from_file(keymap, file)) {
+ xkb_keymap_unref(keymap);
+ return NULL;
+ }
+
+ return keymap;
+}
+
+XKB_EXPORT char *
+xkb_keymap_get_as_string(struct xkb_keymap *keymap,
+ enum xkb_keymap_format format)
+{
+ const struct xkb_keymap_format_ops *ops;
+
+ if (format == XKB_KEYMAP_USE_ORIGINAL_FORMAT)
+ format = keymap->format;
+
+ ops = get_keymap_format_ops(format);
+ if (!ops || !ops->keymap_get_as_string) {
+ log_err_func(keymap->ctx, "unsupported keymap format: %d\n", format);
+ return NULL;
+ }
+
+ return ops->keymap_get_as_string(keymap);
+}
+
+/**
+ * Returns the total number of modifiers active in the keymap.
+ */
+XKB_EXPORT xkb_mod_index_t
+xkb_keymap_num_mods(struct xkb_keymap *keymap)
+{
+ return darray_size(keymap->mods);
+}
+
+/**
+ * Return the name for a given modifier.
+ */
+XKB_EXPORT const char *
+xkb_keymap_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx)
+{
+ if (idx >= darray_size(keymap->mods))
+ return NULL;
+
+ return xkb_atom_text(keymap->ctx, darray_item(keymap->mods, idx).name);
+}
+
+/**
+ * Returns the index for a named modifier.
+ */
+XKB_EXPORT xkb_mod_index_t
+xkb_keymap_mod_get_index(struct xkb_keymap *keymap, const char *name)
+{
+ xkb_mod_index_t i;
+ xkb_atom_t atom;
+ const struct xkb_mod *mod;
+
+ atom = xkb_atom_lookup(keymap->ctx, name);
+ if (atom == XKB_ATOM_NONE)
+ return XKB_MOD_INVALID;
+
+ darray_enumerate(i, mod, keymap->mods)
+ if (mod->name == atom)
+ return i;
+
+ return XKB_MOD_INVALID;
+}
+
+/**
+ * Return the total number of active groups in the keymap.
+ */
+XKB_EXPORT xkb_layout_index_t
+xkb_keymap_num_layouts(struct xkb_keymap *keymap)
+{
+ return keymap->num_groups;
+}
+
+/**
+ * Returns the name for a given group.
+ */
+XKB_EXPORT const char *
+xkb_keymap_layout_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx)
+{
+ if (idx >= keymap->num_group_names)
+ return NULL;
+
+ return xkb_atom_text(keymap->ctx, keymap->group_names[idx]);
+}
+
+/**
+ * Returns the index for a named layout.
+ */
+XKB_EXPORT xkb_layout_index_t
+xkb_keymap_layout_get_index(struct xkb_keymap *keymap, const char *name)
+{
+ xkb_atom_t atom = xkb_atom_lookup(keymap->ctx, name);
+ xkb_layout_index_t i;
+
+ if (atom == XKB_ATOM_NONE)
+ return XKB_LAYOUT_INVALID;
+
+ for (i = 0; i < keymap->num_group_names; i++)
+ if (keymap->group_names[i] == atom)
+ return i;
+
+ return XKB_LAYOUT_INVALID;
+}
+
+/**
+ * Returns the number of layouts active for a particular key.
+ */
+XKB_EXPORT xkb_layout_index_t
+xkb_keymap_num_layouts_for_key(struct xkb_keymap *keymap, xkb_keycode_t kc)
+{
+ const struct xkb_key *key = XkbKey(keymap, kc);
+
+ if (!key)
+ return 0;
+
+ return key->num_groups;
+}
+
+/**
+ * Returns the number of levels active for a particular key and layout.
+ */
+XKB_EXPORT xkb_level_index_t
+xkb_keymap_num_levels_for_key(struct xkb_keymap *keymap, xkb_keycode_t kc,
+ xkb_layout_index_t layout)
+{
+ const struct xkb_key *key = XkbKey(keymap, kc);
+
+ if (!key)
+ return 0;
+
+ layout = wrap_group_into_range(layout, key->num_groups,
+ key->out_of_range_group_action,
+ key->out_of_range_group_number);
+ if (layout == XKB_LAYOUT_INVALID)
+ return 0;
+
+ return XkbKeyGroupWidth(key, layout);
+}
+
+/**
+ * Return the total number of LEDs in the keymap.
+ */
+XKB_EXPORT xkb_led_index_t
+xkb_keymap_num_leds(struct xkb_keymap *keymap)
+{
+ return darray_size(keymap->leds);
+}
+
+/**
+ * Returns the name for a given LED.
+ */
+XKB_EXPORT const char *
+xkb_keymap_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx)
+{
+ if (idx >= darray_size(keymap->leds))
+ return NULL;
+
+ return xkb_atom_text(keymap->ctx, darray_item(keymap->leds, idx).name);
+}
+
+/**
+ * Returns the index for a named LED.
+ */
+XKB_EXPORT xkb_led_index_t
+xkb_keymap_led_get_index(struct xkb_keymap *keymap, const char *name)
+{
+ xkb_atom_t atom = xkb_atom_lookup(keymap->ctx, name);
+ xkb_led_index_t i;
+ const struct xkb_led *led;
+
+ if (atom == XKB_ATOM_NONE)
+ return XKB_LED_INVALID;
+
+ darray_enumerate(i, led, keymap->leds)
+ if (led->name == atom)
+ return i;
+
+ return XKB_LED_INVALID;
+}
+
+/**
+ * As below, but takes an explicit layout/level rather than state.
+ */
+XKB_EXPORT int
+xkb_keymap_key_get_syms_by_level(struct xkb_keymap *keymap,
+ xkb_keycode_t kc,
+ xkb_layout_index_t layout,
+ xkb_level_index_t level,
+ const xkb_keysym_t **syms_out)
+{
+ const struct xkb_key *key = XkbKey(keymap, kc);
+ int num_syms;
+
+ if (!key)
+ goto err;
+
+ layout = wrap_group_into_range(layout, key->num_groups,
+ key->out_of_range_group_action,
+ key->out_of_range_group_number);
+ if (layout == XKB_LAYOUT_INVALID)
+ goto err;
+
+ if (level >= XkbKeyGroupWidth(key, layout))
+ goto err;
+
+ num_syms = key->groups[layout].levels[level].num_syms;
+ if (num_syms == 0)
+ goto err;
+
+ if (num_syms == 1)
+ *syms_out = &key->groups[layout].levels[level].u.sym;
+ else
+ *syms_out = key->groups[layout].levels[level].u.syms;
+
+ return num_syms;
+
+err:
+ *syms_out = NULL;
+ return 0;
+}
+
+/**
+ * Simple boolean specifying whether or not the key should repeat.
+ */
+XKB_EXPORT int
+xkb_keymap_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t kc)
+{
+ const struct xkb_key *key = XkbKey(keymap, kc);
+
+ if (!key)
+ return 0;
+
+ return key->repeats;
+}
+
+struct xkb_key *
+XkbKeyByName(struct xkb_keymap *keymap, xkb_atom_t name, bool use_aliases)
+{
+ struct xkb_key *key;
+
+ xkb_foreach_key(key, keymap)
+ if (key->name == name)
+ return key;
+
+ if (use_aliases) {
+ xkb_atom_t new_name = XkbResolveKeyAlias(keymap, name);
+ if (new_name != XKB_ATOM_NONE)
+ return XkbKeyByName(keymap, new_name, false);
+ }
+
+ return NULL;
+}
+
+xkb_atom_t
+XkbResolveKeyAlias(struct xkb_keymap *keymap, xkb_atom_t name)
+{
+ for (unsigned i = 0; i < keymap->num_key_aliases; i++)
+ if (keymap->key_aliases[i].alias == name)
+ return keymap->key_aliases[i].real;
+
+ return XKB_ATOM_NONE;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/action.c b/src/3rdparty/xkbcommon/src/xkbcomp/action.c
new file mode 100644
index 0000000000..88323f9952
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/action.c
@@ -0,0 +1,951 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ * Ran Benita <ran234@gmail.com>
+ */
+
+#include "xkbcomp-priv.h"
+#include "text.h"
+#include "expr.h"
+#include "action.h"
+
+static const ExprDef constTrue = {
+ .common = { .type = STMT_EXPR, .next = NULL },
+ .op = EXPR_VALUE,
+ .value_type = EXPR_TYPE_BOOLEAN,
+ .value = { .ival = 1 },
+};
+
+static const ExprDef constFalse = {
+ .common = { .type = STMT_EXPR, .next = NULL },
+ .op = EXPR_VALUE,
+ .value_type = EXPR_TYPE_BOOLEAN,
+ .value = { .ival = 0 },
+};
+
+enum action_field {
+ ACTION_FIELD_CLEAR_LOCKS,
+ ACTION_FIELD_LATCH_TO_LOCK,
+ ACTION_FIELD_GEN_KEY_EVENT,
+ ACTION_FIELD_REPORT,
+ ACTION_FIELD_DEFAULT,
+ ACTION_FIELD_AFFECT,
+ ACTION_FIELD_INCREMENT,
+ ACTION_FIELD_MODIFIERS,
+ ACTION_FIELD_GROUP,
+ ACTION_FIELD_X,
+ ACTION_FIELD_Y,
+ ACTION_FIELD_ACCEL,
+ ACTION_FIELD_BUTTON,
+ ACTION_FIELD_VALUE,
+ ACTION_FIELD_CONTROLS,
+ ACTION_FIELD_TYPE,
+ ACTION_FIELD_COUNT,
+ ACTION_FIELD_SCREEN,
+ ACTION_FIELD_SAME,
+ ACTION_FIELD_DATA,
+ ACTION_FIELD_DEVICE,
+ ACTION_FIELD_KEYCODE,
+ ACTION_FIELD_MODS_TO_CLEAR,
+};
+
+ActionsInfo *
+NewActionsInfo(void)
+{
+ unsigned type;
+ ActionsInfo *info;
+
+ info = calloc(1, sizeof(*info));
+ if (!info)
+ return NULL;
+
+ for (type = 0; type < _ACTION_TYPE_NUM_ENTRIES; type++)
+ info->actions[type].type = type;
+
+ /* Apply some "factory defaults". */
+
+ /* Increment default button. */
+ info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.flags = 0;
+ info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.value = 1;
+
+ return info;
+}
+
+void
+FreeActionsInfo(ActionsInfo *info)
+{
+ free(info);
+}
+
+static const LookupEntry fieldStrings[] = {
+ { "clearLocks", ACTION_FIELD_CLEAR_LOCKS },
+ { "latchToLock", ACTION_FIELD_LATCH_TO_LOCK },
+ { "genKeyEvent", ACTION_FIELD_GEN_KEY_EVENT },
+ { "generateKeyEvent", ACTION_FIELD_GEN_KEY_EVENT },
+ { "report", ACTION_FIELD_REPORT },
+ { "default", ACTION_FIELD_DEFAULT },
+ { "affect", ACTION_FIELD_AFFECT },
+ { "increment", ACTION_FIELD_INCREMENT },
+ { "modifiers", ACTION_FIELD_MODIFIERS },
+ { "mods", ACTION_FIELD_MODIFIERS },
+ { "group", ACTION_FIELD_GROUP },
+ { "x", ACTION_FIELD_X },
+ { "y", ACTION_FIELD_Y },
+ { "accel", ACTION_FIELD_ACCEL },
+ { "accelerate", ACTION_FIELD_ACCEL },
+ { "repeat", ACTION_FIELD_ACCEL },
+ { "button", ACTION_FIELD_BUTTON },
+ { "value", ACTION_FIELD_VALUE },
+ { "controls", ACTION_FIELD_CONTROLS },
+ { "ctrls", ACTION_FIELD_CONTROLS },
+ { "type", ACTION_FIELD_TYPE },
+ { "count", ACTION_FIELD_COUNT },
+ { "screen", ACTION_FIELD_SCREEN },
+ { "same", ACTION_FIELD_SAME },
+ { "sameServer", ACTION_FIELD_SAME },
+ { "data", ACTION_FIELD_DATA },
+ { "device", ACTION_FIELD_DEVICE },
+ { "dev", ACTION_FIELD_DEVICE },
+ { "key", ACTION_FIELD_KEYCODE },
+ { "keycode", ACTION_FIELD_KEYCODE },
+ { "kc", ACTION_FIELD_KEYCODE },
+ { "clearmods", ACTION_FIELD_MODS_TO_CLEAR },
+ { "clearmodifiers", ACTION_FIELD_MODS_TO_CLEAR },
+ { NULL, 0 }
+};
+
+static bool
+stringToAction(const char *str, unsigned *type_rtrn)
+{
+ return LookupString(actionTypeNames, str, type_rtrn);
+}
+
+static bool
+stringToField(const char *str, enum action_field *field_rtrn)
+{
+ return LookupString(fieldStrings, str, field_rtrn);
+}
+
+static const char *
+fieldText(enum action_field field)
+{
+ return LookupValue(fieldStrings, field);
+}
+
+/***====================================================================***/
+
+static inline bool
+ReportMismatch(struct xkb_keymap *keymap, enum xkb_action_type action,
+ enum action_field field, const char *type)
+{
+ log_err(keymap->ctx,
+ "Value of %s field must be of type %s; "
+ "Action %s definition ignored\n",
+ fieldText(field), type, ActionTypeText(action));
+ return false;
+}
+
+static inline bool
+ReportIllegal(struct xkb_keymap *keymap, enum xkb_action_type action,
+ enum action_field field)
+{
+ log_err(keymap->ctx,
+ "Field %s is not defined for an action of type %s; "
+ "Action definition ignored\n",
+ fieldText(field), ActionTypeText(action));
+ return false;
+}
+
+static inline bool
+ReportActionNotArray(struct xkb_keymap *keymap, enum xkb_action_type action,
+ enum action_field field)
+{
+ log_err(keymap->ctx,
+ "The %s field in the %s action is not an array; "
+ "Action definition ignored\n",
+ fieldText(field), ActionTypeText(action));
+ return false;
+}
+
+static inline bool
+ReportNotFound(struct xkb_keymap *keymap, enum xkb_action_type action,
+ enum action_field field, const char *what, const char *bad)
+{
+ log_err(keymap->ctx,
+ "%s named %s not found; "
+ "Ignoring the %s field of an %s action\n",
+ what, bad, fieldText(field), ActionTypeText(action));
+ return false;
+}
+
+static bool
+HandleNoAction(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+
+{
+ return true;
+}
+
+static bool
+CheckLatchLockFlags(struct xkb_keymap *keymap, enum xkb_action_type action,
+ enum action_field field, const ExprDef *value,
+ enum xkb_action_flags *flags_inout)
+{
+ enum xkb_action_flags tmp;
+ bool result;
+
+ if (field == ACTION_FIELD_CLEAR_LOCKS)
+ tmp = ACTION_LOCK_CLEAR;
+ else if (field == ACTION_FIELD_LATCH_TO_LOCK)
+ tmp = ACTION_LATCH_TO_LOCK;
+ else
+ return false; /* WSGO! */
+
+ if (!ExprResolveBoolean(keymap->ctx, value, &result))
+ return ReportMismatch(keymap, action, field, "boolean");
+
+ if (result)
+ *flags_inout |= tmp;
+ else
+ *flags_inout &= ~tmp;
+
+ return true;
+}
+
+static bool
+CheckModifierField(struct xkb_keymap *keymap, enum xkb_action_type action,
+ const ExprDef *value, enum xkb_action_flags *flags_inout,
+ xkb_mod_mask_t *mods_rtrn)
+{
+ if (value->op == EXPR_IDENT) {
+ const char *valStr;
+ valStr = xkb_atom_text(keymap->ctx, value->value.str);
+ if (valStr && (istreq(valStr, "usemodmapmods") ||
+ istreq(valStr, "modmapmods"))) {
+
+ *mods_rtrn = 0;
+ *flags_inout |= ACTION_MODS_LOOKUP_MODMAP;
+ return true;
+ }
+ }
+
+ if (!ExprResolveModMask(keymap, value, MOD_BOTH, mods_rtrn))
+ return ReportMismatch(keymap, action,
+ ACTION_FIELD_MODIFIERS, "modifier mask");
+
+ *flags_inout &= ~ACTION_MODS_LOOKUP_MODMAP;
+ return true;
+}
+
+static bool
+HandleSetLatchMods(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_mod_action *act = &action->mods;
+ enum xkb_action_flags rtrn, t1;
+ xkb_mod_mask_t t2;
+
+ if (array_ndx != NULL) {
+ switch (field) {
+ case ACTION_FIELD_CLEAR_LOCKS:
+ case ACTION_FIELD_LATCH_TO_LOCK:
+ case ACTION_FIELD_MODIFIERS:
+ return ReportActionNotArray(keymap, action->type, field);
+ default:
+ break;
+ }
+ }
+
+ switch (field) {
+ case ACTION_FIELD_CLEAR_LOCKS:
+ case ACTION_FIELD_LATCH_TO_LOCK:
+ rtrn = act->flags;
+ if (CheckLatchLockFlags(keymap, action->type, field, value, &rtrn)) {
+ act->flags = rtrn;
+ return true;
+ }
+ return false;
+
+ case ACTION_FIELD_MODIFIERS:
+ t1 = act->flags;
+ if (CheckModifierField(keymap, action->type, value, &t1, &t2)) {
+ act->flags = t1;
+ act->mods.mods = t2;
+ return true;
+ }
+ return false;
+
+ default:
+ break;
+ }
+
+ return ReportIllegal(keymap, action->type, field);
+}
+
+static bool
+HandleLockMods(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_mod_action *act = &action->mods;
+ enum xkb_action_flags t1;
+ xkb_mod_mask_t t2;
+
+ if (array_ndx && field == ACTION_FIELD_MODIFIERS)
+ return ReportActionNotArray(keymap, action->type, field);
+
+ switch (field) {
+ case ACTION_FIELD_MODIFIERS:
+ t1 = act->flags;
+ if (CheckModifierField(keymap, action->type, value, &t1, &t2)) {
+ act->flags = t1;
+ act->mods.mods = t2;
+ return true;
+ }
+ return false;
+
+ default:
+ break;
+ }
+
+ return ReportIllegal(keymap, action->type, field);
+}
+
+static bool
+CheckGroupField(struct xkb_keymap *keymap, unsigned action,
+ const ExprDef *value, enum xkb_action_flags *flags_inout,
+ xkb_layout_index_t *grp_rtrn)
+{
+ const ExprDef *spec;
+
+ if (value->op == EXPR_NEGATE || value->op == EXPR_UNARY_PLUS) {
+ *flags_inout &= ~ACTION_ABSOLUTE_SWITCH;
+ spec = value->value.child;
+ }
+ else {
+ *flags_inout |= ACTION_ABSOLUTE_SWITCH;
+ spec = value;
+ }
+
+ if (!ExprResolveGroup(keymap->ctx, spec, grp_rtrn))
+ return ReportMismatch(keymap, action, ACTION_FIELD_GROUP,
+ "integer (range 1..8)");
+
+ if (value->op == EXPR_NEGATE)
+ *grp_rtrn = -*grp_rtrn;
+ else if (value->op != EXPR_UNARY_PLUS)
+ (*grp_rtrn)--;
+
+ return true;
+}
+
+static bool
+HandleSetLatchGroup(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_group_action *act = &action->group;
+ enum xkb_action_flags rtrn, t1;
+ xkb_layout_index_t t2;
+
+ if (array_ndx != NULL) {
+ switch (field) {
+ case ACTION_FIELD_CLEAR_LOCKS:
+ case ACTION_FIELD_LATCH_TO_LOCK:
+ case ACTION_FIELD_GROUP:
+ return ReportActionNotArray(keymap, action->type, field);
+
+ default:
+ break;
+ }
+ }
+
+ switch (field) {
+ case ACTION_FIELD_CLEAR_LOCKS:
+ case ACTION_FIELD_LATCH_TO_LOCK:
+ rtrn = act->flags;
+ if (CheckLatchLockFlags(keymap, action->type, field, value, &rtrn)) {
+ act->flags = rtrn;
+ return true;
+ }
+ return false;
+
+ case ACTION_FIELD_GROUP:
+ t1 = act->flags;
+ if (CheckGroupField(keymap, action->type, value, &t1, &t2)) {
+ act->flags = t1;
+ act->group = t2;
+ return true;
+ }
+ return false;
+
+ default:
+ break;
+ }
+
+ return ReportIllegal(keymap, action->type, field);
+}
+
+static bool
+HandleLockGroup(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_group_action *act = &action->group;
+ enum xkb_action_flags t1;
+ xkb_layout_index_t t2;
+
+ if ((array_ndx != NULL) && (field == ACTION_FIELD_GROUP))
+ return ReportActionNotArray(keymap, action->type, field);
+ if (field == ACTION_FIELD_GROUP) {
+ t1 = act->flags;
+ if (CheckGroupField(keymap, action->type, value, &t1, &t2)) {
+ act->flags = t1;
+ act->group = t2;
+ return true;
+ }
+ return false;
+ }
+ return ReportIllegal(keymap, action->type, field);
+}
+
+static bool
+HandleMovePtr(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_pointer_action *act = &action->ptr;
+ bool absolute;
+
+ if (array_ndx && (field == ACTION_FIELD_X || field == ACTION_FIELD_Y))
+ return ReportActionNotArray(keymap, action->type, field);
+
+ if (field == ACTION_FIELD_X || field == ACTION_FIELD_Y) {
+ int val;
+
+ if (value->op == EXPR_NEGATE || value->op == EXPR_UNARY_PLUS)
+ absolute = false;
+ else
+ absolute = true;
+
+ if (!ExprResolveInteger(keymap->ctx, value, &val))
+ return ReportMismatch(keymap, action->type, field, "integer");
+
+ if (field == ACTION_FIELD_X) {
+ if (absolute)
+ act->flags |= ACTION_ABSOLUTE_X;
+ act->x = val;
+ }
+ else {
+ if (absolute)
+ act->flags |= ACTION_ABSOLUTE_Y;
+ act->y = val;
+ }
+
+ return true;
+ }
+ else if (field == ACTION_FIELD_ACCEL) {
+ bool set;
+
+ if (!ExprResolveBoolean(keymap->ctx, value, &set))
+ return ReportMismatch(keymap, action->type, field, "boolean");
+
+ if (set)
+ act->flags &= ~ACTION_NO_ACCEL;
+ else
+ act->flags |= ACTION_NO_ACCEL;
+ }
+
+ return ReportIllegal(keymap, action->type, field);
+}
+
+static const LookupEntry lockWhich[] = {
+ { "both", 0 },
+ { "lock", ACTION_LOCK_NO_UNLOCK },
+ { "neither", (ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK) },
+ { "unlock", ACTION_LOCK_NO_LOCK },
+ { NULL, 0 }
+};
+
+static bool
+HandlePtrBtn(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_pointer_button_action *act = &action->btn;
+
+ if (field == ACTION_FIELD_BUTTON) {
+ int btn;
+
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
+ if (!ExprResolveButton(keymap->ctx, value, &btn))
+ return ReportMismatch(keymap, action->type, field,
+ "integer (range 1..5)");
+
+ if (btn < 0 || btn > 5) {
+ log_err(keymap->ctx,
+ "Button must specify default or be in the range 1..5; "
+ "Illegal button value %d ignored\n", btn);
+ return false;
+ }
+
+ act->button = btn;
+ return true;
+ }
+ else if (action->type == ACTION_TYPE_PTR_LOCK &&
+ field == ACTION_FIELD_AFFECT) {
+ enum xkb_action_flags val;
+
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
+ if (!ExprResolveEnum(keymap->ctx, value, &val, lockWhich))
+ return ReportMismatch(keymap, action->type, field,
+ "lock or unlock");
+
+ act->flags &= ~(ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK);
+ act->flags |= val;
+ return true;
+ }
+ else if (field == ACTION_FIELD_COUNT) {
+ int btn;
+
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
+ /* XXX: Should this actually be ResolveButton? */
+ if (!ExprResolveButton(keymap->ctx, value, &btn))
+ return ReportMismatch(keymap, action->type, field, "integer");
+
+ if (btn < 0 || btn > 255) {
+ log_err(keymap->ctx,
+ "The count field must have a value in the range 0..255; "
+ "Illegal count %d ignored\n", btn);
+ return false;
+ }
+
+ act->count = btn;
+ return true;
+ }
+ return ReportIllegal(keymap, action->type, field);
+}
+
+static const LookupEntry ptrDflts[] = {
+ { "dfltbtn", 1 },
+ { "defaultbutton", 1 },
+ { "button", 1 },
+ { NULL, 0 }
+};
+
+static bool
+HandleSetPtrDflt(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_pointer_default_action *act = &action->dflt;
+
+ if (field == ACTION_FIELD_AFFECT) {
+ unsigned int val;
+
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
+ if (!ExprResolveEnum(keymap->ctx, value, &val, ptrDflts))
+ return ReportMismatch(keymap, action->type, field,
+ "pointer component");
+ return true;
+ }
+ else if (field == ACTION_FIELD_BUTTON || field == ACTION_FIELD_VALUE) {
+ const ExprDef *button;
+ int btn;
+
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
+ if (value->op == EXPR_NEGATE || value->op == EXPR_UNARY_PLUS) {
+ act->flags &= ~ACTION_ABSOLUTE_SWITCH;
+ button = value->value.child;
+ }
+ else {
+ act->flags |= ACTION_ABSOLUTE_SWITCH;
+ button = value;
+ }
+
+ if (!ExprResolveButton(keymap->ctx, button, &btn))
+ return ReportMismatch(keymap, action->type, field,
+ "integer (range 1..5)");
+
+ if (btn < 0 || btn > 5) {
+ log_err(keymap->ctx,
+ "New default button value must be in the range 1..5; "
+ "Illegal default button value %d ignored\n", btn);
+ return false;
+ }
+ if (btn == 0) {
+ log_err(keymap->ctx,
+ "Cannot set default pointer button to \"default\"; "
+ "Illegal default button setting ignored\n");
+ return false;
+ }
+
+ act->value = (value->op == EXPR_NEGATE ? -btn: btn);
+ return true;
+ }
+
+ return ReportIllegal(keymap, action->type, field);
+}
+
+static bool
+HandleSwitchScreen(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_switch_screen_action *act = &action->screen;
+
+ if (field == ACTION_FIELD_SCREEN) {
+ const ExprDef *scrn;
+ int val;
+
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
+ if (value->op == EXPR_NEGATE || value->op == EXPR_UNARY_PLUS) {
+ act->flags &= ~ACTION_ABSOLUTE_SWITCH;
+ scrn = value->value.child;
+ }
+ else {
+ act->flags |= ACTION_ABSOLUTE_SWITCH;
+ scrn = value;
+ }
+
+ if (!ExprResolveInteger(keymap->ctx, scrn, &val))
+ return ReportMismatch(keymap, action->type, field,
+ "integer (0..255)");
+
+ if (val < 0 || val > 255) {
+ log_err(keymap->ctx,
+ "Screen index must be in the range 1..255; "
+ "Illegal screen value %d ignored\n", val);
+ return false;
+ }
+
+ act->screen = (value->op == EXPR_NEGATE ? -val : val);
+ return true;
+ }
+ else if (field == ACTION_FIELD_SAME) {
+ bool set;
+
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
+ if (!ExprResolveBoolean(keymap->ctx, value, &set))
+ return ReportMismatch(keymap, action->type, field, "boolean");
+
+ if (set)
+ act->flags &= ~ACTION_SAME_SCREEN;
+ else
+ act->flags |= ACTION_SAME_SCREEN;
+
+ return true;
+ }
+
+ return ReportIllegal(keymap, action->type, field);
+}
+
+static bool
+HandleSetLockControls(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_controls_action *act = &action->ctrls;
+
+ if (field == ACTION_FIELD_CONTROLS) {
+ unsigned int mask;
+
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
+ if (!ExprResolveMask(keymap->ctx, value, &mask, ctrlMaskNames))
+ return ReportMismatch(keymap, action->type, field,
+ "controls mask");
+
+ act->ctrls = mask;
+ return true;
+ }
+
+ return ReportIllegal(keymap, action->type, field);
+}
+
+static bool
+HandlePrivate(struct xkb_keymap *keymap, union xkb_action *action,
+ enum action_field field, const ExprDef *array_ndx,
+ const ExprDef *value)
+{
+ struct xkb_private_action *act = &action->priv;
+
+ if (field == ACTION_FIELD_TYPE) {
+ int type;
+
+ if (!ExprResolveInteger(keymap->ctx, value, &type))
+ return ReportMismatch(keymap, ACTION_TYPE_PRIVATE, field, "integer");
+
+ if (type < 0 || type > 255) {
+ log_err(keymap->ctx,
+ "Private action type must be in the range 0..255; "
+ "Illegal type %d ignored\n", type);
+ return false;
+ }
+
+ /*
+ * It's possible for someone to write something like this:
+ * actions = [ Private(type=3,data[0]=1,data[1]=3,data[2]=3) ]
+ * where the type refers to some existing action type, e.g. LockMods.
+ * This assumes that this action's struct is laid out in memory
+ * exactly as described in the XKB specification and libraries.
+ * We, however, have changed these structs in various ways, so this
+ * assumption is no longer true. Since this is a lousy "feature", we
+ * make actions like these no-ops for now.
+ */
+ if (type < ACTION_TYPE_PRIVATE) {
+ log_info(keymap->ctx,
+ "Private actions of type %s are not supported; Ignored\n",
+ ActionTypeText(type));
+ act->type = ACTION_TYPE_NONE;
+ }
+ else {
+ act->type = (enum xkb_action_type) type;
+ }
+
+ return true;
+ }
+ else if (field == ACTION_FIELD_DATA) {
+ if (array_ndx == NULL) {
+ xkb_atom_t val;
+ const char *str;
+ int len;
+
+ if (!ExprResolveString(keymap->ctx, value, &val))
+ return ReportMismatch(keymap, action->type, field, "string");
+
+ str = xkb_atom_text(keymap->ctx, val);
+ len = strlen(str);
+ if (len < 1 || len > 7) {
+ log_warn(keymap->ctx,
+ "A private action has 7 data bytes; "
+ "Extra %d bytes ignored\n", len - 6);
+ return false;
+ }
+
+ strncpy((char *) act->data, str, sizeof(act->data));
+ return true;
+ }
+ else {
+ int ndx, datum;
+
+ if (!ExprResolveInteger(keymap->ctx, array_ndx, &ndx)) {
+ log_err(keymap->ctx,
+ "Array subscript must be integer; "
+ "Illegal subscript ignored\n");
+ return false;
+ }
+
+ if (ndx < 0 || ndx >= sizeof(act->data)) {
+ log_err(keymap->ctx,
+ "The data for a private action is %lu bytes long; "
+ "Attempt to use data[%d] ignored\n",
+ (unsigned long) sizeof(act->data), ndx);
+ return false;
+ }
+
+ if (!ExprResolveInteger(keymap->ctx, value, &datum))
+ return ReportMismatch(keymap, act->type, field, "integer");
+
+ if (datum < 0 || datum > 255) {
+ log_err(keymap->ctx,
+ "All data for a private action must be 0..255; "
+ "Illegal datum %d ignored\n", datum);
+ return false;
+ }
+
+ act->data[ndx] = (uint8_t) datum;
+ return true;
+ }
+ }
+
+ return ReportIllegal(keymap, ACTION_TYPE_NONE, field);
+}
+
+typedef bool (*actionHandler)(struct xkb_keymap *keymap,
+ union xkb_action *action,
+ enum action_field field,
+ const ExprDef *array_ndx,
+ const ExprDef *value);
+
+static const actionHandler handleAction[_ACTION_TYPE_NUM_ENTRIES] = {
+ [ACTION_TYPE_NONE] = HandleNoAction,
+ [ACTION_TYPE_MOD_SET] = HandleSetLatchMods,
+ [ACTION_TYPE_MOD_LATCH] = HandleSetLatchMods,
+ [ACTION_TYPE_MOD_LOCK] = HandleLockMods,
+ [ACTION_TYPE_GROUP_SET] = HandleSetLatchGroup,
+ [ACTION_TYPE_GROUP_LATCH] = HandleSetLatchGroup,
+ [ACTION_TYPE_GROUP_LOCK] = HandleLockGroup,
+ [ACTION_TYPE_PTR_MOVE] = HandleMovePtr,
+ [ACTION_TYPE_PTR_BUTTON] = HandlePtrBtn,
+ [ACTION_TYPE_PTR_LOCK] = HandlePtrBtn,
+ [ACTION_TYPE_PTR_DEFAULT] = HandleSetPtrDflt,
+ [ACTION_TYPE_TERMINATE] = HandleNoAction,
+ [ACTION_TYPE_SWITCH_VT] = HandleSwitchScreen,
+ [ACTION_TYPE_CTRL_SET] = HandleSetLockControls,
+ [ACTION_TYPE_CTRL_LOCK] = HandleSetLockControls,
+ [ACTION_TYPE_PRIVATE] = HandlePrivate,
+};
+
+/***====================================================================***/
+
+bool
+HandleActionDef(ExprDef *def, struct xkb_keymap *keymap,
+ union xkb_action *action, ActionsInfo *info)
+{
+ ExprDef *arg;
+ const char *str;
+ unsigned handler_type;
+
+ if (def->op != EXPR_ACTION_DECL) {
+ log_err(keymap->ctx, "Expected an action definition, found %s\n",
+ expr_op_type_to_string(def->op));
+ return false;
+ }
+
+ str = xkb_atom_text(keymap->ctx, def->value.action.name);
+ if (!stringToAction(str, &handler_type)) {
+ log_err(keymap->ctx, "Unknown action %s\n", str);
+ return false;
+ }
+
+ /*
+ * Get the default values for this action type, as modified by
+ * statements such as:
+ * latchMods.clearLocks = True;
+ */
+ *action = info->actions[handler_type];
+
+ /*
+ * Now change the action properties as specified for this
+ * particular instance, e.g. "modifiers" and "clearLocks" in:
+ * SetMods(modifiers=Alt,clearLocks);
+ */
+ for (arg = def->value.action.args; arg != NULL;
+ arg = (ExprDef *) arg->common.next) {
+ const ExprDef *value;
+ ExprDef *field, *arrayRtrn;
+ const char *elemRtrn, *fieldRtrn;
+ enum action_field fieldNdx;
+
+ if (arg->op == EXPR_ASSIGN) {
+ field = arg->value.binary.left;
+ value = arg->value.binary.right;
+ }
+ else if (arg->op == EXPR_NOT || arg->op == EXPR_INVERT) {
+ field = arg->value.child;
+ value = &constFalse;
+ }
+ else {
+ field = arg;
+ value = &constTrue;
+ }
+
+ if (!ExprResolveLhs(keymap->ctx, field, &elemRtrn, &fieldRtrn,
+ &arrayRtrn))
+ return false;
+
+ if (elemRtrn) {
+ log_err(keymap->ctx,
+ "Cannot change defaults in an action definition; "
+ "Ignoring attempt to change %s.%s\n",
+ elemRtrn, fieldRtrn);
+ return false;
+ }
+
+ if (!stringToField(fieldRtrn, &fieldNdx)) {
+ log_err(keymap->ctx, "Unknown field name %s\n", fieldRtrn);
+ return false;
+ }
+
+ if (!handleAction[handler_type](keymap, action, fieldNdx, arrayRtrn,
+ value))
+ return false;
+ }
+
+ return true;
+}
+
+
+bool
+SetActionField(struct xkb_keymap *keymap, const char *elem, const char *field,
+ ExprDef *array_ndx, ExprDef *value, ActionsInfo *info)
+{
+ unsigned action;
+ enum action_field action_field;
+
+ if (!stringToAction(elem, &action))
+ return false;
+
+ if (!stringToField(field, &action_field)) {
+ log_err(keymap->ctx, "\"%s\" is not a legal field name\n", field);
+ return false;
+ }
+
+ return handleAction[action](keymap, &info->actions[action],
+ action_field, array_ndx, value);
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/action.h b/src/3rdparty/xkbcommon/src/xkbcomp/action.h
new file mode 100644
index 0000000000..82915ef57d
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/action.h
@@ -0,0 +1,53 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#ifndef XKBCOMP_ACTION_H
+#define XKBCOMP_ACTION_H
+
+/*
+ * This struct contains the default values which every new action
+ * (e.g. in an interpret statement) starts off with. It can be
+ * modified within the files (see calls to SetActionField).
+ */
+typedef struct {
+ union xkb_action actions[_ACTION_TYPE_NUM_ENTRIES];
+} ActionsInfo;
+
+ActionsInfo *
+NewActionsInfo(void);
+
+void
+FreeActionsInfo(ActionsInfo *info);
+
+bool
+HandleActionDef(ExprDef *def, struct xkb_keymap *keymap,
+ union xkb_action *action, ActionsInfo *info);
+
+bool
+SetActionField(struct xkb_keymap *keymap, const char *elem, const char *field,
+ ExprDef *array_ndx, ExprDef *value, ActionsInfo *info);
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.c b/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.c
new file mode 100644
index 0000000000..c9b7cb0a3e
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.c
@@ -0,0 +1,793 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ * Ran Benita <ran234@gmail.com>
+ */
+
+#include "xkbcomp-priv.h"
+#include "ast-build.h"
+#include "parser-priv.h"
+#include "include.h"
+
+ParseCommon *
+AppendStmt(ParseCommon *to, ParseCommon *append)
+{
+ ParseCommon *iter;
+
+ if (!to)
+ return append;
+
+ for (iter = to; iter->next; iter = iter->next);
+
+ iter->next = append;
+ return to;
+}
+
+ExprDef *
+ExprCreate(enum expr_op_type op, enum expr_value_type type)
+{
+ ExprDef *expr = malloc(sizeof(*expr));
+ if (!expr)
+ return NULL;
+
+ expr->common.type = STMT_EXPR;
+ expr->common.next = NULL;
+ expr->op = op;
+ expr->value_type = type;
+
+ return expr;
+}
+
+ExprDef *
+ExprCreateUnary(enum expr_op_type op, enum expr_value_type type,
+ ExprDef *child)
+{
+ ExprDef *expr = malloc(sizeof(*expr));
+ if (!expr)
+ return NULL;
+
+ expr->common.type = STMT_EXPR;
+ expr->common.next = NULL;
+ expr->op = op;
+ expr->value_type = type;
+ expr->value.child = child;
+
+ return expr;
+}
+
+ExprDef *
+ExprCreateBinary(enum expr_op_type op, ExprDef *left, ExprDef *right)
+{
+ ExprDef *expr = malloc(sizeof(*expr));
+ if (!expr)
+ return NULL;
+
+ expr->common.type = STMT_EXPR;
+ expr->common.next = NULL;
+ expr->op = op;
+ if (op == EXPR_ASSIGN || left->value_type == EXPR_TYPE_UNKNOWN)
+ expr->value_type = right->value_type;
+ else if (left->value_type == right->value_type ||
+ right->value_type == EXPR_TYPE_UNKNOWN)
+ expr->value_type = left->value_type;
+ else
+ expr->value_type = EXPR_TYPE_UNKNOWN;
+ expr->value.binary.left = left;
+ expr->value.binary.right = right;
+
+ return expr;
+}
+
+KeycodeDef *
+KeycodeCreate(xkb_atom_t name, int64_t value)
+{
+ KeycodeDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_KEYCODE;
+ def->common.next = NULL;
+ def->name = name;
+ def->value = value;
+
+ return def;
+}
+
+KeyAliasDef *
+KeyAliasCreate(xkb_atom_t alias, xkb_atom_t real)
+{
+ KeyAliasDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_ALIAS;
+ def->common.next = NULL;
+ def->alias = alias;
+ def->real = real;
+
+ return def;
+}
+
+VModDef *
+VModCreate(xkb_atom_t name, ExprDef *value)
+{
+ VModDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_VMOD;
+ def->common.next = NULL;
+ def->name = name;
+ def->value = value;
+
+ return def;
+}
+
+VarDef *
+VarCreate(ExprDef *name, ExprDef *value)
+{
+ VarDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_VAR;
+ def->common.next = NULL;
+ def->name = name;
+ def->value = value;
+
+ return def;
+}
+
+VarDef *
+BoolVarCreate(xkb_atom_t nameToken, unsigned set)
+{
+ ExprDef *name, *value;
+ VarDef *def;
+
+ name = ExprCreate(EXPR_IDENT, EXPR_TYPE_UNKNOWN);
+ name->value.str = nameToken;
+ value = ExprCreate(EXPR_VALUE, EXPR_TYPE_BOOLEAN);
+ value->value.uval = set;
+ def = VarCreate(name, value);
+
+ return def;
+}
+
+InterpDef *
+InterpCreate(char *sym, ExprDef *match)
+{
+ InterpDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_INTERP;
+ def->common.next = NULL;
+ def->sym = sym;
+ def->match = match;
+
+ return def;
+}
+
+KeyTypeDef *
+KeyTypeCreate(xkb_atom_t name, VarDef *body)
+{
+ KeyTypeDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_TYPE;
+ def->common.next = NULL;
+ def->merge = MERGE_DEFAULT;
+ def->name = name;
+ def->body = body;
+
+ return def;
+}
+
+SymbolsDef *
+SymbolsCreate(xkb_atom_t keyName, ExprDef *symbols)
+{
+ SymbolsDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_SYMBOLS;
+ def->common.next = NULL;
+ def->merge = MERGE_DEFAULT;
+ def->keyName = keyName;
+ def->symbols = symbols;
+
+ return def;
+}
+
+GroupCompatDef *
+GroupCompatCreate(int group, ExprDef *val)
+{
+ GroupCompatDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_GROUP_COMPAT;
+ def->common.next = NULL;
+ def->merge = MERGE_DEFAULT;
+ def->group = group;
+ def->def = val;
+
+ return def;
+}
+
+ModMapDef *
+ModMapCreate(uint32_t modifier, ExprDef *keys)
+{
+ ModMapDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_MODMAP;
+ def->common.next = NULL;
+ def->merge = MERGE_DEFAULT;
+ def->modifier = modifier;
+ def->keys = keys;
+
+ return def;
+}
+
+LedMapDef *
+LedMapCreate(xkb_atom_t name, VarDef *body)
+{
+ LedMapDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_LED_MAP;
+ def->common.next = NULL;
+ def->merge = MERGE_DEFAULT;
+ def->name = name;
+ def->body = body;
+
+ return def;
+}
+
+LedNameDef *
+LedNameCreate(int ndx, ExprDef *name, bool virtual)
+{
+ LedNameDef *def = malloc(sizeof(*def));
+ if (!def)
+ return NULL;
+
+ def->common.type = STMT_LED_NAME;
+ def->common.next = NULL;
+ def->merge = MERGE_DEFAULT;
+ def->ndx = ndx;
+ def->name = name;
+ def->virtual = virtual;
+
+ return def;
+}
+
+ExprDef *
+ActionCreate(xkb_atom_t name, ExprDef *args)
+{
+ ExprDef *act = malloc(sizeof(*act));
+ if (!act)
+ return NULL;
+
+ act->common.type = STMT_EXPR;
+ act->common.next = NULL;
+ act->op = EXPR_ACTION_DECL;
+ act->value.action.name = name;
+ act->value.action.args = args;
+
+ return act;
+}
+
+ExprDef *
+CreateKeysymList(char *sym)
+{
+ ExprDef *def;
+
+ def = ExprCreate(EXPR_KEYSYM_LIST, EXPR_TYPE_SYMBOLS);
+
+ darray_init(def->value.list.syms);
+ darray_init(def->value.list.symsMapIndex);
+ darray_init(def->value.list.symsNumEntries);
+
+ darray_append(def->value.list.syms, sym);
+ darray_append(def->value.list.symsMapIndex, 0);
+ darray_append(def->value.list.symsNumEntries, 1);
+
+ return def;
+}
+
+ExprDef *
+CreateMultiKeysymList(ExprDef *list)
+{
+ size_t nLevels = darray_size(list->value.list.symsMapIndex);
+
+ darray_resize(list->value.list.symsMapIndex, 1);
+ darray_resize(list->value.list.symsNumEntries, 1);
+ darray_item(list->value.list.symsMapIndex, 0) = 0;
+ darray_item(list->value.list.symsNumEntries, 0) = nLevels;
+
+ return list;
+}
+
+ExprDef *
+AppendKeysymList(ExprDef *list, char *sym)
+{
+ size_t nSyms = darray_size(list->value.list.syms);
+
+ darray_append(list->value.list.symsMapIndex, nSyms);
+ darray_append(list->value.list.symsNumEntries, 1);
+ darray_append(list->value.list.syms, sym);
+
+ return list;
+}
+
+ExprDef *
+AppendMultiKeysymList(ExprDef *list, ExprDef *append)
+{
+ size_t nSyms = darray_size(list->value.list.syms);
+ size_t numEntries = darray_size(append->value.list.syms);
+
+ darray_append(list->value.list.symsMapIndex, nSyms);
+ darray_append(list->value.list.symsNumEntries, numEntries);
+ darray_append_items(list->value.list.syms,
+ darray_mem(append->value.list.syms, 0),
+ numEntries);
+
+ darray_resize(append->value.list.syms, 0);
+ FreeStmt(&append->common);
+
+ return list;
+}
+
+static void
+FreeInclude(IncludeStmt *incl);
+
+IncludeStmt *
+IncludeCreate(struct xkb_context *ctx, char *str, enum merge_mode merge)
+{
+ IncludeStmt *incl, *first;
+ char *file, *map, *stmt, *tmp, *extra_data;
+ char nextop;
+
+ incl = first = NULL;
+ file = map = NULL;
+ tmp = str;
+ stmt = strdup_safe(str);
+ while (tmp && *tmp)
+ {
+ if (!ParseIncludeMap(&tmp, &file, &map, &nextop, &extra_data))
+ goto err;
+
+ /*
+ * Given an RMLVO (here layout) like 'us,,fr', the rules parser
+ * will give out something like 'pc+us+:2+fr:3+inet(evdev)'.
+ * We should just skip the ':2' in this case and leave it to the
+ * appropriate section to deal with the empty group.
+ */
+ if (isempty(file)) {
+ free(file);
+ free(map);
+ free(extra_data);
+ continue;
+ }
+
+ if (first == NULL) {
+ first = incl = malloc(sizeof(*first));
+ } else {
+ incl->next_incl = malloc(sizeof(*first));
+ incl = incl->next_incl;
+ }
+
+ if (!incl) {
+ log_wsgo(ctx,
+ "Allocation failure in IncludeCreate; "
+ "Using only part of the include\n");
+ break;
+ }
+
+ incl->common.type = STMT_INCLUDE;
+ incl->common.next = NULL;
+ incl->merge = merge;
+ incl->stmt = NULL;
+ incl->file = file;
+ incl->map = map;
+ incl->modifier = extra_data;
+ incl->next_incl = NULL;
+
+ if (nextop == '|')
+ merge = MERGE_AUGMENT;
+ else
+ merge = MERGE_OVERRIDE;
+ }
+
+ if (first)
+ first->stmt = stmt;
+ else
+ free(stmt);
+
+ return first;
+
+err:
+ log_err(ctx, "Illegal include statement \"%s\"; Ignored\n", stmt);
+ FreeInclude(first);
+ free(stmt);
+ return NULL;
+}
+
+static void
+EscapeMapName(char *name)
+{
+ /*
+ * All latin-1 alphanumerics, plus parens, slash, minus, underscore and
+ * wildcards.
+ */
+ static const unsigned char legal[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, 0xff, 0x83,
+ 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff
+ };
+
+ if (!name)
+ return;
+
+ while (*name) {
+ if (!(legal[*name / 8] & (1 << (*name % 8))))
+ *name = '_';
+ name++;
+ }
+}
+
+XkbFile *
+XkbFileCreate(struct xkb_context *ctx, enum xkb_file_type type, char *name,
+ ParseCommon *defs, enum xkb_map_flags flags)
+{
+ XkbFile *file;
+
+ file = calloc(1, sizeof(*file));
+ if (!file)
+ return NULL;
+
+ EscapeMapName(name);
+ file->file_type = type;
+ file->topName = strdup_safe(name);
+ file->name = name;
+ file->defs = defs;
+ file->flags = flags;
+
+ return file;
+}
+
+XkbFile *
+XkbFileFromComponents(struct xkb_context *ctx,
+ const struct xkb_component_names *kkctgs)
+{
+ char *const components[] = {
+ kkctgs->keycodes, kkctgs->types,
+ kkctgs->compat, kkctgs->symbols,
+ };
+ enum xkb_file_type type;
+ IncludeStmt *include = NULL;
+ XkbFile *file = NULL;
+ ParseCommon *defs = NULL;
+
+ for (type = FIRST_KEYMAP_FILE_TYPE; type <= LAST_KEYMAP_FILE_TYPE; type++) {
+ include = IncludeCreate(ctx, components[type], MERGE_DEFAULT);
+ if (!include)
+ goto err;
+
+ file = XkbFileCreate(ctx, type, NULL, &include->common, 0);
+ if (!file) {
+ FreeInclude(include);
+ goto err;
+ }
+
+ defs = AppendStmt(defs, &file->common);
+ }
+
+ file = XkbFileCreate(ctx, FILE_TYPE_KEYMAP, NULL, defs, 0);
+ if (!file)
+ goto err;
+
+ return file;
+
+err:
+ FreeXkbFile((XkbFile *) defs);
+ return NULL;
+}
+
+static void
+FreeExpr(ExprDef *expr)
+{
+ char **sym;
+
+ if (!expr)
+ return;
+
+ switch (expr->op) {
+ case EXPR_ACTION_LIST:
+ case EXPR_NEGATE:
+ case EXPR_UNARY_PLUS:
+ case EXPR_NOT:
+ case EXPR_INVERT:
+ FreeStmt(&expr->value.child->common);
+ break;
+
+ case EXPR_DIVIDE:
+ case EXPR_ADD:
+ case EXPR_SUBTRACT:
+ case EXPR_MULTIPLY:
+ case EXPR_ASSIGN:
+ FreeStmt(&expr->value.binary.left->common);
+ FreeStmt(&expr->value.binary.right->common);
+ break;
+
+ case EXPR_ACTION_DECL:
+ FreeStmt(&expr->value.action.args->common);
+ break;
+
+ case EXPR_ARRAY_REF:
+ FreeStmt(&expr->value.array.entry->common);
+ break;
+
+ case EXPR_KEYSYM_LIST:
+ darray_foreach(sym, expr->value.list.syms)
+ free(*sym);
+ darray_free(expr->value.list.syms);
+ darray_free(expr->value.list.symsMapIndex);
+ darray_free(expr->value.list.symsNumEntries);
+ break;
+
+ default:
+ break;
+ }
+}
+
+static void
+FreeInclude(IncludeStmt *incl)
+{
+ IncludeStmt *next;
+
+ while (incl)
+ {
+ next = incl->next_incl;
+
+ free(incl->file);
+ free(incl->map);
+ free(incl->modifier);
+ free(incl->stmt);
+
+ free(incl);
+ incl = next;
+ }
+}
+
+void
+FreeStmt(ParseCommon *stmt)
+{
+ ParseCommon *next;
+ YYSTYPE u;
+
+ while (stmt)
+ {
+ next = stmt->next;
+ u.any = stmt;
+
+ switch (stmt->type) {
+ case STMT_INCLUDE:
+ FreeInclude((IncludeStmt *) stmt);
+ /* stmt is already free'd here. */
+ stmt = NULL;
+ break;
+ case STMT_EXPR:
+ FreeExpr(u.expr);
+ break;
+ case STMT_VAR:
+ FreeStmt(&u.var->name->common);
+ FreeStmt(&u.var->value->common);
+ break;
+ case STMT_TYPE:
+ FreeStmt(&u.keyType->body->common);
+ break;
+ case STMT_INTERP:
+ free(u.interp->sym);
+ FreeStmt(&u.interp->match->common);
+ FreeStmt(&u.interp->def->common);
+ break;
+ case STMT_VMOD:
+ FreeStmt(&u.vmod->value->common);
+ break;
+ case STMT_SYMBOLS:
+ FreeStmt(&u.syms->symbols->common);
+ break;
+ case STMT_MODMAP:
+ FreeStmt(&u.modMask->keys->common);
+ break;
+ case STMT_GROUP_COMPAT:
+ FreeStmt(&u.groupCompat->def->common);
+ break;
+ case STMT_LED_MAP:
+ FreeStmt(&u.ledMap->body->common);
+ break;
+ case STMT_LED_NAME:
+ FreeStmt(&u.ledName->name->common);
+ break;
+ default:
+ break;
+ }
+
+ free(stmt);
+ stmt = next;
+ }
+}
+
+void
+FreeXkbFile(XkbFile *file)
+{
+ XkbFile *next;
+
+ while (file)
+ {
+ next = (XkbFile *) file->common.next;
+
+ switch (file->file_type) {
+ case FILE_TYPE_KEYMAP:
+ FreeXkbFile((XkbFile *) file->defs);
+ break;
+
+ case FILE_TYPE_TYPES:
+ case FILE_TYPE_COMPAT:
+ case FILE_TYPE_SYMBOLS:
+ case FILE_TYPE_KEYCODES:
+ case FILE_TYPE_GEOMETRY:
+ FreeStmt(file->defs);
+ break;
+
+ default:
+ break;
+ }
+
+ free(file->name);
+ free(file->topName);
+ free(file);
+ file = next;
+ }
+}
+
+static const char *xkb_file_type_strings[_FILE_TYPE_NUM_ENTRIES] = {
+ [FILE_TYPE_KEYCODES] = "xkb_keycodes",
+ [FILE_TYPE_TYPES] = "xkb_types",
+ [FILE_TYPE_COMPAT] = "xkb_compatibility",
+ [FILE_TYPE_SYMBOLS] = "xkb_symbols",
+ [FILE_TYPE_GEOMETRY] = "xkb_geometry",
+ [FILE_TYPE_KEYMAP] = "xkb_keymap",
+ [FILE_TYPE_RULES] = "rules",
+};
+
+const char *
+xkb_file_type_to_string(enum xkb_file_type type)
+{
+ if (type > _FILE_TYPE_NUM_ENTRIES)
+ return "unknown";
+ return xkb_file_type_strings[type];
+}
+
+static const char *stmt_type_strings[_STMT_NUM_VALUES] = {
+ [STMT_UNKNOWN] = "unknown statement",
+ [STMT_INCLUDE] = "include statement",
+ [STMT_KEYCODE] = "key name definition",
+ [STMT_ALIAS] = "key alias definition",
+ [STMT_EXPR] = "expression",
+ [STMT_VAR] = "variable definition",
+ [STMT_TYPE] = "key type definition",
+ [STMT_INTERP] = "symbol interpretation definition",
+ [STMT_VMOD] = "virtual modifiers definition",
+ [STMT_SYMBOLS] = "key symbols definition",
+ [STMT_MODMAP] = "modifier map declaration",
+ [STMT_GROUP_COMPAT] = "group declaration",
+ [STMT_LED_MAP] = "indicator map declaration",
+ [STMT_LED_NAME] = "indicator name declaration",
+};
+
+const char *
+stmt_type_to_string(enum stmt_type type)
+{
+ if (type >= _STMT_NUM_VALUES)
+ return NULL;
+ return stmt_type_strings[type];
+}
+
+static const char *expr_op_type_strings[_EXPR_NUM_VALUES] = {
+ [EXPR_VALUE] = "literal",
+ [EXPR_IDENT] = "identifier",
+ [EXPR_ACTION_DECL] = "action declaration",
+ [EXPR_FIELD_REF] = "field reference",
+ [EXPR_ARRAY_REF] = "array reference",
+ [EXPR_KEYSYM_LIST] = "list of keysyms",
+ [EXPR_ACTION_LIST] = "list of actions",
+ [EXPR_ADD] = "addition",
+ [EXPR_SUBTRACT] = "subtraction",
+ [EXPR_MULTIPLY] = "multiplication",
+ [EXPR_DIVIDE] = "division",
+ [EXPR_ASSIGN] = "assignment",
+ [EXPR_NOT] = "logical negation",
+ [EXPR_NEGATE] = "arithmetic negation",
+ [EXPR_INVERT] = "bitwise inversion",
+ [EXPR_UNARY_PLUS] = "unary plus",
+};
+
+const char *
+expr_op_type_to_string(enum expr_op_type type)
+{
+ if (type >= _EXPR_NUM_VALUES)
+ return NULL;
+ return expr_op_type_strings[type];
+}
+
+static const char *expr_value_type_strings[_EXPR_TYPE_NUM_VALUES] = {
+ [EXPR_TYPE_UNKNOWN] = "unknown",
+ [EXPR_TYPE_BOOLEAN] = "boolean",
+ [EXPR_TYPE_INT] = "int",
+ [EXPR_TYPE_STRING] = "string",
+ [EXPR_TYPE_ACTION] = "action",
+ [EXPR_TYPE_KEYNAME] = "keyname",
+ [EXPR_TYPE_SYMBOLS] = "symbols",
+};
+
+const char *
+expr_value_type_to_string(enum expr_value_type type)
+{
+ if (type >= _EXPR_TYPE_NUM_VALUES)
+ return NULL;
+ return expr_value_type_strings[type];
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.h b/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.h
new file mode 100644
index 0000000000..0ecd124145
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.h
@@ -0,0 +1,104 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#ifndef XKBCOMP_AST_BUILD_H
+#define XKBCOMP_AST_BUILD_H
+
+ParseCommon *
+AppendStmt(ParseCommon *to, ParseCommon *append);
+
+ExprDef *
+ExprCreate(enum expr_op_type op, enum expr_value_type type);
+
+ExprDef *
+ExprCreateUnary(enum expr_op_type op, enum expr_value_type type,
+ ExprDef *child);
+
+ExprDef *
+ExprCreateBinary(enum expr_op_type op, ExprDef *left, ExprDef *right);
+
+KeycodeDef *
+KeycodeCreate(xkb_atom_t name, int64_t value);
+
+KeyAliasDef *
+KeyAliasCreate(xkb_atom_t alias, xkb_atom_t real);
+
+VModDef *
+VModCreate(xkb_atom_t name, ExprDef *value);
+
+VarDef *
+VarCreate(ExprDef *name, ExprDef *value);
+
+VarDef *
+BoolVarCreate(xkb_atom_t nameToken, unsigned set);
+
+InterpDef *
+InterpCreate(char *sym, ExprDef *match);
+
+KeyTypeDef *
+KeyTypeCreate(xkb_atom_t name, VarDef *body);
+
+SymbolsDef *
+SymbolsCreate(xkb_atom_t keyName, ExprDef *symbols);
+
+GroupCompatDef *
+GroupCompatCreate(int group, ExprDef *def);
+
+ModMapDef *
+ModMapCreate(uint32_t modifier, ExprDef *keys);
+
+LedMapDef *
+LedMapCreate(xkb_atom_t name, VarDef *body);
+
+LedNameDef *
+LedNameCreate(int ndx, ExprDef *name, bool virtual);
+
+ExprDef *
+ActionCreate(xkb_atom_t name, ExprDef *args);
+
+ExprDef *
+CreateMultiKeysymList(ExprDef *list);
+
+ExprDef *
+CreateKeysymList(char *sym);
+
+ExprDef *
+AppendMultiKeysymList(ExprDef *list, ExprDef *append);
+
+ExprDef *
+AppendKeysymList(ExprDef *list, char *sym);
+
+IncludeStmt *
+IncludeCreate(struct xkb_context *ctx, char *str, enum merge_mode merge);
+
+XkbFile *
+XkbFileCreate(struct xkb_context *ctx, enum xkb_file_type type, char *name,
+ ParseCommon *defs, unsigned flags);
+
+void
+FreeStmt(ParseCommon *stmt);
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/ast.h b/src/3rdparty/xkbcommon/src/xkbcomp/ast.h
new file mode 100644
index 0000000000..c430a772ae
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/ast.h
@@ -0,0 +1,295 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef XKBCOMP_AST_H
+#define XKBCOMP_AST_H
+
+enum xkb_file_type {
+ /* Component files, by order of compilation. */
+ FILE_TYPE_KEYCODES = 0,
+ FILE_TYPE_TYPES = 1,
+ FILE_TYPE_COMPAT = 2,
+ FILE_TYPE_SYMBOLS = 3,
+ /* Geometry is not compiled any more. */
+ FILE_TYPE_GEOMETRY = 4,
+
+ /* A top level file which includes the above files. */
+ FILE_TYPE_KEYMAP,
+
+/* File types which must be found in a keymap file. */
+#define FIRST_KEYMAP_FILE_TYPE FILE_TYPE_KEYCODES
+#define LAST_KEYMAP_FILE_TYPE FILE_TYPE_SYMBOLS
+
+ /* This one doesn't mix with the others, but useful here as well. */
+ FILE_TYPE_RULES,
+
+ _FILE_TYPE_NUM_ENTRIES
+};
+
+enum stmt_type {
+ STMT_UNKNOWN = 0,
+ STMT_INCLUDE,
+ STMT_KEYCODE,
+ STMT_ALIAS,
+ STMT_EXPR,
+ STMT_VAR,
+ STMT_TYPE,
+ STMT_INTERP,
+ STMT_VMOD,
+ STMT_SYMBOLS,
+ STMT_MODMAP,
+ STMT_GROUP_COMPAT,
+ STMT_LED_MAP,
+ STMT_LED_NAME,
+
+ _STMT_NUM_VALUES
+};
+
+enum expr_value_type {
+ EXPR_TYPE_UNKNOWN = 0,
+ EXPR_TYPE_BOOLEAN,
+ EXPR_TYPE_INT,
+ EXPR_TYPE_STRING,
+ EXPR_TYPE_ACTION,
+ EXPR_TYPE_KEYNAME,
+ EXPR_TYPE_SYMBOLS,
+
+ _EXPR_TYPE_NUM_VALUES
+};
+
+enum expr_op_type {
+ EXPR_VALUE,
+ EXPR_IDENT,
+ EXPR_ACTION_DECL,
+ EXPR_FIELD_REF,
+ EXPR_ARRAY_REF,
+ EXPR_KEYSYM_LIST,
+ EXPR_ACTION_LIST,
+ EXPR_ADD,
+ EXPR_SUBTRACT,
+ EXPR_MULTIPLY,
+ EXPR_DIVIDE,
+ EXPR_ASSIGN,
+ EXPR_NOT,
+ EXPR_NEGATE,
+ EXPR_INVERT,
+ EXPR_UNARY_PLUS,
+
+ _EXPR_NUM_VALUES
+};
+
+enum merge_mode {
+ MERGE_DEFAULT,
+ MERGE_AUGMENT,
+ MERGE_OVERRIDE,
+ MERGE_REPLACE,
+};
+
+const char *
+xkb_file_type_to_string(enum xkb_file_type type);
+
+const char *
+stmt_type_to_string(enum stmt_type type);
+
+const char *
+expr_op_type_to_string(enum expr_op_type type);
+
+const char *
+expr_value_type_to_string(enum expr_value_type type);
+
+typedef struct _ParseCommon {
+ enum stmt_type type;
+ struct _ParseCommon *next;
+} ParseCommon;
+
+typedef struct _IncludeStmt {
+ ParseCommon common;
+ enum merge_mode merge;
+ char *stmt;
+ char *file;
+ char *map;
+ char *modifier;
+ struct _IncludeStmt *next_incl;
+} IncludeStmt;
+
+typedef struct _Expr {
+ ParseCommon common;
+ enum expr_op_type op;
+ enum expr_value_type value_type;
+ union {
+ struct {
+ struct _Expr *left;
+ struct _Expr *right;
+ } binary;
+ struct {
+ xkb_atom_t element;
+ xkb_atom_t field;
+ } field;
+ struct {
+ xkb_atom_t element;
+ xkb_atom_t field;
+ struct _Expr *entry;
+ } array;
+ struct {
+ xkb_atom_t name;
+ struct _Expr *args;
+ } action;
+ struct {
+ darray(char *) syms;
+ darray(int) symsMapIndex;
+ darray(unsigned int) symsNumEntries;
+ } list;
+ struct _Expr *child;
+ xkb_atom_t str;
+ unsigned uval;
+ int ival;
+ xkb_atom_t keyName;
+ } value;
+} ExprDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ ExprDef *name;
+ ExprDef *value;
+} VarDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ xkb_atom_t name;
+ ExprDef *value;
+} VModDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ xkb_atom_t name;
+ int64_t value;
+} KeycodeDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ xkb_atom_t alias;
+ xkb_atom_t real;
+} KeyAliasDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ xkb_atom_t name;
+ VarDef *body;
+} KeyTypeDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ xkb_atom_t keyName;
+ ExprDef *symbols;
+} SymbolsDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ xkb_atom_t modifier;
+ ExprDef *keys;
+} ModMapDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ int group;
+ ExprDef *def;
+} GroupCompatDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ char *sym;
+ ExprDef *match;
+ VarDef *def;
+} InterpDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ int ndx;
+ ExprDef *name;
+ bool virtual;
+} LedNameDef;
+
+typedef struct {
+ ParseCommon common;
+ enum merge_mode merge;
+ xkb_atom_t name;
+ VarDef *body;
+} LedMapDef;
+
+enum xkb_map_flags {
+ MAP_IS_DEFAULT = (1 << 0),
+ MAP_IS_PARTIAL = (1 << 1),
+ MAP_IS_HIDDEN = (1 << 2),
+ MAP_HAS_ALPHANUMERIC = (1 << 3),
+ MAP_HAS_MODIFIER = (1 << 4),
+ MAP_HAS_KEYPAD = (1 << 5),
+ MAP_HAS_FN = (1 << 6),
+ MAP_IS_ALTGR = (1 << 7),
+};
+
+typedef struct {
+ ParseCommon common;
+ enum xkb_file_type file_type;
+ char *topName;
+ char *name;
+ ParseCommon *defs;
+ enum xkb_map_flags flags;
+} XkbFile;
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/compat.c b/src/3rdparty/xkbcommon/src/xkbcomp/compat.c
new file mode 100644
index 0000000000..5682895430
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/compat.c
@@ -0,0 +1,1078 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#include "xkbcomp-priv.h"
+#include "text.h"
+#include "expr.h"
+#include "action.h"
+#include "vmod.h"
+#include "include.h"
+
+/*
+ * The xkb_compat section
+ * =====================
+ * This section is the third to be processed, after xkb_keycodes and
+ * xkb_types.
+ *
+ * Interpret statements
+ * --------------------
+ * Statements of the form:
+ * interpret Num_Lock+Any { ... }
+ * interpret Shift_Lock+AnyOf(Shift+Lock) { ... }
+ *
+ * The xkb_symbols section (see symbols.c) allows the keymap author to do,
+ * among other things, the following for each key:
+ * - Bind an action, like SetMods or LockGroup, to the key. Actions, like
+ * symbols, are specified for each level of each group in the key
+ * separately.
+ * - Add a virtual modifier to the key's virtual modifier mapping (vmodmap).
+ * - Specify whether the key should repeat or not.
+ *
+ * However, doing this for each key (or level) is tedious and inflexible.
+ * Interpret's are a mechanism to apply these settings to a bunch of
+ * keys/levels at once.
+ *
+ * Each interpret specifies a condition by which it attaches to certain
+ * levels. The condition consists of two parts:
+ * - A keysym. If the level has a different (or more than one) keysym, the
+ * match failes. Leaving out the keysym is equivalent to using the
+ * NoSymbol keysym, which always matches successfully.
+ * - A modifier predicate. The predicate consists of a matching operation
+ * and a mask of (real) modifiers. The modifers are matched against the
+ * key's modifier map (modmap). The matching operation can be one of the
+ * following:
+ * + AnyOfOrNone - The modmap must either be empty or include at least
+ * one of the specified modifiers.
+ * + AnyOf - The modmap must include at least one of the specified
+ * modifiers.
+ * + NoneOf - The modmap must not include any of the specified modifiers.
+ * + AllOf - The modmap must include all of the specified modifiers (but
+ * may include others as well).
+ * + Exactly - The modmap must be exactly the same as the specified
+ * modifiers.
+ * Leaving out the predicate is equivalent to usign AnyOfOrNone while
+ * specifying all modifiers. Leaving out just the matching condtition
+ * is equivalent to using Exactly.
+ * An interpret may also include "useModMapMods = level1;" - see below.
+ *
+ * If a level fulfils the conditions of several interpret's, only the
+ * most specific one is used:
+ * - A specific keysym will always match before a generic NoSymbol
+ * condition.
+ * - If the keysyms are the same, the interpret with the more specific
+ * matching operation is used. The above list is sorted from least to
+ * most specific.
+ * - If both the keysyms and the matching operations are the same (but the
+ * modifiers are different), the first interpret is used.
+ *
+ * As described above, once an interpret "attaches" to a level, it can bind
+ * an action to that level, add one virtual modifier to the key's vmodmap,
+ * or set the key's repeat setting. You should note the following:
+ * - The key repeat is a property of the entire key; it is not level-specific.
+ * In order to avoid confusion, it is only inspected for the first level of
+ * the first group; the interpret's repeat setting is ignored when applied
+ * to other levels.
+ * - If one of the above fields was set directly for a key in xkb_symbols,
+ * the explicit setting takes precedence over the interpret.
+ *
+ * The body of the statment may include statements of the following
+ * forms (all of which are optional):
+ *
+ * - useModMapMods statement:
+ * useModMapMods = level1;
+ *
+ * When set to 'level1', the interpret will only match levels which are
+ * the first level of the first group of the keys. This can be useful in
+ * conjunction with e.g. a virtualModifier statement.
+ *
+ * - action statement:
+ * action = LockMods(modifiers=NumLock);
+ *
+ * Bind this action to the matching levels.
+ *
+ * - virtual modifier statement:
+ * virtualModifier = NumLock;
+ *
+ * Add this virtual modifier to the key's vmodmap. The given virtual
+ * modifier must be declared at the top level of the file with a
+ * virtual_modifiers statement, e.g.:
+ * virtual_modifiers NumLock;
+ *
+ * - repeat statement:
+ * repeat = True;
+ *
+ * Set whether the key should repeat or not. Must be a boolean value.
+ *
+ * Led map statements
+ * ------------------------
+ * Statements of the form:
+ * indicator "Shift Lock" { ... }
+ *
+ * This statement specifies the behavior and binding of the LED (a.k.a
+ * indicator) with the given name ("Shift Lock" above). The name should
+ * have been declared previously in the xkb_keycodes section (see Led
+ * name statement), and given an index there. If it wasn't, it is created
+ * with the next free index.
+ * The body of the statement describes the conditions of the keyboard
+ * state which will cause the LED to be lit. It may include the following
+ * statements:
+ *
+ * - modifiers statment:
+ * modifiers = ScrollLock;
+ *
+ * If the given modifiers are in the required state (see below), the
+ * led is lit.
+ *
+ * - whichModifierState statment:
+ * whichModState = Latched + Locked;
+ *
+ * Can be any combination of:
+ * base, latched, locked, effective
+ * any (i.e. all of the above)
+ * none (i.e. none of the above)
+ * compat (legacy value, treated as effective)
+ * This will cause the respective portion of the modifer state (see
+ * struct xkb_state) to be matched against the modifiers given in the
+ * "modifiers" statement.
+ *
+ * Here's a simple example:
+ * indicator "Num Lock" {
+ * modifiers = NumLock;
+ * whichModState = Locked;
+ * };
+ * Whenever the NumLock modifier is locked, the Num Lock LED will light
+ * up.
+ *
+ * - groups statment:
+ * groups = All - group1;
+ *
+ * If the given groups are in the required state (see below), the led
+ * is lit.
+ *
+ * - whichGroupState statment:
+ * whichGroupState = Effective;
+ *
+ * Can be any combination of:
+ * base, latched, locked, effective
+ * any (i.e. all of the above)
+ * none (i.e. none of the above)
+ * This will cause the respective portion of the group state (see
+ * struct xkb_state) to be matched against the groups given in the
+ * "groups" statement.
+ *
+ * Note: the above conditions are disjunctive, i.e. if any of them are
+ * satisfied the led is lit.
+ *
+ * Virtual modifier statements
+ * ---------------------------
+ * Statements of the form:
+ * virtual_modifiers LControl;
+ *
+ * Can appear in the xkb_types, xkb_compat, xkb_symbols sections.
+ * TODO
+ *
+ * Effect on keymap
+ * ----------------
+ * After all of the xkb_compat sections have been compiled, the following
+ * members of struct xkb_keymap are finalized:
+ * darray(struct xkb_sym_interpret) sym_interprets;
+ * darray(struct xkb_led) leds;
+ * char *compat_section_name;
+ * TODO: virtual modifiers.
+ */
+
+enum si_field {
+ SI_FIELD_VIRTUAL_MOD = (1 << 0),
+ SI_FIELD_ACTION = (1 << 1),
+ SI_FIELD_AUTO_REPEAT = (1 << 2),
+ SI_FIELD_LEVEL_ONE_ONLY = (1 << 3),
+};
+
+typedef struct {
+ enum si_field defined;
+ enum merge_mode merge;
+
+ struct xkb_sym_interpret interp;
+} SymInterpInfo;
+
+enum led_field {
+ LED_FIELD_MODS = (1 << 0),
+ LED_FIELD_GROUPS = (1 << 1),
+ LED_FIELD_CTRLS = (1 << 2),
+};
+
+typedef struct {
+ enum led_field defined;
+ enum merge_mode merge;
+
+ struct xkb_led led;
+} LedInfo;
+
+typedef struct {
+ char *name;
+ int errorCount;
+ SymInterpInfo default_interp;
+ darray(SymInterpInfo) interps;
+ LedInfo default_led;
+ darray(LedInfo) leds;
+ ActionsInfo *actions;
+ struct xkb_keymap *keymap;
+} CompatInfo;
+
+static const char *
+siText(SymInterpInfo *si, CompatInfo *info)
+{
+ char *buf = xkb_context_get_buffer(info->keymap->ctx, 128);
+
+ if (si == &info->default_interp)
+ return "default";
+
+ snprintf(buf, 128, "%s+%s(%s)",
+ KeysymText(info->keymap->ctx, si->interp.sym),
+ SIMatchText(si->interp.match),
+ ModMaskText(info->keymap, si->interp.mods));
+
+ return buf;
+}
+
+static inline bool
+ReportSINotArray(CompatInfo *info, SymInterpInfo *si, const char *field)
+{
+ return ReportNotArray(info->keymap->ctx, "symbol interpretation", field,
+ siText(si, info));
+}
+
+static inline bool
+ReportSIBadType(CompatInfo *info, SymInterpInfo *si, const char *field,
+ const char *wanted)
+{
+ return ReportBadType(info->keymap->ctx, "symbol interpretation", field,
+ siText(si, info), wanted);
+}
+
+static inline bool
+ReportLedBadType(CompatInfo *info, LedInfo *ledi, const char *field,
+ const char *wanted)
+{
+ return ReportBadType(info->keymap->ctx, "indicator map", field,
+ xkb_atom_text(info->keymap->ctx, ledi->led.name),
+ wanted);
+}
+
+static inline bool
+ReportLedNotArray(CompatInfo *info, LedInfo *ledi, const char *field)
+{
+ return ReportNotArray(info->keymap->ctx, "indicator map", field,
+ xkb_atom_text(info->keymap->ctx, ledi->led.name));
+}
+
+static void
+InitCompatInfo(CompatInfo *info, struct xkb_keymap *keymap,
+ ActionsInfo *actions)
+{
+ memset(info, 0, sizeof(*info));
+ info->keymap = keymap;
+ info->actions = actions;
+ info->default_interp.merge = MERGE_OVERRIDE;
+ info->default_interp.interp.virtual_mod = XKB_MOD_INVALID;
+ info->default_led.merge = MERGE_OVERRIDE;
+}
+
+static void
+ClearCompatInfo(CompatInfo *info)
+{
+ free(info->name);
+ darray_free(info->interps);
+ darray_free(info->leds);
+}
+
+static SymInterpInfo *
+FindMatchingInterp(CompatInfo *info, SymInterpInfo *new)
+{
+ SymInterpInfo *old;
+
+ darray_foreach(old, info->interps)
+ if (old->interp.sym == new->interp.sym &&
+ old->interp.mods == new->interp.mods &&
+ old->interp.match == new->interp.match)
+ return old;
+
+ return NULL;
+}
+
+static bool
+UseNewInterpField(enum si_field field, SymInterpInfo *old, SymInterpInfo *new,
+ bool report, enum si_field *collide)
+{
+ if (!(old->defined & field))
+ return true;
+
+ if (new->defined & field) {
+ if (report)
+ *collide |= field;
+
+ if (new->merge != MERGE_AUGMENT)
+ return true;
+ }
+
+ return false;
+}
+
+static bool
+AddInterp(CompatInfo *info, SymInterpInfo *new, bool same_file)
+{
+ SymInterpInfo *old = FindMatchingInterp(info, new);
+ if (old) {
+ const int verbosity = xkb_context_get_log_verbosity(info->keymap->ctx);
+ const bool report = (same_file && verbosity > 0) || verbosity > 9;
+ enum si_field collide = 0;
+
+ if (new->merge == MERGE_REPLACE) {
+ if (report)
+ log_warn(info->keymap->ctx,
+ "Multiple definitions for \"%s\"; "
+ "Earlier interpretation ignored\n",
+ siText(new, info));
+ *old = *new;
+ return true;
+ }
+
+ if (UseNewInterpField(SI_FIELD_VIRTUAL_MOD, old, new, report,
+ &collide)) {
+ old->interp.virtual_mod = new->interp.virtual_mod;
+ old->defined |= SI_FIELD_VIRTUAL_MOD;
+ }
+ if (UseNewInterpField(SI_FIELD_ACTION, old, new, report,
+ &collide)) {
+ old->interp.action = new->interp.action;
+ old->defined |= SI_FIELD_ACTION;
+ }
+ if (UseNewInterpField(SI_FIELD_AUTO_REPEAT, old, new, report,
+ &collide)) {
+ old->interp.repeat = new->interp.repeat;
+ old->defined |= SI_FIELD_AUTO_REPEAT;
+ }
+ if (UseNewInterpField(SI_FIELD_LEVEL_ONE_ONLY, old, new, report,
+ &collide)) {
+ old->interp.level_one_only = new->interp.level_one_only;
+ old->defined |= SI_FIELD_LEVEL_ONE_ONLY;
+ }
+
+ if (collide) {
+ log_warn(info->keymap->ctx,
+ "Multiple interpretations of \"%s\"; "
+ "Using %s definition for duplicate fields\n",
+ siText(new, info),
+ (new->merge != MERGE_AUGMENT ? "last" : "first"));
+ }
+
+ return true;
+ }
+
+ darray_append(info->interps, *new);
+ return true;
+}
+
+/***====================================================================***/
+
+static bool
+ResolveStateAndPredicate(ExprDef *expr, enum xkb_match_operation *pred_rtrn,
+ xkb_mod_mask_t *mods_rtrn, CompatInfo *info)
+{
+ if (expr == NULL) {
+ *pred_rtrn = MATCH_ANY_OR_NONE;
+ *mods_rtrn = MOD_REAL_MASK_ALL;
+ return true;
+ }
+
+ *pred_rtrn = MATCH_EXACTLY;
+ if (expr->op == EXPR_ACTION_DECL) {
+ const char *pred_txt = xkb_atom_text(info->keymap->ctx,
+ expr->value.action.name);
+ if (!LookupString(symInterpretMatchMaskNames, pred_txt, pred_rtrn)) {
+ log_err(info->keymap->ctx,
+ "Illegal modifier predicate \"%s\"; Ignored\n", pred_txt);
+ return false;
+ }
+ expr = expr->value.action.args;
+ }
+ else if (expr->op == EXPR_IDENT) {
+ const char *pred_txt = xkb_atom_text(info->keymap->ctx,
+ expr->value.str);
+ if (pred_txt && istreq(pred_txt, "any")) {
+ *pred_rtrn = MATCH_ANY;
+ *mods_rtrn = MOD_REAL_MASK_ALL;
+ return true;
+ }
+ }
+
+ return ExprResolveModMask(info->keymap, expr, MOD_REAL, mods_rtrn);
+}
+
+/***====================================================================***/
+
+static bool
+UseNewLEDField(enum led_field field, LedInfo *old, LedInfo *new,
+ bool report, enum led_field *collide)
+{
+ if (!(old->defined & field))
+ return true;
+
+ if (new->defined & field) {
+ if (report)
+ *collide |= field;
+
+ if (new->merge != MERGE_AUGMENT)
+ return true;
+ }
+
+ return false;
+}
+
+static bool
+AddLedMap(CompatInfo *info, LedInfo *new, bool same_file)
+{
+ LedInfo *old;
+ enum led_field collide;
+ struct xkb_context *ctx = info->keymap->ctx;
+ const int verbosity = xkb_context_get_log_verbosity(ctx);
+ const bool report = (same_file && verbosity > 0) || verbosity > 9;
+
+ darray_foreach(old, info->leds) {
+ if (old->led.name != new->led.name)
+ continue;
+
+ if (old->led.mods.mods == new->led.mods.mods &&
+ old->led.groups == new->led.groups &&
+ old->led.ctrls == new->led.ctrls &&
+ old->led.which_mods == new->led.which_mods &&
+ old->led.which_groups == new->led.which_groups) {
+ old->defined |= new->defined;
+ return true;
+ }
+
+ if (new->merge == MERGE_REPLACE) {
+ if (report)
+ log_warn(info->keymap->ctx,
+ "Map for indicator %s redefined; "
+ "Earlier definition ignored\n",
+ xkb_atom_text(ctx, old->led.name));
+ *old = *new;
+ return true;
+ }
+
+ collide = 0;
+ if (UseNewLEDField(LED_FIELD_MODS, old, new, report, &collide)) {
+ old->led.which_mods = new->led.which_mods;
+ old->led.mods = new->led.mods;
+ old->defined |= LED_FIELD_MODS;
+ }
+ if (UseNewLEDField(LED_FIELD_GROUPS, old, new, report, &collide)) {
+ old->led.which_groups = new->led.which_groups;
+ old->led.groups = new->led.groups;
+ old->defined |= LED_FIELD_GROUPS;
+ }
+ if (UseNewLEDField(LED_FIELD_CTRLS, old, new, report, &collide)) {
+ old->led.ctrls = new->led.ctrls;
+ old->defined |= LED_FIELD_CTRLS;
+ }
+
+ if (collide) {
+ log_warn(info->keymap->ctx,
+ "Map for indicator %s redefined; "
+ "Using %s definition for duplicate fields\n",
+ xkb_atom_text(ctx, old->led.name),
+ (new->merge == MERGE_AUGMENT ? "first" : "last"));
+ }
+
+ return true;
+ }
+
+ darray_append(info->leds, *new);
+ return true;
+}
+
+static void
+MergeIncludedCompatMaps(CompatInfo *into, CompatInfo *from,
+ enum merge_mode merge)
+{
+ SymInterpInfo *si;
+ LedInfo *ledi;
+
+ if (from->errorCount > 0) {
+ into->errorCount += from->errorCount;
+ return;
+ }
+
+ if (into->name == NULL) {
+ into->name = from->name;
+ from->name = NULL;
+ }
+
+ darray_foreach(si, from->interps) {
+ si->merge = (merge == MERGE_DEFAULT ? si->merge : merge);
+ if (!AddInterp(into, si, false))
+ into->errorCount++;
+ }
+
+ darray_foreach(ledi, from->leds) {
+ ledi->merge = (merge == MERGE_DEFAULT ? ledi->merge : merge);
+ if (!AddLedMap(into, ledi, false))
+ into->errorCount++;
+ }
+}
+
+static void
+HandleCompatMapFile(CompatInfo *info, XkbFile *file, enum merge_mode merge);
+
+static bool
+HandleIncludeCompatMap(CompatInfo *info, IncludeStmt *include)
+{
+ CompatInfo included;
+
+ InitCompatInfo(&included, info->keymap, info->actions);
+ included.name = include->stmt;
+ include->stmt = NULL;
+
+ for (IncludeStmt *stmt = include; stmt; stmt = stmt->next_incl) {
+ CompatInfo next_incl;
+ XkbFile *file;
+
+ file = ProcessIncludeFile(info->keymap->ctx, stmt, FILE_TYPE_COMPAT);
+ if (!file) {
+ info->errorCount += 10;
+ ClearCompatInfo(&included);
+ return false;
+ }
+
+ InitCompatInfo(&next_incl, info->keymap, info->actions);
+ next_incl.default_interp = info->default_interp;
+ next_incl.default_interp.merge = stmt->merge;
+ next_incl.default_led = info->default_led;
+ next_incl.default_led.merge = stmt->merge;
+
+ HandleCompatMapFile(&next_incl, file, MERGE_OVERRIDE);
+
+ MergeIncludedCompatMaps(&included, &next_incl, stmt->merge);
+
+ ClearCompatInfo(&next_incl);
+ FreeXkbFile(file);
+ }
+
+ MergeIncludedCompatMaps(info, &included, include->merge);
+ ClearCompatInfo(&included);
+
+ return (info->errorCount == 0);
+}
+
+static bool
+SetInterpField(CompatInfo *info, SymInterpInfo *si, const char *field,
+ ExprDef *arrayNdx, ExprDef *value)
+{
+ struct xkb_keymap *keymap = info->keymap;
+ xkb_mod_index_t ndx;
+
+ if (istreq(field, "action")) {
+ if (arrayNdx)
+ return ReportSINotArray(info, si, field);
+
+ if (!HandleActionDef(value, keymap, &si->interp.action, info->actions))
+ return false;
+
+ si->defined |= SI_FIELD_ACTION;
+ }
+ else if (istreq(field, "virtualmodifier") ||
+ istreq(field, "virtualmod")) {
+ if (arrayNdx)
+ return ReportSINotArray(info, si, field);
+
+ if (!ExprResolveMod(keymap, value, MOD_VIRT, &ndx))
+ return ReportSIBadType(info, si, field, "virtual modifier");
+
+ si->interp.virtual_mod = ndx;
+ si->defined |= SI_FIELD_VIRTUAL_MOD;
+ }
+ else if (istreq(field, "repeat")) {
+ bool set;
+
+ if (arrayNdx)
+ return ReportSINotArray(info, si, field);
+
+ if (!ExprResolveBoolean(keymap->ctx, value, &set))
+ return ReportSIBadType(info, si, field, "boolean");
+
+ si->interp.repeat = set;
+
+ si->defined |= SI_FIELD_AUTO_REPEAT;
+ }
+ else if (istreq(field, "locking")) {
+ log_dbg(info->keymap->ctx,
+ "The \"locking\" field in symbol interpretation is unsupported; "
+ "Ignored\n");
+ }
+ else if (istreq(field, "usemodmap") ||
+ istreq(field, "usemodmapmods")) {
+ unsigned int val;
+
+ if (arrayNdx)
+ return ReportSINotArray(info, si, field);
+
+ if (!ExprResolveEnum(keymap->ctx, value, &val, useModMapValueNames))
+ return ReportSIBadType(info, si, field, "level specification");
+
+ si->interp.level_one_only = !!val;
+ si->defined |= SI_FIELD_LEVEL_ONE_ONLY;
+ }
+ else {
+ return ReportBadField(keymap->ctx, "symbol interpretation", field,
+ siText(si, info));
+ }
+
+ return true;
+}
+
+static bool
+SetLedMapField(CompatInfo *info, LedInfo *ledi, const char *field,
+ ExprDef *arrayNdx, ExprDef *value)
+{
+ bool ok = true;
+ struct xkb_keymap *keymap = info->keymap;
+
+ if (istreq(field, "modifiers") || istreq(field, "mods")) {
+ if (arrayNdx)
+ return ReportLedNotArray(info, ledi, field);
+
+ if (!ExprResolveModMask(keymap, value, MOD_BOTH, &ledi->led.mods.mods))
+ return ReportLedBadType(info, ledi, field, "modifier mask");
+
+ ledi->defined |= LED_FIELD_MODS;
+ }
+ else if (istreq(field, "groups")) {
+ unsigned int mask;
+
+ if (arrayNdx)
+ return ReportLedNotArray(info, ledi, field);
+
+ if (!ExprResolveMask(keymap->ctx, value, &mask, groupMaskNames))
+ return ReportLedBadType(info, ledi, field, "group mask");
+
+ ledi->led.groups = mask;
+ ledi->defined |= LED_FIELD_GROUPS;
+ }
+ else if (istreq(field, "controls") || istreq(field, "ctrls")) {
+ unsigned int mask;
+
+ if (arrayNdx)
+ return ReportLedNotArray(info, ledi, field);
+
+ if (!ExprResolveMask(keymap->ctx, value, &mask, ctrlMaskNames))
+ return ReportLedBadType(info, ledi, field, "controls mask");
+
+ ledi->led.ctrls = mask;
+ ledi->defined |= LED_FIELD_CTRLS;
+ }
+ else if (istreq(field, "allowexplicit")) {
+ log_dbg(info->keymap->ctx,
+ "The \"allowExplicit\" field in indicator statements is unsupported; "
+ "Ignored\n");
+ }
+ else if (istreq(field, "whichmodstate") ||
+ istreq(field, "whichmodifierstate")) {
+ unsigned int mask;
+
+ if (arrayNdx)
+ return ReportLedNotArray(info, ledi, field);
+
+ if (!ExprResolveMask(keymap->ctx, value, &mask,
+ modComponentMaskNames))
+ return ReportLedBadType(info, ledi, field,
+ "mask of modifier state components");
+
+ ledi->led.which_mods = mask;
+ }
+ else if (istreq(field, "whichgroupstate")) {
+ unsigned mask;
+
+ if (arrayNdx)
+ return ReportLedNotArray(info, ledi, field);
+
+ if (!ExprResolveMask(keymap->ctx, value, &mask,
+ groupComponentMaskNames))
+ return ReportLedBadType(info, ledi, field,
+ "mask of group state components");
+
+ ledi->led.which_groups = mask;
+ }
+ else if (istreq(field, "driveskbd") ||
+ istreq(field, "driveskeyboard") ||
+ istreq(field, "leddriveskbd") ||
+ istreq(field, "leddriveskeyboard") ||
+ istreq(field, "indicatordriveskbd") ||
+ istreq(field, "indicatordriveskeyboard")) {
+ log_dbg(info->keymap->ctx,
+ "The \"%s\" field in indicator statements is unsupported; "
+ "Ignored\n", field);
+ }
+ else if (istreq(field, "index")) {
+ /* Users should see this, it might cause unexpected behavior. */
+ log_err(info->keymap->ctx,
+ "The \"index\" field in indicator statements is unsupported; "
+ "Ignored\n");
+ }
+ else {
+ log_err(info->keymap->ctx,
+ "Unknown field %s in map for %s indicator; "
+ "Definition ignored\n",
+ field, xkb_atom_text(keymap->ctx, ledi->led.name));
+ ok = false;
+ }
+
+ return ok;
+}
+
+static bool
+HandleGlobalVar(CompatInfo *info, VarDef *stmt)
+{
+ const char *elem, *field;
+ ExprDef *ndx;
+ bool ret;
+
+ if (!ExprResolveLhs(info->keymap->ctx, stmt->name, &elem, &field, &ndx))
+ ret = false;
+ else if (elem && istreq(elem, "interpret"))
+ ret = SetInterpField(info, &info->default_interp, field, ndx,
+ stmt->value);
+ else if (elem && istreq(elem, "indicator"))
+ ret = SetLedMapField(info, &info->default_led, field, ndx,
+ stmt->value);
+ else
+ ret = SetActionField(info->keymap, elem, field, ndx, stmt->value,
+ info->actions);
+ return ret;
+}
+
+static bool
+HandleInterpBody(CompatInfo *info, VarDef *def, SymInterpInfo *si)
+{
+ bool ok = true;
+ const char *elem, *field;
+ ExprDef *arrayNdx;
+
+ for (; def; def = (VarDef *) def->common.next) {
+ if (def->name && def->name->op == EXPR_FIELD_REF) {
+ log_err(info->keymap->ctx,
+ "Cannot set a global default value from within an interpret statement; "
+ "Move statements to the global file scope\n");
+ ok = false;
+ continue;
+ }
+
+ ok = ExprResolveLhs(info->keymap->ctx, def->name, &elem, &field,
+ &arrayNdx);
+ if (!ok)
+ continue;
+
+ ok = SetInterpField(info, si, field, arrayNdx, def->value);
+ }
+
+ return ok;
+}
+
+static bool
+HandleInterpDef(CompatInfo *info, InterpDef *def, enum merge_mode merge)
+{
+ enum xkb_match_operation pred;
+ xkb_mod_mask_t mods;
+ SymInterpInfo si;
+
+ if (!ResolveStateAndPredicate(def->match, &pred, &mods, info)) {
+ log_err(info->keymap->ctx,
+ "Couldn't determine matching modifiers; "
+ "Symbol interpretation ignored\n");
+ return false;
+ }
+
+ si = info->default_interp;
+ si.merge = merge = (def->merge == MERGE_DEFAULT ? merge : def->merge);
+
+ if (!LookupKeysym(def->sym, &si.interp.sym)) {
+ log_err(info->keymap->ctx,
+ "Could not resolve keysym %s; "
+ "Symbol interpretation ignored\n",
+ def->sym);
+ return false;
+ }
+
+ si.interp.match = pred;
+ si.interp.mods = mods;
+
+ if (!HandleInterpBody(info, def->def, &si)) {
+ info->errorCount++;
+ return false;
+ }
+
+ if (!AddInterp(info, &si, true)) {
+ info->errorCount++;
+ return false;
+ }
+
+ return true;
+}
+
+static bool
+HandleLedMapDef(CompatInfo *info, LedMapDef *def, enum merge_mode merge)
+{
+ LedInfo ledi;
+ VarDef *var;
+ bool ok;
+
+ if (def->merge != MERGE_DEFAULT)
+ merge = def->merge;
+
+ ledi = info->default_led;
+ ledi.merge = merge;
+ ledi.led.name = def->name;
+
+ ok = true;
+ for (var = def->body; var != NULL; var = (VarDef *) var->common.next) {
+ const char *elem, *field;
+ ExprDef *arrayNdx;
+ if (!ExprResolveLhs(info->keymap->ctx, var->name, &elem, &field,
+ &arrayNdx)) {
+ ok = false;
+ continue;
+ }
+
+ if (elem) {
+ log_err(info->keymap->ctx,
+ "Cannot set defaults for \"%s\" element in indicator map; "
+ "Assignment to %s.%s ignored\n", elem, elem, field);
+ ok = false;
+ }
+ else {
+ ok = SetLedMapField(info, &ledi, field, arrayNdx, var->value) && ok;
+ }
+ }
+
+ if (ok)
+ return AddLedMap(info, &ledi, true);
+
+ return false;
+}
+
+static void
+HandleCompatMapFile(CompatInfo *info, XkbFile *file, enum merge_mode merge)
+{
+ bool ok;
+
+ merge = (merge == MERGE_DEFAULT ? MERGE_AUGMENT : merge);
+
+ free(info->name);
+ info->name = strdup_safe(file->name);
+
+ for (ParseCommon *stmt = file->defs; stmt; stmt = stmt->next) {
+ switch (stmt->type) {
+ case STMT_INCLUDE:
+ ok = HandleIncludeCompatMap(info, (IncludeStmt *) stmt);
+ break;
+ case STMT_INTERP:
+ ok = HandleInterpDef(info, (InterpDef *) stmt, merge);
+ break;
+ case STMT_GROUP_COMPAT:
+ log_dbg(info->keymap->ctx,
+ "The \"group\" statement in compat is unsupported; "
+ "Ignored\n");
+ ok = true;
+ break;
+ case STMT_LED_MAP:
+ ok = HandleLedMapDef(info, (LedMapDef *) stmt, merge);
+ break;
+ case STMT_VAR:
+ ok = HandleGlobalVar(info, (VarDef *) stmt);
+ break;
+ case STMT_VMOD:
+ ok = HandleVModDef(info->keymap, (VModDef *) stmt);
+ break;
+ default:
+ log_err(info->keymap->ctx,
+ "Interpretation files may not include other types; "
+ "Ignoring %s\n", stmt_type_to_string(stmt->type));
+ ok = false;
+ break;
+ }
+
+ if (!ok)
+ info->errorCount++;
+
+ if (info->errorCount > 10) {
+ log_err(info->keymap->ctx,
+ "Abandoning compatibility map \"%s\"\n", file->topName);
+ break;
+ }
+ }
+}
+
+static void
+CopyInterps(CompatInfo *info, bool needSymbol, enum xkb_match_operation pred)
+{
+ SymInterpInfo *si;
+
+ darray_foreach(si, info->interps)
+ if (si->interp.match == pred &&
+ (si->interp.sym != XKB_KEY_NoSymbol) == needSymbol)
+ darray_append(info->keymap->sym_interprets, si->interp);
+}
+
+static void
+CopyLedMapDefs(CompatInfo *info)
+{
+ LedInfo *ledi;
+ xkb_led_index_t i;
+ struct xkb_led *led;
+ struct xkb_keymap *keymap = info->keymap;
+
+ darray_foreach(ledi, info->leds) {
+ /*
+ * Find the LED with the given name, if it was already declared
+ * in keycodes.
+ */
+ darray_enumerate(i, led, keymap->leds)
+ if (led->name == ledi->led.name)
+ break;
+
+ /* Not previously declared; create it with next free index. */
+ if (i >= darray_size(keymap->leds)) {
+ log_dbg(keymap->ctx,
+ "Indicator name \"%s\" was not declared in the keycodes section; "
+ "Adding new indicator\n",
+ xkb_atom_text(keymap->ctx, ledi->led.name));
+
+ darray_enumerate(i, led, keymap->leds)
+ if (led->name == XKB_ATOM_NONE)
+ break;
+
+ if (i >= darray_size(keymap->leds)) {
+ /* Not place to put it; ignore. */
+ if (i >= XKB_MAX_LEDS) {
+ log_err(keymap->ctx,
+ "Too many indicators (maximum is %d); "
+ "Indicator name \"%s\" ignored\n",
+ XKB_MAX_LEDS,
+ xkb_atom_text(keymap->ctx, ledi->led.name));
+ continue;
+ }
+ /* Add a new LED. */
+ darray_resize(keymap->leds, i + 1);
+ led = &darray_item(keymap->leds, i);
+ }
+ }
+
+ *led = ledi->led;
+ if (led->groups != 0 && led->which_groups == 0)
+ led->which_groups = XKB_STATE_LAYOUT_EFFECTIVE;
+ if (led->mods.mods != 0 && led->which_mods == 0)
+ led->which_mods = XKB_STATE_MODS_EFFECTIVE;
+ }
+}
+
+static bool
+CopyCompatToKeymap(struct xkb_keymap *keymap, CompatInfo *info)
+{
+ keymap->compat_section_name = strdup_safe(info->name);
+
+ if (!darray_empty(info->interps)) {
+ /* Most specific to least specific. */
+ CopyInterps(info, true, MATCH_EXACTLY);
+ CopyInterps(info, true, MATCH_ALL);
+ CopyInterps(info, true, MATCH_NONE);
+ CopyInterps(info, true, MATCH_ANY);
+ CopyInterps(info, true, MATCH_ANY_OR_NONE);
+ CopyInterps(info, false, MATCH_EXACTLY);
+ CopyInterps(info, false, MATCH_ALL);
+ CopyInterps(info, false, MATCH_NONE);
+ CopyInterps(info, false, MATCH_ANY);
+ CopyInterps(info, false, MATCH_ANY_OR_NONE);
+ }
+
+ CopyLedMapDefs(info);
+
+ return true;
+}
+
+bool
+CompileCompatMap(XkbFile *file, struct xkb_keymap *keymap,
+ enum merge_mode merge)
+{
+ CompatInfo info;
+ ActionsInfo *actions;
+
+ actions = NewActionsInfo();
+ if (!actions)
+ return false;
+
+ InitCompatInfo(&info, keymap, actions);
+ info.default_interp.merge = merge;
+ info.default_led.merge = merge;
+
+ HandleCompatMapFile(&info, file, merge);
+ if (info.errorCount != 0)
+ goto err_info;
+
+ if (!CopyCompatToKeymap(keymap, &info))
+ goto err_info;
+
+ ClearCompatInfo(&info);
+ FreeActionsInfo(actions);
+ return true;
+
+err_info:
+ ClearCompatInfo(&info);
+ FreeActionsInfo(actions);
+ return false;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/expr.c b/src/3rdparty/xkbcommon/src/xkbcomp/expr.c
new file mode 100644
index 0000000000..dc64d7891f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/expr.c
@@ -0,0 +1,685 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#include "xkbcomp-priv.h"
+#include "text.h"
+#include "expr.h"
+
+typedef bool (*IdentLookupFunc)(struct xkb_context *ctx, const void *priv,
+ xkb_atom_t field, enum expr_value_type type,
+ unsigned int *val_rtrn);
+
+bool
+ExprResolveLhs(struct xkb_context *ctx, const ExprDef *expr,
+ const char **elem_rtrn, const char **field_rtrn,
+ ExprDef **index_rtrn)
+{
+ switch (expr->op) {
+ case EXPR_IDENT:
+ *elem_rtrn = NULL;
+ *field_rtrn = xkb_atom_text(ctx, expr->value.str);
+ *index_rtrn = NULL;
+ return true;
+ case EXPR_FIELD_REF:
+ *elem_rtrn = xkb_atom_text(ctx, expr->value.field.element);
+ *field_rtrn = xkb_atom_text(ctx, expr->value.field.field);
+ *index_rtrn = NULL;
+ return true;
+ case EXPR_ARRAY_REF:
+ *elem_rtrn = xkb_atom_text(ctx, expr->value.array.element);
+ *field_rtrn = xkb_atom_text(ctx, expr->value.array.field);
+ *index_rtrn = expr->value.array.entry;
+ return true;
+ default:
+ break;
+ }
+ log_wsgo(ctx, "Unexpected operator %d in ResolveLhs\n", expr->op);
+ return false;
+}
+
+static bool
+SimpleLookup(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
+ enum expr_value_type type, unsigned int *val_rtrn)
+{
+ const LookupEntry *entry;
+ const char *str;
+
+ if (!priv || field == XKB_ATOM_NONE || type != EXPR_TYPE_INT)
+ return false;
+
+ str = xkb_atom_text(ctx, field);
+ for (entry = priv; entry && entry->name; entry++) {
+ if (istreq(str, entry->name)) {
+ *val_rtrn = entry->value;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/* Data passed in the *priv argument for LookupModMask. */
+typedef struct {
+ const struct xkb_keymap *keymap;
+ enum mod_type mod_type;
+} LookupModMaskPriv;
+
+static bool
+LookupModMask(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
+ enum expr_value_type type, xkb_mod_mask_t *val_rtrn)
+{
+ const char *str;
+ xkb_mod_index_t ndx;
+ const LookupModMaskPriv *arg = priv;
+ const struct xkb_keymap *keymap = arg->keymap;
+ enum mod_type mod_type = arg->mod_type;
+
+ if (type != EXPR_TYPE_INT)
+ return false;
+
+ str = xkb_atom_text(ctx, field);
+
+ if (istreq(str, "all")) {
+ *val_rtrn = MOD_REAL_MASK_ALL;
+ return true;
+ }
+
+ if (istreq(str, "none")) {
+ *val_rtrn = 0;
+ return true;
+ }
+
+ ndx = ModNameToIndex(keymap, field, mod_type);
+ if (ndx == XKB_MOD_INVALID)
+ return false;
+
+ *val_rtrn = (1 << ndx);
+ return true;
+}
+
+bool
+ExprResolveBoolean(struct xkb_context *ctx, const ExprDef *expr,
+ bool *set_rtrn)
+{
+ bool ok = false;
+ const char *ident;
+
+ switch (expr->op) {
+ case EXPR_VALUE:
+ if (expr->value_type != EXPR_TYPE_BOOLEAN) {
+ log_err(ctx,
+ "Found constant of type %s where boolean was expected\n",
+ expr_value_type_to_string(expr->value_type));
+ return false;
+ }
+ *set_rtrn = !!expr->value.ival;
+ return true;
+
+ case EXPR_IDENT:
+ ident = xkb_atom_text(ctx, expr->value.str);
+ if (ident) {
+ if (istreq(ident, "true") ||
+ istreq(ident, "yes") ||
+ istreq(ident, "on")) {
+ *set_rtrn = true;
+ return true;
+ }
+ else if (istreq(ident, "false") ||
+ istreq(ident, "no") ||
+ istreq(ident, "off")) {
+ *set_rtrn = false;
+ return true;
+ }
+ }
+ log_err(ctx, "Identifier \"%s\" of type boolean is unknown\n",
+ xkb_atom_text(ctx, expr->value.str));
+ return false;
+
+ case EXPR_FIELD_REF:
+ log_err(ctx, "Default \"%s.%s\" of type boolean is unknown\n",
+ xkb_atom_text(ctx, expr->value.field.element),
+ xkb_atom_text(ctx, expr->value.field.field));
+ return false;
+
+ case EXPR_INVERT:
+ case EXPR_NOT:
+ ok = ExprResolveBoolean(ctx, expr, set_rtrn);
+ if (ok)
+ *set_rtrn = !*set_rtrn;
+ return ok;
+ case EXPR_ADD:
+ case EXPR_SUBTRACT:
+ case EXPR_MULTIPLY:
+ case EXPR_DIVIDE:
+ case EXPR_ASSIGN:
+ case EXPR_NEGATE:
+ case EXPR_UNARY_PLUS:
+ log_err(ctx, "%s of boolean values not permitted\n",
+ expr_op_type_to_string(expr->op));
+ break;
+
+ default:
+ log_wsgo(ctx, "Unknown operator %d in ResolveBoolean\n", expr->op);
+ break;
+ }
+
+ return false;
+}
+
+bool
+ExprResolveKeyCode(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_keycode_t *kc)
+{
+ xkb_keycode_t leftRtrn, rightRtrn;
+ ExprDef *left, *right;
+
+ switch (expr->op) {
+ case EXPR_VALUE:
+ if (expr->value_type != EXPR_TYPE_INT) {
+ log_err(ctx,
+ "Found constant of type %s where an int was expected\n",
+ expr_value_type_to_string(expr->value_type));
+ return false;
+ }
+
+ *kc = expr->value.uval;
+ return true;
+
+ case EXPR_ADD:
+ case EXPR_SUBTRACT:
+ case EXPR_MULTIPLY:
+ case EXPR_DIVIDE:
+ left = expr->value.binary.left;
+ right = expr->value.binary.right;
+
+ if (!ExprResolveKeyCode(ctx, left, &leftRtrn) ||
+ !ExprResolveKeyCode(ctx, right, &rightRtrn))
+ return false;
+
+ switch (expr->op) {
+ case EXPR_ADD:
+ *kc = leftRtrn + rightRtrn;
+ break;
+ case EXPR_SUBTRACT:
+ *kc = leftRtrn - rightRtrn;
+ break;
+ case EXPR_MULTIPLY:
+ *kc = leftRtrn * rightRtrn;
+ break;
+ case EXPR_DIVIDE:
+ if (rightRtrn == 0) {
+ log_err(ctx, "Cannot divide by zero: %d / %d\n",
+ leftRtrn, rightRtrn);
+ return false;
+ }
+
+ *kc = leftRtrn / rightRtrn;
+ break;
+ default:
+ break;
+ }
+
+ return true;
+
+ case EXPR_NEGATE:
+ left = expr->value.child;
+ if (!ExprResolveKeyCode(ctx, left, &leftRtrn))
+ return false;
+
+ *kc = ~leftRtrn;
+ return true;
+
+ case EXPR_UNARY_PLUS:
+ left = expr->value.child;
+ return ExprResolveKeyCode(ctx, left, kc);
+
+ default:
+ log_wsgo(ctx, "Unknown operator %d in ResolveKeyCode\n", expr->op);
+ break;
+ }
+
+ return false;
+}
+
+/**
+ * This function returns ... something. It's a bit of a guess, really.
+ *
+ * If an integer is given in value ctx, it will be returned in ival.
+ * If an ident or field reference is given, the lookup function (if given)
+ * will be called. At the moment, only SimpleLookup use this, and they both
+ * return the results in uval. And don't support field references.
+ *
+ * Cool.
+ */
+static bool
+ExprResolveIntegerLookup(struct xkb_context *ctx, const ExprDef *expr,
+ int *val_rtrn, IdentLookupFunc lookup,
+ const void *lookupPriv)
+{
+ bool ok = false;
+ int l, r;
+ unsigned u;
+ ExprDef *left, *right;
+
+ switch (expr->op) {
+ case EXPR_VALUE:
+ if (expr->value_type != EXPR_TYPE_INT) {
+ log_err(ctx,
+ "Found constant of type %s where an int was expected\n",
+ expr_value_type_to_string(expr->value_type));
+ return false;
+ }
+
+ *val_rtrn = expr->value.ival;
+ return true;
+
+ case EXPR_IDENT:
+ if (lookup)
+ ok = lookup(ctx, lookupPriv, expr->value.str, EXPR_TYPE_INT, &u);
+
+ if (!ok)
+ log_err(ctx, "Identifier \"%s\" of type int is unknown\n",
+ xkb_atom_text(ctx, expr->value.str));
+ else
+ *val_rtrn = (int) u;
+
+ return ok;
+
+ case EXPR_FIELD_REF:
+ log_err(ctx, "Default \"%s.%s\" of type int is unknown\n",
+ xkb_atom_text(ctx, expr->value.field.element),
+ xkb_atom_text(ctx, expr->value.field.field));
+ return false;
+
+ case EXPR_ADD:
+ case EXPR_SUBTRACT:
+ case EXPR_MULTIPLY:
+ case EXPR_DIVIDE:
+ left = expr->value.binary.left;
+ right = expr->value.binary.right;
+ if (!ExprResolveIntegerLookup(ctx, left, &l, lookup, lookupPriv) ||
+ !ExprResolveIntegerLookup(ctx, right, &r, lookup, lookupPriv))
+ return false;
+
+ switch (expr->op) {
+ case EXPR_ADD:
+ *val_rtrn = l + r;
+ break;
+ case EXPR_SUBTRACT:
+ *val_rtrn = l - r;
+ break;
+ case EXPR_MULTIPLY:
+ *val_rtrn = l * r;
+ break;
+ case EXPR_DIVIDE:
+ if (r == 0) {
+ log_err(ctx, "Cannot divide by zero: %d / %d\n", l, r);
+ return false;
+ }
+ *val_rtrn = l / r;
+ break;
+ default:
+ break;
+ }
+
+ return true;
+
+ case EXPR_ASSIGN:
+ log_wsgo(ctx, "Assignment operator not implemented yet\n");
+ break;
+
+ case EXPR_NOT:
+ log_err(ctx, "The ! operator cannot be applied to an integer\n");
+ return false;
+
+ case EXPR_INVERT:
+ case EXPR_NEGATE:
+ left = expr->value.child;
+ if (!ExprResolveIntegerLookup(ctx, left, &l, lookup, lookupPriv))
+ return false;
+
+ *val_rtrn = (expr->op == EXPR_NEGATE ? -l : ~l);
+ return true;
+
+ case EXPR_UNARY_PLUS:
+ left = expr->value.child;
+ return ExprResolveIntegerLookup(ctx, left, val_rtrn, lookup,
+ lookupPriv);
+
+ default:
+ log_wsgo(ctx, "Unknown operator %d in ResolveInteger\n", expr->op);
+ break;
+ }
+
+ return false;
+}
+
+bool
+ExprResolveInteger(struct xkb_context *ctx, const ExprDef *expr,
+ int *val_rtrn)
+{
+ return ExprResolveIntegerLookup(ctx, expr, val_rtrn, NULL, NULL);
+}
+
+bool
+ExprResolveGroup(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_layout_index_t *group_rtrn)
+{
+ bool ok;
+ int result;
+
+ ok = ExprResolveIntegerLookup(ctx, expr, &result, SimpleLookup,
+ groupNames);
+ if (!ok)
+ return false;
+
+ if (result <= 0 || result > XKB_MAX_GROUPS) {
+ log_err(ctx, "Group index %u is out of range (1..%d)\n",
+ result, XKB_MAX_GROUPS);
+ return false;
+ }
+
+ *group_rtrn = (xkb_layout_index_t) result;
+ return true;
+}
+
+bool
+ExprResolveLevel(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_level_index_t *level_rtrn)
+{
+ bool ok;
+ int result;
+
+ ok = ExprResolveIntegerLookup(ctx, expr, &result, SimpleLookup,
+ levelNames);
+ if (!ok)
+ return false;
+
+ if (result < 1) {
+ log_err(ctx, "Shift level %d is out of range\n", result);
+ return false;
+ }
+
+ /* Level is zero-indexed from now on. */
+ *level_rtrn = (unsigned int) (result - 1);
+ return true;
+}
+
+bool
+ExprResolveButton(struct xkb_context *ctx, const ExprDef *expr, int *btn_rtrn)
+{
+ int result;
+
+ if (!ExprResolveIntegerLookup(ctx, expr, &result, SimpleLookup,
+ buttonNames))
+ return false;
+
+ *btn_rtrn = result;
+ return true;
+}
+
+bool
+ExprResolveString(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_atom_t *val_rtrn)
+{
+ switch (expr->op) {
+ case EXPR_VALUE:
+ if (expr->value_type != EXPR_TYPE_STRING) {
+ log_err(ctx, "Found constant of type %s, expected a string\n",
+ expr_value_type_to_string(expr->value_type));
+ return false;
+ }
+
+ *val_rtrn = expr->value.str;
+ return true;
+
+ case EXPR_IDENT:
+ log_err(ctx, "Identifier \"%s\" of type string not found\n",
+ xkb_atom_text(ctx, expr->value.str));
+ return false;
+
+ case EXPR_FIELD_REF:
+ log_err(ctx, "Default \"%s.%s\" of type string not found\n",
+ xkb_atom_text(ctx, expr->value.field.element),
+ xkb_atom_text(ctx, expr->value.field.field));
+ return false;
+
+ case EXPR_ADD:
+ case EXPR_SUBTRACT:
+ case EXPR_MULTIPLY:
+ case EXPR_DIVIDE:
+ case EXPR_ASSIGN:
+ case EXPR_NEGATE:
+ case EXPR_INVERT:
+ case EXPR_NOT:
+ case EXPR_UNARY_PLUS:
+ log_err(ctx, "%s of strings not permitted\n",
+ expr_op_type_to_string(expr->op));
+ return false;
+
+ default:
+ log_wsgo(ctx, "Unknown operator %d in ResolveString\n", expr->op);
+ break;
+ }
+ return false;
+}
+
+bool
+ExprResolveEnum(struct xkb_context *ctx, const ExprDef *expr,
+ unsigned int *val_rtrn, const LookupEntry *values)
+{
+ if (expr->op != EXPR_IDENT) {
+ log_err(ctx, "Found a %s where an enumerated value was expected\n",
+ expr_op_type_to_string(expr->op));
+ return false;
+ }
+
+ if (!SimpleLookup(ctx, values, expr->value.str, EXPR_TYPE_INT,
+ val_rtrn)) {
+ log_err(ctx, "Illegal identifier %s; expected one of:\n",
+ xkb_atom_text(ctx, expr->value.str));
+ while (values && values->name)
+ {
+ log_err(ctx, "\t%s\n", values->name);
+ values++;
+ }
+ return false;
+ }
+
+ return true;
+}
+
+static bool
+ExprResolveMaskLookup(struct xkb_context *ctx, const ExprDef *expr,
+ unsigned int *val_rtrn, IdentLookupFunc lookup,
+ const void *lookupPriv)
+{
+ bool ok = 0;
+ unsigned int l, r;
+ int v;
+ ExprDef *left, *right;
+ const char *bogus = NULL;
+
+ switch (expr->op) {
+ case EXPR_VALUE:
+ if (expr->value_type != EXPR_TYPE_INT) {
+ log_err(ctx,
+ "Found constant of type %s where a mask was expected\n",
+ expr_value_type_to_string(expr->value_type));
+ return false;
+ }
+ *val_rtrn = (unsigned int) expr->value.ival;
+ return true;
+
+ case EXPR_IDENT:
+ ok = lookup(ctx, lookupPriv, expr->value.str, EXPR_TYPE_INT,
+ val_rtrn);
+ if (!ok)
+ log_err(ctx, "Identifier \"%s\" of type int is unknown\n",
+ xkb_atom_text(ctx, expr->value.str));
+ return ok;
+
+ case EXPR_FIELD_REF:
+ log_err(ctx, "Default \"%s.%s\" of type int is unknown\n",
+ xkb_atom_text(ctx, expr->value.field.element),
+ xkb_atom_text(ctx, expr->value.field.field));
+ return false;
+
+ case EXPR_ARRAY_REF:
+ bogus = "array reference";
+
+ case EXPR_ACTION_DECL:
+ if (bogus == NULL)
+ bogus = "function use";
+ log_err(ctx,
+ "Unexpected %s in mask expression; Expression Ignored\n",
+ bogus);
+ return false;
+
+ case EXPR_ADD:
+ case EXPR_SUBTRACT:
+ case EXPR_MULTIPLY:
+ case EXPR_DIVIDE:
+ left = expr->value.binary.left;
+ right = expr->value.binary.right;
+ if (!ExprResolveMaskLookup(ctx, left, &l, lookup, lookupPriv) ||
+ !ExprResolveMaskLookup(ctx, right, &r, lookup, lookupPriv))
+ return false;
+
+ switch (expr->op) {
+ case EXPR_ADD:
+ *val_rtrn = l | r;
+ break;
+ case EXPR_SUBTRACT:
+ *val_rtrn = l & (~r);
+ break;
+ case EXPR_MULTIPLY:
+ case EXPR_DIVIDE:
+ log_err(ctx, "Cannot %s masks; Illegal operation ignored\n",
+ (expr->op == EXPR_DIVIDE ? "divide" : "multiply"));
+ return false;
+ default:
+ break;
+ }
+
+ return true;
+
+ case EXPR_ASSIGN:
+ log_wsgo(ctx, "Assignment operator not implemented yet\n");
+ break;
+
+ case EXPR_INVERT:
+ left = expr->value.child;
+ if (!ExprResolveIntegerLookup(ctx, left, &v, lookup, lookupPriv))
+ return false;
+
+ *val_rtrn = ~v;
+ return true;
+
+ case EXPR_UNARY_PLUS:
+ case EXPR_NEGATE:
+ case EXPR_NOT:
+ left = expr->value.child;
+ if (!ExprResolveIntegerLookup(ctx, left, &v, lookup, lookupPriv))
+ log_err(ctx, "The %s operator cannot be used with a mask\n",
+ (expr->op == EXPR_NEGATE ? "-" : "!"));
+ return false;
+
+ default:
+ log_wsgo(ctx, "Unknown operator %d in ResolveMask\n", expr->op);
+ break;
+ }
+
+ return false;
+}
+
+bool
+ExprResolveMask(struct xkb_context *ctx, const ExprDef *expr,
+ unsigned int *mask_rtrn, const LookupEntry *values)
+{
+ return ExprResolveMaskLookup(ctx, expr, mask_rtrn, SimpleLookup, values);
+}
+
+bool
+ExprResolveModMask(struct xkb_keymap *keymap, const ExprDef *expr,
+ enum mod_type mod_type, xkb_mod_mask_t *mask_rtrn)
+{
+ LookupModMaskPriv priv = { .keymap = keymap, .mod_type = mod_type };
+ return ExprResolveMaskLookup(keymap->ctx, expr, mask_rtrn, LookupModMask,
+ &priv);
+}
+
+bool
+ExprResolveKeySym(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_keysym_t *sym_rtrn)
+{
+ int val;
+
+ if (expr->op == EXPR_IDENT) {
+ const char *str;
+ str = xkb_atom_text(ctx, expr->value.str);
+ *sym_rtrn = xkb_keysym_from_name(str, 0);
+ if (*sym_rtrn != XKB_KEY_NoSymbol)
+ return true;
+ }
+
+ if (!ExprResolveInteger(ctx, expr, &val))
+ return false;
+
+ if (val < 0 || val >= 10)
+ return false;
+
+ *sym_rtrn = ((xkb_keysym_t) val) + '0';
+ return true;
+}
+
+bool
+ExprResolveMod(struct xkb_keymap *keymap, const ExprDef *def,
+ enum mod_type mod_type, xkb_mod_index_t *ndx_rtrn)
+{
+ xkb_mod_index_t ndx;
+ xkb_atom_t name = def->value.str;
+
+ if (def->op != EXPR_IDENT) {
+ log_err(keymap->ctx,
+ "Cannot resolve virtual modifier: "
+ "found %s where a virtual modifier name was expected\n",
+ expr_op_type_to_string(def->op));
+ return false;
+ }
+
+ ndx = ModNameToIndex(keymap, name, mod_type);
+ if (ndx == XKB_MOD_INVALID) {
+ log_err(keymap->ctx,
+ "Cannot resolve virtual modifier: "
+ "\"%s\" was not previously declared\n",
+ xkb_atom_text(keymap->ctx, name));
+ return false;
+ }
+
+ *ndx_rtrn = ndx;
+ return true;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/expr.h b/src/3rdparty/xkbcommon/src/xkbcomp/expr.h
new file mode 100644
index 0000000000..5434ad199e
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/expr.h
@@ -0,0 +1,83 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#ifndef XKBCOMP_EXPR_H
+#define XKBCOMP_EXPR_H
+
+bool
+ExprResolveLhs(struct xkb_context *ctx, const ExprDef *expr,
+ const char **elem_rtrn, const char **field_rtrn,
+ ExprDef **index_rtrn);
+
+bool
+ExprResolveModMask(struct xkb_keymap *keymap, const ExprDef *expr,
+ enum mod_type mod_type, xkb_mod_mask_t *mask_rtrn);
+
+bool
+ExprResolveMod(struct xkb_keymap *keymap, const ExprDef *def,
+ enum mod_type mod_type, xkb_mod_index_t *ndx_rtrn);
+
+bool
+ExprResolveBoolean(struct xkb_context *ctx, const ExprDef *expr,
+ bool *set_rtrn);
+
+bool
+ExprResolveKeyCode(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_keycode_t *kc);
+
+bool
+ExprResolveInteger(struct xkb_context *ctx, const ExprDef *expr,
+ int *val_rtrn);
+
+bool
+ExprResolveLevel(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_level_index_t *level_rtrn);
+
+bool
+ExprResolveGroup(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_layout_index_t *group_rtrn);
+
+bool
+ExprResolveButton(struct xkb_context *ctx, const ExprDef *expr,
+ int *btn_rtrn);
+
+bool
+ExprResolveString(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_atom_t *val_rtrn);
+
+bool
+ExprResolveEnum(struct xkb_context *ctx, const ExprDef *expr,
+ unsigned int *val_rtrn, const LookupEntry *values);
+
+bool
+ExprResolveMask(struct xkb_context *ctx, const ExprDef *expr,
+ unsigned int *mask_rtrn, const LookupEntry *values);
+
+bool
+ExprResolveKeySym(struct xkb_context *ctx, const ExprDef *expr,
+ xkb_keysym_t *sym_rtrn);
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/include.c b/src/3rdparty/xkbcommon/src/xkbcomp/include.c
new file mode 100644
index 0000000000..b4a4014635
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/include.c
@@ -0,0 +1,289 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+
+#include "xkbcomp-priv.h"
+#include "include.h"
+
+/**
+ * Parse an include statement. Each call returns a file name, along with
+ * (possibly) a specific map in the file, an explicit group designator, and
+ * the separator from the next file, used to determine the merge mode.
+ *
+ * @param str_inout Input statement, modified in-place. Should be passed in
+ * repeatedly. If str_inout is NULL, the parsing has completed.
+ *
+ * @param file_rtrn Set to the name of the include file to be used. Combined
+ * with an enum xkb_file_type, this determines which file to look for in the
+ * include path.
+ *
+ * @param map_rtrn Set to the string between '(' and ')', if any. This will
+ * result in the compilation of a specific named map within the file (e.g.
+ * xkb_symbols "basic" { ... }) , as opposed to the default map of the file.
+ *
+ * @param nextop_rtrn Set to the next operation in the complete statement,
+ * which is '\0' if it's the last file or '+' or '|' if there are more.
+ * Separating the files with '+' sets the merge mode to MERGE_MODE_OVERRIDE,
+ * while '|' sets the merge mode to MERGE_MODE_AUGMENT.
+ *
+ * @param extra_data Set to the string after ':', if any. Currently the
+ * extra data is only used for setting an explicit group index for a symbols
+ * file.
+ *
+ * @return true if parsing was successful, false for an illegal string.
+ *
+ * Example: "evdev+aliases(qwerty):2"
+ * str_inout = "aliases(qwerty):2"
+ * file_rtrn = "evdev"
+ * map_rtrn = NULL
+ * nextop_retrn = "+"
+ * extra_data = NULL
+ *
+ * 2nd run with "aliases(qwerty):2"
+ * str_inout = NULL
+ * file_rtrn = "aliases"
+ * map_rtrn = "qwerty"
+ * nextop_retrn = ""
+ * extra_data = "2"
+ *
+ */
+bool
+ParseIncludeMap(char **str_inout, char **file_rtrn, char **map_rtrn,
+ char *nextop_rtrn, char **extra_data)
+{
+ char *tmp, *str, *next;
+
+ str = *str_inout;
+
+ /*
+ * Find the position in the string where the next file is included,
+ * if there is more than one left in the statement.
+ */
+ next = strpbrk(str, "|+");
+ if (next) {
+ /* Got more files, this function will be called again. */
+ *nextop_rtrn = *next;
+ /* Separate the string, for strchr etc. to work on this file only. */
+ *next++ = '\0';
+ }
+ else {
+ /* This is the last file in this statement, won't be called again. */
+ *nextop_rtrn = '\0';
+ next = NULL;
+ }
+
+ /*
+ * Search for the explicit group designator, if any. If it's there,
+ * it goes after the file name and map.
+ */
+ tmp = strchr(str, ':');
+ if (tmp != NULL) {
+ *tmp++ = '\0';
+ *extra_data = strdup(tmp);
+ }
+ else {
+ *extra_data = NULL;
+ }
+
+ /* Look for a map, if any. */
+ tmp = strchr(str, '(');
+ if (tmp == NULL) {
+ /* No map. */
+ *file_rtrn = strdup(str);
+ *map_rtrn = NULL;
+ }
+ else if (str[0] == '(') {
+ /* Map without file - invalid. */
+ free(*extra_data);
+ return false;
+ }
+ else {
+ /* Got a map; separate the file and the map for the strdup's. */
+ *tmp++ = '\0';
+ *file_rtrn = strdup(str);
+ str = tmp;
+ tmp = strchr(str, ')');
+ if (tmp == NULL || tmp[1] != '\0') {
+ free(*file_rtrn);
+ free(*extra_data);
+ return false;
+ }
+ *tmp++ = '\0';
+ *map_rtrn = strdup(str);
+ }
+
+ /* Set up the next file for the next call, if any. */
+ if (*nextop_rtrn == '\0')
+ *str_inout = NULL;
+ else if (*nextop_rtrn == '|' || *nextop_rtrn == '+')
+ *str_inout = next;
+ else
+ return false;
+
+ return true;
+}
+
+static const char *xkb_file_type_include_dirs[_FILE_TYPE_NUM_ENTRIES] = {
+ [FILE_TYPE_KEYCODES] = "keycodes",
+ [FILE_TYPE_TYPES] = "types",
+ [FILE_TYPE_COMPAT] = "compat",
+ [FILE_TYPE_SYMBOLS] = "symbols",
+ [FILE_TYPE_GEOMETRY] = "geometry",
+ [FILE_TYPE_KEYMAP] = "keymap",
+ [FILE_TYPE_RULES] = "rules",
+};
+
+/**
+ * Return the xkb directory based on the type.
+ */
+static const char *
+DirectoryForInclude(enum xkb_file_type type)
+{
+ if (type >= _FILE_TYPE_NUM_ENTRIES)
+ return "";
+ return xkb_file_type_include_dirs[type];
+}
+
+FILE *
+FindFileInXkbPath(struct xkb_context *ctx, const char *name,
+ enum xkb_file_type type, char **pathRtrn)
+{
+ unsigned int i;
+ FILE *file = NULL;
+ char buf[PATH_MAX];
+ const char *typeDir;
+
+ typeDir = DirectoryForInclude(type);
+
+ for (i = 0; i < xkb_context_num_include_paths(ctx); i++) {
+ int ret = snprintf(buf, sizeof(buf), "%s/%s/%s",
+ xkb_context_include_path_get(ctx, i),
+ typeDir, name);
+ if (ret >= (ssize_t) sizeof(buf)) {
+ log_err(ctx, "File name (%s/%s/%s) too long\n",
+ xkb_context_include_path_get(ctx, i), typeDir, name);
+ continue;
+ }
+
+ file = fopen(buf, "r");
+ if (file)
+ break;
+ }
+
+ if (!file) {
+ log_err(ctx, "Couldn't find file \"%s/%s\" in include paths\n",
+ typeDir, name);
+
+ if (xkb_context_num_include_paths(ctx) > 0) {
+ log_err(ctx, "%d include paths searched:\n",
+ xkb_context_num_include_paths(ctx));
+ for (i = 0; i < xkb_context_num_include_paths(ctx); i++)
+ log_err(ctx, "\t%s\n",
+ xkb_context_include_path_get(ctx, i));
+ }
+ else {
+ log_err(ctx, "There are no include paths to search\n");
+ }
+
+ if (xkb_context_num_failed_include_paths(ctx) > 0) {
+ log_err(ctx, "%d include paths could not be added:\n",
+ xkb_context_num_failed_include_paths(ctx));
+ for (i = 0; i < xkb_context_num_failed_include_paths(ctx); i++)
+ log_err(ctx, "\t%s\n",
+ xkb_context_failed_include_path_get(ctx, i));
+ }
+
+ return NULL;
+ }
+
+ if (pathRtrn)
+ *pathRtrn = strdup(buf);
+ return file;
+}
+
+XkbFile *
+ProcessIncludeFile(struct xkb_context *ctx, IncludeStmt *stmt,
+ enum xkb_file_type file_type)
+{
+ FILE *file;
+ XkbFile *xkb_file;
+
+ file = FindFileInXkbPath(ctx, stmt->file, file_type, NULL);
+ if (!file)
+ return false;
+
+ xkb_file = XkbParseFile(ctx, file, stmt->file, stmt->map);
+ fclose(file);
+ if (!xkb_file) {
+ if (stmt->map)
+ log_err(ctx, "Couldn't process include statement for '%s(%s)'\n",
+ stmt->file, stmt->map);
+ else
+ log_err(ctx, "Couldn't process include statement for '%s'\n",
+ stmt->file);
+ return NULL;
+ }
+
+ if (xkb_file->file_type != file_type) {
+ log_err(ctx,
+ "Include file wrong type (expected %s, got %s); "
+ "Include file \"%s\" ignored\n",
+ xkb_file_type_to_string(file_type),
+ xkb_file_type_to_string(xkb_file->file_type), stmt->file);
+ FreeXkbFile(xkb_file);
+ return NULL;
+ }
+
+ /* FIXME: we have to check recursive includes here (or somewhere) */
+
+ return xkb_file;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/include.h b/src/3rdparty/xkbcommon/src/xkbcomp/include.h
new file mode 100644
index 0000000000..03e76ed5ce
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/include.h
@@ -0,0 +1,42 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#ifndef XKBCOMP_INCLUDE_H
+#define XKBCOMP_INCLUDE_H
+
+bool
+ParseIncludeMap(char **str_inout, char **file_rtrn, char **map_rtrn,
+ char *nextop_rtrn, char **extra_data);
+
+FILE *
+FindFileInXkbPath(struct xkb_context *ctx, const char *name,
+ enum xkb_file_type type, char **pathRtrn);
+
+XkbFile *
+ProcessIncludeFile(struct xkb_context *ctx, IncludeStmt *stmt,
+ enum xkb_file_type file_type);
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/keycodes.c b/src/3rdparty/xkbcommon/src/xkbcomp/keycodes.c
new file mode 100644
index 0000000000..edc54c94f3
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/keycodes.c
@@ -0,0 +1,692 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#include "xkbcomp-priv.h"
+#include "text.h"
+#include "expr.h"
+#include "include.h"
+
+/*
+ * The xkb_keycodes section
+ * ========================
+ *
+ * This is the simplest section type, and is the first one to be
+ * compiled. The purpose of this is mostly to map between the
+ * hardware/evdev scancodes and xkb keycodes. Each key is given a name
+ * by which it can be referred to later, e.g. in the symbols section.
+ *
+ * Keycode statements
+ * ------------------
+ * Statements of the form:
+ * <TLDE> = 49;
+ * <AE01> = 10;
+ *
+ * The above would let 49 and 10 be valid keycodes in the keymap, and
+ * assign them the names TLDE and AE01 respectively. The format <WXYZ> is
+ * always used to refer to a key by name.
+ *
+ * [ The naming convention <AE01> just denoted the position of the key
+ * in the main alphanumric section of the keyboard, with the two letters
+ * specifying the row and the two digits specifying the column, from
+ * the bottom left.]
+ *
+ * In the common case this just maps to the evdev scancodes from
+ * /usr/include/linux/input.h, e.g. the following definitions:
+ * #define KEY_GRAVE 41
+ * #define KEY_1 2
+ * Similar definitions appear in the xf86-input-keyboard driver. Note
+ * that in all current keymaps there's a constant offset of 8 (for
+ * historical reasons).
+ *
+ * If there's a conflict, like the same name given to different keycodes,
+ * or same keycode given different names, it is resolved according to the
+ * merge mode which applies to the definitions.
+ *
+ * Alias statements
+ * ----------------
+ * Statements of the form:
+ * alias <MENU> = <COMP>;
+ *
+ * Allows to refer to a previously defined key (here <COMP>) by another
+ * name (here <MENU>). Conflicts are handled similarly.
+ *
+ * LED name statements
+ * -------------------------
+ * Statements of the form:
+ * indicator 1 = "Caps Lock";
+ * indicator 2 = "Num Lock";
+ * indicator 3 = "Scroll Lock";
+ *
+ * Assigns a name to the keyboard LED (a.k.a indicator) with the given index.
+ * The led may be referred by this name later in the compat section
+ * and by the user.
+ *
+ * Effect on the keymap
+ * --------------------
+ * After all of the xkb_keycodes sections have been compiled, the
+ * following members of struct xkb_keymap are finalized:
+ * xkb_keycode_t min_key_code;
+ * xkb_keycode_t max_key_code;
+ * unsigned int num_aliases;
+ * struct xkb_key_alias *key_aliases;
+ * char *keycodes_section_name;
+ * The 'name' field of leds declared in xkb_keycodes:
+ * darray(struct xkb_led) leds;
+ * Further, the array of keys:
+ * struct xkb_key *keys;
+ * had been resized to its final size (i.e. all of the xkb_key objects are
+ * referable by their keycode). However the objects themselves do not
+ * contain any useful information besides the key name at this point.
+ */
+
+typedef struct {
+ enum merge_mode merge;
+
+ xkb_atom_t alias;
+ xkb_atom_t real;
+} AliasInfo;
+
+typedef struct {
+ enum merge_mode merge;
+
+ xkb_atom_t name;
+} LedNameInfo;
+
+typedef struct {
+ char *name;
+ int errorCount;
+
+ xkb_keycode_t min_key_code;
+ xkb_keycode_t max_key_code;
+ darray(xkb_atom_t) key_names;
+ darray(LedNameInfo) led_names;
+ darray(AliasInfo) aliases;
+
+ struct xkb_context *ctx;
+} KeyNamesInfo;
+
+/***====================================================================***/
+
+static void
+InitAliasInfo(AliasInfo *info, enum merge_mode merge,
+ xkb_atom_t alias, xkb_atom_t real)
+{
+ memset(info, 0, sizeof(*info));
+ info->merge = merge;
+ info->alias = alias;
+ info->real = real;
+}
+
+static LedNameInfo *
+FindLedByName(KeyNamesInfo *info, xkb_atom_t name,
+ xkb_led_index_t *idx_out)
+{
+ LedNameInfo *ledi;
+ xkb_led_index_t idx;
+
+ darray_enumerate(idx, ledi, info->led_names) {
+ if (ledi->name == name) {
+ *idx_out = idx;
+ return ledi;
+ }
+ }
+
+ return NULL;
+}
+
+static bool
+AddLedName(KeyNamesInfo *info, enum merge_mode merge, bool same_file,
+ LedNameInfo *new, xkb_led_index_t new_idx)
+{
+ xkb_led_index_t old_idx;
+ LedNameInfo *old;
+ const int verbosity = xkb_context_get_log_verbosity(info->ctx);
+ const bool report = (same_file && verbosity > 0) || verbosity > 9;
+ const bool replace = (merge == MERGE_REPLACE || merge == MERGE_OVERRIDE);
+
+ /* LED with the same name already exists. */
+ old = FindLedByName(info, new->name, &old_idx);
+ if (old) {
+ if (old_idx == new_idx) {
+ log_warn(info->ctx,
+ "Multiple indicators named \"%s\"; "
+ "Identical definitions ignored\n",
+ xkb_atom_text(info->ctx, new->name));
+ return true;
+ }
+
+ if (report) {
+ xkb_led_index_t use = (replace ? new_idx + 1 : old_idx + 1);
+ xkb_led_index_t ignore = (replace ? old_idx + 1 : new_idx + 1);
+ log_warn(info->ctx,
+ "Multiple indicators named %s; Using %d, ignoring %d\n",
+ xkb_atom_text(info->ctx, new->name), use, ignore);
+ }
+
+ if (replace)
+ *old = *new;
+
+ return true;
+ }
+
+ if (new_idx >= darray_size(info->led_names))
+ darray_resize0(info->led_names, new_idx + 1);
+
+ /* LED with the same index already exists. */
+ old = &darray_item(info->led_names, new_idx);
+ if (old->name != XKB_ATOM_NONE) {
+ if (report) {
+ const xkb_atom_t use = (replace ? new->name : old->name);
+ const xkb_atom_t ignore = (replace ? old->name : new->name);
+ log_warn(info->ctx, "Multiple names for indicator %d; "
+ "Using %s, ignoring %s\n", new_idx + 1,
+ xkb_atom_text(info->ctx, use),
+ xkb_atom_text(info->ctx, ignore));
+ }
+
+ if (replace)
+ *old = *new;
+
+ return true;
+ }
+
+ darray_item(info->led_names, new_idx) = *new;
+ return true;
+}
+
+static void
+ClearKeyNamesInfo(KeyNamesInfo *info)
+{
+ free(info->name);
+ darray_free(info->key_names);
+ darray_free(info->aliases);
+ darray_free(info->led_names);
+}
+
+static void
+InitKeyNamesInfo(KeyNamesInfo *info, struct xkb_context *ctx)
+{
+ memset(info, 0, sizeof(*info));
+ info->ctx = ctx;
+ info->min_key_code = XKB_KEYCODE_MAX;
+}
+
+static xkb_keycode_t
+FindKeyByName(KeyNamesInfo *info, xkb_atom_t name)
+{
+ xkb_keycode_t i;
+
+ for (i = info->min_key_code; i <= info->max_key_code; i++)
+ if (darray_item(info->key_names, i) == name)
+ return i;
+
+ return XKB_KEYCODE_INVALID;
+}
+
+static bool
+AddKeyName(KeyNamesInfo *info, xkb_keycode_t kc, xkb_atom_t name,
+ enum merge_mode merge, bool same_file, bool report)
+{
+ xkb_atom_t old_name;
+ xkb_keycode_t old_kc;
+ const int verbosity = xkb_context_get_log_verbosity(info->ctx);
+
+ report = report && ((same_file && verbosity > 0) || verbosity > 7);
+
+ if (kc >= darray_size(info->key_names))
+ darray_resize0(info->key_names, kc + 1);
+
+ info->min_key_code = MIN(info->min_key_code, kc);
+ info->max_key_code = MAX(info->max_key_code, kc);
+
+ /* There's already a key with this keycode. */
+ old_name = darray_item(info->key_names, kc);
+ if (old_name != XKB_ATOM_NONE) {
+ const char *lname = KeyNameText(info->ctx, old_name);
+ const char *kname = KeyNameText(info->ctx, name);
+
+ if (old_name == name) {
+ if (report)
+ log_warn(info->ctx,
+ "Multiple identical key name definitions; "
+ "Later occurrences of \"%s = %d\" ignored\n",
+ lname, kc);
+ return true;
+ }
+ else if (merge == MERGE_AUGMENT) {
+ if (report)
+ log_warn(info->ctx,
+ "Multiple names for keycode %d; "
+ "Using %s, ignoring %s\n", kc, lname, kname);
+ return true;
+ }
+ else {
+ if (report)
+ log_warn(info->ctx,
+ "Multiple names for keycode %d; "
+ "Using %s, ignoring %s\n", kc, kname, lname);
+ darray_item(info->key_names, kc) = XKB_ATOM_NONE;
+ }
+ }
+
+ /* There's already a key with this name. */
+ old_kc = FindKeyByName(info, name);
+ if (old_kc != XKB_KEYCODE_INVALID && old_kc != kc) {
+ const char *kname = KeyNameText(info->ctx, name);
+
+ if (merge == MERGE_OVERRIDE) {
+ darray_item(info->key_names, old_kc) = XKB_ATOM_NONE;
+ if (report)
+ log_warn(info->ctx,
+ "Key name %s assigned to multiple keys; "
+ "Using %d, ignoring %d\n", kname, kc, old_kc);
+ }
+ else {
+ if (report)
+ log_vrb(info->ctx, 3,
+ "Key name %s assigned to multiple keys; "
+ "Using %d, ignoring %d\n", kname, old_kc, kc);
+ return true;
+ }
+ }
+
+ darray_item(info->key_names, kc) = name;
+ return true;
+}
+
+/***====================================================================***/
+
+static int
+HandleAliasDef(KeyNamesInfo *info, KeyAliasDef *def, enum merge_mode merge);
+
+static void
+MergeIncludedKeycodes(KeyNamesInfo *into, KeyNamesInfo *from,
+ enum merge_mode merge)
+{
+ if (from->errorCount > 0) {
+ into->errorCount += from->errorCount;
+ return;
+ }
+
+ if (into->name == NULL) {
+ into->name = from->name;
+ from->name = NULL;
+ }
+
+ /* Merge key names. */
+ if (darray_empty(into->key_names)) {
+ into->key_names = from->key_names;
+ darray_init(from->key_names);
+ into->min_key_code = from->min_key_code;
+ into->max_key_code = from->max_key_code;
+ }
+ else {
+ if (darray_size(into->key_names) < darray_size(from->key_names))
+ darray_resize0(into->key_names, darray_size(from->key_names));
+
+ for (unsigned i = from->min_key_code; i <= from->max_key_code; i++) {
+ xkb_atom_t name = darray_item(from->key_names, i);
+ if (name == XKB_ATOM_NONE)
+ continue;
+
+ if (!AddKeyName(into, i, name, merge, true, false))
+ into->errorCount++;
+ }
+ }
+
+ /* Merge key aliases. */
+ if (darray_empty(into->aliases)) {
+ into->aliases = from->aliases;
+ darray_init(from->aliases);
+ }
+ else {
+ AliasInfo *alias;
+
+ darray_foreach(alias, from->aliases) {
+ KeyAliasDef def;
+
+ def.merge = (merge == MERGE_DEFAULT ? alias->merge : merge);
+ def.alias = alias->alias;
+ def.real = alias->real;
+
+ if (!HandleAliasDef(into, &def, def.merge))
+ into->errorCount++;
+ }
+ }
+
+ /* Merge LED names. */
+ if (darray_empty(into->led_names)) {
+ into->led_names = from->led_names;
+ darray_init(from->led_names);
+ }
+ else {
+ xkb_led_index_t idx;
+ LedNameInfo *ledi;
+
+ darray_enumerate(idx, ledi, from->led_names) {
+ if (ledi->name == XKB_ATOM_NONE)
+ continue;
+
+ ledi->merge = (merge == MERGE_DEFAULT ? ledi->merge : merge);
+ if (!AddLedName(into, ledi->merge, false, ledi, idx))
+ into->errorCount++;
+ }
+ }
+}
+
+static void
+HandleKeycodesFile(KeyNamesInfo *info, XkbFile *file, enum merge_mode merge);
+
+static bool
+HandleIncludeKeycodes(KeyNamesInfo *info, IncludeStmt *include)
+{
+ KeyNamesInfo included;
+
+ InitKeyNamesInfo(&included, info->ctx);
+ included.name = include->stmt;
+ include->stmt = NULL;
+
+ for (IncludeStmt *stmt = include; stmt; stmt = stmt->next_incl) {
+ KeyNamesInfo next_incl;
+ XkbFile *file;
+
+ file = ProcessIncludeFile(info->ctx, stmt, FILE_TYPE_KEYCODES);
+ if (!file) {
+ info->errorCount += 10;
+ ClearKeyNamesInfo(&included);
+ return false;
+ }
+
+ InitKeyNamesInfo(&next_incl, info->ctx);
+
+ HandleKeycodesFile(&next_incl, file, MERGE_OVERRIDE);
+
+ MergeIncludedKeycodes(&included, &next_incl, stmt->merge);
+
+ ClearKeyNamesInfo(&next_incl);
+ FreeXkbFile(file);
+ }
+
+ MergeIncludedKeycodes(info, &included, include->merge);
+ ClearKeyNamesInfo(&included);
+
+ return (info->errorCount == 0);
+}
+
+static bool
+HandleKeycodeDef(KeyNamesInfo *info, KeycodeDef *stmt, enum merge_mode merge)
+{
+ if (stmt->merge != MERGE_DEFAULT) {
+ if (stmt->merge == MERGE_REPLACE)
+ merge = MERGE_OVERRIDE;
+ else
+ merge = stmt->merge;
+ }
+
+ if (stmt->value < 0 || stmt->value > XKB_KEYCODE_MAX) {
+ log_err(info->ctx,
+ "Illegal keycode %lld: must be between 0..%u; "
+ "Key ignored\n", (long long) stmt->value, XKB_KEYCODE_MAX);
+ return false;
+ }
+
+ return AddKeyName(info, stmt->value, stmt->name, merge, false, true);
+}
+
+static int
+HandleAliasDef(KeyNamesInfo *info, KeyAliasDef *def, enum merge_mode merge)
+{
+ AliasInfo *old, new;
+
+ darray_foreach(old, info->aliases) {
+ if (old->alias == def->alias) {
+ if (def->real == old->real) {
+ log_vrb(info->ctx, 1,
+ "Alias of %s for %s declared more than once; "
+ "First definition ignored\n",
+ KeyNameText(info->ctx, def->alias),
+ KeyNameText(info->ctx, def->real));
+ }
+ else {
+ xkb_atom_t use, ignore;
+
+ use = (merge == MERGE_AUGMENT ? old->real : def->real);
+ ignore = (merge == MERGE_AUGMENT ? def->real : old->real);
+
+ log_warn(info->ctx,
+ "Multiple definitions for alias %s; "
+ "Using %s, ignoring %s\n",
+ KeyNameText(info->ctx, old->alias),
+ KeyNameText(info->ctx, use),
+ KeyNameText(info->ctx, ignore));
+
+ old->real = use;
+ }
+
+ old->merge = merge;
+ return true;
+ }
+ }
+
+ InitAliasInfo(&new, merge, def->alias, def->real);
+ darray_append(info->aliases, new);
+ return true;
+}
+
+static int
+HandleKeyNameVar(KeyNamesInfo *info, VarDef *stmt)
+{
+ const char *elem, *field;
+ ExprDef *arrayNdx;
+
+ if (!ExprResolveLhs(info->ctx, stmt->name, &elem, &field, &arrayNdx))
+ return false;
+
+ if (elem) {
+ log_err(info->ctx, "Unknown element %s encountered; "
+ "Default for field %s ignored\n", elem, field);
+ return false;
+ }
+
+ if (!istreq(field, "minimum") && !istreq(field, "maximum")) {
+ log_err(info->ctx, "Unknown field encountered; "
+ "Assignment to field %s ignored\n", field);
+ return false;
+ }
+
+ /* We ignore explicit min/max statements, we always use computed. */
+ return true;
+}
+
+static int
+HandleLedNameDef(KeyNamesInfo *info, LedNameDef *def,
+ enum merge_mode merge)
+{
+ LedNameInfo ledi;
+ xkb_atom_t name;
+
+ if (def->ndx < 1 || def->ndx > XKB_MAX_LEDS) {
+ info->errorCount++;
+ log_err(info->ctx,
+ "Illegal indicator index (%d) specified; must be between 1 .. %d; "
+ "Ignored\n", def->ndx, XKB_MAX_LEDS);
+ return false;
+ }
+
+ if (!ExprResolveString(info->ctx, def->name, &name)) {
+ char buf[20];
+ snprintf(buf, sizeof(buf), "%d", def->ndx);
+ info->errorCount++;
+ return ReportBadType(info->ctx, "indicator", "name", buf, "string");
+ }
+
+ ledi.merge = merge;
+ ledi.name = name;
+ return AddLedName(info, merge, true, &ledi, def->ndx - 1);
+}
+
+static void
+HandleKeycodesFile(KeyNamesInfo *info, XkbFile *file, enum merge_mode merge)
+{
+ bool ok;
+
+ free(info->name);
+ info->name = strdup_safe(file->name);
+
+ for (ParseCommon *stmt = file->defs; stmt; stmt = stmt->next) {
+ switch (stmt->type) {
+ case STMT_INCLUDE:
+ ok = HandleIncludeKeycodes(info, (IncludeStmt *) stmt);
+ break;
+ case STMT_KEYCODE:
+ ok = HandleKeycodeDef(info, (KeycodeDef *) stmt, merge);
+ break;
+ case STMT_ALIAS:
+ ok = HandleAliasDef(info, (KeyAliasDef *) stmt, merge);
+ break;
+ case STMT_VAR:
+ ok = HandleKeyNameVar(info, (VarDef *) stmt);
+ break;
+ case STMT_LED_NAME:
+ ok = HandleLedNameDef(info, (LedNameDef *) stmt, merge);
+ break;
+ default:
+ log_err(info->ctx,
+ "Keycode files may define key and indicator names only; "
+ "Ignoring %s\n", stmt_type_to_string(stmt->type));
+ ok = false;
+ break;
+ }
+
+ if (!ok)
+ info->errorCount++;
+
+ if (info->errorCount > 10) {
+ log_err(info->ctx, "Abandoning keycodes file \"%s\"\n",
+ file->topName);
+ break;
+ }
+ }
+}
+
+/***====================================================================***/
+
+static bool
+CopyKeyNamesToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info)
+{
+ xkb_keycode_t kc;
+ xkb_led_index_t idx;
+ LedNameInfo *ledi;
+ AliasInfo *alias;
+ unsigned i;
+
+ keymap->keycodes_section_name = strdup_safe(info->name);
+
+ keymap->min_key_code = info->min_key_code;
+ keymap->max_key_code = info->max_key_code;
+
+ /* Copy key names. */
+ keymap->keys = calloc(info->max_key_code + 1, sizeof(*keymap->keys));
+ for (kc = info->min_key_code; kc <= info->max_key_code; kc++) {
+ keymap->keys[kc].keycode = kc;
+ keymap->keys[kc].name = darray_item(info->key_names, kc);
+ }
+
+ /*
+ * Do some sanity checking on the aliases. We can't do it before
+ * because keys and their aliases may be added out-of-order.
+ */
+ keymap->num_key_aliases = 0;
+ darray_foreach(alias, info->aliases) {
+ /* Check that ->real is a key. */
+ if (!XkbKeyByName(keymap, alias->real, false)) {
+ log_vrb(info->ctx, 5,
+ "Attempt to alias %s to non-existent key %s; Ignored\n",
+ KeyNameText(info->ctx, alias->alias),
+ KeyNameText(info->ctx, alias->real));
+ alias->real = XKB_ATOM_NONE;
+ continue;
+ }
+
+ /* Check that ->alias is not a key. */
+ if (XkbKeyByName(keymap, alias->alias, false)) {
+ log_vrb(info->ctx, 5,
+ "Attempt to create alias with the name of a real key; "
+ "Alias \"%s = %s\" ignored\n",
+ KeyNameText(info->ctx, alias->alias),
+ KeyNameText(info->ctx, alias->real));
+ alias->real = XKB_ATOM_NONE;
+ continue;
+ }
+
+ keymap->num_key_aliases++;
+ }
+
+ /* Copy key aliases. */
+ keymap->key_aliases = calloc(keymap->num_key_aliases,
+ sizeof(*keymap->key_aliases));
+ i = 0;
+ darray_foreach(alias, info->aliases) {
+ if (alias->real != XKB_ATOM_NONE) {
+ keymap->key_aliases[i].alias = alias->alias;
+ keymap->key_aliases[i].real = alias->real;
+ i++;
+ }
+ }
+
+ /* Copy LED names. */
+ darray_resize0(keymap->leds, darray_size(info->led_names));
+ darray_enumerate(idx, ledi, info->led_names)
+ if (ledi->name != XKB_ATOM_NONE)
+ darray_item(keymap->leds, idx).name = ledi->name;
+
+ return true;
+}
+
+/***====================================================================***/
+
+bool
+CompileKeycodes(XkbFile *file, struct xkb_keymap *keymap,
+ enum merge_mode merge)
+{
+ KeyNamesInfo info;
+
+ InitKeyNamesInfo(&info, keymap->ctx);
+
+ HandleKeycodesFile(&info, file, merge);
+ if (info.errorCount != 0)
+ goto err_info;
+
+ if (!CopyKeyNamesToKeymap(keymap, &info))
+ goto err_info;
+
+ ClearKeyNamesInfo(&info);
+ return true;
+
+err_info:
+ ClearKeyNamesInfo(&info);
+ return false;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/keymap-dump.c b/src/3rdparty/xkbcommon/src/xkbcomp/keymap-dump.c
new file mode 100644
index 0000000000..034a8c1af3
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/keymap-dump.c
@@ -0,0 +1,662 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#include "xkbcomp-priv.h"
+#include "text.h"
+
+#define BUF_CHUNK_SIZE 4096
+
+struct buf {
+ char *buf;
+ size_t size;
+ size_t alloc;
+};
+
+static bool
+do_realloc(struct buf *buf, size_t at_least)
+{
+ char *new;
+
+ buf->alloc += BUF_CHUNK_SIZE;
+ if (at_least >= BUF_CHUNK_SIZE)
+ buf->alloc += at_least;
+
+ new = realloc(buf->buf, buf->alloc);
+ if (!new)
+ return false;
+
+ buf->buf = new;
+ return true;
+}
+
+ATTR_PRINTF(2, 3) static bool
+check_write_buf(struct buf *buf, const char *fmt, ...)
+{
+ va_list args;
+ int printed;
+ size_t available;
+
+ available = buf->alloc - buf->size;
+ va_start(args, fmt);
+ printed = vsnprintf(buf->buf + buf->size, available, fmt, args);
+ va_end(args);
+
+ if (printed < 0)
+ goto err;
+
+ if (printed >= available)
+ if (!do_realloc(buf, printed))
+ goto err;
+
+ /* The buffer has enough space now. */
+
+ available = buf->alloc - buf->size;
+ va_start(args, fmt);
+ printed = vsnprintf(buf->buf + buf->size, available, fmt, args);
+ va_end(args);
+
+ if (printed >= available || printed < 0)
+ goto err;
+
+ buf->size += printed;
+ return true;
+
+err:
+ free(buf->buf);
+ buf->buf = NULL;
+ return false;
+}
+
+#define write_buf(buf, ...) do { \
+ if (!check_write_buf(buf, __VA_ARGS__)) \
+ return false; \
+} while (0)
+
+static bool
+write_vmods(struct xkb_keymap *keymap, struct buf *buf)
+{
+ const struct xkb_mod *mod;
+ xkb_mod_index_t num_vmods = 0;
+
+ darray_foreach(mod, keymap->mods) {
+ if (mod->type != MOD_VIRT)
+ continue;
+
+ if (num_vmods == 0)
+ write_buf(buf, "\tvirtual_modifiers ");
+ else
+ write_buf(buf, ",");
+ write_buf(buf, "%s", xkb_atom_text(keymap->ctx, mod->name));
+ num_vmods++;
+ }
+
+ if (num_vmods > 0)
+ write_buf(buf, ";\n\n");
+
+ return true;
+}
+
+static bool
+write_keycodes(struct xkb_keymap *keymap, struct buf *buf)
+{
+ const struct xkb_key *key;
+ xkb_led_index_t idx;
+ const struct xkb_led *led;
+
+ if (keymap->keycodes_section_name)
+ write_buf(buf, "xkb_keycodes \"%s\" {\n",
+ keymap->keycodes_section_name);
+ else
+ write_buf(buf, "xkb_keycodes {\n");
+
+ xkb_foreach_key(key, keymap) {
+ if (key->name == XKB_ATOM_NONE)
+ continue;
+
+ write_buf(buf, "\t%-20s = %d;\n",
+ KeyNameText(keymap->ctx, key->name), key->keycode);
+ }
+
+ darray_enumerate(idx, led, keymap->leds)
+ if (led->name != XKB_ATOM_NONE)
+ write_buf(buf, "\tindicator %d = \"%s\";\n",
+ idx + 1, xkb_atom_text(keymap->ctx, led->name));
+
+
+ for (unsigned i = 0; i < keymap->num_key_aliases; i++)
+ write_buf(buf, "\talias %-14s = %s;\n",
+ KeyNameText(keymap->ctx, keymap->key_aliases[i].alias),
+ KeyNameText(keymap->ctx, keymap->key_aliases[i].real));
+
+ write_buf(buf, "};\n\n");
+ return true;
+}
+
+static bool
+write_types(struct xkb_keymap *keymap, struct buf *buf)
+{
+ if (keymap->types_section_name)
+ write_buf(buf, "xkb_types \"%s\" {\n",
+ keymap->types_section_name);
+ else
+ write_buf(buf, "xkb_types {\n");
+
+ write_vmods(keymap, buf);
+
+ for (unsigned i = 0; i < keymap->num_types; i++) {
+ const struct xkb_key_type *type = &keymap->types[i];
+
+ write_buf(buf, "\ttype \"%s\" {\n",
+ xkb_atom_text(keymap->ctx, type->name));
+
+ write_buf(buf, "\t\tmodifiers= %s;\n",
+ ModMaskText(keymap, type->mods.mods));
+
+ for (unsigned j = 0; j < type->num_entries; j++) {
+ const char *str;
+ const struct xkb_key_type_entry *entry = &type->entries[j];
+
+ /*
+ * Printing level 1 entries is redundant, it's the default,
+ * unless there's preserve info.
+ */
+ if (entry->level == 0 && entry->preserve.mods == 0)
+ continue;
+
+ str = ModMaskText(keymap, entry->mods.mods);
+ write_buf(buf, "\t\tmap[%s]= Level%d;\n",
+ str, entry->level + 1);
+
+ if (entry->preserve.mods)
+ write_buf(buf, "\t\tpreserve[%s]= %s;\n",
+ str, ModMaskText(keymap, entry->preserve.mods));
+ }
+
+ for (xkb_level_index_t n = 0; n < type->num_levels; n++)
+ if (type->level_names[n])
+ write_buf(buf, "\t\tlevel_name[Level%d]= \"%s\";\n", n + 1,
+ xkb_atom_text(keymap->ctx, type->level_names[n]));
+
+ write_buf(buf, "\t};\n");
+ }
+
+ write_buf(buf, "};\n\n");
+ return true;
+}
+
+static bool
+write_led_map(struct xkb_keymap *keymap, struct buf *buf,
+ const struct xkb_led *led)
+{
+ write_buf(buf, "\tindicator \"%s\" {\n",
+ xkb_atom_text(keymap->ctx, led->name));
+
+ if (led->which_groups) {
+ if (led->which_groups != XKB_STATE_LAYOUT_EFFECTIVE) {
+ write_buf(buf, "\t\twhichGroupState= %s;\n",
+ LedStateMaskText(keymap->ctx, led->which_groups));
+ }
+ write_buf(buf, "\t\tgroups= 0x%02x;\n",
+ led->groups);
+ }
+
+ if (led->which_mods) {
+ if (led->which_mods != XKB_STATE_MODS_EFFECTIVE) {
+ write_buf(buf, "\t\twhichModState= %s;\n",
+ LedStateMaskText(keymap->ctx, led->which_mods));
+ }
+ write_buf(buf, "\t\tmodifiers= %s;\n",
+ ModMaskText(keymap, led->mods.mods));
+ }
+
+ if (led->ctrls) {
+ write_buf(buf, "\t\tcontrols= %s;\n",
+ ControlMaskText(keymap->ctx, led->ctrls));
+ }
+
+ write_buf(buf, "\t};\n");
+ return true;
+}
+
+static bool
+write_action(struct xkb_keymap *keymap, struct buf *buf,
+ const union xkb_action *action,
+ const char *prefix, const char *suffix)
+{
+ const char *type;
+ const char *args = NULL;
+
+ if (!prefix)
+ prefix = "";
+ if (!suffix)
+ suffix = "";
+
+ type = ActionTypeText(action->type);
+
+ switch (action->type) {
+ case ACTION_TYPE_MOD_SET:
+ case ACTION_TYPE_MOD_LATCH:
+ case ACTION_TYPE_MOD_LOCK:
+ if (action->mods.flags & ACTION_MODS_LOOKUP_MODMAP)
+ args = "modMapMods";
+ else
+ args = ModMaskText(keymap, action->mods.mods.mods);
+ write_buf(buf, "%s%s(modifiers=%s%s%s)%s", prefix, type, args,
+ (action->type != ACTION_TYPE_MOD_LOCK &&
+ (action->mods.flags & ACTION_LOCK_CLEAR)) ?
+ ",clearLocks" : "",
+ (action->type != ACTION_TYPE_MOD_LOCK &&
+ (action->mods.flags & ACTION_LATCH_TO_LOCK)) ?
+ ",latchToLock" : "",
+ suffix);
+ break;
+
+ case ACTION_TYPE_GROUP_SET:
+ case ACTION_TYPE_GROUP_LATCH:
+ case ACTION_TYPE_GROUP_LOCK:
+ write_buf(buf, "%s%s(group=%s%d%s%s)%s", prefix, type,
+ (!(action->group.flags & ACTION_ABSOLUTE_SWITCH) &&
+ action->group.group > 0) ? "+" : "",
+ (action->group.flags & ACTION_ABSOLUTE_SWITCH) ?
+ action->group.group + 1 : action->group.group,
+ (action->type != ACTION_TYPE_GROUP_LOCK &&
+ (action->group.flags & ACTION_LOCK_CLEAR)) ?
+ ",clearLocks" : "",
+ (action->type != ACTION_TYPE_GROUP_LOCK &&
+ (action->group.flags & ACTION_LATCH_TO_LOCK)) ?
+ ",latchToLock" : "",
+ suffix);
+ break;
+
+ case ACTION_TYPE_TERMINATE:
+ write_buf(buf, "%s%s()%s", prefix, type, suffix);
+ break;
+
+ case ACTION_TYPE_PTR_MOVE:
+ write_buf(buf, "%s%s(x=%s%d,y=%s%d%s)%s", prefix, type,
+ (!(action->ptr.flags & ACTION_ABSOLUTE_X) &&
+ action->ptr.x >= 0) ? "+" : "",
+ action->ptr.x,
+ (!(action->ptr.flags & ACTION_ABSOLUTE_Y) &&
+ action->ptr.y >= 0) ? "+" : "",
+ action->ptr.y,
+ (action->ptr.flags & ACTION_NO_ACCEL) ? ",!accel" : "",
+ suffix);
+ break;
+
+ case ACTION_TYPE_PTR_LOCK:
+ switch (action->btn.flags &
+ (ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK)) {
+ case ACTION_LOCK_NO_UNLOCK:
+ args = ",affect=lock";
+ break;
+
+ case ACTION_LOCK_NO_LOCK:
+ args = ",affect=unlock";
+ break;
+
+ case ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK:
+ args = ",affect=neither";
+ break;
+
+ default:
+ args = ",affect=both";
+ break;
+ }
+ case ACTION_TYPE_PTR_BUTTON:
+ write_buf(buf, "%s%s(button=", prefix, type);
+ if (action->btn.button > 0 && action->btn.button <= 5)
+ write_buf(buf, "%d", action->btn.button);
+ else
+ write_buf(buf, "default");
+ if (action->btn.count)
+ write_buf(buf, ",count=%d", action->btn.count);
+ if (args)
+ write_buf(buf, "%s", args);
+ write_buf(buf, ")%s", suffix);
+ break;
+
+ case ACTION_TYPE_PTR_DEFAULT:
+ write_buf(buf, "%s%s(", prefix, type);
+ write_buf(buf, "affect=button,button=%s%d",
+ (!(action->dflt.flags & ACTION_ABSOLUTE_SWITCH) &&
+ action->dflt.value >= 0) ? "+" : "",
+ action->dflt.value);
+ write_buf(buf, ")%s", suffix);
+ break;
+
+ case ACTION_TYPE_SWITCH_VT:
+ write_buf(buf, "%s%s(screen=%s%d,%ssame)%s", prefix, type,
+ (!(action->screen.flags & ACTION_ABSOLUTE_SWITCH) &&
+ action->screen.screen >= 0) ? "+" : "",
+ action->screen.screen,
+ (action->screen.flags & ACTION_SAME_SCREEN) ? "!" : "",
+ suffix);
+ break;
+
+ case ACTION_TYPE_CTRL_SET:
+ case ACTION_TYPE_CTRL_LOCK:
+ write_buf(buf, "%s%s(controls=%s)%s", prefix, type,
+ ControlMaskText(keymap->ctx, action->ctrls.ctrls), suffix);
+ break;
+
+ case ACTION_TYPE_NONE:
+ write_buf(buf, "%sNoAction()%s", prefix, suffix);
+ break;
+
+ default:
+ write_buf(buf,
+ "%s%s(type=0x%02x,data[0]=0x%02x,data[1]=0x%02x,data[2]=0x%02x,data[3]=0x%02x,data[4]=0x%02x,data[5]=0x%02x,data[6]=0x%02x)%s",
+ prefix, type, action->type, action->priv.data[0],
+ action->priv.data[1], action->priv.data[2],
+ action->priv.data[3], action->priv.data[4],
+ action->priv.data[5], action->priv.data[6],
+ suffix);
+ break;
+ }
+
+ return true;
+}
+
+static bool
+write_compat(struct xkb_keymap *keymap, struct buf *buf)
+{
+ const struct xkb_sym_interpret *si;
+ const struct xkb_led *led;
+
+ if (keymap->compat_section_name)
+ write_buf(buf, "xkb_compatibility \"%s\" {\n",
+ keymap->compat_section_name);
+ else
+ write_buf(buf, "xkb_compatibility {\n");
+
+ write_vmods(keymap, buf);
+
+ write_buf(buf, "\tinterpret.useModMapMods= AnyLevel;\n");
+ write_buf(buf, "\tinterpret.repeat= False;\n");
+
+ darray_foreach(si, keymap->sym_interprets) {
+ write_buf(buf, "\tinterpret %s+%s(%s) {\n",
+ si->sym ? KeysymText(keymap->ctx, si->sym) : "Any",
+ SIMatchText(si->match),
+ ModMaskText(keymap, si->mods));
+
+ if (si->virtual_mod != XKB_MOD_INVALID)
+ write_buf(buf, "\t\tvirtualModifier= %s;\n",
+ ModIndexText(keymap, si->virtual_mod));
+
+ if (si->level_one_only)
+ write_buf(buf, "\t\tuseModMapMods=level1;\n");
+
+ if (si->repeat)
+ write_buf(buf, "\t\trepeat= True;\n");
+
+ write_action(keymap, buf, &si->action, "\t\taction= ", ";\n");
+ write_buf(buf, "\t};\n");
+ }
+
+ darray_foreach(led, keymap->leds)
+ if (led->which_groups || led->groups || led->which_mods ||
+ led->mods.mods || led->ctrls)
+ write_led_map(keymap, buf, led);
+
+ write_buf(buf, "};\n\n");
+
+ return true;
+}
+
+static bool
+write_keysyms(struct xkb_keymap *keymap, struct buf *buf,
+ const struct xkb_key *key, xkb_layout_index_t group)
+{
+ for (xkb_level_index_t level = 0; level < XkbKeyGroupWidth(key, group);
+ level++) {
+ const xkb_keysym_t *syms;
+ int num_syms;
+
+ if (level != 0)
+ write_buf(buf, ", ");
+
+ num_syms = xkb_keymap_key_get_syms_by_level(keymap, key->keycode,
+ group, level, &syms);
+ if (num_syms == 0) {
+ write_buf(buf, "%15s", "NoSymbol");
+ }
+ else if (num_syms == 1) {
+ write_buf(buf, "%15s", KeysymText(keymap->ctx, syms[0]));
+ }
+ else {
+ write_buf(buf, "{ ");
+ for (int s = 0; s < num_syms; s++) {
+ if (s != 0)
+ write_buf(buf, ", ");
+ write_buf(buf, "%s", KeysymText(keymap->ctx, syms[s]));
+ }
+ write_buf(buf, " }");
+ }
+ }
+
+ return true;
+}
+
+static bool
+write_key(struct xkb_keymap *keymap, struct buf *buf,
+ const struct xkb_key *key)
+{
+ xkb_layout_index_t group;
+ bool simple = true;
+ bool explicit_types = false;
+ bool multi_type = false;
+ bool show_actions;
+
+ write_buf(buf, "\tkey %-20s {", KeyNameText(keymap->ctx, key->name));
+
+ for (group = 0; group < key->num_groups; group++) {
+ if (key->groups[group].explicit_type)
+ explicit_types = true;
+
+ if (group != 0 && key->groups[group].type != key->groups[0].type)
+ multi_type = true;
+ }
+
+ if (explicit_types) {
+ const struct xkb_key_type *type;
+ simple = false;
+
+ if (multi_type) {
+ for (group = 0; group < key->num_groups; group++) {
+ if (!key->groups[group].explicit_type)
+ continue;
+
+ type = key->groups[group].type;
+ write_buf(buf, "\n\t\ttype[group%u]= \"%s\",",
+ group + 1,
+ xkb_atom_text(keymap->ctx, type->name));
+ }
+ }
+ else {
+ type = key->groups[0].type;
+ write_buf(buf, "\n\t\ttype= \"%s\",",
+ xkb_atom_text(keymap->ctx, type->name));
+ }
+ }
+
+ if (key->explicit & EXPLICIT_REPEAT) {
+ if (key->repeats)
+ write_buf(buf, "\n\t\trepeat= Yes,");
+ else
+ write_buf(buf, "\n\t\trepeat= No,");
+ simple = false;
+ }
+
+ if (key->vmodmap && (key->explicit & EXPLICIT_VMODMAP))
+ write_buf(buf, "\n\t\tvirtualMods= %s,",
+ ModMaskText(keymap, key->vmodmap));
+
+ switch (key->out_of_range_group_action) {
+ case RANGE_SATURATE:
+ write_buf(buf, "\n\t\tgroupsClamp,");
+ break;
+
+ case RANGE_REDIRECT:
+ write_buf(buf, "\n\t\tgroupsRedirect= Group%u,",
+ key->out_of_range_group_number + 1);
+ break;
+
+ default:
+ break;
+ }
+
+ show_actions = !!(key->explicit & EXPLICIT_INTERP);
+
+ if (key->num_groups > 1 || show_actions)
+ simple = false;
+
+ if (simple) {
+ write_buf(buf, "\t[ ");
+ if (!write_keysyms(keymap, buf, key, 0))
+ return false;
+ write_buf(buf, " ] };\n");
+ }
+ else {
+ xkb_level_index_t level;
+
+ for (group = 0; group < key->num_groups; group++) {
+ if (group != 0)
+ write_buf(buf, ",");
+ write_buf(buf, "\n\t\tsymbols[Group%u]= [ ", group + 1);
+ if (!write_keysyms(keymap, buf, key, group))
+ return false;
+ write_buf(buf, " ]");
+ if (show_actions) {
+ write_buf(buf, ",\n\t\tactions[Group%u]= [ ", group + 1);
+ for (level = 0;
+ level < XkbKeyGroupWidth(key, group); level++) {
+ if (level != 0)
+ write_buf(buf, ", ");
+ write_action(keymap, buf,
+ &key->groups[group].levels[level].action,
+ NULL, NULL);
+ }
+ write_buf(buf, " ]");
+ }
+ }
+ write_buf(buf, "\n\t};\n");
+ }
+
+ return true;
+}
+
+static bool
+write_symbols(struct xkb_keymap *keymap, struct buf *buf)
+{
+ const struct xkb_key *key;
+ xkb_layout_index_t group;
+
+ if (keymap->symbols_section_name)
+ write_buf(buf, "xkb_symbols \"%s\" {\n",
+ keymap->symbols_section_name);
+ else
+ write_buf(buf, "xkb_symbols {\n");
+
+ for (group = 0; group < keymap->num_group_names; group++)
+ if (keymap->group_names[group])
+ write_buf(buf,
+ "\tname[group%d]=\"%s\";\n", group + 1,
+ xkb_atom_text(keymap->ctx, keymap->group_names[group]));
+ if (group > 0)
+ write_buf(buf, "\n");
+
+ xkb_foreach_key(key, keymap)
+ if (key->num_groups > 0)
+ write_key(keymap, buf, key);
+
+ xkb_foreach_key(key, keymap) {
+ xkb_mod_index_t i;
+ const struct xkb_mod *mod;
+
+ if (key->modmap == 0)
+ continue;
+
+ darray_enumerate(i, mod, keymap->mods)
+ if (key->modmap & (1 << i))
+ write_buf(buf, "\tmodifier_map %s { %s };\n",
+ xkb_atom_text(keymap->ctx, mod->name),
+ KeyNameText(keymap->ctx, key->name));
+ }
+
+ write_buf(buf, "};\n\n");
+ return true;
+}
+
+static bool
+write_keymap(struct xkb_keymap *keymap, struct buf *buf)
+{
+ return (check_write_buf(buf, "xkb_keymap {\n") &&
+ write_keycodes(keymap, buf) &&
+ write_types(keymap, buf) &&
+ write_compat(keymap, buf) &&
+ write_symbols(keymap, buf) &&
+ check_write_buf(buf, "};\n"));
+}
+
+char *
+text_v1_keymap_get_as_string(struct xkb_keymap *keymap)
+{
+ struct buf buf = { NULL, 0, 0 };
+
+ if (!write_keymap(keymap, &buf)) {
+ free(buf.buf);
+ return NULL;
+ }
+
+ return buf.buf;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/keymap.c b/src/3rdparty/xkbcommon/src/xkbcomp/keymap.c
new file mode 100644
index 0000000000..bed3930be9
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/keymap.c
@@ -0,0 +1,333 @@
+/*
+ * Copyright © 2009 Dan Nicholson
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Dan Nicholson <dbn.lists@gmail.com>
+ * Daniel Stone <daniel@fooishbar.org>
+ * Ran Benita <ran234@gmail.com>
+ */
+
+#include "xkbcomp-priv.h"
+
+static void
+ComputeEffectiveMask(struct xkb_keymap *keymap, struct xkb_mods *mods)
+{
+ const struct xkb_mod *mod;
+ xkb_mod_index_t i;
+
+ /* The effective mask is only real mods for now. */
+ mods->mask = mods->mods & MOD_REAL_MASK_ALL;
+
+ darray_enumerate(i, mod, keymap->mods)
+ if (mods->mods & (1 << i))
+ mods->mask |= mod->mapping;
+}
+
+static void
+UpdateActionMods(struct xkb_keymap *keymap, union xkb_action *act,
+ xkb_mod_mask_t modmap)
+{
+ switch (act->type) {
+ case ACTION_TYPE_MOD_SET:
+ case ACTION_TYPE_MOD_LATCH:
+ case ACTION_TYPE_MOD_LOCK:
+ if (act->mods.flags & ACTION_MODS_LOOKUP_MODMAP)
+ act->mods.mods.mods = modmap;
+ ComputeEffectiveMask(keymap, &act->mods.mods);
+ break;
+ default:
+ break;
+ }
+}
+
+static const struct xkb_sym_interpret default_interpret = {
+ .sym = XKB_KEY_NoSymbol,
+ .repeat = true,
+ .match = MATCH_ANY_OR_NONE,
+ .mods = 0,
+ .virtual_mod = XKB_MOD_INVALID,
+ .action = { .type = ACTION_TYPE_NONE },
+};
+
+/**
+ * Find an interpretation which applies to this particular level, either by
+ * finding an exact match for the symbol and modifier combination, or a
+ * generic XKB_KEY_NoSymbol match.
+ */
+static const struct xkb_sym_interpret *
+FindInterpForKey(struct xkb_keymap *keymap, const struct xkb_key *key,
+ xkb_layout_index_t group, xkb_level_index_t level)
+{
+ const struct xkb_sym_interpret *interp;
+ const xkb_keysym_t *syms;
+ int num_syms;
+
+ num_syms = xkb_keymap_key_get_syms_by_level(keymap, key->keycode, group,
+ level, &syms);
+ if (num_syms == 0)
+ return NULL;
+
+ /*
+ * There may be multiple matchings interprets; we should always return
+ * the most specific. Here we rely on compat.c to set up the
+ * sym_interprets array from the most specific to the least specific,
+ * such that when we find a match we return immediately.
+ */
+ darray_foreach(interp, keymap->sym_interprets) {
+ xkb_mod_mask_t mods;
+ bool found = false;
+
+ if ((num_syms > 1 || interp->sym != syms[0]) &&
+ interp->sym != XKB_KEY_NoSymbol)
+ continue;
+
+ if (interp->level_one_only && level != 0)
+ mods = 0;
+ else
+ mods = key->modmap;
+
+ switch (interp->match) {
+ case MATCH_NONE:
+ found = !(interp->mods & mods);
+ break;
+ case MATCH_ANY_OR_NONE:
+ found = (!mods || (interp->mods & mods));
+ break;
+ case MATCH_ANY:
+ found = !!(interp->mods & mods);
+ break;
+ case MATCH_ALL:
+ found = ((interp->mods & mods) == interp->mods);
+ break;
+ case MATCH_EXACTLY:
+ found = (interp->mods == mods);
+ break;
+ }
+
+ if (found)
+ return interp;
+ }
+
+ return &default_interpret;
+}
+
+static bool
+ApplyInterpsToKey(struct xkb_keymap *keymap, struct xkb_key *key)
+{
+ xkb_mod_mask_t vmodmap = 0;
+ xkb_layout_index_t group;
+ xkb_level_index_t level;
+
+ /* If we've been told not to bind interps to this key, then don't. */
+ if (key->explicit & EXPLICIT_INTERP)
+ return true;
+
+ for (group = 0; group < key->num_groups; group++) {
+ for (level = 0; level < XkbKeyGroupWidth(key, group); level++) {
+ const struct xkb_sym_interpret *interp;
+
+ interp = FindInterpForKey(keymap, key, group, level);
+ if (!interp)
+ continue;
+
+ /* Infer default key behaviours from the base level. */
+ if (group == 0 && level == 0)
+ if (!(key->explicit & EXPLICIT_REPEAT) && interp->repeat)
+ key->repeats = true;
+
+ if ((group == 0 && level == 0) || !interp->level_one_only)
+ if (interp->virtual_mod != XKB_MOD_INVALID)
+ vmodmap |= (1 << interp->virtual_mod);
+
+ if (interp->action.type != ACTION_TYPE_NONE)
+ key->groups[group].levels[level].action = interp->action;
+ }
+ }
+
+ if (!(key->explicit & EXPLICIT_VMODMAP))
+ key->vmodmap = vmodmap;
+
+ return true;
+}
+
+/**
+ * This collects a bunch of disparate functions which was done in the server
+ * at various points that really should've been done within xkbcomp. Turns out
+ * your actions and types are a lot more useful when any of your modifiers
+ * other than Shift actually do something ...
+ */
+static bool
+UpdateDerivedKeymapFields(struct xkb_keymap *keymap)
+{
+ struct xkb_mod *mod;
+ struct xkb_led *led;
+ unsigned int i, j;
+ struct xkb_key *key;
+
+ /* Find all the interprets for the key and bind them to actions,
+ * which will also update the vmodmap. */
+ xkb_foreach_key(key, keymap)
+ if (!ApplyInterpsToKey(keymap, key))
+ return false;
+
+ /* Update keymap->mods, the virtual -> real mod mapping. */
+ xkb_foreach_key(key, keymap)
+ darray_enumerate(i, mod, keymap->mods)
+ if (key->vmodmap & (1 << i))
+ mod->mapping |= key->modmap;
+
+ /* Now update the level masks for all the types to reflect the vmods. */
+ for (i = 0; i < keymap->num_types; i++) {
+ ComputeEffectiveMask(keymap, &keymap->types[i].mods);
+
+ for (j = 0; j < keymap->types[i].num_entries; j++) {
+ ComputeEffectiveMask(keymap, &keymap->types[i].entries[j].mods);
+ ComputeEffectiveMask(keymap, &keymap->types[i].entries[j].preserve);
+ }
+ }
+
+ /* Update action modifiers. */
+ xkb_foreach_key(key, keymap)
+ for (i = 0; i < key->num_groups; i++)
+ for (j = 0; j < XkbKeyGroupWidth(key, i); j++)
+ UpdateActionMods(keymap, &key->groups[i].levels[j].action,
+ key->modmap);
+
+ /* Update vmod -> led maps. */
+ darray_foreach(led, keymap->leds)
+ ComputeEffectiveMask(keymap, &led->mods);
+
+ /* Find maximum number of groups out of all keys in the keymap. */
+ xkb_foreach_key(key, keymap)
+ keymap->num_groups = MAX(keymap->num_groups, key->num_groups);
+
+ return true;
+}
+
+static bool
+UpdateBuiltinKeymapFields(struct xkb_keymap *keymap)
+{
+ struct xkb_context *ctx = keymap->ctx;
+
+ /*
+ * Add predefined (AKA real, core, X11) modifiers.
+ * The order is important!
+ */
+ darray_appends_t(keymap->mods, struct xkb_mod,
+ { .name = xkb_atom_intern(ctx, "Shift"), .type = MOD_REAL },
+ { .name = xkb_atom_intern(ctx, "Lock"), .type = MOD_REAL },
+ { .name = xkb_atom_intern(ctx, "Control"), .type = MOD_REAL },
+ { .name = xkb_atom_intern(ctx, "Mod1"), .type = MOD_REAL },
+ { .name = xkb_atom_intern(ctx, "Mod2"), .type = MOD_REAL },
+ { .name = xkb_atom_intern(ctx, "Mod3"), .type = MOD_REAL },
+ { .name = xkb_atom_intern(ctx, "Mod4"), .type = MOD_REAL },
+ { .name = xkb_atom_intern(ctx, "Mod5"), .type = MOD_REAL });
+
+ return true;
+}
+
+typedef bool (*compile_file_fn)(XkbFile *file,
+ struct xkb_keymap *keymap,
+ enum merge_mode merge);
+
+static const compile_file_fn compile_file_fns[LAST_KEYMAP_FILE_TYPE + 1] = {
+ [FILE_TYPE_KEYCODES] = CompileKeycodes,
+ [FILE_TYPE_TYPES] = CompileKeyTypes,
+ [FILE_TYPE_COMPAT] = CompileCompatMap,
+ [FILE_TYPE_SYMBOLS] = CompileSymbols,
+};
+
+bool
+CompileKeymap(XkbFile *file, struct xkb_keymap *keymap, enum merge_mode merge)
+{
+ bool ok;
+ const char *main_name;
+ XkbFile *files[LAST_KEYMAP_FILE_TYPE + 1] = { NULL };
+ enum xkb_file_type type;
+ struct xkb_context *ctx = keymap->ctx;
+
+ main_name = file->name ? file->name : "(unnamed)";
+
+ /* Collect section files and check for duplicates. */
+ for (file = (XkbFile *) file->defs; file;
+ file = (XkbFile *) file->common.next) {
+ if (file->file_type < FIRST_KEYMAP_FILE_TYPE ||
+ file->file_type > LAST_KEYMAP_FILE_TYPE) {
+ log_err(ctx, "Cannot define %s in a keymap file\n",
+ xkb_file_type_to_string(file->file_type));
+ continue;
+ }
+
+ if (files[file->file_type]) {
+ log_err(ctx,
+ "More than one %s section in keymap file; "
+ "All sections after the first ignored\n",
+ xkb_file_type_to_string(file->file_type));
+ continue;
+ }
+
+ if (!file->topName) {
+ free(file->topName);
+ file->topName = strdup(main_name);
+ }
+
+ files[file->file_type] = file;
+ }
+
+ /*
+ * Check that all required section were provided.
+ * Report everything before failing.
+ */
+ ok = true;
+ for (type = FIRST_KEYMAP_FILE_TYPE;
+ type <= LAST_KEYMAP_FILE_TYPE;
+ type++) {
+ if (files[type] == NULL) {
+ log_err(ctx, "Required section %s missing from keymap\n",
+ xkb_file_type_to_string(type));
+ ok = false;
+ }
+ }
+ if (!ok)
+ return false;
+
+ if (!UpdateBuiltinKeymapFields(keymap))
+ return false;
+
+ /* Compile sections. */
+ for (type = FIRST_KEYMAP_FILE_TYPE;
+ type <= LAST_KEYMAP_FILE_TYPE;
+ type++) {
+ log_dbg(ctx, "Compiling %s \"%s\"\n",
+ xkb_file_type_to_string(type), files[type]->topName);
+
+ ok = compile_file_fns[type](files[type], keymap, merge);
+ if (!ok) {
+ log_err(ctx, "Failed to compile %s\n",
+ xkb_file_type_to_string(type));
+ return false;
+ }
+ }
+
+ return UpdateDerivedKeymapFields(keymap);
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/parser-priv.h b/src/3rdparty/xkbcommon/src/xkbcomp/parser-priv.h
new file mode 100644
index 0000000000..2e02db66a8
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/parser-priv.h
@@ -0,0 +1,47 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#ifndef XKBCOMP_PARSER_PRIV_H
+#define XKBCOMP_PARSER_PRIV_H
+
+struct scanner_extra;
+struct parser_param;
+
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC diagnostic push
+#include "parser.h"
+#pragma GCC diagnostic pop
+
+void
+scanner_error(YYLTYPE *loc, void *scanner, const char *msg);
+
+int
+_xkbcommon_lex(YYSTYPE *val, YYLTYPE *loc, void *scanner);
+
+XkbFile *
+parse(struct xkb_context *ctx, void *scanner, const char *map);
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/parser.c b/src/3rdparty/xkbcommon/src/xkbcomp/parser.c
new file mode 100644
index 0000000000..e1280e9180
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/parser.c
@@ -0,0 +1,3674 @@
+/* A Bison parser, made by GNU Bison 2.5. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.5"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 1
+
+/* Substitute the variable and function names. */
+#define yyparse _xkbcommon_parse
+#define yylex _xkbcommon_lex
+#define yyerror _xkbcommon_error
+#define yylval _xkbcommon_lval
+#define yychar _xkbcommon_char
+#define yydebug _xkbcommon_debug
+#define yynerrs _xkbcommon_nerrs
+#define yylloc _xkbcommon_lloc
+
+/* Copy the first part of user declarations. */
+
+/* Line 268 of yacc.c */
+#line 27 "parser.y"
+
+#include "xkbcomp-priv.h"
+#include "ast-build.h"
+#include "parser-priv.h"
+
+struct parser_param {
+ struct xkb_context *ctx;
+ void *scanner;
+ XkbFile *rtrn;
+ bool more_maps;
+};
+
+static void
+_xkbcommon_error(struct YYLTYPE *loc, struct parser_param *param, const char *msg)
+{
+ scanner_error(loc, param->scanner, msg);
+}
+
+#define scanner param->scanner
+
+
+/* Line 268 of yacc.c */
+#line 101 "src/xkbcomp/parser.c"
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ END_OF_FILE = 0,
+ ERROR_TOK = 255,
+ XKB_KEYMAP = 1,
+ XKB_KEYCODES = 2,
+ XKB_TYPES = 3,
+ XKB_SYMBOLS = 4,
+ XKB_COMPATMAP = 5,
+ XKB_GEOMETRY = 6,
+ XKB_SEMANTICS = 7,
+ XKB_LAYOUT = 8,
+ INCLUDE = 10,
+ OVERRIDE = 11,
+ AUGMENT = 12,
+ REPLACE = 13,
+ ALTERNATE = 14,
+ VIRTUAL_MODS = 20,
+ TYPE = 21,
+ INTERPRET = 22,
+ ACTION_TOK = 23,
+ KEY = 24,
+ ALIAS = 25,
+ GROUP = 26,
+ MODIFIER_MAP = 27,
+ INDICATOR = 28,
+ SHAPE = 29,
+ KEYS = 30,
+ ROW = 31,
+ SECTION = 32,
+ OVERLAY = 33,
+ TEXT = 34,
+ OUTLINE = 35,
+ SOLID = 36,
+ LOGO = 37,
+ VIRTUAL = 38,
+ EQUALS = 40,
+ PLUS = 41,
+ MINUS = 42,
+ DIVIDE = 43,
+ TIMES = 44,
+ OBRACE = 45,
+ CBRACE = 46,
+ OPAREN = 47,
+ CPAREN = 48,
+ OBRACKET = 49,
+ CBRACKET = 50,
+ DOT = 51,
+ COMMA = 52,
+ SEMI = 53,
+ EXCLAM = 54,
+ INVERT = 55,
+ STRING = 60,
+ INTEGER = 61,
+ FLOAT = 62,
+ IDENT = 63,
+ KEYNAME = 64,
+ PARTIAL = 70,
+ DEFAULT = 71,
+ HIDDEN = 72,
+ ALPHANUMERIC_KEYS = 73,
+ MODIFIER_KEYS = 74,
+ KEYPAD_KEYS = 75,
+ FUNCTION_KEYS = 76,
+ ALTERNATE_GROUP = 77
+ };
+#endif
+/* Tokens. */
+#define END_OF_FILE 0
+#define ERROR_TOK 255
+#define XKB_KEYMAP 1
+#define XKB_KEYCODES 2
+#define XKB_TYPES 3
+#define XKB_SYMBOLS 4
+#define XKB_COMPATMAP 5
+#define XKB_GEOMETRY 6
+#define XKB_SEMANTICS 7
+#define XKB_LAYOUT 8
+#define INCLUDE 10
+#define OVERRIDE 11
+#define AUGMENT 12
+#define REPLACE 13
+#define ALTERNATE 14
+#define VIRTUAL_MODS 20
+#define TYPE 21
+#define INTERPRET 22
+#define ACTION_TOK 23
+#define KEY 24
+#define ALIAS 25
+#define GROUP 26
+#define MODIFIER_MAP 27
+#define INDICATOR 28
+#define SHAPE 29
+#define KEYS 30
+#define ROW 31
+#define SECTION 32
+#define OVERLAY 33
+#define TEXT 34
+#define OUTLINE 35
+#define SOLID 36
+#define LOGO 37
+#define VIRTUAL 38
+#define EQUALS 40
+#define PLUS 41
+#define MINUS 42
+#define DIVIDE 43
+#define TIMES 44
+#define OBRACE 45
+#define CBRACE 46
+#define OPAREN 47
+#define CPAREN 48
+#define OBRACKET 49
+#define CBRACKET 50
+#define DOT 51
+#define COMMA 52
+#define SEMI 53
+#define EXCLAM 54
+#define INVERT 55
+#define STRING 60
+#define INTEGER 61
+#define FLOAT 62
+#define IDENT 63
+#define KEYNAME 64
+#define PARTIAL 70
+#define DEFAULT 71
+#define HIDDEN 72
+#define ALPHANUMERIC_KEYS 73
+#define MODIFIER_KEYS 74
+#define KEYPAD_KEYS 75
+#define FUNCTION_KEYS 76
+#define ALTERNATE_GROUP 77
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 293 of yacc.c */
+#line 127 "parser.y"
+
+ int ival;
+ unsigned uval;
+ int64_t num;
+ enum xkb_file_type file_type;
+ char *str;
+ xkb_atom_t sval;
+ enum merge_mode merge;
+ enum xkb_map_flags mapFlags;
+ ParseCommon *any;
+ ExprDef *expr;
+ VarDef *var;
+ VModDef *vmod;
+ InterpDef *interp;
+ KeyTypeDef *keyType;
+ SymbolsDef *syms;
+ ModMapDef *modMask;
+ GroupCompatDef *groupCompat;
+ LedMapDef *ledMap;
+ LedNameDef *ledName;
+ KeycodeDef *keyCode;
+ KeyAliasDef *keyAlias;
+ void *geom;
+ XkbFile *file;
+
+
+
+/* Line 293 of yacc.c */
+#line 295 "src/xkbcomp/parser.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE
+{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+} YYLTYPE;
+# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 343 of yacc.c */
+#line 320 "src/xkbcomp/parser.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+ int yyi;
+#endif
+{
+ return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ + 2 * YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 16
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 735
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 65
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 72
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 184
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 334
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 257
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 4, 5, 6, 7, 8, 9, 10, 11, 2,
+ 12, 13, 14, 15, 16, 2, 2, 2, 2, 2,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 2,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 2, 2, 2, 2,
+ 52, 53, 54, 55, 56, 2, 2, 2, 2, 2,
+ 57, 58, 59, 60, 61, 62, 63, 64, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 3, 1, 2
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint16 yyprhs[] =
+{
+ 0, 0, 3, 5, 7, 9, 17, 19, 21, 23,
+ 26, 28, 36, 38, 40, 42, 44, 46, 48, 49,
+ 52, 54, 56, 58, 60, 62, 64, 66, 68, 70,
+ 73, 74, 77, 80, 83, 86, 89, 92, 95, 98,
+ 101, 104, 107, 110, 113, 116, 119, 124, 127, 131,
+ 136, 142, 146, 150, 152, 154, 158, 165, 169, 171,
+ 174, 176, 183, 190, 194, 196, 197, 201, 205, 207,
+ 210, 212, 216, 220, 226, 233, 240, 246, 253, 260,
+ 267, 274, 277, 279, 285, 287, 289, 291, 293, 296,
+ 298, 304, 306, 310, 312, 314, 318, 325, 329, 331,
+ 335, 339, 341, 345, 351, 355, 359, 361, 367, 374,
+ 376, 378, 380, 382, 384, 386, 388, 390, 392, 394,
+ 396, 398, 400, 402, 404, 406, 408, 410, 411, 413,
+ 415, 417, 419, 421, 423, 424, 428, 430, 434, 438,
+ 442, 446, 450, 452, 455, 458, 461, 464, 466, 471,
+ 473, 477, 481, 483, 488, 490, 494, 499, 506, 508,
+ 510, 512, 514, 516, 517, 521, 525, 527, 529, 533,
+ 535, 537, 539, 542, 544, 546, 548, 550, 552, 554,
+ 556, 558, 560, 562, 563
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int16 yyrhs[] =
+{
+ 66, 0, -1, 67, -1, 70, -1, 0, -1, 72,
+ 68, 135, 41, 69, 42, 49, -1, 4, -1, 10,
+ -1, 11, -1, 69, 70, -1, 70, -1, 72, 71,
+ 135, 41, 75, 42, 49, -1, 5, -1, 6, -1,
+ 8, -1, 7, -1, 9, -1, 73, -1, -1, 73,
+ 74, -1, 74, -1, 57, -1, 58, -1, 59, -1,
+ 60, -1, 61, -1, 62, -1, 63, -1, 64, -1,
+ 75, 76, -1, -1, 114, 77, -1, 114, 80, -1,
+ 114, 83, -1, 114, 78, -1, 114, 79, -1, 114,
+ 86, -1, 114, 87, -1, 114, 92, -1, 114, 91,
+ -1, 114, 93, -1, 114, 94, -1, 114, 95, -1,
+ 114, 96, -1, 114, 110, -1, 115, 52, -1, 122,
+ 36, 118, 49, -1, 133, 49, -1, 50, 133, 49,
+ -1, 56, 36, 132, 49, -1, 22, 56, 36, 56,
+ 49, -1, 17, 81, 49, -1, 81, 48, 82, -1,
+ 82, -1, 133, -1, 133, 36, 118, -1, 19, 84,
+ 41, 85, 42, 49, -1, 127, 37, 118, -1, 127,
+ -1, 85, 77, -1, 77, -1, 18, 134, 41, 85,
+ 42, 49, -1, 21, 56, 41, 88, 42, 49, -1,
+ 88, 48, 89, -1, 89, -1, -1, 122, 36, 118,
+ -1, 122, 36, 90, -1, 133, -1, 50, 133, -1,
+ 90, -1, 45, 124, 46, -1, 45, 120, 46, -1,
+ 23, 131, 36, 118, 49, -1, 24, 133, 41, 117,
+ 42, 49, -1, 25, 134, 41, 85, 42, 49, -1,
+ 25, 131, 36, 118, 49, -1, 35, 25, 131, 36,
+ 118, 49, -1, 26, 134, 41, 106, 42, 49, -1,
+ 26, 134, 41, 108, 42, 49, -1, 29, 134, 41,
+ 97, 42, 49, -1, 97, 98, -1, 98, -1, 28,
+ 41, 99, 42, 49, -1, 77, -1, 110, -1, 93,
+ -1, 103, -1, 99, 100, -1, 100, -1, 27, 41,
+ 101, 42, 49, -1, 77, -1, 101, 48, 102, -1,
+ 102, -1, 56, -1, 41, 117, 42, -1, 30, 134,
+ 41, 104, 42, 49, -1, 104, 48, 105, -1, 105,
+ -1, 56, 36, 56, -1, 106, 48, 107, -1, 107,
+ -1, 41, 108, 42, -1, 133, 36, 41, 108, 42,
+ -1, 133, 36, 118, -1, 108, 48, 109, -1, 109,
+ -1, 45, 128, 48, 128, 46, -1, 111, 134, 41,
+ 85, 42, 49, -1, 31, -1, 32, -1, 33, -1,
+ 34, -1, 133, -1, 113, -1, 20, -1, 19, -1,
+ 18, -1, 21, -1, 23, -1, 24, -1, 25, -1,
+ 26, -1, 28, -1, 29, -1, 31, -1, 115, -1,
+ -1, 12, -1, 14, -1, 13, -1, 15, -1, 16,
+ -1, 117, -1, -1, 117, 48, 118, -1, 118, -1,
+ 118, 39, 118, -1, 118, 37, 118, -1, 118, 38,
+ 118, -1, 118, 40, 118, -1, 122, 36, 118, -1,
+ 119, -1, 38, 119, -1, 37, 119, -1, 50, 119,
+ -1, 51, 119, -1, 122, -1, 112, 43, 116, 44,
+ -1, 123, -1, 43, 118, 44, -1, 120, 48, 121,
+ -1, 121, -1, 112, 43, 116, 44, -1, 112, -1,
+ 112, 47, 112, -1, 112, 45, 118, 46, -1, 112,
+ 47, 112, 45, 118, 46, -1, 134, -1, 131, -1,
+ 130, -1, 56, -1, 125, -1, -1, 125, 48, 127,
+ -1, 125, 48, 126, -1, 127, -1, 126, -1, 41,
+ 125, 42, -1, 55, -1, 29, -1, 131, -1, 38,
+ 129, -1, 129, -1, 54, -1, 53, -1, 54, -1,
+ 53, -1, 53, -1, 55, -1, 58, -1, 52, -1,
+ 136, -1, -1, 52, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 198, 198, 200, 202, 206, 212, 213, 214, 217,
+ 224, 228, 243, 244, 245, 246, 247, 250, 251, 254,
+ 255, 258, 259, 260, 261, 262, 263, 264, 265, 268,
+ 270, 273, 278, 283, 288, 293, 298, 303, 308, 313,
+ 318, 323, 328, 329, 330, 331, 338, 340, 342, 346,
+ 350, 354, 358, 360, 364, 366, 370, 376, 378, 382,
+ 384, 388, 394, 400, 402, 404, 407, 408, 409, 410,
+ 411, 414, 416, 420, 424, 428, 432, 434, 438, 440,
+ 444, 448, 449, 452, 454, 456, 458, 460, 464, 465,
+ 468, 469, 473, 474, 477, 479, 483, 487, 488, 491,
+ 494, 496, 500, 502, 504, 508, 510, 514, 518, 522,
+ 523, 524, 525, 528, 529, 532, 534, 536, 538, 540,
+ 542, 544, 546, 548, 550, 552, 556, 557, 560, 561,
+ 562, 563, 564, 574, 575, 578, 580, 584, 586, 588,
+ 590, 592, 594, 598, 600, 602, 604, 606, 608, 610,
+ 612, 616, 618, 622, 626, 633, 641, 650, 661, 668,
+ 675, 679, 688, 689, 692, 694, 696, 698, 702, 706,
+ 707, 708, 722, 723, 726, 727, 730, 733, 736, 739,
+ 740, 743, 746, 747, 750
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "END_OF_FILE", "error", "$undefined", "ERROR_TOK", "XKB_KEYMAP",
+ "XKB_KEYCODES", "XKB_TYPES", "XKB_SYMBOLS", "XKB_COMPATMAP",
+ "XKB_GEOMETRY", "XKB_SEMANTICS", "XKB_LAYOUT", "INCLUDE", "OVERRIDE",
+ "AUGMENT", "REPLACE", "ALTERNATE", "VIRTUAL_MODS", "TYPE", "INTERPRET",
+ "ACTION_TOK", "KEY", "ALIAS", "GROUP", "MODIFIER_MAP", "INDICATOR",
+ "SHAPE", "KEYS", "ROW", "SECTION", "OVERLAY", "TEXT", "OUTLINE", "SOLID",
+ "LOGO", "VIRTUAL", "EQUALS", "PLUS", "MINUS", "DIVIDE", "TIMES",
+ "OBRACE", "CBRACE", "OPAREN", "CPAREN", "OBRACKET", "CBRACKET", "DOT",
+ "COMMA", "SEMI", "EXCLAM", "INVERT", "STRING", "INTEGER", "FLOAT",
+ "IDENT", "KEYNAME", "PARTIAL", "DEFAULT", "HIDDEN", "ALPHANUMERIC_KEYS",
+ "MODIFIER_KEYS", "KEYPAD_KEYS", "FUNCTION_KEYS", "ALTERNATE_GROUP",
+ "$accept", "XkbFile", "XkbCompositeMap", "XkbCompositeType",
+ "XkbMapConfigList", "XkbMapConfig", "FileType", "OptFlags", "Flags",
+ "Flag", "DeclList", "Decl", "VarDecl", "KeyNameDecl", "KeyAliasDecl",
+ "VModDecl", "VModDefList", "VModDef", "InterpretDecl", "InterpretMatch",
+ "VarDeclList", "KeyTypeDecl", "SymbolsDecl", "SymbolsBody",
+ "SymbolsVarDecl", "ArrayInit", "GroupCompatDecl", "ModMapDecl",
+ "LedMapDecl", "LedNameDecl", "ShapeDecl", "SectionDecl", "SectionBody",
+ "SectionBodyItem", "RowBody", "RowBodyItem", "Keys", "Key",
+ "OverlayDecl", "OverlayKeyList", "OverlayKey", "OutlineList",
+ "OutlineInList", "CoordList", "Coord", "DoodadDecl", "DoodadType",
+ "FieldSpec", "Element", "OptMergeMode", "MergeMode", "OptExprList",
+ "ExprList", "Expr", "Term", "ActionList", "Action", "Lhs", "Terminal",
+ "OptKeySymList", "KeySymList", "KeySyms", "KeySym", "SignedNumber",
+ "Number", "Float", "Integer", "KeyCode", "Ident", "String", "OptMapName",
+ "MapName", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 255, 1, 2, 3, 4, 5, 6,
+ 7, 8, 10, 11, 12, 13, 14, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 60, 61, 62, 63, 64, 70, 71, 72,
+ 73, 74, 75, 76, 77
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 65, 66, 66, 66, 67, 68, 68, 68, 69,
+ 69, 70, 71, 71, 71, 71, 71, 72, 72, 73,
+ 73, 74, 74, 74, 74, 74, 74, 74, 74, 75,
+ 75, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 77, 77, 77, 78,
+ 79, 80, 81, 81, 82, 82, 83, 84, 84, 85,
+ 85, 86, 87, 88, 88, 88, 89, 89, 89, 89,
+ 89, 90, 90, 91, 92, 93, 94, 94, 95, 95,
+ 96, 97, 97, 98, 98, 98, 98, 98, 99, 99,
+ 100, 100, 101, 101, 102, 102, 103, 104, 104, 105,
+ 106, 106, 107, 107, 107, 108, 108, 109, 110, 111,
+ 111, 111, 111, 112, 112, 113, 113, 113, 113, 113,
+ 113, 113, 113, 113, 113, 113, 114, 114, 115, 115,
+ 115, 115, 115, 116, 116, 117, 117, 118, 118, 118,
+ 118, 118, 118, 119, 119, 119, 119, 119, 119, 119,
+ 119, 120, 120, 121, 122, 122, 122, 122, 123, 123,
+ 123, 123, 124, 124, 125, 125, 125, 125, 126, 127,
+ 127, 127, 128, 128, 129, 129, 130, 131, 132, 133,
+ 133, 134, 135, 135, 136
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 1, 1, 7, 1, 1, 1, 2,
+ 1, 7, 1, 1, 1, 1, 1, 1, 0, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 4, 2, 3, 4,
+ 5, 3, 3, 1, 1, 3, 6, 3, 1, 2,
+ 1, 6, 6, 3, 1, 0, 3, 3, 1, 2,
+ 1, 3, 3, 5, 6, 6, 5, 6, 6, 6,
+ 6, 2, 1, 5, 1, 1, 1, 1, 2, 1,
+ 5, 1, 3, 1, 1, 3, 6, 3, 1, 3,
+ 3, 1, 3, 5, 3, 3, 1, 5, 6, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
+ 1, 1, 1, 1, 0, 3, 1, 3, 3, 3,
+ 3, 3, 1, 2, 2, 2, 2, 1, 4, 1,
+ 3, 3, 1, 4, 1, 3, 4, 6, 1, 1,
+ 1, 1, 1, 0, 3, 3, 1, 1, 3, 1,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 18, 4, 21, 22, 23, 24, 25, 26, 27, 28,
+ 0, 2, 3, 0, 17, 20, 1, 6, 12, 13,
+ 15, 14, 16, 7, 8, 183, 183, 19, 184, 0,
+ 182, 0, 18, 30, 18, 10, 0, 127, 0, 9,
+ 128, 130, 129, 131, 132, 0, 29, 0, 126, 5,
+ 11, 0, 117, 116, 115, 118, 0, 119, 120, 121,
+ 122, 123, 124, 125, 110, 111, 112, 0, 0, 179,
+ 0, 180, 31, 34, 35, 32, 33, 36, 37, 39,
+ 38, 40, 41, 42, 43, 44, 0, 154, 114, 0,
+ 113, 45, 0, 53, 54, 181, 0, 170, 177, 169,
+ 0, 58, 171, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 47, 0,
+ 51, 0, 0, 0, 0, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0, 48, 178, 0, 0, 117, 116,
+ 118, 119, 120, 121, 122, 124, 125, 0, 0, 0,
+ 0, 0, 176, 161, 154, 0, 142, 147, 149, 160,
+ 159, 113, 158, 155, 0, 52, 55, 60, 0, 0,
+ 57, 163, 0, 0, 64, 70, 0, 113, 0, 0,
+ 0, 136, 0, 0, 0, 0, 0, 101, 0, 106,
+ 0, 121, 123, 0, 84, 86, 0, 82, 87, 85,
+ 0, 49, 0, 144, 147, 143, 0, 145, 146, 134,
+ 0, 0, 0, 0, 156, 0, 0, 46, 0, 59,
+ 0, 170, 0, 169, 0, 0, 152, 0, 162, 167,
+ 166, 69, 0, 0, 0, 50, 73, 0, 0, 76,
+ 0, 0, 0, 175, 174, 0, 173, 0, 0, 0,
+ 0, 0, 0, 0, 0, 81, 0, 0, 150, 0,
+ 133, 138, 139, 137, 140, 141, 0, 61, 56, 0,
+ 134, 72, 0, 71, 0, 62, 63, 67, 66, 74,
+ 135, 75, 102, 172, 0, 78, 100, 79, 105, 0,
+ 104, 0, 91, 0, 89, 0, 80, 77, 108, 148,
+ 157, 168, 0, 151, 165, 164, 0, 0, 0, 0,
+ 88, 0, 0, 98, 153, 107, 103, 0, 94, 0,
+ 93, 83, 0, 0, 0, 0, 0, 0, 99, 96,
+ 97, 95, 90, 92
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 10, 11, 25, 34, 12, 26, 36, 14, 15,
+ 37, 46, 167, 73, 74, 75, 92, 93, 76, 100,
+ 168, 77, 78, 173, 174, 175, 79, 80, 195, 82,
+ 83, 84, 196, 197, 293, 294, 319, 320, 198, 312,
+ 313, 186, 187, 188, 189, 199, 86, 154, 88, 47,
+ 48, 259, 260, 181, 156, 225, 226, 157, 158, 227,
+ 228, 229, 230, 245, 246, 159, 160, 136, 161, 162,
+ 29, 30
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -182
+static const yytype_int16 yypact[] =
+{
+ 176, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ 6, -182, -182, 271, 227, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -38, -38, -182, -182, -24,
+ -182, 33, 227, -182, 210, -182, 353, 44, 5, -182,
+ -182, -182, -182, -182, -182, 32, -182, 13, 41, -182,
+ -182, -48, 55, 11, -182, 79, 87, 58, -48, -2,
+ 55, -182, 55, 72, -182, -182, -182, 107, -48, -182,
+ 110, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 55, -18, -182, 127,
+ 121, -182, 66, -182, 138, -182, 136, -182, -182, -182,
+ 144, 147, -182, 152, 180, 182, 178, 184, 187, 188,
+ 190, 58, 198, 201, 214, 367, 677, 367, -182, -48,
+ -182, 367, 663, 663, 367, 494, 200, 367, 367, 367,
+ 663, 68, 449, 223, -182, -182, 212, 663, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, 367, 367, 367,
+ 367, 367, -182, -182, 57, 157, -182, 224, -182, -182,
+ -182, -182, -182, 218, 91, -182, 333, -182, 509, 537,
+ 333, 552, -48, 1, -182, -182, 228, 40, 216, 143,
+ 70, 333, 150, 593, 247, -30, 97, -182, 105, -182,
+ 261, 55, 259, 55, -182, -182, 408, -182, -182, -182,
+ 367, -182, 608, -182, -182, -182, 287, -182, -182, 367,
+ 367, 367, 367, 367, -182, 367, 367, -182, 252, -182,
+ 253, 264, 24, 269, 272, 163, -182, 273, 270, -182,
+ -182, -182, 280, 494, 285, -182, -182, 283, 367, -182,
+ 284, 112, 8, -182, -182, 294, -182, 299, -36, 304,
+ 247, 326, 649, 279, 307, -182, 204, 316, -182, 322,
+ 320, 111, 111, -182, -182, 333, 211, -182, -182, 116,
+ 367, -182, 677, -182, 24, -182, -182, -182, 333, -182,
+ 333, -182, -182, -182, -30, -182, -182, -182, -182, 247,
+ 333, 334, -182, 466, -182, 318, -182, -182, -182, -182,
+ -182, -182, 339, -182, -182, -182, 343, 120, 14, 345,
+ -182, 361, 124, -182, -182, -182, -182, 367, -182, 131,
+ -182, -182, 344, 350, 318, 166, 352, 14, -182, -182,
+ -182, -182, -182, -182
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -182, -182, -182, -182, -182, 181, -182, 402, -182, 389,
+ -182, -182, -35, -182, -182, -182, -182, 288, -182, -182,
+ -50, -182, -182, -182, 173, 174, -182, -182, 362, -182,
+ -182, -182, -182, 215, -182, 119, -182, 86, -182, -182,
+ 90, -182, 167, -181, 185, 369, -182, -27, -182, -182,
+ -182, 154, -126, 83, 76, -182, 158, -31, -182, -182,
+ 221, 170, -52, 161, 205, -182, -44, -182, -47, -34,
+ 420, -182
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -180
+static const yytype_int16 yytable[] =
+{
+ 90, 101, 180, 241, 94, 184, 16, 69, 242, 102,
+ 71, 106, 72, 105, 28, 107, 89, 32, 96, 69,
+ 87, 112, 71, 243, 244, 108, 109, 115, 110, 116,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 97, 61, 62, 232, 63, 64, 65, 66, 67, 233,
+ 95, 98, 114, 97, 49, 317, 40, 41, 42, 43,
+ 44, 243, 244, 68, 98, 222, 99, 133, 69, 70,
+ 318, 71, 94, 169, 33, 90, 90, 98, 177, 99,
+ 183, 50, -68, 90, 190, 90, 45, 202, -68, 163,
+ 90, 89, 89, 91, 176, 87, 87, 194, 87, 89,
+ 209, 89, 115, 87, 116, 87, 89, 95, 307, 184,
+ 87, 98, 237, 185, 119, 120, 204, 204, 238, 204,
+ 204, 90, 90, 69, -109, 231, 71, 102, 210, 211,
+ 212, 213, 111, 219, 219, 103, 90, 89, 89, 247,
+ 217, 87, 87, 104, 224, 248, 113, 249, 219, 90,
+ 212, 213, 89, 250, 282, 90, 87, 108, 301, 253,
+ 250, 194, 316, 117, 274, 89, 323, 219, 250, 87,
+ 118, 89, 324, 326, 121, 87, 1, 122, 102, 327,
+ 210, 211, 212, 213, 124, 123, 177, 210, 211, 212,
+ 213, 325, 236, 125, 210, 211, 212, 213, 155, 239,
+ 164, 190, 176, 214, 166, 90, 87, 170, 331, 271,
+ 179, 272, 182, 35, 238, 39, 126, 292, 127, 128,
+ 129, 89, 305, 203, 205, 87, 207, 208, 130, 131,
+ 102, 132, 206, 2, 3, 4, 5, 6, 7, 8,
+ 9, 210, 211, 212, 213, 224, 90, 134, 210, 211,
+ 212, 213, 38, 297, 135, 137, 178, 300, 292, 200,
+ 215, 201, 89, 216, 234, 235, 87, 2, 3, 4,
+ 5, 6, 7, 8, 9, 17, 18, 19, 20, 21,
+ 22, 23, 24, 256, 2, 3, 4, 5, 6, 7,
+ 8, 9, 185, 261, 262, 263, 264, 251, 265, 266,
+ 252, 267, 268, 138, 139, 54, 140, -124, 141, 142,
+ 143, 144, -179, 61, 145, 270, 146, 278, 274, 273,
+ 295, 280, 147, 148, 210, 211, 212, 213, 149, 275,
+ 171, 258, 279, 281, 290, 150, 151, 95, 98, 152,
+ 69, 153, 284, 71, 138, 139, 54, 140, 285, 141,
+ 142, 143, 144, 287, 61, 145, 296, 146, 18, 19,
+ 20, 21, 22, 147, 148, 298, 299, 289, 238, 149,
+ 210, 211, 212, 213, 311, 308, 150, 151, 95, 98,
+ 152, 69, 153, 314, 71, 138, 139, 54, 140, 315,
+ 141, 142, 143, 144, 321, 61, 145, 322, 146, 329,
+ 328, 332, 13, 27, 147, 148, 276, 165, 277, 81,
+ 149, 255, 310, 333, 330, 286, 85, 150, 151, 95,
+ 98, 152, 69, 153, 302, 71, 138, 139, 54, 140,
+ 303, 141, 142, 191, 144, 288, 192, 145, 193, 63,
+ 64, 65, 66, 269, 304, 306, 31, 283, 0, 0,
+ 254, 0, 0, 0, 0, 0, 0, 0, 68, 0,
+ 0, 0, 0, 69, 0, 0, 71, 138, 139, 54,
+ 140, 0, 141, 142, 191, 144, 0, 192, 145, 193,
+ 63, 64, 65, 66, 138, 139, 54, 140, 0, 141,
+ 142, 143, 144, 291, 61, 145, 0, 146, 0, 68,
+ 0, 0, 0, 0, 69, 0, 0, 71, 309, 0,
+ 0, 0, 138, 139, 54, 140, 68, 141, 142, 143,
+ 144, 69, 61, 145, 71, 146, 0, 138, 139, 54,
+ 140, 0, 141, 142, 143, 144, 0, 61, 145, 171,
+ 146, 0, 0, 0, 172, 0, 0, 0, 0, 69,
+ 0, 218, 71, 0, 0, 138, 139, 54, 140, 68,
+ 141, 142, 143, 144, 69, 61, 145, 71, 146, 0,
+ 138, 139, 54, 140, 0, 141, 142, 143, 144, 220,
+ 61, 221, 0, 146, 0, 0, 0, 68, 0, 0,
+ 0, 0, 69, 222, 0, 71, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 98, 0, 223, 0, 0,
+ 71, 138, 139, 54, 140, 0, 141, 142, 143, 144,
+ 0, 61, 145, 0, 146, 0, 138, 139, 54, 140,
+ 0, 141, 142, 143, 144, 240, 61, 145, 0, 146,
+ 0, 0, 0, 68, 0, 0, 0, 0, 69, 0,
+ 257, 71, 0, 0, 0, 0, 0, 0, 68, 0,
+ 0, 0, 0, 69, 0, 0, 71, 138, 139, 54,
+ 140, 0, 141, 142, 143, 144, 291, 61, 145, 0,
+ 146, 138, 139, 54, 140, 0, 141, 142, 143, 144,
+ 0, 61, 145, 0, 146, 138, 139, 54, 140, 68,
+ 141, 142, 143, 144, 69, 61, 145, 71, 146, 0,
+ 0, 0, 0, 68, 0, 0, 0, 0, 69, 0,
+ 0, 71, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 69, 0, 0, 71
+};
+
+#define yypact_value_is_default(yystate) \
+ ((yystate) == (-182))
+
+#define yytable_value_is_error(yytable_value) \
+ YYID (0)
+
+static const yytype_int16 yycheck[] =
+{
+ 47, 53, 128, 184, 51, 41, 0, 55, 38, 53,
+ 58, 58, 47, 57, 52, 59, 47, 41, 52, 55,
+ 47, 68, 58, 53, 54, 59, 60, 45, 62, 47,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 29, 28, 29, 42, 31, 32, 33, 34, 35, 48,
+ 52, 53, 86, 29, 49, 41, 12, 13, 14, 15,
+ 16, 53, 54, 50, 53, 41, 55, 111, 55, 56,
+ 56, 58, 119, 123, 41, 122, 123, 53, 125, 55,
+ 130, 49, 42, 130, 131, 132, 42, 137, 48, 116,
+ 137, 122, 123, 52, 125, 122, 123, 132, 125, 130,
+ 43, 132, 45, 130, 47, 132, 137, 52, 289, 41,
+ 137, 53, 42, 45, 48, 49, 147, 148, 48, 150,
+ 151, 168, 169, 55, 52, 172, 58, 171, 37, 38,
+ 39, 40, 25, 168, 169, 56, 183, 168, 169, 42,
+ 49, 168, 169, 56, 171, 48, 36, 42, 183, 196,
+ 39, 40, 183, 48, 42, 202, 183, 191, 42, 193,
+ 48, 196, 42, 36, 48, 196, 42, 202, 48, 196,
+ 49, 202, 48, 42, 36, 202, 0, 41, 222, 48,
+ 37, 38, 39, 40, 37, 41, 233, 37, 38, 39,
+ 40, 317, 49, 41, 37, 38, 39, 40, 115, 49,
+ 117, 248, 233, 46, 121, 252, 233, 124, 42, 46,
+ 127, 48, 129, 32, 48, 34, 36, 252, 36, 41,
+ 36, 252, 274, 147, 148, 252, 150, 151, 41, 41,
+ 274, 41, 149, 57, 58, 59, 60, 61, 62, 63,
+ 64, 37, 38, 39, 40, 272, 293, 49, 37, 38,
+ 39, 40, 42, 49, 53, 41, 56, 46, 293, 36,
+ 36, 49, 293, 45, 36, 49, 293, 57, 58, 59,
+ 60, 61, 62, 63, 64, 4, 5, 6, 7, 8,
+ 9, 10, 11, 200, 57, 58, 59, 60, 61, 62,
+ 63, 64, 45, 210, 211, 212, 213, 36, 215, 216,
+ 41, 49, 49, 18, 19, 20, 21, 43, 23, 24,
+ 25, 26, 43, 28, 29, 43, 31, 234, 48, 46,
+ 41, 238, 37, 38, 37, 38, 39, 40, 43, 49,
+ 45, 44, 49, 49, 251, 50, 51, 52, 53, 54,
+ 55, 56, 48, 58, 18, 19, 20, 21, 49, 23,
+ 24, 25, 26, 49, 28, 29, 49, 31, 5, 6,
+ 7, 8, 9, 37, 38, 49, 44, 41, 48, 43,
+ 37, 38, 39, 40, 56, 41, 50, 51, 52, 53,
+ 54, 55, 56, 44, 58, 18, 19, 20, 21, 46,
+ 23, 24, 25, 26, 49, 28, 29, 36, 31, 49,
+ 56, 49, 0, 14, 37, 38, 233, 119, 234, 47,
+ 43, 196, 293, 327, 324, 248, 47, 50, 51, 52,
+ 53, 54, 55, 56, 270, 58, 18, 19, 20, 21,
+ 272, 23, 24, 25, 26, 250, 28, 29, 30, 31,
+ 32, 33, 34, 222, 274, 284, 26, 242, -1, -1,
+ 42, -1, -1, -1, -1, -1, -1, -1, 50, -1,
+ -1, -1, -1, 55, -1, -1, 58, 18, 19, 20,
+ 21, -1, 23, 24, 25, 26, -1, 28, 29, 30,
+ 31, 32, 33, 34, 18, 19, 20, 21, -1, 23,
+ 24, 25, 26, 27, 28, 29, -1, 31, -1, 50,
+ -1, -1, -1, -1, 55, -1, -1, 58, 42, -1,
+ -1, -1, 18, 19, 20, 21, 50, 23, 24, 25,
+ 26, 55, 28, 29, 58, 31, -1, 18, 19, 20,
+ 21, -1, 23, 24, 25, 26, -1, 28, 29, 45,
+ 31, -1, -1, -1, 50, -1, -1, -1, -1, 55,
+ -1, 42, 58, -1, -1, 18, 19, 20, 21, 50,
+ 23, 24, 25, 26, 55, 28, 29, 58, 31, -1,
+ 18, 19, 20, 21, -1, 23, 24, 25, 26, 42,
+ 28, 29, -1, 31, -1, -1, -1, 50, -1, -1,
+ -1, -1, 55, 41, -1, 58, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 53, -1, 55, -1, -1,
+ 58, 18, 19, 20, 21, -1, 23, 24, 25, 26,
+ -1, 28, 29, -1, 31, -1, 18, 19, 20, 21,
+ -1, 23, 24, 25, 26, 42, 28, 29, -1, 31,
+ -1, -1, -1, 50, -1, -1, -1, -1, 55, -1,
+ 42, 58, -1, -1, -1, -1, -1, -1, 50, -1,
+ -1, -1, -1, 55, -1, -1, 58, 18, 19, 20,
+ 21, -1, 23, 24, 25, 26, 27, 28, 29, -1,
+ 31, 18, 19, 20, 21, -1, 23, 24, 25, 26,
+ -1, 28, 29, -1, 31, 18, 19, 20, 21, 50,
+ 23, 24, 25, 26, 55, 28, 29, 58, 31, -1,
+ -1, -1, -1, 50, -1, -1, -1, -1, 55, -1,
+ -1, 58, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 55, -1, -1, 58
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
+ 66, 67, 70, 72, 73, 74, 0, 4, 5, 6,
+ 7, 8, 9, 10, 11, 68, 71, 74, 52, 135,
+ 136, 135, 41, 41, 69, 70, 72, 75, 42, 70,
+ 12, 13, 14, 15, 16, 42, 76, 114, 115, 49,
+ 49, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 28, 29, 31, 32, 33, 34, 35, 50, 55,
+ 56, 58, 77, 78, 79, 80, 83, 86, 87, 91,
+ 92, 93, 94, 95, 96, 110, 111, 112, 113, 122,
+ 133, 52, 81, 82, 133, 52, 134, 29, 53, 55,
+ 84, 127, 131, 56, 56, 131, 133, 131, 134, 134,
+ 134, 25, 133, 36, 134, 45, 47, 36, 49, 48,
+ 49, 36, 41, 41, 37, 41, 36, 36, 41, 36,
+ 41, 41, 41, 131, 49, 53, 132, 41, 18, 19,
+ 21, 23, 24, 25, 26, 29, 31, 37, 38, 43,
+ 50, 51, 54, 56, 112, 118, 119, 122, 123, 130,
+ 131, 133, 134, 112, 118, 82, 118, 77, 85, 85,
+ 118, 45, 50, 88, 89, 90, 122, 133, 56, 118,
+ 117, 118, 118, 85, 41, 45, 106, 107, 108, 109,
+ 133, 25, 28, 30, 77, 93, 97, 98, 103, 110,
+ 36, 49, 85, 119, 122, 119, 118, 119, 119, 43,
+ 37, 38, 39, 40, 46, 36, 45, 49, 42, 77,
+ 42, 29, 41, 55, 112, 120, 121, 124, 125, 126,
+ 127, 133, 42, 48, 36, 49, 49, 42, 48, 49,
+ 42, 108, 38, 53, 54, 128, 129, 42, 48, 42,
+ 48, 36, 41, 134, 42, 98, 118, 42, 44, 116,
+ 117, 118, 118, 118, 118, 118, 118, 49, 49, 125,
+ 43, 46, 48, 46, 48, 49, 89, 90, 118, 49,
+ 118, 49, 42, 129, 48, 49, 107, 49, 109, 41,
+ 118, 27, 77, 99, 100, 41, 49, 49, 49, 44,
+ 46, 42, 116, 121, 126, 127, 128, 108, 41, 42,
+ 100, 56, 104, 105, 44, 46, 42, 41, 56, 101,
+ 102, 49, 36, 42, 48, 117, 42, 48, 56, 49,
+ 105, 42, 49, 102
+};
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
+
+#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (1); \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (&yylloc, param, YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (YYID (0))
+
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval, &yylloc, scanner)
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location, param); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_param *param)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, param)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+ YYLTYPE const * const yylocationp;
+ struct parser_param *param;
+#endif
+{
+ if (!yyvaluep)
+ return;
+ YYUSE (yylocationp);
+ YYUSE (param);
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_param *param)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, param)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+ YYLTYPE const * const yylocationp;
+ struct parser_param *param;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ YY_LOCATION_PRINT (yyoutput, *yylocationp);
+ YYFPRINTF (yyoutput, ": ");
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, param);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parser_param *param)
+#else
+static void
+yy_reduce_print (yyvsp, yylsp, yyrule, param)
+ YYSTYPE *yyvsp;
+ YYLTYPE *yylsp;
+ int yyrule;
+ struct parser_param *param;
+#endif
+{
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , &(yylsp[(yyi + 1) - (yynrhs)]) , param);
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, yylsp, Rule, param); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+ const char *yystr;
+#endif
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+#endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = 0;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_param *param)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep, yylocationp, param)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+ YYLTYPE *yylocationp;
+ struct parser_param *param;
+#endif
+{
+ YYUSE (yyvaluep);
+ YYUSE (yylocationp);
+ YYUSE (param);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (struct parser_param *param);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (struct parser_param *param)
+#else
+int
+yyparse (param)
+ struct parser_param *param;
+#endif
+#endif
+{
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+/* Location data for the lookahead symbol. */
+YYLTYPE yylloc;
+
+ /* Number of syntax errors so far. */
+ int yynerrs;
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+ YYLTYPE yyloc;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+ yyssp = yyss;
+ yyvsp = yyvs;
+ yylsp = yyls;
+
+#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+ /* Initialize the default location before parsing starts. */
+ yylloc.first_line = yylloc.last_line = 1;
+ yylloc.first_column = yylloc.last_column = 1;
+#endif
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+ YYLTYPE *yyls1 = yyls;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*yylsp),
+ &yystacksize);
+
+ yyls = yyls1;
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+ yylsp = yyls + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ *++yyvsp = yylval;
+ *++yylsp = yylloc;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+ /* Default location. */
+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+
+/* Line 1806 of yacc.c */
+#line 199 "parser.y"
+ { (yyval.file) = param->rtrn = (yyvsp[(1) - (1)].file); param->more_maps = true; }
+ break;
+
+ case 3:
+
+/* Line 1806 of yacc.c */
+#line 201 "parser.y"
+ { (yyval.file) = param->rtrn = (yyvsp[(1) - (1)].file); param->more_maps = true; YYACCEPT; }
+ break;
+
+ case 4:
+
+/* Line 1806 of yacc.c */
+#line 203 "parser.y"
+ { (yyval.file) = param->rtrn = NULL; param->more_maps = false; }
+ break;
+
+ case 5:
+
+/* Line 1806 of yacc.c */
+#line 209 "parser.y"
+ { (yyval.file) = XkbFileCreate(param->ctx, (yyvsp[(2) - (7)].file_type), (yyvsp[(3) - (7)].str), &(yyvsp[(5) - (7)].file)->common, (yyvsp[(1) - (7)].mapFlags)); }
+ break;
+
+ case 6:
+
+/* Line 1806 of yacc.c */
+#line 212 "parser.y"
+ { (yyval.file_type) = FILE_TYPE_KEYMAP; }
+ break;
+
+ case 7:
+
+/* Line 1806 of yacc.c */
+#line 213 "parser.y"
+ { (yyval.file_type) = FILE_TYPE_KEYMAP; }
+ break;
+
+ case 8:
+
+/* Line 1806 of yacc.c */
+#line 214 "parser.y"
+ { (yyval.file_type) = FILE_TYPE_KEYMAP; }
+ break;
+
+ case 9:
+
+/* Line 1806 of yacc.c */
+#line 218 "parser.y"
+ {
+ if (!(yyvsp[(2) - (2)].file))
+ (yyval.file) = (yyvsp[(1) - (2)].file);
+ else
+ (yyval.file) = (XkbFile *)AppendStmt(&(yyvsp[(1) - (2)].file)->common, &(yyvsp[(2) - (2)].file)->common);
+ }
+ break;
+
+ case 10:
+
+/* Line 1806 of yacc.c */
+#line 225 "parser.y"
+ { (yyval.file) = (yyvsp[(1) - (1)].file); }
+ break;
+
+ case 11:
+
+/* Line 1806 of yacc.c */
+#line 231 "parser.y"
+ {
+ if ((yyvsp[(2) - (7)].file_type) == FILE_TYPE_GEOMETRY) {
+ free((yyvsp[(3) - (7)].str));
+ FreeStmt((yyvsp[(5) - (7)].any));
+ (yyval.file) = NULL;
+ }
+ else {
+ (yyval.file) = XkbFileCreate(param->ctx, (yyvsp[(2) - (7)].file_type), (yyvsp[(3) - (7)].str), (yyvsp[(5) - (7)].any), (yyvsp[(1) - (7)].mapFlags));
+ }
+ }
+ break;
+
+ case 12:
+
+/* Line 1806 of yacc.c */
+#line 243 "parser.y"
+ { (yyval.file_type) = FILE_TYPE_KEYCODES; }
+ break;
+
+ case 13:
+
+/* Line 1806 of yacc.c */
+#line 244 "parser.y"
+ { (yyval.file_type) = FILE_TYPE_TYPES; }
+ break;
+
+ case 14:
+
+/* Line 1806 of yacc.c */
+#line 245 "parser.y"
+ { (yyval.file_type) = FILE_TYPE_COMPAT; }
+ break;
+
+ case 15:
+
+/* Line 1806 of yacc.c */
+#line 246 "parser.y"
+ { (yyval.file_type) = FILE_TYPE_SYMBOLS; }
+ break;
+
+ case 16:
+
+/* Line 1806 of yacc.c */
+#line 247 "parser.y"
+ { (yyval.file_type) = FILE_TYPE_GEOMETRY; }
+ break;
+
+ case 17:
+
+/* Line 1806 of yacc.c */
+#line 250 "parser.y"
+ { (yyval.mapFlags) = (yyvsp[(1) - (1)].mapFlags); }
+ break;
+
+ case 18:
+
+/* Line 1806 of yacc.c */
+#line 251 "parser.y"
+ { (yyval.mapFlags) = 0; }
+ break;
+
+ case 19:
+
+/* Line 1806 of yacc.c */
+#line 254 "parser.y"
+ { (yyval.mapFlags) = ((yyvsp[(1) - (2)].mapFlags) | (yyvsp[(2) - (2)].mapFlags)); }
+ break;
+
+ case 20:
+
+/* Line 1806 of yacc.c */
+#line 255 "parser.y"
+ { (yyval.mapFlags) = (yyvsp[(1) - (1)].mapFlags); }
+ break;
+
+ case 21:
+
+/* Line 1806 of yacc.c */
+#line 258 "parser.y"
+ { (yyval.mapFlags) = MAP_IS_PARTIAL; }
+ break;
+
+ case 22:
+
+/* Line 1806 of yacc.c */
+#line 259 "parser.y"
+ { (yyval.mapFlags) = MAP_IS_DEFAULT; }
+ break;
+
+ case 23:
+
+/* Line 1806 of yacc.c */
+#line 260 "parser.y"
+ { (yyval.mapFlags) = MAP_IS_HIDDEN; }
+ break;
+
+ case 24:
+
+/* Line 1806 of yacc.c */
+#line 261 "parser.y"
+ { (yyval.mapFlags) = MAP_HAS_ALPHANUMERIC; }
+ break;
+
+ case 25:
+
+/* Line 1806 of yacc.c */
+#line 262 "parser.y"
+ { (yyval.mapFlags) = MAP_HAS_MODIFIER; }
+ break;
+
+ case 26:
+
+/* Line 1806 of yacc.c */
+#line 263 "parser.y"
+ { (yyval.mapFlags) = MAP_HAS_KEYPAD; }
+ break;
+
+ case 27:
+
+/* Line 1806 of yacc.c */
+#line 264 "parser.y"
+ { (yyval.mapFlags) = MAP_HAS_FN; }
+ break;
+
+ case 28:
+
+/* Line 1806 of yacc.c */
+#line 265 "parser.y"
+ { (yyval.mapFlags) = MAP_IS_ALTGR; }
+ break;
+
+ case 29:
+
+/* Line 1806 of yacc.c */
+#line 269 "parser.y"
+ { (yyval.any) = AppendStmt((yyvsp[(1) - (2)].any), (yyvsp[(2) - (2)].any)); }
+ break;
+
+ case 30:
+
+/* Line 1806 of yacc.c */
+#line 270 "parser.y"
+ { (yyval.any) = NULL; }
+ break;
+
+ case 31:
+
+/* Line 1806 of yacc.c */
+#line 274 "parser.y"
+ {
+ (yyvsp[(2) - (2)].var)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].var)->common;
+ }
+ break;
+
+ case 32:
+
+/* Line 1806 of yacc.c */
+#line 279 "parser.y"
+ {
+ (yyvsp[(2) - (2)].vmod)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].vmod)->common;
+ }
+ break;
+
+ case 33:
+
+/* Line 1806 of yacc.c */
+#line 284 "parser.y"
+ {
+ (yyvsp[(2) - (2)].interp)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].interp)->common;
+ }
+ break;
+
+ case 34:
+
+/* Line 1806 of yacc.c */
+#line 289 "parser.y"
+ {
+ (yyvsp[(2) - (2)].keyCode)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].keyCode)->common;
+ }
+ break;
+
+ case 35:
+
+/* Line 1806 of yacc.c */
+#line 294 "parser.y"
+ {
+ (yyvsp[(2) - (2)].keyAlias)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].keyAlias)->common;
+ }
+ break;
+
+ case 36:
+
+/* Line 1806 of yacc.c */
+#line 299 "parser.y"
+ {
+ (yyvsp[(2) - (2)].keyType)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].keyType)->common;
+ }
+ break;
+
+ case 37:
+
+/* Line 1806 of yacc.c */
+#line 304 "parser.y"
+ {
+ (yyvsp[(2) - (2)].syms)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].syms)->common;
+ }
+ break;
+
+ case 38:
+
+/* Line 1806 of yacc.c */
+#line 309 "parser.y"
+ {
+ (yyvsp[(2) - (2)].modMask)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].modMask)->common;
+ }
+ break;
+
+ case 39:
+
+/* Line 1806 of yacc.c */
+#line 314 "parser.y"
+ {
+ (yyvsp[(2) - (2)].groupCompat)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].groupCompat)->common;
+ }
+ break;
+
+ case 40:
+
+/* Line 1806 of yacc.c */
+#line 319 "parser.y"
+ {
+ (yyvsp[(2) - (2)].ledMap)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].ledMap)->common;
+ }
+ break;
+
+ case 41:
+
+/* Line 1806 of yacc.c */
+#line 324 "parser.y"
+ {
+ (yyvsp[(2) - (2)].ledName)->merge = (yyvsp[(1) - (2)].merge);
+ (yyval.any) = &(yyvsp[(2) - (2)].ledName)->common;
+ }
+ break;
+
+ case 42:
+
+/* Line 1806 of yacc.c */
+#line 328 "parser.y"
+ { (yyval.any) = NULL; }
+ break;
+
+ case 43:
+
+/* Line 1806 of yacc.c */
+#line 329 "parser.y"
+ { (yyval.any) = NULL; }
+ break;
+
+ case 44:
+
+/* Line 1806 of yacc.c */
+#line 330 "parser.y"
+ { (yyval.any) = NULL; }
+ break;
+
+ case 45:
+
+/* Line 1806 of yacc.c */
+#line 332 "parser.y"
+ {
+ (yyval.any) = &IncludeCreate(param->ctx, (yyvsp[(2) - (2)].str), (yyvsp[(1) - (2)].merge))->common;
+ free((yyvsp[(2) - (2)].str));
+ }
+ break;
+
+ case 46:
+
+/* Line 1806 of yacc.c */
+#line 339 "parser.y"
+ { (yyval.var) = VarCreate((yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr)); }
+ break;
+
+ case 47:
+
+/* Line 1806 of yacc.c */
+#line 341 "parser.y"
+ { (yyval.var) = BoolVarCreate((yyvsp[(1) - (2)].sval), 1); }
+ break;
+
+ case 48:
+
+/* Line 1806 of yacc.c */
+#line 343 "parser.y"
+ { (yyval.var) = BoolVarCreate((yyvsp[(2) - (3)].sval), 0); }
+ break;
+
+ case 49:
+
+/* Line 1806 of yacc.c */
+#line 347 "parser.y"
+ { (yyval.keyCode) = KeycodeCreate((yyvsp[(1) - (4)].sval), (yyvsp[(3) - (4)].num)); }
+ break;
+
+ case 50:
+
+/* Line 1806 of yacc.c */
+#line 351 "parser.y"
+ { (yyval.keyAlias) = KeyAliasCreate((yyvsp[(2) - (5)].sval), (yyvsp[(4) - (5)].sval)); }
+ break;
+
+ case 51:
+
+/* Line 1806 of yacc.c */
+#line 355 "parser.y"
+ { (yyval.vmod) = (yyvsp[(2) - (3)].vmod); }
+ break;
+
+ case 52:
+
+/* Line 1806 of yacc.c */
+#line 359 "parser.y"
+ { (yyval.vmod) = (VModDef *)AppendStmt(&(yyvsp[(1) - (3)].vmod)->common, &(yyvsp[(3) - (3)].vmod)->common); }
+ break;
+
+ case 53:
+
+/* Line 1806 of yacc.c */
+#line 361 "parser.y"
+ { (yyval.vmod) = (yyvsp[(1) - (1)].vmod); }
+ break;
+
+ case 54:
+
+/* Line 1806 of yacc.c */
+#line 365 "parser.y"
+ { (yyval.vmod) = VModCreate((yyvsp[(1) - (1)].sval), NULL); }
+ break;
+
+ case 55:
+
+/* Line 1806 of yacc.c */
+#line 367 "parser.y"
+ { (yyval.vmod) = VModCreate((yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 56:
+
+/* Line 1806 of yacc.c */
+#line 373 "parser.y"
+ { (yyvsp[(2) - (6)].interp)->def = (yyvsp[(4) - (6)].var); (yyval.interp) = (yyvsp[(2) - (6)].interp); }
+ break;
+
+ case 57:
+
+/* Line 1806 of yacc.c */
+#line 377 "parser.y"
+ { (yyval.interp) = InterpCreate((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 58:
+
+/* Line 1806 of yacc.c */
+#line 379 "parser.y"
+ { (yyval.interp) = InterpCreate((yyvsp[(1) - (1)].str), NULL); }
+ break;
+
+ case 59:
+
+/* Line 1806 of yacc.c */
+#line 383 "parser.y"
+ { (yyval.var) = (VarDef *)AppendStmt(&(yyvsp[(1) - (2)].var)->common, &(yyvsp[(2) - (2)].var)->common); }
+ break;
+
+ case 60:
+
+/* Line 1806 of yacc.c */
+#line 385 "parser.y"
+ { (yyval.var) = (yyvsp[(1) - (1)].var); }
+ break;
+
+ case 61:
+
+/* Line 1806 of yacc.c */
+#line 391 "parser.y"
+ { (yyval.keyType) = KeyTypeCreate((yyvsp[(2) - (6)].sval), (yyvsp[(4) - (6)].var)); }
+ break;
+
+ case 62:
+
+/* Line 1806 of yacc.c */
+#line 397 "parser.y"
+ { (yyval.syms) = SymbolsCreate((yyvsp[(2) - (6)].sval), (ExprDef *)(yyvsp[(4) - (6)].var)); }
+ break;
+
+ case 63:
+
+/* Line 1806 of yacc.c */
+#line 401 "parser.y"
+ { (yyval.var) = (VarDef *)AppendStmt(&(yyvsp[(1) - (3)].var)->common, &(yyvsp[(3) - (3)].var)->common); }
+ break;
+
+ case 64:
+
+/* Line 1806 of yacc.c */
+#line 403 "parser.y"
+ { (yyval.var) = (yyvsp[(1) - (1)].var); }
+ break;
+
+ case 65:
+
+/* Line 1806 of yacc.c */
+#line 404 "parser.y"
+ { (yyval.var) = NULL; }
+ break;
+
+ case 66:
+
+/* Line 1806 of yacc.c */
+#line 407 "parser.y"
+ { (yyval.var) = VarCreate((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 67:
+
+/* Line 1806 of yacc.c */
+#line 408 "parser.y"
+ { (yyval.var) = VarCreate((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 68:
+
+/* Line 1806 of yacc.c */
+#line 409 "parser.y"
+ { (yyval.var) = BoolVarCreate((yyvsp[(1) - (1)].sval), 1); }
+ break;
+
+ case 69:
+
+/* Line 1806 of yacc.c */
+#line 410 "parser.y"
+ { (yyval.var) = BoolVarCreate((yyvsp[(2) - (2)].sval), 0); }
+ break;
+
+ case 70:
+
+/* Line 1806 of yacc.c */
+#line 411 "parser.y"
+ { (yyval.var) = VarCreate(NULL, (yyvsp[(1) - (1)].expr)); }
+ break;
+
+ case 71:
+
+/* Line 1806 of yacc.c */
+#line 415 "parser.y"
+ { (yyval.expr) = (yyvsp[(2) - (3)].expr); }
+ break;
+
+ case 72:
+
+/* Line 1806 of yacc.c */
+#line 417 "parser.y"
+ { (yyval.expr) = ExprCreateUnary(EXPR_ACTION_LIST, EXPR_TYPE_ACTION, (yyvsp[(2) - (3)].expr)); }
+ break;
+
+ case 73:
+
+/* Line 1806 of yacc.c */
+#line 421 "parser.y"
+ { (yyval.groupCompat) = GroupCompatCreate((yyvsp[(2) - (5)].ival), (yyvsp[(4) - (5)].expr)); }
+ break;
+
+ case 74:
+
+/* Line 1806 of yacc.c */
+#line 425 "parser.y"
+ { (yyval.modMask) = ModMapCreate((yyvsp[(2) - (6)].sval), (yyvsp[(4) - (6)].expr)); }
+ break;
+
+ case 75:
+
+/* Line 1806 of yacc.c */
+#line 429 "parser.y"
+ { (yyval.ledMap) = LedMapCreate((yyvsp[(2) - (6)].sval), (yyvsp[(4) - (6)].var)); }
+ break;
+
+ case 76:
+
+/* Line 1806 of yacc.c */
+#line 433 "parser.y"
+ { (yyval.ledName) = LedNameCreate((yyvsp[(2) - (5)].ival), (yyvsp[(4) - (5)].expr), false); }
+ break;
+
+ case 77:
+
+/* Line 1806 of yacc.c */
+#line 435 "parser.y"
+ { (yyval.ledName) = LedNameCreate((yyvsp[(3) - (6)].ival), (yyvsp[(5) - (6)].expr), true); }
+ break;
+
+ case 78:
+
+/* Line 1806 of yacc.c */
+#line 439 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 79:
+
+/* Line 1806 of yacc.c */
+#line 441 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 80:
+
+/* Line 1806 of yacc.c */
+#line 445 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 81:
+
+/* Line 1806 of yacc.c */
+#line 448 "parser.y"
+ { (yyval.geom) = NULL;}
+ break;
+
+ case 82:
+
+/* Line 1806 of yacc.c */
+#line 449 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 83:
+
+/* Line 1806 of yacc.c */
+#line 453 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 84:
+
+/* Line 1806 of yacc.c */
+#line 455 "parser.y"
+ { FreeStmt(&(yyvsp[(1) - (1)].var)->common); (yyval.geom) = NULL; }
+ break;
+
+ case 85:
+
+/* Line 1806 of yacc.c */
+#line 457 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 86:
+
+/* Line 1806 of yacc.c */
+#line 459 "parser.y"
+ { FreeStmt(&(yyvsp[(1) - (1)].ledMap)->common); (yyval.geom) = NULL; }
+ break;
+
+ case 87:
+
+/* Line 1806 of yacc.c */
+#line 461 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 88:
+
+/* Line 1806 of yacc.c */
+#line 464 "parser.y"
+ { (yyval.geom) = NULL;}
+ break;
+
+ case 89:
+
+/* Line 1806 of yacc.c */
+#line 465 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 90:
+
+/* Line 1806 of yacc.c */
+#line 468 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 91:
+
+/* Line 1806 of yacc.c */
+#line 470 "parser.y"
+ { FreeStmt(&(yyvsp[(1) - (1)].var)->common); (yyval.geom) = NULL; }
+ break;
+
+ case 92:
+
+/* Line 1806 of yacc.c */
+#line 473 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 93:
+
+/* Line 1806 of yacc.c */
+#line 474 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 94:
+
+/* Line 1806 of yacc.c */
+#line 478 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 95:
+
+/* Line 1806 of yacc.c */
+#line 480 "parser.y"
+ { FreeStmt(&(yyvsp[(2) - (3)].expr)->common); (yyval.geom) = NULL; }
+ break;
+
+ case 96:
+
+/* Line 1806 of yacc.c */
+#line 484 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 97:
+
+/* Line 1806 of yacc.c */
+#line 487 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 98:
+
+/* Line 1806 of yacc.c */
+#line 488 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 99:
+
+/* Line 1806 of yacc.c */
+#line 491 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 100:
+
+/* Line 1806 of yacc.c */
+#line 495 "parser.y"
+ { (yyval.geom) = NULL;}
+ break;
+
+ case 101:
+
+/* Line 1806 of yacc.c */
+#line 497 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 102:
+
+/* Line 1806 of yacc.c */
+#line 501 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 103:
+
+/* Line 1806 of yacc.c */
+#line 503 "parser.y"
+ { (yyval.geom) = NULL; }
+ break;
+
+ case 104:
+
+/* Line 1806 of yacc.c */
+#line 505 "parser.y"
+ { FreeStmt(&(yyvsp[(3) - (3)].expr)->common); (yyval.geom) = NULL; }
+ break;
+
+ case 105:
+
+/* Line 1806 of yacc.c */
+#line 509 "parser.y"
+ { (yyval.expr) = NULL; }
+ break;
+
+ case 106:
+
+/* Line 1806 of yacc.c */
+#line 511 "parser.y"
+ { (yyval.expr) = NULL; }
+ break;
+
+ case 107:
+
+/* Line 1806 of yacc.c */
+#line 515 "parser.y"
+ { (yyval.expr) = NULL; }
+ break;
+
+ case 108:
+
+/* Line 1806 of yacc.c */
+#line 519 "parser.y"
+ { FreeStmt(&(yyvsp[(4) - (6)].var)->common); (yyval.geom) = NULL; }
+ break;
+
+ case 109:
+
+/* Line 1806 of yacc.c */
+#line 522 "parser.y"
+ { (yyval.uval) = 0; }
+ break;
+
+ case 110:
+
+/* Line 1806 of yacc.c */
+#line 523 "parser.y"
+ { (yyval.uval) = 0; }
+ break;
+
+ case 111:
+
+/* Line 1806 of yacc.c */
+#line 524 "parser.y"
+ { (yyval.uval) = 0; }
+ break;
+
+ case 112:
+
+/* Line 1806 of yacc.c */
+#line 525 "parser.y"
+ { (yyval.uval) = 0; }
+ break;
+
+ case 113:
+
+/* Line 1806 of yacc.c */
+#line 528 "parser.y"
+ { (yyval.sval) = (yyvsp[(1) - (1)].sval); }
+ break;
+
+ case 114:
+
+/* Line 1806 of yacc.c */
+#line 529 "parser.y"
+ { (yyval.sval) = (yyvsp[(1) - (1)].sval); }
+ break;
+
+ case 115:
+
+/* Line 1806 of yacc.c */
+#line 533 "parser.y"
+ { (yyval.sval) = xkb_atom_intern(param->ctx, "action"); }
+ break;
+
+ case 116:
+
+/* Line 1806 of yacc.c */
+#line 535 "parser.y"
+ { (yyval.sval) = xkb_atom_intern(param->ctx, "interpret"); }
+ break;
+
+ case 117:
+
+/* Line 1806 of yacc.c */
+#line 537 "parser.y"
+ { (yyval.sval) = xkb_atom_intern(param->ctx, "type"); }
+ break;
+
+ case 118:
+
+/* Line 1806 of yacc.c */
+#line 539 "parser.y"
+ { (yyval.sval) = xkb_atom_intern(param->ctx, "key"); }
+ break;
+
+ case 119:
+
+/* Line 1806 of yacc.c */
+#line 541 "parser.y"
+ { (yyval.sval) = xkb_atom_intern(param->ctx, "group"); }
+ break;
+
+ case 120:
+
+/* Line 1806 of yacc.c */
+#line 543 "parser.y"
+ {(yyval.sval) = xkb_atom_intern(param->ctx, "modifier_map");}
+ break;
+
+ case 121:
+
+/* Line 1806 of yacc.c */
+#line 545 "parser.y"
+ { (yyval.sval) = xkb_atom_intern(param->ctx, "indicator"); }
+ break;
+
+ case 122:
+
+/* Line 1806 of yacc.c */
+#line 547 "parser.y"
+ { (yyval.sval) = XKB_ATOM_NONE; }
+ break;
+
+ case 123:
+
+/* Line 1806 of yacc.c */
+#line 549 "parser.y"
+ { (yyval.sval) = XKB_ATOM_NONE; }
+ break;
+
+ case 124:
+
+/* Line 1806 of yacc.c */
+#line 551 "parser.y"
+ { (yyval.sval) = XKB_ATOM_NONE; }
+ break;
+
+ case 125:
+
+/* Line 1806 of yacc.c */
+#line 553 "parser.y"
+ { (yyval.sval) = XKB_ATOM_NONE; }
+ break;
+
+ case 126:
+
+/* Line 1806 of yacc.c */
+#line 556 "parser.y"
+ { (yyval.merge) = (yyvsp[(1) - (1)].merge); }
+ break;
+
+ case 127:
+
+/* Line 1806 of yacc.c */
+#line 557 "parser.y"
+ { (yyval.merge) = MERGE_DEFAULT; }
+ break;
+
+ case 128:
+
+/* Line 1806 of yacc.c */
+#line 560 "parser.y"
+ { (yyval.merge) = MERGE_DEFAULT; }
+ break;
+
+ case 129:
+
+/* Line 1806 of yacc.c */
+#line 561 "parser.y"
+ { (yyval.merge) = MERGE_AUGMENT; }
+ break;
+
+ case 130:
+
+/* Line 1806 of yacc.c */
+#line 562 "parser.y"
+ { (yyval.merge) = MERGE_OVERRIDE; }
+ break;
+
+ case 131:
+
+/* Line 1806 of yacc.c */
+#line 563 "parser.y"
+ { (yyval.merge) = MERGE_REPLACE; }
+ break;
+
+ case 132:
+
+/* Line 1806 of yacc.c */
+#line 565 "parser.y"
+ {
+ /*
+ * This used to be MERGE_ALT_FORM. This functionality was
+ * unused and has been removed.
+ */
+ (yyval.merge) = MERGE_DEFAULT;
+ }
+ break;
+
+ case 133:
+
+/* Line 1806 of yacc.c */
+#line 574 "parser.y"
+ { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 134:
+
+/* Line 1806 of yacc.c */
+#line 575 "parser.y"
+ { (yyval.expr) = NULL; }
+ break;
+
+ case 135:
+
+/* Line 1806 of yacc.c */
+#line 579 "parser.y"
+ { (yyval.expr) = (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common, &(yyvsp[(3) - (3)].expr)->common); }
+ break;
+
+ case 136:
+
+/* Line 1806 of yacc.c */
+#line 581 "parser.y"
+ { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 137:
+
+/* Line 1806 of yacc.c */
+#line 585 "parser.y"
+ { (yyval.expr) = ExprCreateBinary(EXPR_DIVIDE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 138:
+
+/* Line 1806 of yacc.c */
+#line 587 "parser.y"
+ { (yyval.expr) = ExprCreateBinary(EXPR_ADD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 139:
+
+/* Line 1806 of yacc.c */
+#line 589 "parser.y"
+ { (yyval.expr) = ExprCreateBinary(EXPR_SUBTRACT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 140:
+
+/* Line 1806 of yacc.c */
+#line 591 "parser.y"
+ { (yyval.expr) = ExprCreateBinary(EXPR_MULTIPLY, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 141:
+
+/* Line 1806 of yacc.c */
+#line 593 "parser.y"
+ { (yyval.expr) = ExprCreateBinary(EXPR_ASSIGN, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 142:
+
+/* Line 1806 of yacc.c */
+#line 595 "parser.y"
+ { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 143:
+
+/* Line 1806 of yacc.c */
+#line 599 "parser.y"
+ { (yyval.expr) = ExprCreateUnary(EXPR_NEGATE, (yyvsp[(2) - (2)].expr)->value_type, (yyvsp[(2) - (2)].expr)); }
+ break;
+
+ case 144:
+
+/* Line 1806 of yacc.c */
+#line 601 "parser.y"
+ { (yyval.expr) = ExprCreateUnary(EXPR_UNARY_PLUS, (yyvsp[(2) - (2)].expr)->value_type, (yyvsp[(2) - (2)].expr)); }
+ break;
+
+ case 145:
+
+/* Line 1806 of yacc.c */
+#line 603 "parser.y"
+ { (yyval.expr) = ExprCreateUnary(EXPR_NOT, EXPR_TYPE_BOOLEAN, (yyvsp[(2) - (2)].expr)); }
+ break;
+
+ case 146:
+
+/* Line 1806 of yacc.c */
+#line 605 "parser.y"
+ { (yyval.expr) = ExprCreateUnary(EXPR_INVERT, (yyvsp[(2) - (2)].expr)->value_type, (yyvsp[(2) - (2)].expr)); }
+ break;
+
+ case 147:
+
+/* Line 1806 of yacc.c */
+#line 607 "parser.y"
+ { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 148:
+
+/* Line 1806 of yacc.c */
+#line 609 "parser.y"
+ { (yyval.expr) = ActionCreate((yyvsp[(1) - (4)].sval), (yyvsp[(3) - (4)].expr)); }
+ break;
+
+ case 149:
+
+/* Line 1806 of yacc.c */
+#line 611 "parser.y"
+ { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 150:
+
+/* Line 1806 of yacc.c */
+#line 613 "parser.y"
+ { (yyval.expr) = (yyvsp[(2) - (3)].expr); }
+ break;
+
+ case 151:
+
+/* Line 1806 of yacc.c */
+#line 617 "parser.y"
+ { (yyval.expr) = (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common, &(yyvsp[(3) - (3)].expr)->common); }
+ break;
+
+ case 152:
+
+/* Line 1806 of yacc.c */
+#line 619 "parser.y"
+ { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 153:
+
+/* Line 1806 of yacc.c */
+#line 623 "parser.y"
+ { (yyval.expr) = ActionCreate((yyvsp[(1) - (4)].sval), (yyvsp[(3) - (4)].expr)); }
+ break;
+
+ case 154:
+
+/* Line 1806 of yacc.c */
+#line 627 "parser.y"
+ {
+ ExprDef *expr;
+ expr = ExprCreate(EXPR_IDENT, EXPR_TYPE_UNKNOWN);
+ expr->value.str = (yyvsp[(1) - (1)].sval);
+ (yyval.expr) = expr;
+ }
+ break;
+
+ case 155:
+
+/* Line 1806 of yacc.c */
+#line 634 "parser.y"
+ {
+ ExprDef *expr;
+ expr = ExprCreate(EXPR_FIELD_REF, EXPR_TYPE_UNKNOWN);
+ expr->value.field.element = (yyvsp[(1) - (3)].sval);
+ expr->value.field.field = (yyvsp[(3) - (3)].sval);
+ (yyval.expr) = expr;
+ }
+ break;
+
+ case 156:
+
+/* Line 1806 of yacc.c */
+#line 642 "parser.y"
+ {
+ ExprDef *expr;
+ expr = ExprCreate(EXPR_ARRAY_REF, EXPR_TYPE_UNKNOWN);
+ expr->value.array.element = XKB_ATOM_NONE;
+ expr->value.array.field = (yyvsp[(1) - (4)].sval);
+ expr->value.array.entry = (yyvsp[(3) - (4)].expr);
+ (yyval.expr) = expr;
+ }
+ break;
+
+ case 157:
+
+/* Line 1806 of yacc.c */
+#line 651 "parser.y"
+ {
+ ExprDef *expr;
+ expr = ExprCreate(EXPR_ARRAY_REF, EXPR_TYPE_UNKNOWN);
+ expr->value.array.element = (yyvsp[(1) - (6)].sval);
+ expr->value.array.field = (yyvsp[(3) - (6)].sval);
+ expr->value.array.entry = (yyvsp[(5) - (6)].expr);
+ (yyval.expr) = expr;
+ }
+ break;
+
+ case 158:
+
+/* Line 1806 of yacc.c */
+#line 662 "parser.y"
+ {
+ ExprDef *expr;
+ expr = ExprCreate(EXPR_VALUE, EXPR_TYPE_STRING);
+ expr->value.str = (yyvsp[(1) - (1)].sval);
+ (yyval.expr) = expr;
+ }
+ break;
+
+ case 159:
+
+/* Line 1806 of yacc.c */
+#line 669 "parser.y"
+ {
+ ExprDef *expr;
+ expr = ExprCreate(EXPR_VALUE, EXPR_TYPE_INT);
+ expr->value.ival = (yyvsp[(1) - (1)].ival);
+ (yyval.expr) = expr;
+ }
+ break;
+
+ case 160:
+
+/* Line 1806 of yacc.c */
+#line 676 "parser.y"
+ {
+ (yyval.expr) = NULL;
+ }
+ break;
+
+ case 161:
+
+/* Line 1806 of yacc.c */
+#line 680 "parser.y"
+ {
+ ExprDef *expr;
+ expr = ExprCreate(EXPR_VALUE, EXPR_TYPE_KEYNAME);
+ expr->value.keyName = (yyvsp[(1) - (1)].sval);
+ (yyval.expr) = expr;
+ }
+ break;
+
+ case 162:
+
+/* Line 1806 of yacc.c */
+#line 688 "parser.y"
+ { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 163:
+
+/* Line 1806 of yacc.c */
+#line 689 "parser.y"
+ { (yyval.expr) = NULL; }
+ break;
+
+ case 164:
+
+/* Line 1806 of yacc.c */
+#line 693 "parser.y"
+ { (yyval.expr) = AppendKeysymList((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].str)); }
+ break;
+
+ case 165:
+
+/* Line 1806 of yacc.c */
+#line 695 "parser.y"
+ { (yyval.expr) = AppendMultiKeysymList((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 166:
+
+/* Line 1806 of yacc.c */
+#line 697 "parser.y"
+ { (yyval.expr) = CreateKeysymList((yyvsp[(1) - (1)].str)); }
+ break;
+
+ case 167:
+
+/* Line 1806 of yacc.c */
+#line 699 "parser.y"
+ { (yyval.expr) = CreateMultiKeysymList((yyvsp[(1) - (1)].expr)); }
+ break;
+
+ case 168:
+
+/* Line 1806 of yacc.c */
+#line 703 "parser.y"
+ { (yyval.expr) = (yyvsp[(2) - (3)].expr); }
+ break;
+
+ case 169:
+
+/* Line 1806 of yacc.c */
+#line 706 "parser.y"
+ { (yyval.str) = (yyvsp[(1) - (1)].str); }
+ break;
+
+ case 170:
+
+/* Line 1806 of yacc.c */
+#line 707 "parser.y"
+ { (yyval.str) = strdup("section"); }
+ break;
+
+ case 171:
+
+/* Line 1806 of yacc.c */
+#line 709 "parser.y"
+ {
+ if ((yyvsp[(1) - (1)].ival) < 10) { /* XK_0 .. XK_9 */
+ (yyval.str) = malloc(2);
+ (yyval.str)[0] = (yyvsp[(1) - (1)].ival) + '0';
+ (yyval.str)[1] = '\0';
+ }
+ else {
+ (yyval.str) = malloc(17);
+ snprintf((yyval.str), 17, "0x%x", (yyvsp[(1) - (1)].ival));
+ }
+ }
+ break;
+
+ case 172:
+
+/* Line 1806 of yacc.c */
+#line 722 "parser.y"
+ { (yyval.ival) = -(yyvsp[(2) - (2)].ival); }
+ break;
+
+ case 173:
+
+/* Line 1806 of yacc.c */
+#line 723 "parser.y"
+ { (yyval.ival) = (yyvsp[(1) - (1)].ival); }
+ break;
+
+ case 174:
+
+/* Line 1806 of yacc.c */
+#line 726 "parser.y"
+ { (yyval.ival) = (yyvsp[(1) - (1)].num); }
+ break;
+
+ case 175:
+
+/* Line 1806 of yacc.c */
+#line 727 "parser.y"
+ { (yyval.ival) = (yyvsp[(1) - (1)].num); }
+ break;
+
+ case 176:
+
+/* Line 1806 of yacc.c */
+#line 730 "parser.y"
+ { (yyval.ival) = 0; }
+ break;
+
+ case 177:
+
+/* Line 1806 of yacc.c */
+#line 733 "parser.y"
+ { (yyval.ival) = (yyvsp[(1) - (1)].num); }
+ break;
+
+ case 178:
+
+/* Line 1806 of yacc.c */
+#line 736 "parser.y"
+ { (yyval.num) = (yyvsp[(1) - (1)].num); }
+ break;
+
+ case 179:
+
+/* Line 1806 of yacc.c */
+#line 739 "parser.y"
+ { (yyval.sval) = xkb_atom_steal(param->ctx, (yyvsp[(1) - (1)].str)); }
+ break;
+
+ case 180:
+
+/* Line 1806 of yacc.c */
+#line 740 "parser.y"
+ { (yyval.sval) = xkb_atom_intern(param->ctx, "default"); }
+ break;
+
+ case 181:
+
+/* Line 1806 of yacc.c */
+#line 743 "parser.y"
+ { (yyval.sval) = xkb_atom_steal(param->ctx, (yyvsp[(1) - (1)].str)); }
+ break;
+
+ case 182:
+
+/* Line 1806 of yacc.c */
+#line 746 "parser.y"
+ { (yyval.str) = (yyvsp[(1) - (1)].str); }
+ break;
+
+ case 183:
+
+/* Line 1806 of yacc.c */
+#line 747 "parser.y"
+ { (yyval.str) = NULL; }
+ break;
+
+ case 184:
+
+/* Line 1806 of yacc.c */
+#line 750 "parser.y"
+ { (yyval.str) = (yyvsp[(1) - (1)].str); }
+ break;
+
+
+
+/* Line 1806 of yacc.c */
+#line 3386 "src/xkbcomp/parser.c"
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+ *++yylsp = yyloc;
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (&yylloc, param, YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (&yylloc, param, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+ yyerror_range[1] = yylloc;
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, &yylloc, param);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ yyerror_range[1] = yylsp[1-yylen];
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+ yyerror_range[1] = *yylsp;
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp, yylsp, param);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ *++yyvsp = yylval;
+
+ yyerror_range[2] = yylloc;
+ /* Using YYLLOC is tempting, but would change the location of
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
+ *++yylsp = yyloc;
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (&yylloc, param, YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, &yylloc, param);
+ }
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp, yylsp, param);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
+}
+
+
+
+/* Line 2067 of yacc.c */
+#line 753 "parser.y"
+
+
+#undef scanner
+
+XkbFile *
+parse(struct xkb_context *ctx, void *scanner, const char *map)
+{
+ struct parser_param param;
+ int ret;
+ XkbFile *first = NULL;
+
+ param.scanner = scanner;
+ param.ctx = ctx;
+
+ /*
+ * If we got a specific map, we look for it exclusively and return
+ * immediately upon finding it. Otherwise, we need to get the
+ * default map. If we find a map marked as default, we return it
+ * immediately. If there are no maps marked as default, we return
+ * the first map in the file.
+ */
+
+ while ((ret = yyparse(&param)) == 0 && param.more_maps) {
+ if (map) {
+ if (streq_not_null(map, param.rtrn->name))
+ return param.rtrn;
+ else
+ FreeXkbFile(param.rtrn);
+ }
+ else {
+ if (param.rtrn->flags & MAP_IS_DEFAULT) {
+ FreeXkbFile(first);
+ return param.rtrn;
+ }
+ else if (!first) {
+ first = param.rtrn;
+ }
+ else {
+ FreeXkbFile(param.rtrn);
+ }
+ }
+ }
+
+ if (ret != 0) {
+ FreeXkbFile(first);
+ return NULL;
+ }
+
+ return first;
+}
+
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/parser.h b/src/3rdparty/xkbcommon/src/xkbcomp/parser.h
new file mode 100644
index 0000000000..fba3f4ebd0
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/parser.h
@@ -0,0 +1,230 @@
+/* A Bison parser, made by GNU Bison 2.5. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ END_OF_FILE = 0,
+ ERROR_TOK = 255,
+ XKB_KEYMAP = 1,
+ XKB_KEYCODES = 2,
+ XKB_TYPES = 3,
+ XKB_SYMBOLS = 4,
+ XKB_COMPATMAP = 5,
+ XKB_GEOMETRY = 6,
+ XKB_SEMANTICS = 7,
+ XKB_LAYOUT = 8,
+ INCLUDE = 10,
+ OVERRIDE = 11,
+ AUGMENT = 12,
+ REPLACE = 13,
+ ALTERNATE = 14,
+ VIRTUAL_MODS = 20,
+ TYPE = 21,
+ INTERPRET = 22,
+ ACTION_TOK = 23,
+ KEY = 24,
+ ALIAS = 25,
+ GROUP = 26,
+ MODIFIER_MAP = 27,
+ INDICATOR = 28,
+ SHAPE = 29,
+ KEYS = 30,
+ ROW = 31,
+ SECTION = 32,
+ OVERLAY = 33,
+ TEXT = 34,
+ OUTLINE = 35,
+ SOLID = 36,
+ LOGO = 37,
+ VIRTUAL = 38,
+ EQUALS = 40,
+ PLUS = 41,
+ MINUS = 42,
+ DIVIDE = 43,
+ TIMES = 44,
+ OBRACE = 45,
+ CBRACE = 46,
+ OPAREN = 47,
+ CPAREN = 48,
+ OBRACKET = 49,
+ CBRACKET = 50,
+ DOT = 51,
+ COMMA = 52,
+ SEMI = 53,
+ EXCLAM = 54,
+ INVERT = 55,
+ STRING = 60,
+ INTEGER = 61,
+ FLOAT = 62,
+ IDENT = 63,
+ KEYNAME = 64,
+ PARTIAL = 70,
+ DEFAULT = 71,
+ HIDDEN = 72,
+ ALPHANUMERIC_KEYS = 73,
+ MODIFIER_KEYS = 74,
+ KEYPAD_KEYS = 75,
+ FUNCTION_KEYS = 76,
+ ALTERNATE_GROUP = 77
+ };
+#endif
+/* Tokens. */
+#define END_OF_FILE 0
+#define ERROR_TOK 255
+#define XKB_KEYMAP 1
+#define XKB_KEYCODES 2
+#define XKB_TYPES 3
+#define XKB_SYMBOLS 4
+#define XKB_COMPATMAP 5
+#define XKB_GEOMETRY 6
+#define XKB_SEMANTICS 7
+#define XKB_LAYOUT 8
+#define INCLUDE 10
+#define OVERRIDE 11
+#define AUGMENT 12
+#define REPLACE 13
+#define ALTERNATE 14
+#define VIRTUAL_MODS 20
+#define TYPE 21
+#define INTERPRET 22
+#define ACTION_TOK 23
+#define KEY 24
+#define ALIAS 25
+#define GROUP 26
+#define MODIFIER_MAP 27
+#define INDICATOR 28
+#define SHAPE 29
+#define KEYS 30
+#define ROW 31
+#define SECTION 32
+#define OVERLAY 33
+#define TEXT 34
+#define OUTLINE 35
+#define SOLID 36
+#define LOGO 37
+#define VIRTUAL 38
+#define EQUALS 40
+#define PLUS 41
+#define MINUS 42
+#define DIVIDE 43
+#define TIMES 44
+#define OBRACE 45
+#define CBRACE 46
+#define OPAREN 47
+#define CPAREN 48
+#define OBRACKET 49
+#define CBRACKET 50
+#define DOT 51
+#define COMMA 52
+#define SEMI 53
+#define EXCLAM 54
+#define INVERT 55
+#define STRING 60
+#define INTEGER 61
+#define FLOAT 62
+#define IDENT 63
+#define KEYNAME 64
+#define PARTIAL 70
+#define DEFAULT 71
+#define HIDDEN 72
+#define ALPHANUMERIC_KEYS 73
+#define MODIFIER_KEYS 74
+#define KEYPAD_KEYS 75
+#define FUNCTION_KEYS 76
+#define ALTERNATE_GROUP 77
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 2068 of yacc.c */
+#line 127 "parser.y"
+
+ int ival;
+ unsigned uval;
+ int64_t num;
+ enum xkb_file_type file_type;
+ char *str;
+ xkb_atom_t sval;
+ enum merge_mode merge;
+ enum xkb_map_flags mapFlags;
+ ParseCommon *any;
+ ExprDef *expr;
+ VarDef *var;
+ VModDef *vmod;
+ InterpDef *interp;
+ KeyTypeDef *keyType;
+ SymbolsDef *syms;
+ ModMapDef *modMask;
+ GroupCompatDef *groupCompat;
+ LedMapDef *ledMap;
+ LedNameDef *ledName;
+ KeycodeDef *keyCode;
+ KeyAliasDef *keyAlias;
+ void *geom;
+ XkbFile *file;
+
+
+
+/* Line 2068 of yacc.c */
+#line 208 "src/xkbcomp/parser.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE
+{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+} YYLTYPE;
+# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+
+
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/rules.c b/src/3rdparty/xkbcommon/src/xkbcomp/rules.c
new file mode 100644
index 0000000000..3f717600fd
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/rules.c
@@ -0,0 +1,1231 @@
+/************************************************************
+ * Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#include <ctype.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include "xkbcomp-priv.h"
+#include "rules.h"
+#include "include.h"
+
+/*
+ * The rules file
+ * ==============
+ * The purpose of this file is to map between configuration values that
+ * are easy for a user to specify and understand, and the configuration
+ * values xkbcomp uses and understands.
+ * xkbcomp uses the xkb_component_names struct, which maps directly to
+ * include statements of the appropriate sections, called for short
+ * KcCGST (see keycodes.c, types.c, compat.c, symbols.c; geometry.c was
+ * removed). These are not really intuitive or straight-forward for
+ * the uninitiated.
+ * Instead, the user passes in a xkb_rule_names struct, which consists
+ * of the name of a rules file (in Linux this is usually "evdev"), a
+ * keyboard model (e.g. "pc105"), a set of layouts (which will end up
+ * in different groups, e.g. "us,fr"), variants (used to alter/augment
+ * the respective layout, e.g. "intl,dvorak"), and a set of options
+ * (used to tweak some general behavior of the keyboard, e.g.
+ * "ctrl:nocaps,compose:menu" to make the Caps Lock key act like Ctrl
+ * and the Menu key like Compose). We call these RMLVO.
+ *
+ * Format of the file
+ * ------------------
+ * The file consists of rule sets, each consisting of rules (one per
+ * line), which match the MLVO values on the left hand side, and, if
+ * the values match to the values the user passed in, results in the
+ * values on the right hand side being added to the resulting KcCGST.
+ * Since some values are related and repeated often, it is possible
+ * to group them together and refer to them by a group name in the
+ * rules.
+ * Along with matching values by simple string equality, and for
+ * membership in a group defined previously, rules may also contain
+ * "wildcard" values - "*" - which always match. These usually appear
+ * near the end.
+ *
+ * Grammer
+ * -------
+ * (It might be helpful to look at a file like rules/evdev along with
+ * this grammer. Comments, whitespace, etc. are not shown.)
+ *
+ * File ::= { "!" (Group | RuleSet) }
+ *
+ * Group ::= GroupName "=" { GroupElement } "\n"
+ * GroupName ::= "$"<ident>
+ * GroupElement ::= <ident>
+ *
+ * RuleSet ::= Mapping { Rule }
+ *
+ * Mapping ::= { Mlvo } "=" { Kccgst } "\n"
+ * Mlvo ::= "model" | "option" | ("layout" | "variant") [ Index ]
+ * Index ::= "[" 1..XKB_NUM_GROUPS "]"
+ * Kccgst ::= "keycodes" | "symbols" | "types" | "compat" | "geometry"
+ *
+ * Rule ::= { MlvoValue } "=" { KccgstValue } "\n"
+ * MlvoValue ::= "*" | GroupName | <ident>
+ * KccgstValue ::= <ident>
+ *
+ * Notes:
+ * - The order of values in a Rule must be the same as the Mapping it
+ * follows. The mapping line determines the meaning of the values in
+ * the rules which follow in the RuleSet.
+ * - If a Rule is matched, %-expansion is performed on the KccgstValue,
+ * as follows:
+ * %m, %l, %v:
+ * The model, layout or variant, if only one was given (e.g.
+ * %l for "us,il" is invalid).
+ * %l[1], %v[1]:
+ * Layout or variant for the specified group Index, if more than
+ * one was given (e.g. %l[1] for "us" is invalid).
+ * %+m, %+l, %+v, %+l[1], %+v[1]
+ * As above, but prefixed with '+'. Similarly, '|', '-', '_' may be
+ * used instead of '+'.
+ * %(m), %(l), %(l[1]), %(v), %(v[1]):
+ * As above, but prefixed by '(' and suffixed by ')'.
+ * In case the expansion is invalid, as described above, it is
+ * skipped (the rest of the string is still processed); this includes
+ * the prefix and suffix (that's why you shouldn't use e.g. "(%v[1])").
+ */
+
+/* Scanner / Lexer */
+
+/* Point to some substring in the file; used to avoid copying. */
+struct sval {
+ const char *start;
+ unsigned int len;
+};
+typedef darray(struct sval) darray_sval;
+
+static inline bool
+svaleq(struct sval s1, struct sval s2)
+{
+ return s1.len == s2.len && strncmp(s1.start, s2.start, s1.len) == 0;
+}
+
+static inline bool
+svaleq_prefix(struct sval s1, struct sval s2)
+{
+ return s1.len <= s2.len && strncmp(s1.start, s2.start, s1.len) == 0;
+}
+
+/* Values returned with some tokens, like yylval. */
+union lvalue {
+ struct sval string;
+};
+
+/*
+ * Holds the location in the file of the last processed token,
+ * like yylloc.
+ */
+struct location {
+ int line, column;
+};
+
+struct scanner {
+ const char *s;
+ size_t pos;
+ size_t len;
+ int line, column;
+ const char *file_name;
+ struct xkb_context *ctx;
+};
+
+enum rules_token {
+ TOK_END_OF_FILE = 0,
+ TOK_END_OF_LINE,
+ TOK_IDENTIFIER,
+ TOK_GROUP_NAME,
+ TOK_BANG,
+ TOK_EQUALS,
+ TOK_STAR,
+ TOK_ERROR
+};
+
+static void
+scanner_init(struct scanner *s, struct xkb_context *ctx,
+ const char *string, size_t len, const char *file_name)
+{
+ s->s = string;
+ s->len = len;
+ s->pos = 0;
+ s->line = s->column = 1;
+ s->file_name = file_name;
+ s->ctx = ctx;
+}
+
+/* C99 is stupid. Just use the 1 variant when there are no args. */
+#define scanner_error1(scanner, loc, msg) \
+ log_warn(scanner->ctx, "rules/%s:%d:%d: " msg "\n", \
+ scanner->file_name, loc->line, loc->column)
+#define scanner_error(scanner, loc, fmt, ...) \
+ log_warn(scanner->ctx, "rules/%s:%d:%d: " fmt "\n", \
+ scanner->file_name, loc->line, loc->column, __VA_ARGS__)
+
+static char
+peek(struct scanner *s)
+{
+ return s->pos < s->len ? s->s[s->pos] : '\0';
+}
+
+static bool
+eof(struct scanner *s)
+{
+ return peek(s) == '\0';
+}
+
+static bool
+eol(struct scanner *s)
+{
+ return peek(s) == '\n';
+}
+
+static char
+next(struct scanner *s)
+{
+ if (eof(s))
+ return '\0';
+ if (eol(s)) {
+ s->line++;
+ s->column = 1;
+ }
+ else {
+ s->column++;
+ }
+ return s->s[s->pos++];
+}
+
+static bool
+chr(struct scanner *s, char ch)
+{
+ if (peek(s) != ch)
+ return false;
+ s->pos++; s->column++;
+ return true;
+}
+
+static bool
+str(struct scanner *s, const char *string, size_t len)
+{
+ if (s->len - s->pos < len)
+ return false;
+ if (strncasecmp(s->s + s->pos, string, len) != 0)
+ return false;
+ s->pos += len; s->column += len;
+ return true;
+}
+
+#define lit(s, literal) str(s, literal, sizeof(literal) - 1)
+
+static enum rules_token
+lex(struct scanner *s, union lvalue *val, struct location *loc)
+{
+skip_more_whitespace_and_comments:
+ /* Skip spaces. */
+ while (chr(s, ' ') || chr(s, '\t'));
+
+ /* Skip comments. */
+ if (lit(s, "//")) {
+ while (!eof(s) && !eol(s)) next(s);
+ }
+
+ /* New line. */
+ if (eol(s)) {
+ while (eol(s)) next(s);
+ return TOK_END_OF_LINE;
+ }
+
+ /* Escaped line continuation. */
+ if (chr(s, '\\')) {
+ if (!eol(s)) {
+ scanner_error1(s, loc,
+ "illegal new line escape; must appear at end of line");
+ return TOK_ERROR;
+ }
+ next(s);
+ goto skip_more_whitespace_and_comments;
+ }
+
+ /* See if we're done. */
+ if (eof(s)) return TOK_END_OF_FILE;
+
+ /* New token. */
+ loc->line = s->line;
+ loc->column = s->column;
+
+ /* Operators and punctuation. */
+ if (chr(s, '!')) return TOK_BANG;
+ if (chr(s, '=')) return TOK_EQUALS;
+ if (chr(s, '*')) return TOK_STAR;
+
+ /* Group name. */
+ if (chr(s, '$')) {
+ val->string.start = s->s + s->pos;
+ val->string.len = 0;
+ while (isgraph(peek(s))) {
+ next(s);
+ val->string.len++;
+ }
+ if (val->string.len == 0) {
+ scanner_error1(s, loc,
+ "unexpected character after \'$\'; expected name");
+ return TOK_ERROR;
+ }
+ return TOK_GROUP_NAME;
+ }
+
+ /* Identifier. */
+ if (isgraph(peek(s))) {
+ val->string.start = s->s + s->pos;
+ val->string.len = 0;
+ while (isgraph(peek(s))) {
+ next(s);
+ val->string.len++;
+ }
+ return TOK_IDENTIFIER;
+ }
+
+ scanner_error1(s, loc, "unrecognized token");
+ return TOK_ERROR;
+}
+
+/***====================================================================***/
+
+enum rules_mlvo {
+ MLVO_MODEL,
+ MLVO_LAYOUT,
+ MLVO_VARIANT,
+ MLVO_OPTION,
+ _MLVO_NUM_ENTRIES
+};
+
+#define SVAL_LIT(literal) { literal, sizeof(literal) - 1 }
+
+static const struct sval rules_mlvo_svals[_MLVO_NUM_ENTRIES] = {
+ [MLVO_MODEL] = SVAL_LIT("model"),
+ [MLVO_LAYOUT] = SVAL_LIT("layout"),
+ [MLVO_VARIANT] = SVAL_LIT("variant"),
+ [MLVO_OPTION] = SVAL_LIT("option"),
+};
+
+enum rules_kccgst {
+ KCCGST_KEYCODES,
+ KCCGST_TYPES,
+ KCCGST_COMPAT,
+ KCCGST_SYMBOLS,
+ KCCGST_GEOMETRY,
+ _KCCGST_NUM_ENTRIES
+};
+
+static const struct sval rules_kccgst_svals[_KCCGST_NUM_ENTRIES] = {
+ [KCCGST_KEYCODES] = SVAL_LIT("keycodes"),
+ [KCCGST_TYPES] = SVAL_LIT("types"),
+ [KCCGST_COMPAT] = SVAL_LIT("compat"),
+ [KCCGST_SYMBOLS] = SVAL_LIT("symbols"),
+ [KCCGST_GEOMETRY] = SVAL_LIT("geometry"),
+};
+
+/*
+ * A broken-down version of xkb_rule_names (without the rules,
+ * obviously).
+ */
+struct rule_names {
+ struct sval model;
+ darray_sval layouts;
+ darray_sval variants;
+ darray_sval options;
+};
+
+struct group {
+ struct sval name;
+ darray_sval elements;
+};
+
+struct mapping {
+ int mlvo_at_pos[_MLVO_NUM_ENTRIES];
+ unsigned int num_mlvo;
+ unsigned int defined_mlvo_mask;
+ xkb_layout_index_t layout_idx, variant_idx;
+ int kccgst_at_pos[_KCCGST_NUM_ENTRIES];
+ unsigned int num_kccgst;
+ unsigned int defined_kccgst_mask;
+ bool skip;
+};
+
+enum mlvo_match_type {
+ MLVO_MATCH_NORMAL = 0,
+ MLVO_MATCH_WILDCARD,
+ MLVO_MATCH_GROUP,
+};
+
+struct rule {
+ struct sval mlvo_value_at_pos[_MLVO_NUM_ENTRIES];
+ enum mlvo_match_type match_type_at_pos[_MLVO_NUM_ENTRIES];
+ unsigned int num_mlvo_values;
+ struct sval kccgst_value_at_pos[_KCCGST_NUM_ENTRIES];
+ unsigned int num_kccgst_values;
+ bool skip;
+};
+
+/*
+ * This is the main object used to match a given RMLVO against a rules
+ * file and aggragate the results in a KcCGST. It goes through a simple
+ * matching state machine, with tokens as transitions (see
+ * matcher_match()).
+ */
+struct matcher {
+ struct xkb_context *ctx;
+ /* Input.*/
+ struct rule_names rmlvo;
+ struct location loc;
+ union lvalue val;
+ struct scanner scanner;
+ darray(struct group) groups;
+ /* Current mapping. */
+ struct mapping mapping;
+ /* Current rule. */
+ struct rule rule;
+ /* Output. */
+ darray_char kccgst[_KCCGST_NUM_ENTRIES];
+};
+
+static struct sval
+strip_spaces(struct sval v)
+{
+ while (v.len > 0 && isspace(v.start[0])) { v.len--; v.start++; }
+ while (v.len > 0 && isspace(v.start[v.len - 1])) v.len--;
+ return v;
+}
+
+static darray_sval
+split_comma_separated_string(const char *s)
+{
+ darray_sval arr = darray_new();
+ struct sval val = { NULL, 0 };
+
+ /*
+ * Make sure the array returned by this function always includes at
+ * least one value, e.g. "" -> { "" } and "," -> { "", "" }.
+ */
+
+ if (!s) {
+ darray_append(arr, val);
+ return arr;
+ }
+
+ while (true) {
+ val.start = s; val.len = 0;
+ while (*s != '\0' && *s != ',') { s++; val.len++; }
+ darray_append(arr, strip_spaces(val));
+ if (*s == '\0') break;
+ if (*s == ',') s++;
+ }
+
+ return arr;
+}
+
+static struct matcher *
+matcher_new(struct xkb_context *ctx,
+ const struct xkb_rule_names *rmlvo)
+{
+ struct matcher *m = calloc(1, sizeof(*m));
+ if (!m)
+ return NULL;
+
+ m->ctx = ctx;
+ m->rmlvo.model.start = rmlvo->model;
+ m->rmlvo.model.len = rmlvo->model ? strlen(rmlvo->model) : 0;
+ m->rmlvo.layouts = split_comma_separated_string(rmlvo->layout);
+ m->rmlvo.variants = split_comma_separated_string(rmlvo->variant);
+ m->rmlvo.options = split_comma_separated_string(rmlvo->options);
+
+ return m;
+}
+
+static void
+matcher_free(struct matcher *m)
+{
+ struct group *group;
+ if (!m)
+ return;
+ darray_free(m->rmlvo.layouts);
+ darray_free(m->rmlvo.variants);
+ darray_free(m->rmlvo.options);
+ darray_foreach(group, m->groups)
+ darray_free(group->elements);
+ darray_free(m->groups);
+ free(m);
+}
+
+/* C99 is stupid. Just use the 1 variant when there are no args. */
+#define matcher_error1(matcher, msg) \
+ log_warn(matcher->ctx, "rules/%s:%d:%d: " msg "\n", \
+ matcher->scanner.file_name, matcher->loc.line, \
+ matcher->loc.column)
+#define matcher_error(matcher, fmt, ...) \
+ log_warn(matcher->ctx, "rules/%s:%d:%d: " fmt "\n", \
+ matcher->scanner.file_name, matcher->loc.line, \
+ matcher->loc.column, __VA_ARGS__)
+
+static void
+matcher_group_start_new(struct matcher *m, struct sval name)
+{
+ struct group group = { .name = name, .elements = darray_new() };
+ darray_append(m->groups, group);
+}
+
+static void
+matcher_group_add_element(struct matcher *m, struct sval element)
+{
+ darray_append(darray_item(m->groups, darray_size(m->groups) - 1).elements,
+ element);
+}
+
+static void
+matcher_mapping_start_new(struct matcher *m)
+{
+ unsigned int i;
+ for (i = 0; i < _MLVO_NUM_ENTRIES; i++)
+ m->mapping.mlvo_at_pos[i] = -1;
+ for (i = 0; i < _KCCGST_NUM_ENTRIES; i++)
+ m->mapping.kccgst_at_pos[i] = -1;
+ m->mapping.layout_idx = m->mapping.variant_idx = XKB_LAYOUT_INVALID;
+ m->mapping.num_mlvo = m->mapping.num_kccgst = 0;
+ m->mapping.defined_mlvo_mask = 0;
+ m->mapping.defined_kccgst_mask = 0;
+ m->mapping.skip = false;
+}
+
+static int
+extract_layout_index(const char *s, size_t max_len, xkb_layout_index_t *out)
+{
+ /* This function is pretty stupid, but works for now. */
+ *out = XKB_LAYOUT_INVALID;
+ if (max_len < 3)
+ return -1;
+ if (s[0] != '[' || !isdigit(s[1]) || s[2] != ']')
+ return -1;
+ if (s[1] - '0' < 1 || s[1] - '0' > XKB_MAX_GROUPS)
+ return -1;
+ /* To zero-based index. */
+ *out = s[1] - '0' - 1;
+ return 3;
+}
+
+static void
+matcher_mapping_set_mlvo(struct matcher *m, struct sval ident)
+{
+ enum rules_mlvo mlvo;
+ struct sval mlvo_sval;
+ xkb_layout_index_t idx;
+ int consumed;
+
+ for (mlvo = 0; mlvo < _MLVO_NUM_ENTRIES; mlvo++) {
+ mlvo_sval = rules_mlvo_svals[mlvo];
+
+ if (svaleq_prefix(mlvo_sval, ident))
+ break;
+ }
+
+ /* Not found. */
+ if (mlvo >= _MLVO_NUM_ENTRIES) {
+ matcher_error(m,
+ "invalid mapping: %.*s is not a valid value here; "
+ "ignoring rule set",
+ ident.len, ident.start);
+ m->mapping.skip = true;
+ return;
+ }
+
+ if (m->mapping.defined_mlvo_mask & (1 << mlvo)) {
+ matcher_error(m,
+ "invalid mapping: %.*s appears twice on the same line; "
+ "ignoring rule set",
+ mlvo_sval.len, mlvo_sval.start);
+ m->mapping.skip = true;
+ return;
+ }
+
+ /* If there are leftovers still, it must be an index. */
+ if (mlvo_sval.len < ident.len) {
+ consumed = extract_layout_index(ident.start + mlvo_sval.len,
+ ident.len - mlvo_sval.len, &idx);
+ if ((int) (ident.len - mlvo_sval.len) != consumed) {
+ matcher_error(m,
+ "invalid mapping:\" %.*s\" may only be followed by a valid group index; "
+ "ignoring rule set",
+ mlvo_sval.len, mlvo_sval.start);
+ m->mapping.skip = true;
+ return;
+ }
+
+ if (mlvo == MLVO_LAYOUT) {
+ m->mapping.layout_idx = idx;
+ }
+ else if (mlvo == MLVO_VARIANT) {
+ m->mapping.variant_idx = idx;
+ }
+ else {
+ matcher_error(m,
+ "invalid mapping: \"%.*s\" cannot be followed by a group index; "
+ "ignoring rule set",
+ mlvo_sval.len, mlvo_sval.start);
+ m->mapping.skip = true;
+ return;
+ }
+ }
+
+ m->mapping.mlvo_at_pos[m->mapping.num_mlvo] = mlvo;
+ m->mapping.defined_mlvo_mask |= 1 << mlvo;
+ m->mapping.num_mlvo++;
+}
+
+static void
+matcher_mapping_set_kccgst(struct matcher *m, struct sval ident)
+{
+ enum rules_kccgst kccgst;
+ struct sval kccgst_sval;
+
+ for (kccgst = 0; kccgst < _KCCGST_NUM_ENTRIES; kccgst++) {
+ kccgst_sval = rules_kccgst_svals[kccgst];
+
+ if (svaleq(rules_kccgst_svals[kccgst], ident))
+ break;
+ }
+
+ /* Not found. */
+ if (kccgst >= _KCCGST_NUM_ENTRIES) {
+ matcher_error(m,
+ "invalid mapping: %.*s is not a valid value here; "
+ "ignoring rule set",
+ ident.len, ident.start);
+ m->mapping.skip = true;
+ return;
+ }
+
+ if (m->mapping.defined_kccgst_mask & (1 << kccgst)) {
+ matcher_error(m,
+ "invalid mapping: %.*s appears twice on the same line; "
+ "ignoring rule set",
+ kccgst_sval.len, kccgst_sval.start);
+ m->mapping.skip = true;
+ return;
+ }
+
+ m->mapping.kccgst_at_pos[m->mapping.num_kccgst] = kccgst;
+ m->mapping.defined_kccgst_mask |= 1 << kccgst;
+ m->mapping.num_kccgst++;
+}
+
+static void
+matcher_mapping_verify(struct matcher *m)
+{
+ if (m->mapping.num_mlvo == 0) {
+ matcher_error1(m,
+ "invalid mapping: must have at least one value on the left hand side; "
+ "ignoring rule set");
+ goto skip;
+ }
+
+ if (m->mapping.num_kccgst == 0) {
+ matcher_error1(m,
+ "invalid mapping: must have at least one value on the right hand side; "
+ "ignoring rule set");
+ goto skip;
+ }
+
+ /*
+ * This following is very stupid, but this is how it works.
+ * See the "Notes" section in the overview above.
+ */
+
+ if (m->mapping.defined_mlvo_mask & (1 << MLVO_LAYOUT)) {
+ if (m->mapping.layout_idx == XKB_LAYOUT_INVALID) {
+ if (darray_size(m->rmlvo.layouts) > 1)
+ goto skip;
+ }
+ else {
+ if (darray_size(m->rmlvo.layouts) == 1 ||
+ m->mapping.layout_idx >= darray_size(m->rmlvo.layouts))
+ goto skip;
+ }
+ }
+
+ if (m->mapping.defined_mlvo_mask & (1 << MLVO_VARIANT)) {
+ if (m->mapping.variant_idx == XKB_LAYOUT_INVALID) {
+ if (darray_size(m->rmlvo.variants) > 1)
+ goto skip;
+ }
+ else {
+ if (darray_size(m->rmlvo.variants) == 1 ||
+ m->mapping.variant_idx >= darray_size(m->rmlvo.variants))
+ goto skip;
+ }
+ }
+
+ return;
+
+skip:
+ m->mapping.skip = true;
+}
+
+static void
+matcher_rule_start_new(struct matcher *m)
+{
+ memset(&m->rule, 0, sizeof(m->rule));
+ m->rule.skip = m->mapping.skip;
+}
+
+static void
+matcher_rule_set_mlvo_common(struct matcher *m, struct sval ident,
+ enum mlvo_match_type match_type)
+{
+ if (m->rule.num_mlvo_values + 1 > m->mapping.num_mlvo) {
+ matcher_error1(m,
+ "invalid rule: has more values than the mapping line; "
+ "ignoring rule");
+ m->rule.skip = true;
+ return;
+ }
+ m->rule.match_type_at_pos[m->rule.num_mlvo_values] = match_type;
+ m->rule.mlvo_value_at_pos[m->rule.num_mlvo_values] = ident;
+ m->rule.num_mlvo_values++;
+}
+
+static void
+matcher_rule_set_mlvo_wildcard(struct matcher *m)
+{
+ struct sval dummy = { NULL, 0 };
+ matcher_rule_set_mlvo_common(m, dummy, MLVO_MATCH_WILDCARD);
+}
+
+static void
+matcher_rule_set_mlvo_group(struct matcher *m, struct sval ident)
+{
+ matcher_rule_set_mlvo_common(m, ident, MLVO_MATCH_GROUP);
+}
+
+static void
+matcher_rule_set_mlvo(struct matcher *m, struct sval ident)
+{
+ matcher_rule_set_mlvo_common(m, ident, MLVO_MATCH_NORMAL);
+}
+
+static void
+matcher_rule_set_kccgst(struct matcher *m, struct sval ident)
+{
+ if (m->rule.num_kccgst_values + 1 > m->mapping.num_kccgst) {
+ matcher_error1(m,
+ "invalid rule: has more values than the mapping line; "
+ "ignoring rule");
+ m->rule.skip = true;
+ return;
+ }
+ m->rule.kccgst_value_at_pos[m->rule.num_kccgst_values] = ident;
+ m->rule.num_kccgst_values++;
+}
+
+static bool
+match_group(struct matcher *m, struct sval group_name, struct sval to)
+{
+ struct group *group;
+ struct sval *element;
+ bool found = false;
+
+ darray_foreach(group, m->groups) {
+ if (svaleq(group->name, group_name)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ /*
+ * rules/evdev intentionally uses some undeclared group names
+ * in rules (e.g. commented group definitions which may be
+ * uncommented if needed). So we continue silently.
+ */
+ return false;
+ }
+
+ darray_foreach(element, group->elements)
+ if (svaleq(to, *element))
+ return true;
+
+ return false;
+}
+
+static bool
+match_value(struct matcher *m, struct sval val, struct sval to,
+ enum mlvo_match_type match_type)
+{
+ if (match_type == MLVO_MATCH_WILDCARD)
+ return true;
+ if (match_type == MLVO_MATCH_GROUP)
+ return match_group(m, val, to);
+ return svaleq(val, to);
+}
+
+/*
+ * This function performs %-expansion on @value (see overview above),
+ * and appends the result to @to.
+ */
+static bool
+append_expanded_kccgst_value(struct matcher *m, darray_char *to,
+ struct sval value)
+{
+ unsigned int i;
+ size_t original_size = darray_size(*to);
+ const char *s = value.start;
+ xkb_layout_index_t idx;
+ int consumed;
+ enum rules_mlvo mlv;
+ struct sval expanded;
+ char pfx, sfx;
+
+ /*
+ * Appending bar to foo -> foo (not an error if this happens)
+ * Appending +bar to foo -> foo+bar
+ * Appending bar to +foo -> bar+foo
+ * Appending +bar to +foo -> +foo+bar
+ */
+ if (!darray_empty(*to) && s[0] != '+' && s[0] != '|') {
+ if (darray_item(*to, 0) == '+' || darray_item(*to, 0) == '|')
+ darray_prepend_items_nullterminate(*to, value.start, value.len);
+ return true;
+ }
+
+ /*
+ * Some ugly hand-lexing here, but going through the scanner is more
+ * trouble than it's worth, and the format is ugly on its own merit.
+ */
+ for (i = 0; i < value.len; ) {
+ /* Check if that's a start of an expansion. */
+ if (s[i] != '%') {
+ /* Just a normal character. */
+ darray_append_items_nullterminate(*to, &s[i++], 1);
+ continue;
+ }
+ if (++i >= value.len) goto error;
+
+ pfx = sfx = 0;
+
+ /* Check for prefix. */
+ if (s[i] == '(' || s[i] == '+' || s[i] == '|' ||
+ s[i] == '_' || s[i] == '-') {
+ pfx = s[i];
+ if (s[i] == '(') sfx = ')';
+ if (++i >= value.len) goto error;
+ }
+
+ /* Mandatory model/layout/variant specifier. */
+ switch (s[i++]) {
+ case 'm': mlv = MLVO_MODEL; break;
+ case 'l': mlv = MLVO_LAYOUT; break;
+ case 'v': mlv = MLVO_VARIANT; break;
+ default: goto error;
+ }
+
+ /* Check for index. */
+ idx = XKB_LAYOUT_INVALID;
+ if (i < value.len) {
+ if (s[i] == '[') {
+ if (mlv != MLVO_LAYOUT && mlv != MLVO_VARIANT) {
+ matcher_error1(m,
+ "invalid index in %%-expansion; "
+ "may only index layout or variant");
+ goto error;
+ }
+
+ consumed = extract_layout_index(s + i, value.len - i, &idx);
+ if (consumed == -1) goto error;
+ i += consumed;
+ }
+ else {
+ idx = XKB_LAYOUT_INVALID;
+ }
+ }
+
+ /* Check for suffix, if there supposed to be one. */
+ if (sfx != 0) {
+ if (i >= value.len) goto error;
+ if (s[i++] != sfx) goto error;
+ }
+
+ /* Get the expanded value. */
+ expanded.len = 0;
+
+ if (mlv == MLVO_LAYOUT) {
+ if (idx != XKB_LAYOUT_INVALID &&
+ idx < darray_size(m->rmlvo.layouts) &&
+ darray_size(m->rmlvo.layouts) > 1)
+ expanded = darray_item(m->rmlvo.layouts, idx);
+ else if (idx == XKB_LAYOUT_INVALID &&
+ darray_size(m->rmlvo.layouts) == 1)
+ expanded = darray_item(m->rmlvo.layouts, 0);
+ }
+ else if (mlv == MLVO_VARIANT) {
+ if (idx != XKB_LAYOUT_INVALID &&
+ idx < darray_size(m->rmlvo.variants) &&
+ darray_size(m->rmlvo.variants) > 1)
+ expanded = darray_item(m->rmlvo.variants, idx);
+ else if (idx == XKB_LAYOUT_INVALID &&
+ darray_size(m->rmlvo.variants) == 1)
+ expanded = darray_item(m->rmlvo.variants, 0);
+ }
+ else if (mlv == MLVO_MODEL) {
+ expanded = m->rmlvo.model;
+ }
+
+ /* If we didn't get one, skip silently. */
+ if (expanded.len <= 0)
+ continue;
+
+ if (pfx != 0)
+ darray_append_items_nullterminate(*to, &pfx, 1);
+ darray_append_items_nullterminate(*to, expanded.start, expanded.len);
+ if (sfx != 0)
+ darray_append_items_nullterminate(*to, &sfx, 1);
+ }
+
+ return true;
+
+error:
+ matcher_error1(m, "invalid %%-expansion in value; not used");
+ darray_resize(*to, original_size);
+ return false;
+}
+
+static void
+matcher_rule_verify(struct matcher *m)
+{
+ if (m->rule.num_mlvo_values != m->mapping.num_mlvo ||
+ m->rule.num_kccgst_values != m->mapping.num_kccgst) {
+ matcher_error1(m,
+ "invalid rule: must have same number of values as mapping line;"
+ "ignoring rule");
+ m->rule.skip = true;
+ }
+}
+
+static void
+matcher_rule_apply_if_matches(struct matcher *m)
+{
+ unsigned int i;
+ enum rules_mlvo mlvo;
+ enum rules_kccgst kccgst;
+ struct sval value, *option;
+ enum mlvo_match_type match_type;
+ bool matched = false;
+ xkb_layout_index_t idx;
+
+ for (i = 0; i < m->mapping.num_mlvo; i++) {
+ mlvo = m->mapping.mlvo_at_pos[i];
+ value = m->rule.mlvo_value_at_pos[i];
+ match_type = m->rule.match_type_at_pos[i];
+
+ if (mlvo == MLVO_MODEL) {
+ matched = match_value(m, value, m->rmlvo.model, match_type);
+ }
+ else if (mlvo == MLVO_LAYOUT) {
+ idx = m->mapping.layout_idx;
+ idx = (idx == XKB_LAYOUT_INVALID ? 0 : idx);
+ matched = match_value(m, value,
+ darray_item(m->rmlvo.layouts, idx),
+ match_type);
+ }
+ else if (mlvo == MLVO_VARIANT) {
+ idx = m->mapping.layout_idx;
+ idx = (idx == XKB_LAYOUT_INVALID ? 0 : idx);
+ matched = match_value(m, value,
+ darray_item(m->rmlvo.variants, idx),
+ match_type);
+ }
+ else if (mlvo == MLVO_OPTION) {
+ darray_foreach(option, m->rmlvo.options) {
+ matched = match_value(m, value, *option, match_type);
+ if (matched)
+ break;
+ }
+ }
+
+ if (!matched)
+ return;
+ }
+
+ for (i = 0; i < m->mapping.num_kccgst; i++) {
+ kccgst = m->mapping.kccgst_at_pos[i];
+ value = m->rule.kccgst_value_at_pos[i];
+ append_expanded_kccgst_value(m, &m->kccgst[kccgst], value);
+ }
+
+ /*
+ * If a rule matches in a rule set, the rest of the set should be
+ * skipped. However, rule sets matching against options may contain
+ * several legitimate rules, so they are processed entirely.
+ */
+ if (!(m->mapping.defined_mlvo_mask & (1 << MLVO_OPTION)))
+ m->mapping.skip = true;
+}
+
+static enum rules_token
+gettok(struct matcher *m)
+{
+ return lex(&m->scanner, &m->val, &m->loc);
+}
+
+static bool
+matcher_match(struct matcher *m, const char *string, size_t len,
+ const char *file_name, struct xkb_component_names *out)
+{
+ enum rules_token tok;
+
+ if (!m)
+ return false;
+
+ scanner_init(&m->scanner, m->ctx, string, len, file_name);
+
+initial:
+ switch (tok = gettok(m)) {
+ case TOK_BANG:
+ goto bang;
+ case TOK_END_OF_LINE:
+ goto initial;
+ case TOK_END_OF_FILE:
+ goto finish;
+ default:
+ goto unexpected;
+ }
+
+bang:
+ switch (tok = gettok(m)) {
+ case TOK_GROUP_NAME:
+ matcher_group_start_new(m, m->val.string);
+ goto group_name;
+ case TOK_IDENTIFIER:
+ matcher_mapping_start_new(m);
+ matcher_mapping_set_mlvo(m, m->val.string);
+ goto mapping_mlvo;
+ default:
+ goto unexpected;
+ }
+
+group_name:
+ switch (tok = gettok(m)) {
+ case TOK_EQUALS:
+ goto group_element;
+ default:
+ goto unexpected;
+ }
+
+group_element:
+ switch (tok = gettok(m)) {
+ case TOK_IDENTIFIER:
+ matcher_group_add_element(m, m->val.string);
+ goto group_element;
+ case TOK_END_OF_LINE:
+ goto initial;
+ default:
+ goto unexpected;
+ }
+
+mapping_mlvo:
+ switch (tok = gettok(m)) {
+ case TOK_IDENTIFIER:
+ if (!m->mapping.skip)
+ matcher_mapping_set_mlvo(m, m->val.string);
+ goto mapping_mlvo;
+ case TOK_EQUALS:
+ goto mapping_kccgst;
+ default:
+ goto unexpected;
+ }
+
+mapping_kccgst:
+ switch (tok = gettok(m)) {
+ case TOK_IDENTIFIER:
+ if (!m->mapping.skip)
+ matcher_mapping_set_kccgst(m, m->val.string);
+ goto mapping_kccgst;
+ case TOK_END_OF_LINE:
+ if (!m->mapping.skip)
+ matcher_mapping_verify(m);
+ goto rule_mlvo_first;
+ default:
+ goto unexpected;
+ }
+
+rule_mlvo_first:
+ switch (tok = gettok(m)) {
+ case TOK_BANG:
+ goto bang;
+ case TOK_END_OF_LINE:
+ goto rule_mlvo_first;
+ case TOK_END_OF_FILE:
+ goto finish;
+ default:
+ matcher_rule_start_new(m);
+ goto rule_mlvo_no_tok;
+ }
+
+rule_mlvo:
+ tok = gettok(m);
+rule_mlvo_no_tok:
+ switch (tok) {
+ case TOK_IDENTIFIER:
+ if (!m->rule.skip)
+ matcher_rule_set_mlvo(m, m->val.string);
+ goto rule_mlvo;
+ case TOK_STAR:
+ if (!m->rule.skip)
+ matcher_rule_set_mlvo_wildcard(m);
+ goto rule_mlvo;
+ case TOK_GROUP_NAME:
+ if (!m->rule.skip)
+ matcher_rule_set_mlvo_group(m, m->val.string);
+ goto rule_mlvo;
+ case TOK_EQUALS:
+ goto rule_kccgst;
+ default:
+ goto unexpected;
+ }
+
+rule_kccgst:
+ switch (tok = gettok(m)) {
+ case TOK_IDENTIFIER:
+ if (!m->rule.skip)
+ matcher_rule_set_kccgst(m, m->val.string);
+ goto rule_kccgst;
+ case TOK_END_OF_LINE:
+ if (!m->rule.skip)
+ matcher_rule_verify(m);
+ if (!m->rule.skip)
+ matcher_rule_apply_if_matches(m);
+ goto rule_mlvo_first;
+ default:
+ goto unexpected;
+ }
+
+unexpected:
+ switch (tok) {
+ case TOK_ERROR:
+ goto error;
+ default:
+ goto state_error;
+ }
+
+finish:
+ if (darray_empty(m->kccgst[KCCGST_KEYCODES]) ||
+ darray_empty(m->kccgst[KCCGST_TYPES]) ||
+ darray_empty(m->kccgst[KCCGST_COMPAT]) ||
+ /* darray_empty(m->kccgst[KCCGST_GEOMETRY]) || */
+ darray_empty(m->kccgst[KCCGST_SYMBOLS]))
+ goto error;
+
+ out->keycodes = darray_mem(m->kccgst[KCCGST_KEYCODES], 0);
+ out->types = darray_mem(m->kccgst[KCCGST_TYPES], 0);
+ out->compat = darray_mem(m->kccgst[KCCGST_COMPAT], 0);
+ /* out->geometry = darray_mem(m->kccgst[KCCGST_GEOMETRY], 0); */
+ darray_free(m->kccgst[KCCGST_GEOMETRY]);
+ out->symbols = darray_mem(m->kccgst[KCCGST_SYMBOLS], 0);
+
+ return true;
+
+state_error:
+ matcher_error1(m, "unexpected token");
+error:
+ return false;
+}
+
+bool
+xkb_components_from_rules(struct xkb_context *ctx,
+ const struct xkb_rule_names *rmlvo,
+ struct xkb_component_names *out)
+{
+ bool ret = false;
+ FILE *file;
+ char *path;
+ int fd;
+ struct stat stat_buf;
+ char *string;
+ struct matcher *matcher;
+
+ file = FindFileInXkbPath(ctx, rmlvo->rules, FILE_TYPE_RULES, &path);
+ if (!file)
+ goto err_out;
+
+ fd = fileno(file);
+
+ if (fstat(fd, &stat_buf) != 0) {
+ log_err(ctx, "Couldn't stat rules file\n");
+ goto err_file;
+ }
+
+ string = mmap(NULL, stat_buf.st_size, PROT_READ, MAP_SHARED, fd, 0);
+ if (string == MAP_FAILED) {
+ log_err(ctx, "Couldn't mmap rules file (%lld bytes)\n",
+ (long long) stat_buf.st_size);
+ goto err_file;
+ }
+
+ matcher = matcher_new(ctx, rmlvo);
+ ret = matcher_match(matcher, string, stat_buf.st_size, rmlvo->rules, out);
+ if (!ret)
+ log_err(ctx, "No components returned from XKB rules \"%s\"\n", path);
+ matcher_free(matcher);
+
+ munmap(string, stat_buf.st_size);
+err_file:
+ free(path);
+ fclose(file);
+err_out:
+ return ret;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/rules.h b/src/3rdparty/xkbcommon/src/xkbcomp/rules.h
new file mode 100644
index 0000000000..5381b1562f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/rules.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright © 2009 Dan Nicholson
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef XKBCOMP_RULES_H
+#define XKBCOMP_RULES_H
+
+bool
+xkb_components_from_rules(struct xkb_context *ctx,
+ const struct xkb_rule_names *rmlvo,
+ struct xkb_component_names *out);
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/scanner.c b/src/3rdparty/xkbcommon/src/xkbcomp/scanner.c
new file mode 100644
index 0000000000..4731107b85
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/scanner.c
@@ -0,0 +1,2861 @@
+#line 2 "src/xkbcomp/scanner.c"
+
+#line 4 "src/xkbcomp/scanner.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* An opaque pointer. */
+#ifndef YY_TYPEDEF_YY_SCANNER_T
+#define YY_TYPEDEF_YY_SCANNER_T
+typedef void* yyscan_t;
+#endif
+
+/* For convenience, these vars (plus the bison vars far below)
+ are macros in the reentrant scanner. */
+#define yyin yyg->yyin_r
+#define yyout yyg->yyout_r
+#define yyextra yyg->yyextra_r
+#define yyleng yyg->yyleng_r
+#define yytext yyg->yytext_r
+#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
+#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
+#define yy_flex_debug yyg->yy_flex_debug_r
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yyg->yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yyg->yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE _xkbcommon_restart(yyin ,yyscanner )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
+ * access to the local variable yy_act. Since yyless() is a macro, it would break
+ * existing scanners that call yyless() from OUTSIDE _xkbcommon_lex.
+ * One obvious solution it to make yy_act a global. I tried that, and saw
+ * a 5% performance hit in a non-yylineno scanner, because yy_act is
+ * normally declared as a register variable-- so it is not worth it.
+ */
+ #define YY_LESS_LINENO(n) \
+ do { \
+ int yyl;\
+ for ( yyl = n; yyl < yyleng; ++yyl )\
+ if ( yytext[yyl] == '\n' )\
+ --yylineno;\
+ }while(0)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = yyg->yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via _xkbcommon_restart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
+ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
+ : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
+
+void _xkbcommon_restart (FILE *input_file ,yyscan_t yyscanner );
+void _xkbcommon__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+YY_BUFFER_STATE _xkbcommon__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
+void _xkbcommon__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void _xkbcommon__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void _xkbcommon_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+void _xkbcommon_pop_buffer_state (yyscan_t yyscanner );
+
+static void _xkbcommon_ensure_buffer_stack (yyscan_t yyscanner );
+static void _xkbcommon__load_buffer_state (yyscan_t yyscanner );
+static void _xkbcommon__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
+
+#define YY_FLUSH_BUFFER _xkbcommon__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
+
+YY_BUFFER_STATE _xkbcommon__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
+YY_BUFFER_STATE _xkbcommon__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
+YY_BUFFER_STATE _xkbcommon__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+
+void *_xkbcommon_alloc (yy_size_t ,yyscan_t yyscanner );
+void *_xkbcommon_realloc (void *,yy_size_t ,yyscan_t yyscanner );
+void _xkbcommon_free (void * ,yyscan_t yyscanner );
+
+#define yy_new_buffer _xkbcommon__create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ _xkbcommon_ensure_buffer_stack (yyscanner); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ _xkbcommon__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ _xkbcommon_ensure_buffer_stack (yyscanner); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ _xkbcommon__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+#define _xkbcommon_wrap(n) 1
+#define YY_SKIP_YYWRAP
+
+typedef unsigned char YY_CHAR;
+
+typedef int yy_state_type;
+
+#define yytext_ptr yytext_r
+
+static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
+static int yy_get_next_buffer (yyscan_t yyscanner );
+static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yyg->yytext_ptr = yy_bp; \
+ yyleng = (size_t) (yy_cp - yy_bp); \
+ yyg->yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yyg->yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 83
+#define YY_END_OF_BUFFER 84
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static yyconst flex_int16_t yy_accept[336] =
+ { 0,
+ 0, 0, 0, 0, 84, 82, 81, 81, 79, 3,
+ 2, 72, 73, 69, 66, 77, 67, 76, 68, 63,
+ 63, 78, 82, 65, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 74, 75, 70, 71, 80, 14, 83, 4, 14,
+ 81, 2, 1, 0, 63, 0, 0, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 5, 6, 10, 13, 11, 7, 9, 8, 12,
+ 1, 64, 62, 15, 61, 61, 61, 61, 61, 61,
+
+ 61, 61, 61, 61, 61, 61, 39, 61, 61, 61,
+ 61, 61, 61, 47, 61, 61, 61, 61, 61, 61,
+ 61, 5, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 48, 54, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 51, 36, 61,
+ 61, 5, 61, 40, 61, 61, 61, 61, 61, 41,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 46, 53, 61, 61, 61, 61,
+ 61, 61, 61, 38, 61, 61, 61, 61, 61, 34,
+ 61, 61, 61, 61, 61, 42, 61, 61, 61, 61,
+
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 29, 33, 61, 27, 61, 61, 61,
+ 61, 43, 52, 50, 61, 32, 30, 49, 55, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 28, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 31, 61, 45, 37, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 18, 61,
+ 61, 61, 61, 61, 61, 61, 20, 61, 61, 16,
+ 26, 61, 61, 61, 61, 61, 58, 61, 61, 61,
+ 61, 61, 61, 61, 61, 19, 61, 61, 61, 61,
+
+ 44, 61, 61, 61, 24, 17, 61, 61, 61, 59,
+ 57, 61, 61, 61, 25, 61, 61, 61, 61, 21,
+ 61, 60, 61, 61, 61, 61, 61, 56, 35, 22,
+ 61, 61, 61, 23, 0
+ } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 2, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 4, 5, 6, 1, 1, 1, 1, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 16,
+ 16, 16, 16, 16, 16, 17, 17, 1, 18, 19,
+ 20, 21, 1, 1, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 31, 38, 39, 40, 41, 42, 43, 44, 45, 31,
+ 46, 47, 48, 1, 49, 1, 50, 51, 52, 53,
+
+ 54, 55, 56, 57, 58, 31, 59, 60, 61, 62,
+ 63, 64, 31, 65, 66, 67, 68, 69, 70, 71,
+ 72, 31, 73, 1, 74, 75, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static yyconst flex_int32_t yy_meta[76] =
+ { 0,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
+ 1, 3, 1, 1, 4, 4, 4, 1, 1, 1,
+ 1, 4, 4, 4, 4, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 1, 1, 1, 5, 4,
+ 4, 4, 4, 4, 4, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 1, 1, 1
+ } ;
+
+static yyconst flex_int16_t yy_base[342] =
+ { 0,
+ 0, 0, 73, 74, 263, 695, 78, 80, 695, 695,
+ 0, 695, 695, 695, 695, 695, 695, 695, 203, 71,
+ 76, 695, 0, 695, 66, 0, 59, 54, 58, 67,
+ 65, 75, 67, 68, 64, 86, 83, 109, 98, 81,
+ 82, 695, 695, 695, 695, 695, 695, 695, 695, 158,
+ 114, 0, 0, 132, 138, 0, 158, 0, 100, 128,
+ 100, 123, 109, 124, 136, 166, 131, 141, 152, 140,
+ 156, 150, 157, 156, 159, 179, 171, 164, 177, 178,
+ 179, 221, 229, 695, 695, 695, 695, 695, 695, 695,
+ 0, 232, 0, 695, 192, 202, 199, 206, 200, 217,
+
+ 216, 201, 226, 220, 224, 229, 220, 222, 232, 231,
+ 227, 230, 238, 0, 232, 236, 244, 236, 251, 247,
+ 115, 279, 252, 250, 256, 263, 278, 266, 268, 272,
+ 284, 271, 289, 279, 296, 0, 0, 292, 298, 288,
+ 293, 292, 296, 305, 301, 307, 312, 0, 0, 288,
+ 342, 347, 305, 0, 307, 310, 315, 320, 313, 0,
+ 323, 335, 346, 336, 351, 348, 346, 357, 349, 364,
+ 357, 367, 366, 356, 0, 0, 371, 359, 371, 373,
+ 381, 379, 367, 0, 372, 394, 380, 383, 390, 0,
+ 402, 390, 394, 113, 408, 0, 399, 411, 396, 413,
+
+ 409, 417, 410, 413, 414, 413, 407, 409, 421, 424,
+ 423, 427, 424, 0, 0, 432, 0, 434, 448, 445,
+ 440, 0, 0, 0, 454, 0, 0, 0, 110, 446,
+ 450, 462, 453, 468, 469, 467, 472, 473, 108, 457,
+ 461, 477, 63, 0, 472, 485, 483, 476, 491, 474,
+ 482, 483, 485, 487, 61, 497, 0, 0, 485, 500,
+ 500, 498, 500, 518, 508, 507, 508, 516, 0, 520,
+ 525, 528, 519, 529, 538, 537, 538, 526, 540, 0,
+ 0, 539, 534, 546, 539, 534, 0, 535, 547, 556,
+ 566, 558, 548, 556, 575, 0, 53, 565, 563, 564,
+
+ 0, 578, 578, 587, 0, 0, 573, 581, 574, 0,
+ 0, 580, 583, 581, 0, 595, 586, 598, 595, 0,
+ 586, 0, 594, 594, 596, 602, 599, 0, 0, 49,
+ 612, 604, 610, 0, 695, 674, 679, 682, 684, 689,
+ 90
+ } ;
+
+static yyconst flex_int16_t yy_def[342] =
+ { 0,
+ 335, 1, 336, 336, 335, 335, 335, 335, 335, 335,
+ 337, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 338, 335, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 337, 340, 335, 335, 341, 338, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 340, 335, 341, 335, 339, 339, 339, 339, 339, 339,
+
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 335, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 335, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 0, 335, 335, 335, 335, 335,
+ 335
+ } ;
+
+static yyconst flex_int16_t yy_nxt[771] =
+ { 0,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 21, 22, 23, 24,
+ 6, 25, 26, 26, 27, 26, 28, 29, 30, 31,
+ 26, 32, 33, 34, 26, 35, 36, 37, 38, 39,
+ 26, 40, 26, 41, 26, 42, 6, 43, 26, 25,
+ 26, 26, 27, 26, 28, 29, 30, 31, 32, 33,
+ 34, 26, 35, 36, 37, 38, 39, 26, 40, 26,
+ 41, 26, 44, 45, 46, 48, 48, 49, 49, 51,
+ 51, 51, 51, 54, 62, 55, 55, 55, 54, 59,
+ 55, 55, 55, 93, 63, 64, 65, 331, 60, 66,
+
+ 67, 308, 68, 69, 70, 71, 61, 72, 73, 271,
+ 80, 260, 62, 81, 56, 51, 51, 59, 74, 50,
+ 50, 63, 64, 78, 65, 60, 66, 99, 67, 68,
+ 69, 70, 71, 61, 75, 72, 73, 76, 80, 95,
+ 81, 56, 79, 101, 77, 74, 92, 92, 92, 100,
+ 54, 78, 55, 55, 55, 99, 256, 96, 245, 102,
+ 103, 220, 75, 151, 97, 76, 95, 98, 108, 79,
+ 101, 77, 82, 82, 83, 107, 109, 100, 94, 110,
+ 84, 111, 115, 85, 86, 96, 102, 112, 103, 104,
+ 105, 97, 87, 113, 98, 88, 108, 89, 114, 90,
+
+ 116, 121, 107, 117, 109, 106, 110, 118, 84, 111,
+ 115, 85, 86, 119, 112, 120, 53, 104, 105, 87,
+ 113, 123, 88, 124, 89, 114, 90, 125, 116, 121,
+ 117, 126, 106, 127, 118, 122, 122, 83, 128, 129,
+ 119, 130, 120, 83, 83, 83, 92, 92, 92, 123,
+ 131, 124, 132, 133, 134, 125, 135, 137, 136, 126,
+ 127, 138, 335, 141, 142, 139, 128, 129, 130, 143,
+ 144, 145, 146, 147, 335, 148, 149, 155, 131, 132,
+ 140, 133, 134, 135, 137, 136, 150, 153, 154, 138,
+ 141, 142, 139, 152, 152, 83, 143, 144, 145, 146,
+
+ 156, 147, 148, 157, 149, 155, 158, 159, 160, 161,
+ 335, 162, 163, 150, 153, 154, 164, 165, 166, 167,
+ 335, 168, 169, 335, 170, 172, 173, 156, 177, 171,
+ 174, 157, 175, 158, 159, 160, 176, 161, 162, 184,
+ 163, 185, 189, 164, 186, 165, 166, 167, 168, 187,
+ 169, 170, 188, 172, 173, 177, 171, 190, 174, 191,
+ 175, 83, 83, 83, 176, 178, 184, 192, 185, 179,
+ 189, 186, 193, 180, 181, 194, 187, 195, 197, 188,
+ 182, 183, 196, 198, 190, 199, 200, 191, 201, 202,
+ 335, 203, 204, 178, 205, 192, 206, 179, 207, 193,
+
+ 180, 181, 208, 194, 209, 195, 197, 182, 183, 196,
+ 198, 211, 212, 199, 200, 213, 201, 202, 203, 214,
+ 204, 205, 215, 210, 206, 216, 207, 217, 335, 218,
+ 208, 219, 209, 221, 335, 222, 223, 225, 211, 212,
+ 224, 226, 227, 213, 228, 229, 214, 230, 231, 215,
+ 210, 232, 216, 233, 234, 217, 218, 235, 219, 236,
+ 237, 221, 222, 238, 223, 225, 239, 224, 226, 240,
+ 227, 228, 229, 241, 230, 231, 242, 243, 232, 244,
+ 233, 234, 246, 247, 235, 248, 236, 237, 250, 251,
+ 238, 252, 253, 239, 257, 249, 240, 254, 255, 335,
+
+ 258, 241, 259, 242, 243, 261, 262, 244, 263, 246,
+ 247, 264, 265, 248, 266, 250, 267, 251, 268, 252,
+ 253, 257, 249, 269, 270, 254, 255, 258, 272, 273,
+ 259, 274, 261, 275, 262, 276, 263, 277, 264, 278,
+ 265, 266, 279, 267, 280, 268, 281, 282, 283, 284,
+ 269, 270, 285, 286, 288, 272, 273, 287, 274, 289,
+ 275, 290, 276, 293, 277, 294, 278, 291, 295, 297,
+ 279, 280, 296, 281, 282, 283, 298, 284, 299, 300,
+ 285, 286, 288, 301, 287, 302, 292, 289, 303, 290,
+ 293, 304, 305, 294, 306, 291, 295, 297, 307, 296,
+
+ 309, 310, 311, 298, 312, 299, 300, 313, 314, 318,
+ 301, 315, 316, 302, 317, 319, 303, 320, 304, 305,
+ 321, 306, 322, 323, 324, 333, 307, 309, 310, 311,
+ 325, 326, 312, 327, 328, 313, 314, 318, 315, 316,
+ 329, 317, 319, 330, 320, 332, 334, 335, 321, 322,
+ 335, 323, 324, 333, 335, 335, 335, 325, 326, 335,
+ 327, 328, 335, 335, 335, 335, 335, 329, 335, 335,
+ 330, 335, 332, 334, 47, 47, 47, 47, 47, 52,
+ 335, 52, 52, 52, 57, 57, 57, 58, 58, 91,
+ 335, 91, 91, 91, 5, 335, 335, 335, 335, 335,
+
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335
+ } ;
+
+static yyconst flex_int16_t yy_chk[771] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 4, 3, 4, 7,
+ 7, 8, 8, 20, 27, 20, 20, 20, 21, 25,
+ 21, 21, 21, 341, 28, 29, 30, 330, 25, 31,
+
+ 32, 297, 33, 34, 35, 35, 25, 36, 37, 255,
+ 40, 243, 27, 41, 20, 51, 51, 25, 37, 3,
+ 4, 28, 29, 39, 30, 25, 31, 61, 32, 33,
+ 34, 35, 35, 25, 38, 36, 37, 38, 40, 59,
+ 41, 20, 39, 63, 38, 37, 54, 54, 54, 62,
+ 55, 39, 55, 55, 55, 61, 239, 60, 229, 64,
+ 65, 194, 38, 121, 60, 38, 59, 60, 68, 39,
+ 63, 38, 50, 50, 50, 67, 69, 62, 57, 70,
+ 50, 71, 75, 50, 50, 60, 64, 72, 65, 66,
+ 66, 60, 50, 73, 60, 50, 68, 50, 74, 50,
+
+ 76, 81, 67, 77, 69, 66, 70, 78, 50, 71,
+ 75, 50, 50, 79, 72, 80, 19, 66, 66, 50,
+ 73, 95, 50, 96, 50, 74, 50, 97, 76, 81,
+ 77, 98, 66, 99, 78, 82, 82, 82, 100, 101,
+ 79, 102, 80, 83, 83, 83, 92, 92, 92, 95,
+ 103, 96, 104, 105, 106, 97, 107, 108, 107, 98,
+ 99, 109, 5, 110, 111, 109, 100, 101, 102, 112,
+ 113, 115, 116, 117, 0, 118, 119, 125, 103, 104,
+ 109, 105, 106, 107, 108, 107, 120, 123, 124, 109,
+ 110, 111, 109, 122, 122, 122, 112, 113, 115, 116,
+
+ 126, 117, 118, 127, 119, 125, 128, 129, 130, 131,
+ 0, 132, 133, 120, 123, 124, 134, 135, 138, 139,
+ 0, 140, 141, 0, 142, 143, 144, 126, 150, 142,
+ 145, 127, 146, 128, 129, 130, 147, 131, 132, 153,
+ 133, 155, 159, 134, 156, 135, 138, 139, 140, 157,
+ 141, 142, 158, 143, 144, 150, 142, 161, 145, 162,
+ 146, 152, 152, 152, 147, 151, 153, 163, 155, 151,
+ 159, 156, 164, 151, 151, 165, 157, 166, 168, 158,
+ 151, 151, 167, 169, 161, 170, 171, 162, 172, 173,
+ 0, 174, 177, 151, 178, 163, 179, 151, 180, 164,
+
+ 151, 151, 181, 165, 182, 166, 168, 151, 151, 167,
+ 169, 183, 185, 170, 171, 186, 172, 173, 174, 187,
+ 177, 178, 188, 182, 179, 189, 180, 191, 0, 192,
+ 181, 193, 182, 195, 0, 197, 198, 200, 183, 185,
+ 199, 201, 202, 186, 203, 204, 187, 205, 206, 188,
+ 182, 207, 189, 208, 209, 191, 192, 210, 193, 211,
+ 212, 195, 197, 213, 198, 200, 216, 199, 201, 218,
+ 202, 203, 204, 219, 205, 206, 220, 221, 207, 225,
+ 208, 209, 230, 231, 210, 232, 211, 212, 233, 234,
+ 213, 235, 236, 216, 240, 232, 218, 237, 238, 0,
+
+ 241, 219, 242, 220, 221, 245, 246, 225, 247, 230,
+ 231, 248, 249, 232, 250, 233, 251, 234, 252, 235,
+ 236, 240, 232, 253, 254, 237, 238, 241, 256, 259,
+ 242, 260, 245, 260, 246, 261, 247, 262, 248, 263,
+ 249, 250, 264, 251, 265, 252, 266, 267, 268, 270,
+ 253, 254, 271, 272, 274, 256, 259, 273, 260, 275,
+ 260, 276, 261, 278, 262, 279, 263, 277, 282, 284,
+ 264, 265, 283, 266, 267, 268, 285, 270, 286, 288,
+ 271, 272, 274, 289, 273, 290, 277, 275, 291, 276,
+ 278, 292, 293, 279, 294, 277, 282, 284, 295, 283,
+
+ 298, 299, 300, 285, 302, 286, 288, 303, 304, 312,
+ 289, 307, 308, 290, 309, 313, 291, 314, 292, 293,
+ 316, 294, 317, 318, 319, 332, 295, 298, 299, 300,
+ 321, 323, 302, 324, 325, 303, 304, 312, 307, 308,
+ 326, 309, 313, 327, 314, 331, 333, 0, 316, 317,
+ 0, 318, 319, 332, 0, 0, 0, 321, 323, 0,
+ 324, 325, 0, 0, 0, 0, 0, 326, 0, 0,
+ 327, 0, 331, 333, 336, 336, 336, 336, 336, 337,
+ 0, 337, 337, 337, 338, 338, 338, 339, 339, 340,
+ 0, 340, 340, 340, 335, 335, 335, 335, 335, 335,
+
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335
+ } ;
+
+/* Table of booleans, true if rule could match eol. */
+static yyconst flex_int32_t yy_rule_can_match_eol[84] =
+ { 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, };
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+#line 1 "scanner.l"
+/************************************************************
+ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+#line 28 "scanner.l"
+#include "xkbcomp-priv.h"
+#include "parser-priv.h"
+
+#pragma GCC diagnostic ignored "-Wmissing-noreturn"
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC diagnostic push
+
+struct scanner_extra {
+ struct xkb_context *ctx;
+ const char *file_name;
+ char scanBuf[1024];
+ char *s;
+};
+
+static void
+scanner_error_extra(struct YYLTYPE *loc, struct scanner_extra *extra,
+ const char *msg);
+
+#define YY_USER_ACTION { \
+ yylloc->first_line = yylineno; \
+ yylloc->last_line = yylineno; \
+}
+
+#define APPEND_S(ch) do { \
+ if (yyextra->s - yyextra->scanBuf >= sizeof(yyextra->scanBuf) - 1) \
+ return ERROR_TOK; \
+ *yyextra->s++ = ch; \
+} while (0)
+#define YY_NO_UNISTD_H 1
+#define YY_NO_INPUT 1
+
+#line 803 "src/xkbcomp/scanner.c"
+
+#define INITIAL 0
+#define S_STR 1
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#define YY_EXTRA_TYPE struct scanner_extra *
+
+/* Holds the entire state of the reentrant scanner. */
+struct yyguts_t
+ {
+
+ /* User-defined. Not touched by flex. */
+ YY_EXTRA_TYPE yyextra_r;
+
+ /* The rest are the same as the globals declared in the non-reentrant scanner. */
+ FILE *yyin_r, *yyout_r;
+ size_t yy_buffer_stack_top; /**< index of top of stack. */
+ size_t yy_buffer_stack_max; /**< capacity of stack. */
+ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
+ char yy_hold_char;
+ int yy_n_chars;
+ int yyleng_r;
+ char *yy_c_buf_p;
+ int yy_init;
+ int yy_start;
+ int yy_did_buffer_switch_on_eof;
+ int yy_start_stack_ptr;
+ int yy_start_stack_depth;
+ int *yy_start_stack;
+ yy_state_type yy_last_accepting_state;
+ char* yy_last_accepting_cpos;
+
+ int yylineno_r;
+ int yy_flex_debug_r;
+
+ char *yytext_r;
+ int yy_more_flag;
+ int yy_more_len;
+
+ YYSTYPE * yylval_r;
+
+ YYLTYPE * yylloc_r;
+
+ }; /* end struct yyguts_t */
+
+static int yy_init_globals (yyscan_t yyscanner );
+
+ /* This must go here because YYSTYPE and YYLTYPE are included
+ * from bison output in section 1.*/
+ # define yylval yyg->yylval_r
+
+ # define yylloc yyg->yylloc_r
+
+int _xkbcommon_lex_init (yyscan_t* scanner);
+
+int _xkbcommon_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int _xkbcommon_lex_destroy (yyscan_t yyscanner );
+
+int _xkbcommon_get_debug (yyscan_t yyscanner );
+
+void _xkbcommon_set_debug (int debug_flag ,yyscan_t yyscanner );
+
+YY_EXTRA_TYPE _xkbcommon_get_extra (yyscan_t yyscanner );
+
+void _xkbcommon_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+
+FILE *_xkbcommon_get_in (yyscan_t yyscanner );
+
+void _xkbcommon_set_in (FILE * in_str ,yyscan_t yyscanner );
+
+FILE *_xkbcommon_get_out (yyscan_t yyscanner );
+
+void _xkbcommon_set_out (FILE * out_str ,yyscan_t yyscanner );
+
+int _xkbcommon_get_leng (yyscan_t yyscanner );
+
+char *_xkbcommon_get_text (yyscan_t yyscanner );
+
+int _xkbcommon_get_lineno (yyscan_t yyscanner );
+
+void _xkbcommon_set_lineno (int line_number ,yyscan_t yyscanner );
+
+YYSTYPE * _xkbcommon_get_lval (yyscan_t yyscanner );
+
+void _xkbcommon_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
+
+ YYLTYPE *_xkbcommon_get_lloc (yyscan_t yyscanner );
+
+ void _xkbcommon_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int _xkbcommon_wrap (yyscan_t yyscanner );
+#else
+extern int _xkbcommon_wrap (yyscan_t yyscanner );
+#endif
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int yyinput (yyscan_t yyscanner );
+#else
+static int input (yyscan_t yyscanner );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ size_t n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int _xkbcommon_lex \
+ (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
+
+#define YY_DECL int _xkbcommon_lex \
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+#line 69 "scanner.l"
+
+
+#line 1049 "src/xkbcomp/scanner.c"
+
+ yylval = yylval_param;
+
+ yylloc = yylloc_param;
+
+ if ( !yyg->yy_init )
+ {
+ yyg->yy_init = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yyg->yy_start )
+ yyg->yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ _xkbcommon_ensure_buffer_stack (yyscanner);
+ YY_CURRENT_BUFFER_LVALUE =
+ _xkbcommon__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ }
+
+ _xkbcommon__load_buffer_state(yyscanner );
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yyg->yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yyg->yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yyg->yy_start;
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ if ( yy_accept[yy_current_state] )
+ {
+ yyg->yy_last_accepting_state = yy_current_state;
+ yyg->yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 336 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ ++yy_cp;
+ }
+ while ( yy_current_state != 335 );
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+
+ YY_DO_BEFORE_ACTION;
+
+ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
+ {
+ int yyl;
+ for ( yyl = 0; yyl < yyleng; ++yyl )
+ if ( yytext[yyl] == '\n' )
+
+ do{ yylineno++;
+ yycolumn=0;
+ }while(0)
+;
+ }
+
+do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = yyg->yy_hold_char;
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 71 "scanner.l"
+
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 72 "scanner.l"
+
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 74 "scanner.l"
+yyextra->s = yyextra->scanBuf; BEGIN(S_STR);
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 76 "scanner.l"
+{
+ BEGIN(INITIAL);
+ *yyextra->s = '\0';
+ yylval->str = strdup(yyextra->scanBuf);
+ return STRING;
+ }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 83 "scanner.l"
+{
+ /* octal escape sequence */
+ unsigned int result;
+
+ (void) sscanf( yytext + 1, "%o", &result );
+
+ if (result > 0xff) {
+ scanner_error_extra(yylloc, yyextra,
+ "Illegal octal escape");
+ return ERROR_TOK;
+ }
+
+ APPEND_S(result);
+ }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 98 "scanner.l"
+{
+ scanner_error_extra(yylloc, yyextra,
+ "Illegal octal escape");
+ return ERROR_TOK;
+ }
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 104 "scanner.l"
+APPEND_S('\n');
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 105 "scanner.l"
+APPEND_S('\t');
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 106 "scanner.l"
+APPEND_S('\r');
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 107 "scanner.l"
+APPEND_S('\b');
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 108 "scanner.l"
+APPEND_S('\f');
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 109 "scanner.l"
+APPEND_S('\v');
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 110 "scanner.l"
+APPEND_S('\033');
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 112 "scanner.l"
+APPEND_S(yytext[0]);
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 114 "scanner.l"
+{
+ /* We don't want the brackets. */
+ yytext[yyleng - 1] = '\0';
+ yytext++;
+ yylval->sval = xkb_atom_intern(yyextra->ctx, yytext);
+ return KEYNAME;
+ }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 122 "scanner.l"
+return XKB_KEYMAP;
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 123 "scanner.l"
+return XKB_KEYCODES;
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 124 "scanner.l"
+return XKB_TYPES;
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 125 "scanner.l"
+return XKB_SYMBOLS;
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 126 "scanner.l"
+return XKB_COMPATMAP;
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 127 "scanner.l"
+return XKB_COMPATMAP;
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 128 "scanner.l"
+return XKB_COMPATMAP;
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 129 "scanner.l"
+return XKB_COMPATMAP;
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 130 "scanner.l"
+return XKB_GEOMETRY;
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 131 "scanner.l"
+return XKB_SEMANTICS;
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 132 "scanner.l"
+return XKB_LAYOUT;
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 133 "scanner.l"
+return INCLUDE;
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 134 "scanner.l"
+return OVERRIDE;
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 135 "scanner.l"
+return AUGMENT;
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 136 "scanner.l"
+return REPLACE;
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 137 "scanner.l"
+return ALTERNATE;
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 138 "scanner.l"
+return PARTIAL;
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 139 "scanner.l"
+return DEFAULT;
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 140 "scanner.l"
+return HIDDEN;
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 141 "scanner.l"
+return VIRTUAL_MODS;
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 142 "scanner.l"
+return TYPE;
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 143 "scanner.l"
+return INTERPRET;
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 144 "scanner.l"
+return ACTION_TOK;
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 145 "scanner.l"
+return KEY;
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 146 "scanner.l"
+return ALIAS;
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 147 "scanner.l"
+return GROUP;
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 148 "scanner.l"
+return MODIFIER_MAP;
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 149 "scanner.l"
+return MODIFIER_MAP;
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 150 "scanner.l"
+return MODIFIER_MAP;
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 151 "scanner.l"
+return INDICATOR;
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 152 "scanner.l"
+return SHAPE;
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 153 "scanner.l"
+return ROW;
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 154 "scanner.l"
+return KEYS;
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 155 "scanner.l"
+return SECTION;
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 156 "scanner.l"
+return OVERLAY;
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 157 "scanner.l"
+return TEXT;
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 158 "scanner.l"
+return OUTLINE;
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 159 "scanner.l"
+return SOLID;
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 160 "scanner.l"
+return LOGO;
+ YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 161 "scanner.l"
+return VIRTUAL;
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 162 "scanner.l"
+return ALPHANUMERIC_KEYS;
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 163 "scanner.l"
+return MODIFIER_KEYS;
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 164 "scanner.l"
+return KEYPAD_KEYS;
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 165 "scanner.l"
+return FUNCTION_KEYS;
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 166 "scanner.l"
+return ALTERNATE_GROUP;
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 168 "scanner.l"
+yylval->str = strdup(yytext); return IDENT;
+ YY_BREAK
+case 62:
+#line 171 "scanner.l"
+case 63:
+YY_RULE_SETUP
+#line 171 "scanner.l"
+{
+ char *end;
+ yylval->num = strtoul(yytext, &end, 0);
+
+ return INTEGER;
+ }
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 177 "scanner.l"
+{
+ char *end;
+ yylval->num = strtod(yytext, &end);
+
+ return FLOAT;
+ }
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 184 "scanner.l"
+return EQUALS;
+ YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 185 "scanner.l"
+return PLUS;
+ YY_BREAK
+case 67:
+YY_RULE_SETUP
+#line 186 "scanner.l"
+return MINUS;
+ YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 187 "scanner.l"
+return DIVIDE;
+ YY_BREAK
+case 69:
+YY_RULE_SETUP
+#line 188 "scanner.l"
+return TIMES;
+ YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 189 "scanner.l"
+return OBRACE;
+ YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 190 "scanner.l"
+return CBRACE;
+ YY_BREAK
+case 72:
+YY_RULE_SETUP
+#line 191 "scanner.l"
+return OPAREN;
+ YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 192 "scanner.l"
+return CPAREN;
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 193 "scanner.l"
+return OBRACKET;
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 194 "scanner.l"
+return CBRACKET;
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 195 "scanner.l"
+return DOT;
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 196 "scanner.l"
+return COMMA;
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 197 "scanner.l"
+return SEMI;
+ YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 198 "scanner.l"
+return EXCLAM;
+ YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 199 "scanner.l"
+return INVERT;
+ YY_BREAK
+case 81:
+/* rule 81 can match eol */
+YY_RULE_SETUP
+#line 201 "scanner.l"
+
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(S_STR):
+#line 203 "scanner.l"
+return END_OF_FILE;
+ YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 205 "scanner.l"
+return ERROR_TOK;
+ YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 207 "scanner.l"
+ECHO;
+ YY_BREAK
+#line 1600 "src/xkbcomp/scanner.c"
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yyg->yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * _xkbcommon_lex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( yyscanner );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
+
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yyg->yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( yyscanner ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yyg->yy_did_buffer_switch_on_eof = 0;
+
+ if ( _xkbcommon_wrap(yyscanner ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yyg->yy_c_buf_p =
+ yyg->yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( yyscanner );
+
+ yy_cp = yyg->yy_c_buf_p;
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yyg->yy_c_buf_p =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
+
+ yy_current_state = yy_get_previous_state( yyscanner );
+
+ yy_cp = yyg->yy_c_buf_p;
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+} /* end of _xkbcommon_lex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ register char *source = yyg->yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+
+ int yy_c_buf_p_offset =
+ (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ _xkbcommon_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ yyg->yy_n_chars, (size_t) num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+ }
+
+ if ( yyg->yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ _xkbcommon_restart(yyin ,yyscanner);
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _xkbcommon_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
+
+ yyg->yy_n_chars += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ yy_current_state = yyg->yy_start;
+
+ for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ yyg->yy_last_accepting_state = yy_current_state;
+ yyg->yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 336 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
+{
+ register int yy_is_jam;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
+ register char *yy_cp = yyg->yy_c_buf_p;
+
+ register YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ yyg->yy_last_accepting_state = yy_current_state;
+ yyg->yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 336 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_is_jam = (yy_current_state == 335);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (yyscan_t yyscanner)
+#else
+ static int input (yyscan_t yyscanner)
+#endif
+
+{
+ int c;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
+
+ if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
+ /* This was really a NUL. */
+ *yyg->yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ ++yyg->yy_c_buf_p;
+
+ switch ( yy_get_next_buffer( yyscanner ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ _xkbcommon_restart(yyin ,yyscanner);
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( _xkbcommon_wrap(yyscanner ) )
+ return EOF;
+
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput(yyscanner);
+#else
+ return input(yyscanner);
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
+ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
+ yyg->yy_hold_char = *++yyg->yy_c_buf_p;
+
+ if ( c == '\n' )
+
+ do{ yylineno++;
+ yycolumn=0;
+ }while(0)
+;
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * @param yyscanner The scanner object.
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void _xkbcommon_restart (FILE * input_file , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ if ( ! YY_CURRENT_BUFFER ){
+ _xkbcommon_ensure_buffer_stack (yyscanner);
+ YY_CURRENT_BUFFER_LVALUE =
+ _xkbcommon__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ }
+
+ _xkbcommon__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
+ _xkbcommon__load_buffer_state(yyscanner );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * @param yyscanner The scanner object.
+ */
+ void _xkbcommon__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * _xkbcommon_pop_buffer_state();
+ * _xkbcommon_push_buffer_state(new_buffer);
+ */
+ _xkbcommon_ensure_buffer_stack (yyscanner);
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ _xkbcommon__load_buffer_state(yyscanner );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (_xkbcommon_wrap()) processing, but the only time this flag
+ * is looked at is after _xkbcommon_wrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yyg->yy_did_buffer_switch_on_eof = 1;
+}
+
+static void _xkbcommon__load_buffer_state (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ yyg->yy_hold_char = *yyg->yy_c_buf_p;
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * @param yyscanner The scanner object.
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE _xkbcommon__create_buffer (FILE * file, int size , yyscan_t yyscanner)
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) _xkbcommon_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in _xkbcommon__create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) _xkbcommon_alloc(b->yy_buf_size + 2 ,yyscanner );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in _xkbcommon__create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ _xkbcommon__init_buffer(b,file ,yyscanner);
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with _xkbcommon__create_buffer()
+ * @param yyscanner The scanner object.
+ */
+ void _xkbcommon__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ _xkbcommon_free((void *) b->yy_ch_buf ,yyscanner );
+
+ _xkbcommon_free((void *) b ,yyscanner );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a _xkbcommon_restart() or at EOF.
+ */
+ static void _xkbcommon__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
+
+{
+ int oerrno = errno;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ _xkbcommon__flush_buffer(b ,yyscanner);
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then _xkbcommon__init_buffer was _probably_
+ * called from _xkbcommon_restart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * @param yyscanner The scanner object.
+ */
+ void _xkbcommon__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ _xkbcommon__load_buffer_state(yyscanner );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ * @param yyscanner The scanner object.
+ */
+void _xkbcommon_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ if (new_buffer == NULL)
+ return;
+
+ _xkbcommon_ensure_buffer_stack(yyscanner);
+
+ /* This block is copied from _xkbcommon__switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ yyg->yy_buffer_stack_top++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from _xkbcommon__switch_to_buffer. */
+ _xkbcommon__load_buffer_state(yyscanner );
+ yyg->yy_did_buffer_switch_on_eof = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ * @param yyscanner The scanner object.
+ */
+void _xkbcommon_pop_buffer_state (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ _xkbcommon__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if (yyg->yy_buffer_stack_top > 0)
+ --yyg->yy_buffer_stack_top;
+
+ if (YY_CURRENT_BUFFER) {
+ _xkbcommon__load_buffer_state(yyscanner );
+ yyg->yy_did_buffer_switch_on_eof = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void _xkbcommon_ensure_buffer_stack (yyscan_t yyscanner)
+{
+ int num_to_alloc;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ if (!yyg->yy_buffer_stack) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1;
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)_xkbcommon_alloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ , yyscanner);
+ if ( ! yyg->yy_buffer_stack )
+ YY_FATAL_ERROR( "out of dynamic memory in _xkbcommon_ensure_buffer_stack()" );
+
+ memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ yyg->yy_buffer_stack_max = num_to_alloc;
+ yyg->yy_buffer_stack_top = 0;
+ return;
+ }
+
+ if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ int grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)_xkbcommon_realloc
+ (yyg->yy_buffer_stack,
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ , yyscanner);
+ if ( ! yyg->yy_buffer_stack )
+ YY_FATAL_ERROR( "out of dynamic memory in _xkbcommon_ensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
+ yyg->yy_buffer_stack_max = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE _xkbcommon__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) _xkbcommon_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in _xkbcommon__scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ _xkbcommon__switch_to_buffer(b ,yyscanner );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to _xkbcommon_lex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * _xkbcommon__scan_bytes() instead.
+ */
+YY_BUFFER_STATE _xkbcommon__scan_string (yyconst char * yystr , yyscan_t yyscanner)
+{
+
+ return _xkbcommon__scan_bytes(yystr,strlen(yystr) ,yyscanner);
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to _xkbcommon_lex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE _xkbcommon__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = _yybytes_len + 2;
+ buf = (char *) _xkbcommon_alloc(n ,yyscanner );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in _xkbcommon__scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = _xkbcommon__scan_buffer(buf,n ,yyscanner);
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in _xkbcommon__scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
+{
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = yyg->yy_hold_char; \
+ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
+ yyg->yy_hold_char = *yyg->yy_c_buf_p; \
+ *yyg->yy_c_buf_p = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the user-defined data for this scanner.
+ * @param yyscanner The scanner object.
+ */
+YY_EXTRA_TYPE _xkbcommon_get_extra (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyextra;
+}
+
+/** Get the current line number.
+ * @param yyscanner The scanner object.
+ */
+int _xkbcommon_get_lineno (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ if (! YY_CURRENT_BUFFER)
+ return 0;
+
+ return yylineno;
+}
+
+/** Get the current column number.
+ * @param yyscanner The scanner object.
+ */
+int _xkbcommon_get_column (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ if (! YY_CURRENT_BUFFER)
+ return 0;
+
+ return yycolumn;
+}
+
+/** Get the input stream.
+ * @param yyscanner The scanner object.
+ */
+FILE *_xkbcommon_get_in (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyin;
+}
+
+/** Get the output stream.
+ * @param yyscanner The scanner object.
+ */
+FILE *_xkbcommon_get_out (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyout;
+}
+
+/** Get the length of the current token.
+ * @param yyscanner The scanner object.
+ */
+int _xkbcommon_get_leng (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyleng;
+}
+
+/** Get the current token.
+ * @param yyscanner The scanner object.
+ */
+
+char *_xkbcommon_get_text (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yytext;
+}
+
+/** Set the user-defined data. This data is never touched by the scanner.
+ * @param user_defined The data to be associated with this scanner.
+ * @param yyscanner The scanner object.
+ */
+void _xkbcommon_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyextra = user_defined ;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * @param yyscanner The scanner object.
+ */
+void _xkbcommon_set_lineno (int line_number , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ /* lineno is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ yy_fatal_error( "_xkbcommon_set_lineno called with no buffer" , yyscanner);
+
+ yylineno = line_number;
+}
+
+/** Set the current column.
+ * @param line_number
+ * @param yyscanner The scanner object.
+ */
+void _xkbcommon_set_column (int column_no , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ /* column is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ yy_fatal_error( "_xkbcommon_set_column called with no buffer" , yyscanner);
+
+ yycolumn = column_no;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * @param yyscanner The scanner object.
+ * @see _xkbcommon__switch_to_buffer
+ */
+void _xkbcommon_set_in (FILE * in_str , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyin = in_str ;
+}
+
+void _xkbcommon_set_out (FILE * out_str , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyout = out_str ;
+}
+
+int _xkbcommon_get_debug (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yy_flex_debug;
+}
+
+void _xkbcommon_set_debug (int bdebug , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yy_flex_debug = bdebug ;
+}
+
+/* Accessor methods for yylval and yylloc */
+
+YYSTYPE * _xkbcommon_get_lval (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yylval;
+}
+
+void _xkbcommon_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yylval = yylval_param;
+}
+
+YYLTYPE *_xkbcommon_get_lloc (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yylloc;
+}
+
+void _xkbcommon_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yylloc = yylloc_param;
+}
+
+/* User-visible API */
+
+/* _xkbcommon_lex_init is special because it creates the scanner itself, so it is
+ * the ONLY reentrant function that doesn't take the scanner as the last argument.
+ * That's why we explicitly handle the declaration, instead of using our macros.
+ */
+
+int _xkbcommon_lex_init(yyscan_t* ptr_yy_globals)
+
+{
+ if (ptr_yy_globals == NULL){
+ errno = EINVAL;
+ return 1;
+ }
+
+ *ptr_yy_globals = (yyscan_t) _xkbcommon_alloc ( sizeof( struct yyguts_t ), NULL );
+
+ if (*ptr_yy_globals == NULL){
+ errno = ENOMEM;
+ return 1;
+ }
+
+ /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+
+ return yy_init_globals ( *ptr_yy_globals );
+}
+
+/* _xkbcommon_lex_init_extra has the same functionality as _xkbcommon_lex_init, but follows the
+ * convention of taking the scanner as the last argument. Note however, that
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
+ * is the reason, too, why this function also must handle its own declaration).
+ * The user defined value in the first argument will be available to _xkbcommon_alloc in
+ * the yyextra field.
+ */
+
+int _xkbcommon_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
+
+{
+ struct yyguts_t dummy_yyguts;
+
+ _xkbcommon_set_extra (yy_user_defined, &dummy_yyguts);
+
+ if (ptr_yy_globals == NULL){
+ errno = EINVAL;
+ return 1;
+ }
+
+ *ptr_yy_globals = (yyscan_t) _xkbcommon_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+
+ if (*ptr_yy_globals == NULL){
+ errno = ENOMEM;
+ return 1;
+ }
+
+ /* By setting to 0xAA, we expose bugs in
+ yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+
+ _xkbcommon_set_extra (yy_user_defined, *ptr_yy_globals);
+
+ return yy_init_globals ( *ptr_yy_globals );
+}
+
+static int yy_init_globals (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from _xkbcommon_lex_destroy(), so don't allocate here.
+ */
+
+ yyg->yy_buffer_stack = 0;
+ yyg->yy_buffer_stack_top = 0;
+ yyg->yy_buffer_stack_max = 0;
+ yyg->yy_c_buf_p = (char *) 0;
+ yyg->yy_init = 0;
+ yyg->yy_start = 0;
+
+ yyg->yy_start_stack_ptr = 0;
+ yyg->yy_start_stack_depth = 0;
+ yyg->yy_start_stack = NULL;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * _xkbcommon_lex_init()
+ */
+ return 0;
+}
+
+/* _xkbcommon_lex_destroy is for both reentrant and non-reentrant scanners. */
+int _xkbcommon_lex_destroy (yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ _xkbcommon__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ _xkbcommon_pop_buffer_state(yyscanner);
+ }
+
+ /* Destroy the stack itself. */
+ _xkbcommon_free(yyg->yy_buffer_stack ,yyscanner);
+ yyg->yy_buffer_stack = NULL;
+
+ /* Destroy the start condition stack. */
+ _xkbcommon_free(yyg->yy_start_stack ,yyscanner );
+ yyg->yy_start_stack = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * _xkbcommon_lex() is called, initialization will occur. */
+ yy_init_globals( yyscanner);
+
+ /* Destroy the main struct (reentrant only). */
+ _xkbcommon_free ( yyscanner , yyscanner );
+ yyscanner = NULL;
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
+{
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
+{
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *_xkbcommon_alloc (yy_size_t size , yyscan_t yyscanner)
+{
+ return (void *) malloc( size );
+}
+
+void *_xkbcommon_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
+{
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+}
+
+void _xkbcommon_free (void * ptr , yyscan_t yyscanner)
+{
+ free( (char *) ptr ); /* see _xkbcommon_realloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 207 "scanner.l"
+
+
+
+#pragma GCC diagnostic pop
+
+static void
+scanner_error_extra(struct YYLTYPE *loc, struct scanner_extra *extra,
+ const char *msg)
+{
+ log_err(extra->ctx, "%s: line %d of %s\n", msg,
+ loc->first_line,
+ extra->file_name ? extra->file_name : "(unknown)");
+}
+
+void
+scanner_error(struct YYLTYPE *loc, void *scanner, const char *msg)
+{
+ struct scanner_extra *extra = _xkbcommon_get_extra(scanner);
+ scanner_error_extra(loc, extra, msg);
+}
+
+static bool
+init_scanner(yyscan_t *scanner, struct scanner_extra *extra,
+ struct xkb_context *ctx, const char *file_name)
+{
+ memset(extra, 0, sizeof(*extra));
+
+ if (_xkbcommon_lex_init_extra(extra,scanner) != 0)
+ return false;
+
+ extra->ctx = ctx;
+ extra->file_name = file_name;
+
+ return true;
+}
+
+static void
+clear_scanner(yyscan_t scanner)
+{
+ _xkbcommon_lex_destroy(scanner);
+}
+
+XkbFile *
+XkbParseString(struct xkb_context *ctx, const char *string,
+ const char *file_name)
+{
+ yyscan_t scanner;
+ struct scanner_extra extra;
+ YY_BUFFER_STATE state;
+ XkbFile *xkb_file;
+
+ if (!init_scanner(&scanner, &extra, ctx, file_name))
+ return NULL;
+
+ state = _xkbcommon__scan_string(string,scanner);
+
+ xkb_file = parse(ctx, scanner, NULL);
+
+ _xkbcommon__delete_buffer(state,scanner);
+ clear_scanner(scanner);
+
+ return xkb_file;
+}
+
+/*
+ * _xkbcommon__scan_buffer() requires the last two bytes of \buf to be 0. These two bytes
+ * are not scanned. Other zero bytes in the buffer are scanned normally, though.
+ * Due to these terminating zeroes, \length must be greater than 2.
+ * Furthermore, the buffer must be writable and you cannot make any assumptions
+ * about it after the scanner finished.
+ * All this must be guaranteed by the caller of this function!
+ */
+XkbFile *
+XkbParseBuffer(struct xkb_context *ctx, char *buf, size_t length,
+ const char *file_name)
+{
+ yyscan_t scanner;
+ struct scanner_extra extra;
+ YY_BUFFER_STATE state;
+ XkbFile *xkb_file;
+
+ if (!init_scanner(&scanner, &extra, ctx, file_name))
+ return NULL;
+
+ xkb_file = NULL;
+ state = _xkbcommon__scan_buffer(buf,length,scanner);
+ if (state) {
+ xkb_file = parse(ctx, scanner, NULL);
+ _xkbcommon__delete_buffer(state,scanner);
+ }
+
+ clear_scanner(scanner);
+
+ return xkb_file;
+}
+
+XkbFile *
+XkbParseFile(struct xkb_context *ctx, FILE *file,
+ const char *file_name, const char *map)
+{
+ yyscan_t scanner;
+ struct scanner_extra extra;
+ YY_BUFFER_STATE state;
+ XkbFile *xkb_file;
+
+ if (!init_scanner(&scanner, &extra, ctx, file_name))
+ return NULL;
+
+ state = _xkbcommon__create_buffer(file,YY_BUF_SIZE,scanner);
+ _xkbcommon__switch_to_buffer(state,scanner);
+
+ xkb_file = parse(ctx, scanner, map);
+
+ _xkbcommon__delete_buffer(state,scanner);
+ clear_scanner(scanner);
+
+ return xkb_file;
+}
+
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/symbols.c b/src/3rdparty/xkbcommon/src/xkbcomp/symbols.c
new file mode 100644
index 0000000000..a2970f5004
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/symbols.c
@@ -0,0 +1,1638 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ * Ran Benita <ran234@gmail.com>
+ */
+
+#include "xkbcomp-priv.h"
+#include "text.h"
+#include "expr.h"
+#include "action.h"
+#include "vmod.h"
+#include "include.h"
+#include "keysym.h"
+
+enum key_repeat {
+ KEY_REPEAT_UNDEFINED = 0,
+ KEY_REPEAT_YES = 1,
+ KEY_REPEAT_NO = 2,
+};
+
+enum group_field {
+ GROUP_FIELD_SYMS = (1 << 0),
+ GROUP_FIELD_ACTS = (1 << 1),
+ GROUP_FIELD_TYPE = (1 << 2),
+};
+
+enum key_field {
+ KEY_FIELD_REPEAT = (1 << 0),
+ KEY_FIELD_DEFAULT_TYPE = (1 << 1),
+ KEY_FIELD_GROUPINFO = (1 << 2),
+ KEY_FIELD_VMODMAP = (1 << 3),
+};
+
+typedef struct {
+ enum group_field defined;
+ darray(struct xkb_level) levels;
+ xkb_atom_t type;
+} GroupInfo;
+
+typedef struct {
+ enum key_field defined;
+ enum merge_mode merge;
+
+ xkb_atom_t name;
+
+ darray(GroupInfo) groups;
+
+ enum key_repeat repeat;
+ xkb_mod_mask_t vmodmap;
+ xkb_atom_t default_type;
+
+ enum xkb_range_exceed_type out_of_range_group_action;
+ xkb_layout_index_t out_of_range_group_number;
+} KeyInfo;
+
+static void
+ClearLevelInfo(struct xkb_level *leveli)
+{
+ if (leveli->num_syms > 1)
+ free(leveli->u.syms);
+}
+
+static void
+InitGroupInfo(GroupInfo *groupi)
+{
+ memset(groupi, 0, sizeof(*groupi));
+}
+
+static void
+ClearGroupInfo(GroupInfo *groupi)
+{
+ struct xkb_level *leveli;
+ darray_foreach(leveli, groupi->levels)
+ ClearLevelInfo(leveli);
+ darray_free(groupi->levels);
+}
+
+static void
+CopyGroupInfo(GroupInfo *to, const GroupInfo *from)
+{
+ xkb_level_index_t j;
+ to->defined = from->defined;
+ to->type = from->type;
+ darray_init(to->levels);
+ darray_copy(to->levels, from->levels);
+ for (j = 0; j < darray_size(to->levels); j++)
+ if (darray_item(from->levels, j).num_syms > 1)
+ darray_item(to->levels, j).u.syms =
+ memdup(darray_item(from->levels, j).u.syms,
+ darray_item(from->levels, j).num_syms,
+ sizeof(xkb_keysym_t));
+}
+
+static void
+InitKeyInfo(struct xkb_context *ctx, KeyInfo *keyi)
+{
+ memset(keyi, 0, sizeof(*keyi));
+ keyi->merge = MERGE_OVERRIDE;
+ keyi->name = xkb_atom_intern(ctx, "*");
+ keyi->out_of_range_group_action = RANGE_WRAP;
+}
+
+static void
+ClearKeyInfo(KeyInfo *keyi)
+{
+ GroupInfo *groupi;
+ darray_foreach(groupi, keyi->groups)
+ ClearGroupInfo(groupi);
+ darray_free(keyi->groups);
+}
+
+/***====================================================================***/
+
+typedef struct {
+ enum merge_mode merge;
+ bool haveSymbol;
+ xkb_mod_index_t modifier;
+ union {
+ xkb_atom_t keyName;
+ xkb_keysym_t keySym;
+ } u;
+} ModMapEntry;
+
+typedef struct {
+ char *name; /* e.g. pc+us+inet(evdev) */
+ int errorCount;
+ enum merge_mode merge;
+ xkb_layout_index_t explicit_group;
+ darray(KeyInfo) keys;
+ KeyInfo default_key;
+ ActionsInfo *actions;
+ darray(xkb_atom_t) group_names;
+ darray(ModMapEntry) modMaps;
+
+ struct xkb_keymap *keymap;
+} SymbolsInfo;
+
+static void
+InitSymbolsInfo(SymbolsInfo *info, struct xkb_keymap *keymap,
+ ActionsInfo *actions)
+{
+ memset(info, 0, sizeof(*info));
+ info->keymap = keymap;
+ info->merge = MERGE_OVERRIDE;
+ InitKeyInfo(keymap->ctx, &info->default_key);
+ info->actions = actions;
+ info->explicit_group = XKB_LAYOUT_INVALID;
+}
+
+static void
+ClearSymbolsInfo(SymbolsInfo *info)
+{
+ KeyInfo *keyi;
+ free(info->name);
+ darray_foreach(keyi, info->keys)
+ ClearKeyInfo(keyi);
+ darray_free(info->keys);
+ darray_free(info->group_names);
+ darray_free(info->modMaps);
+ ClearKeyInfo(&info->default_key);
+}
+
+static const char *
+KeyInfoText(SymbolsInfo *info, KeyInfo *keyi)
+{
+ return KeyNameText(info->keymap->ctx, keyi->name);
+}
+
+static bool
+MergeGroups(SymbolsInfo *info, GroupInfo *into, GroupInfo *from, bool clobber,
+ bool report, xkb_layout_index_t group, xkb_atom_t key_name)
+{
+ xkb_level_index_t i, levels_in_both;
+ struct xkb_context *ctx = info->keymap->ctx;
+
+ /* First find the type of the merged group. */
+ if (into->type != from->type) {
+ if (from->type == XKB_ATOM_NONE) {
+ }
+ else if (into->type == XKB_ATOM_NONE) {
+ into->type = from->type;
+ }
+ else {
+ xkb_atom_t use = (clobber ? from->type : into->type);
+ xkb_atom_t ignore = (clobber ? into->type : from->type);
+
+ if (report)
+ log_warn(info->keymap->ctx,
+ "Multiple definitions for group %d type of key %s; "
+ "Using %s, ignoring %s\n",
+ group + 1, KeyNameText(ctx, key_name),
+ xkb_atom_text(ctx, use), xkb_atom_text(ctx, ignore));
+
+ into->type = use;
+ }
+ }
+ into->defined |= (from->defined & GROUP_FIELD_TYPE);
+
+ /* Now look at the levels. */
+
+ if (darray_empty(from->levels)) {
+ InitGroupInfo(from);
+ return true;
+ }
+
+ if (darray_empty(into->levels)) {
+ from->type = into->type;
+ *into = *from;
+ InitGroupInfo(from);
+ return true;
+ }
+
+ /* Merge the actions and syms. */
+ levels_in_both = MIN(darray_size(into->levels), darray_size(from->levels));
+ for (i = 0; i < levels_in_both; i++) {
+ struct xkb_level *intoLevel = &darray_item(into->levels, i);
+ struct xkb_level *fromLevel = &darray_item(from->levels, i);
+
+ if (fromLevel->action.type == ACTION_TYPE_NONE) {
+ }
+ else if (intoLevel->action.type == ACTION_TYPE_NONE) {
+ intoLevel->action = fromLevel->action;
+ }
+ else {
+ union xkb_action *use, *ignore;
+ use = (clobber ? &fromLevel->action : &intoLevel->action);
+ ignore = (clobber ? &intoLevel->action : &fromLevel->action);
+
+ if (report)
+ log_warn(ctx,
+ "Multiple actions for level %d/group %u on key %s; "
+ "Using %s, ignoring %s\n",
+ i + 1, group + 1, KeyNameText(ctx, key_name),
+ ActionTypeText(use->type),
+ ActionTypeText(ignore->type));
+
+ intoLevel->action = *use;
+ }
+
+ if (fromLevel->num_syms == 0) {
+ }
+ else if (intoLevel->num_syms == 0) {
+ intoLevel->num_syms = fromLevel->num_syms;
+ if (fromLevel->num_syms > 1)
+ intoLevel->u.syms = fromLevel->u.syms;
+ else
+ intoLevel->u.sym = fromLevel->u.sym;
+ fromLevel->num_syms = 0;
+ }
+ else {
+ if (report)
+ log_warn(ctx,
+ "Multiple symbols for level %d/group %u on key %s; "
+ "Using %s, ignoring %s\n",
+ i + 1, group + 1, KeyNameText(ctx, key_name),
+ (clobber ? "from" : "to"),
+ (clobber ? "to" : "from"));
+
+ if (clobber) {
+ ClearLevelInfo(intoLevel);
+ intoLevel->num_syms = fromLevel->num_syms;
+ if (fromLevel->num_syms > 1)
+ intoLevel->u.syms = fromLevel->u.syms;
+ else
+ intoLevel->u.sym = fromLevel->u.sym;
+ fromLevel->num_syms = 0;
+ }
+ }
+ }
+ /* If @from has extra levels, get them as well. */
+ for (i = levels_in_both; i < darray_size(from->levels); i++) {
+ darray_append(into->levels, darray_item(from->levels, i));
+ darray_item(from->levels, i).num_syms = 0;
+ }
+ into->defined |= (from->defined & GROUP_FIELD_ACTS);
+ into->defined |= (from->defined & GROUP_FIELD_SYMS);
+
+ return true;
+}
+
+static bool
+UseNewKeyField(enum key_field field, enum key_field old, enum key_field new,
+ bool clobber, bool report, enum key_field *collide)
+{
+ if (!(old & field))
+ return (new & field);
+
+ if (new & field) {
+ if (report)
+ *collide |= field;
+
+ if (clobber)
+ return true;
+ }
+
+ return false;
+}
+
+static bool
+MergeKeys(SymbolsInfo *info, KeyInfo *into, KeyInfo *from, bool same_file)
+{
+ xkb_layout_index_t i;
+ xkb_layout_index_t groups_in_both;
+ enum key_field collide = 0;
+ const int verbosity = xkb_context_get_log_verbosity(info->keymap->ctx);
+ const bool clobber = (from->merge != MERGE_AUGMENT);
+ const bool report = (same_file && verbosity > 0) || verbosity > 9;
+
+ if (from->merge == MERGE_REPLACE) {
+ ClearKeyInfo(into);
+ *into = *from;
+ InitKeyInfo(info->keymap->ctx, from);
+ return true;
+ }
+
+ groups_in_both = MIN(darray_size(into->groups), darray_size(from->groups));
+ for (i = 0; i < groups_in_both; i++)
+ MergeGroups(info,
+ &darray_item(into->groups, i),
+ &darray_item(from->groups, i),
+ clobber, report, i, into->name);
+ /* If @from has extra groups, just move them to @into. */
+ for (i = groups_in_both; i < darray_size(from->groups); i++) {
+ darray_append(into->groups, darray_item(from->groups, i));
+ InitGroupInfo(&darray_item(from->groups, i));
+ }
+
+ if (UseNewKeyField(KEY_FIELD_VMODMAP, into->defined, from->defined,
+ clobber, report, &collide)) {
+ into->vmodmap = from->vmodmap;
+ into->defined |= KEY_FIELD_VMODMAP;
+ }
+ if (UseNewKeyField(KEY_FIELD_REPEAT, into->defined, from->defined,
+ clobber, report, &collide)) {
+ into->repeat = from->repeat;
+ into->defined |= KEY_FIELD_REPEAT;
+ }
+ if (UseNewKeyField(KEY_FIELD_DEFAULT_TYPE, into->defined, from->defined,
+ clobber, report, &collide)) {
+ into->default_type = from->default_type;
+ into->defined |= KEY_FIELD_DEFAULT_TYPE;
+ }
+ if (UseNewKeyField(KEY_FIELD_GROUPINFO, into->defined, from->defined,
+ clobber, report, &collide)) {
+ into->out_of_range_group_action = from->out_of_range_group_action;
+ into->out_of_range_group_number = from->out_of_range_group_number;
+ into->defined |= KEY_FIELD_GROUPINFO;
+ }
+
+ if (collide)
+ log_warn(info->keymap->ctx,
+ "Symbol map for key %s redefined; "
+ "Using %s definition for conflicting fields\n",
+ KeyNameText(info->keymap->ctx, into->name),
+ (clobber ? "first" : "last"));
+
+ ClearKeyInfo(from);
+ InitKeyInfo(info->keymap->ctx, from);
+ return true;
+}
+
+static bool
+AddKeySymbols(SymbolsInfo *info, KeyInfo *keyi, bool same_file)
+{
+ xkb_atom_t real_name;
+ KeyInfo *iter;
+
+ /*
+ * Don't keep aliases in the keys array; this guarantees that
+ * searching for keys to merge with by straight comparison (see the
+ * following loop) is enough, and we won't get multiple KeyInfo's
+ * for the same key because of aliases.
+ */
+ real_name = XkbResolveKeyAlias(info->keymap, keyi->name);
+ if (real_name != XKB_ATOM_NONE)
+ keyi->name = real_name;
+
+ darray_foreach(iter, info->keys)
+ if (iter->name == keyi->name)
+ return MergeKeys(info, iter, keyi, same_file);
+
+ darray_append(info->keys, *keyi);
+ InitKeyInfo(info->keymap->ctx, keyi);
+ return true;
+}
+
+static bool
+AddModMapEntry(SymbolsInfo *info, ModMapEntry *new)
+{
+ ModMapEntry *old;
+ bool clobber = (new->merge != MERGE_AUGMENT);
+
+ darray_foreach(old, info->modMaps) {
+ xkb_mod_index_t use, ignore;
+
+ if ((new->haveSymbol != old->haveSymbol) ||
+ (new->haveSymbol && new->u.keySym != old->u.keySym) ||
+ (!new->haveSymbol && new->u.keyName != old->u.keyName))
+ continue;
+
+ if (new->modifier == old->modifier)
+ return true;
+
+ use = (clobber ? new->modifier : old->modifier);
+ ignore = (clobber ? old->modifier : new->modifier);
+
+ if (new->haveSymbol)
+ log_err(info->keymap->ctx,
+ "Symbol \"%s\" added to modifier map for multiple modifiers; "
+ "Using %s, ignoring %s\n",
+ KeysymText(info->keymap->ctx, new->u.keySym),
+ ModIndexText(info->keymap, use),
+ ModIndexText(info->keymap, ignore));
+ else
+ log_err(info->keymap->ctx,
+ "Key \"%s\" added to modifier map for multiple modifiers; "
+ "Using %s, ignoring %s\n",
+ KeyNameText(info->keymap->ctx, new->u.keyName),
+ ModIndexText(info->keymap, use),
+ ModIndexText(info->keymap, ignore));
+
+ old->modifier = use;
+ return true;
+ }
+
+ darray_append(info->modMaps, *new);
+ return true;
+}
+
+/***====================================================================***/
+
+static void
+MergeIncludedSymbols(SymbolsInfo *into, SymbolsInfo *from,
+ enum merge_mode merge)
+{
+ unsigned int i;
+ KeyInfo *keyi;
+ ModMapEntry *mm;
+ xkb_atom_t *group_name;
+ xkb_layout_index_t group_names_in_both;
+
+ if (from->errorCount > 0) {
+ into->errorCount += from->errorCount;
+ return;
+ }
+
+ if (into->name == NULL) {
+ into->name = from->name;
+ from->name = NULL;
+ }
+
+ group_names_in_both = MIN(darray_size(into->group_names),
+ darray_size(from->group_names));
+ for (i = 0; i < group_names_in_both; i++) {
+ if (!darray_item(from->group_names, i))
+ continue;
+
+ if (merge == MERGE_AUGMENT && darray_item(into->group_names, i))
+ continue;
+
+ darray_item(into->group_names, i) = darray_item(from->group_names, i);
+ }
+ /* If @from has more, get them as well. */
+ darray_foreach_from(group_name, from->group_names, group_names_in_both)
+ darray_append(into->group_names, *group_name);
+
+ darray_foreach(keyi, from->keys) {
+ keyi->merge = (merge == MERGE_DEFAULT ? keyi->merge : merge);
+ if (!AddKeySymbols(into, keyi, false))
+ into->errorCount++;
+ }
+
+ darray_foreach(mm, from->modMaps) {
+ mm->merge = (merge == MERGE_DEFAULT ? mm->merge : merge);
+ if (!AddModMapEntry(into, mm))
+ into->errorCount++;
+ }
+}
+
+static void
+HandleSymbolsFile(SymbolsInfo *info, XkbFile *file, enum merge_mode merge);
+
+static bool
+HandleIncludeSymbols(SymbolsInfo *info, IncludeStmt *include)
+{
+ SymbolsInfo included;
+
+ InitSymbolsInfo(&included, info->keymap, info->actions);
+ included.name = include->stmt;
+ include->stmt = NULL;
+
+ for (IncludeStmt *stmt = include; stmt; stmt = stmt->next_incl) {
+ SymbolsInfo next_incl;
+ XkbFile *file;
+
+ file = ProcessIncludeFile(info->keymap->ctx, stmt, FILE_TYPE_SYMBOLS);
+ if (!file) {
+ info->errorCount += 10;
+ ClearSymbolsInfo(&included);
+ return false;
+ }
+
+ InitSymbolsInfo(&next_incl, info->keymap, info->actions);
+ if (stmt->modifier) {
+ next_incl.explicit_group = atoi(stmt->modifier) - 1;
+ if (next_incl.explicit_group >= XKB_MAX_GROUPS) {
+ log_err(info->keymap->ctx,
+ "Cannot set explicit group to %d - must be between 1..%d; "
+ "Ignoring group number\n",
+ next_incl.explicit_group + 1, XKB_MAX_GROUPS);
+ next_incl.explicit_group = info->explicit_group;
+ }
+ }
+ else {
+ next_incl.explicit_group = info->explicit_group;
+ }
+
+ HandleSymbolsFile(&next_incl, file, MERGE_OVERRIDE);
+
+ MergeIncludedSymbols(&included, &next_incl, stmt->merge);
+
+ ClearSymbolsInfo(&next_incl);
+ FreeXkbFile(file);
+ }
+
+ MergeIncludedSymbols(info, &included, include->merge);
+ ClearSymbolsInfo(&included);
+
+ return (info->errorCount == 0);
+}
+
+#define SYMBOLS 1
+#define ACTIONS 2
+
+static bool
+GetGroupIndex(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx,
+ unsigned what, xkb_layout_index_t *ndx_rtrn)
+{
+ const char *name = (what == SYMBOLS ? "symbols" : "actions");
+
+ if (arrayNdx == NULL) {
+ xkb_layout_index_t i;
+ GroupInfo *groupi;
+ enum group_field field = (what == SYMBOLS ?
+ GROUP_FIELD_SYMS : GROUP_FIELD_ACTS);
+
+ darray_enumerate(i, groupi, keyi->groups) {
+ if (!(groupi->defined & field)) {
+ *ndx_rtrn = i;
+ return true;
+ }
+ }
+
+ if (i >= XKB_MAX_GROUPS) {
+ log_err(info->keymap->ctx,
+ "Too many groups of %s for key %s (max %u); "
+ "Ignoring %s defined for extra groups\n",
+ name, KeyInfoText(info, keyi), XKB_MAX_GROUPS, name);
+ return false;
+ }
+
+ darray_resize0(keyi->groups, darray_size(keyi->groups) + 1);
+ *ndx_rtrn = darray_size(keyi->groups) - 1;
+ return true;
+ }
+
+ if (!ExprResolveGroup(info->keymap->ctx, arrayNdx, ndx_rtrn)) {
+ log_err(info->keymap->ctx,
+ "Illegal group index for %s of key %s\n"
+ "Definition with non-integer array index ignored\n",
+ name, KeyInfoText(info, keyi));
+ return false;
+ }
+
+ (*ndx_rtrn)--;
+ if (*ndx_rtrn >= darray_size(keyi->groups))
+ darray_resize0(keyi->groups, *ndx_rtrn + 1);
+
+ return true;
+}
+
+bool
+LookupKeysym(const char *str, xkb_keysym_t *sym_rtrn)
+{
+ xkb_keysym_t sym;
+
+ if (!str || istreq(str, "any") || istreq(str, "nosymbol")) {
+ *sym_rtrn = XKB_KEY_NoSymbol;
+ return 1;
+ }
+
+ if (istreq(str, "none") || istreq(str, "voidsymbol")) {
+ *sym_rtrn = XKB_KEY_VoidSymbol;
+ return 1;
+ }
+
+ sym = xkb_keysym_from_name(str, 0);
+ if (sym != XKB_KEY_NoSymbol) {
+ *sym_rtrn = sym;
+ return 1;
+ }
+
+ return 0;
+}
+
+static bool
+AddSymbolsToKey(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx,
+ ExprDef *value)
+{
+ xkb_layout_index_t ndx;
+ GroupInfo *groupi;
+ xkb_level_index_t nLevels;
+ xkb_level_index_t i;
+ int j;
+
+ if (!GetGroupIndex(info, keyi, arrayNdx, SYMBOLS, &ndx))
+ return false;
+
+ groupi = &darray_item(keyi->groups, ndx);
+
+ if (value == NULL) {
+ groupi->defined |= GROUP_FIELD_SYMS;
+ return true;
+ }
+
+ if (value->op != EXPR_KEYSYM_LIST) {
+ log_err(info->keymap->ctx,
+ "Expected a list of symbols, found %s; "
+ "Ignoring symbols for group %u of %s\n",
+ expr_op_type_to_string(value->op), ndx + 1,
+ KeyInfoText(info, keyi));
+ return false;
+ }
+
+ if (groupi->defined & GROUP_FIELD_SYMS) {
+ log_err(info->keymap->ctx,
+ "Symbols for key %s, group %u already defined; "
+ "Ignoring duplicate definition\n",
+ KeyInfoText(info, keyi), ndx + 1);
+ return false;
+ }
+
+ nLevels = darray_size(value->value.list.symsMapIndex);
+ if (darray_size(groupi->levels) < nLevels)
+ darray_resize0(groupi->levels, nLevels);
+
+ groupi->defined |= GROUP_FIELD_SYMS;
+
+ for (i = 0; i < nLevels; i++) {
+ unsigned int sym_index;
+ struct xkb_level *leveli = &darray_item(groupi->levels, i);
+
+ sym_index = darray_item(value->value.list.symsMapIndex, i);
+ leveli->num_syms = darray_item(value->value.list.symsNumEntries, i);
+ if (leveli->num_syms > 1)
+ leveli->u.syms = calloc(leveli->num_syms, sizeof(*leveli->u.syms));
+
+ for (j = 0; j < leveli->num_syms; j++) {
+ char *sym_name = darray_item(value->value.list.syms,
+ sym_index + j);
+ xkb_keysym_t keysym;
+
+ if (!LookupKeysym(sym_name, &keysym)) {
+ const char *group_name = "unnamed";
+
+ if (ndx < darray_size(info->group_names) &&
+ darray_item(info->group_names, ndx))
+ group_name = xkb_atom_text(info->keymap->ctx,
+ darray_item(info->group_names,
+ ndx));
+
+ log_warn(info->keymap->ctx,
+ "Could not resolve keysym %s for key %s, group %u (%s), level %u\n",
+ sym_name, KeyInfoText(info, keyi), ndx + 1,
+ group_name, i);
+
+ ClearLevelInfo(leveli);
+ leveli->num_syms = 0;
+ break;
+ }
+
+ if (leveli->num_syms == 1) {
+ if (keysym == XKB_KEY_NoSymbol)
+ leveli->num_syms = 0;
+ else
+ leveli->u.sym = keysym;
+ }
+ else if (leveli->num_syms > 1) {
+ leveli->u.syms[j] = keysym;
+ }
+ }
+ }
+
+ return true;
+}
+
+static bool
+AddActionsToKey(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx,
+ ExprDef *value)
+{
+ unsigned int i;
+ xkb_layout_index_t ndx;
+ GroupInfo *groupi;
+ unsigned int nActs;
+ ExprDef *act;
+ union xkb_action *toAct;
+
+ if (!GetGroupIndex(info, keyi, arrayNdx, ACTIONS, &ndx))
+ return false;
+
+ groupi = &darray_item(keyi->groups, ndx);
+
+ if (value == NULL) {
+ groupi->defined |= GROUP_FIELD_ACTS;
+ return true;
+ }
+
+ if (value->op != EXPR_ACTION_LIST) {
+ log_wsgo(info->keymap->ctx,
+ "Bad expression type (%d) for action list value; "
+ "Ignoring actions for group %u of %s\n",
+ value->op, ndx, KeyInfoText(info, keyi));
+ return false;
+ }
+
+ if (groupi->defined & GROUP_FIELD_ACTS) {
+ log_wsgo(info->keymap->ctx,
+ "Actions for key %s, group %u already defined\n",
+ KeyInfoText(info, keyi), ndx);
+ return false;
+ }
+
+ nActs = 0;
+ for (act = value->value.child; act; act = (ExprDef *) act->common.next)
+ nActs++;
+
+ if (darray_size(groupi->levels) < nActs)
+ darray_resize0(groupi->levels, nActs);
+
+ groupi->defined |= GROUP_FIELD_ACTS;
+
+ act = value->value.child;
+ for (i = 0; i < nActs; i++) {
+ toAct = &darray_item(groupi->levels, i).action;
+
+ if (!HandleActionDef(act, info->keymap, toAct, info->actions))
+ log_err(info->keymap->ctx,
+ "Illegal action definition for %s; "
+ "Action for group %u/level %u ignored\n",
+ KeyInfoText(info, keyi), ndx + 1, i + 1);
+
+ act = (ExprDef *) act->common.next;
+ }
+
+ return true;
+}
+
+static const LookupEntry repeatEntries[] = {
+ { "true", KEY_REPEAT_YES },
+ { "yes", KEY_REPEAT_YES },
+ { "on", KEY_REPEAT_YES },
+ { "false", KEY_REPEAT_NO },
+ { "no", KEY_REPEAT_NO },
+ { "off", KEY_REPEAT_NO },
+ { "default", KEY_REPEAT_UNDEFINED },
+ { NULL, 0 }
+};
+
+static bool
+SetSymbolsField(SymbolsInfo *info, KeyInfo *keyi, const char *field,
+ ExprDef *arrayNdx, ExprDef *value)
+{
+ bool ok = true;
+ struct xkb_context *ctx = info->keymap->ctx;
+
+ if (istreq(field, "type")) {
+ xkb_layout_index_t ndx;
+ xkb_atom_t val;
+
+ if (!ExprResolveString(ctx, value, &val))
+ log_vrb(ctx, 1,
+ "The type field of a key symbol map must be a string; "
+ "Ignoring illegal type definition\n");
+
+ if (arrayNdx == NULL) {
+ keyi->default_type = val;
+ keyi->defined |= KEY_FIELD_DEFAULT_TYPE;
+ }
+ else if (!ExprResolveGroup(ctx, arrayNdx, &ndx)) {
+ log_err(ctx,
+ "Illegal group index for type of key %s; "
+ "Definition with non-integer array index ignored\n",
+ KeyInfoText(info, keyi));
+ return false;
+ }
+ else {
+ ndx--;
+ if (ndx >= darray_size(keyi->groups))
+ darray_resize0(keyi->groups, ndx + 1);
+ darray_item(keyi->groups, ndx).type = val;
+ darray_item(keyi->groups, ndx).defined |= GROUP_FIELD_TYPE;
+ }
+ }
+ else if (istreq(field, "symbols"))
+ return AddSymbolsToKey(info, keyi, arrayNdx, value);
+ else if (istreq(field, "actions"))
+ return AddActionsToKey(info, keyi, arrayNdx, value);
+ else if (istreq(field, "vmods") ||
+ istreq(field, "virtualmods") ||
+ istreq(field, "virtualmodifiers")) {
+ xkb_mod_mask_t mask;
+
+ ok = ExprResolveModMask(info->keymap, value, MOD_VIRT, &mask);
+ if (ok) {
+ keyi->vmodmap = mask;
+ keyi->defined |= KEY_FIELD_VMODMAP;
+ }
+ else {
+ log_err(info->keymap->ctx,
+ "Expected a virtual modifier mask, found %s; "
+ "Ignoring virtual modifiers definition for key %s\n",
+ expr_op_type_to_string(value->op),
+ KeyInfoText(info, keyi));
+ }
+ }
+ else if (istreq(field, "locking") ||
+ istreq(field, "lock") ||
+ istreq(field, "locks")) {
+ log_err(info->keymap->ctx,
+ "Key behaviors not supported; "
+ "Ignoring locking specification for key %s\n",
+ KeyInfoText(info, keyi));
+ }
+ else if (istreq(field, "radiogroup") ||
+ istreq(field, "permanentradiogroup") ||
+ istreq(field, "allownone")) {
+ log_err(info->keymap->ctx,
+ "Radio groups not supported; "
+ "Ignoring radio group specification for key %s\n",
+ KeyInfoText(info, keyi));
+ }
+ else if (istreq_prefix("overlay", field) ||
+ istreq_prefix("permanentoverlay", field)) {
+ log_err(info->keymap->ctx,
+ "Overlays not supported; "
+ "Ignoring overlay specification for key %s\n",
+ KeyInfoText(info, keyi));
+ }
+ else if (istreq(field, "repeating") ||
+ istreq(field, "repeats") ||
+ istreq(field, "repeat")) {
+ unsigned int val;
+
+ ok = ExprResolveEnum(ctx, value, &val, repeatEntries);
+ if (!ok) {
+ log_err(info->keymap->ctx,
+ "Illegal repeat setting for %s; "
+ "Non-boolean repeat setting ignored\n",
+ KeyInfoText(info, keyi));
+ return false;
+ }
+ keyi->repeat = val;
+ keyi->defined |= KEY_FIELD_REPEAT;
+ }
+ else if (istreq(field, "groupswrap") ||
+ istreq(field, "wrapgroups")) {
+ bool set;
+
+ if (!ExprResolveBoolean(ctx, value, &set)) {
+ log_err(info->keymap->ctx,
+ "Illegal groupsWrap setting for %s; "
+ "Non-boolean value ignored\n",
+ KeyInfoText(info, keyi));
+ return false;
+ }
+
+ if (set)
+ keyi->out_of_range_group_action = RANGE_WRAP;
+ else
+ keyi->out_of_range_group_action = RANGE_SATURATE;
+
+ keyi->defined |= KEY_FIELD_GROUPINFO;
+ }
+ else if (istreq(field, "groupsclamp") ||
+ istreq(field, "clampgroups")) {
+ bool set;
+
+ if (!ExprResolveBoolean(ctx, value, &set)) {
+ log_err(info->keymap->ctx,
+ "Illegal groupsClamp setting for %s; "
+ "Non-boolean value ignored\n",
+ KeyInfoText(info, keyi));
+ return false;
+ }
+
+ if (set)
+ keyi->out_of_range_group_action = RANGE_SATURATE;
+ else
+ keyi->out_of_range_group_action = RANGE_WRAP;
+
+ keyi->defined |= KEY_FIELD_GROUPINFO;
+ }
+ else if (istreq(field, "groupsredirect") ||
+ istreq(field, "redirectgroups")) {
+ xkb_layout_index_t grp;
+
+ if (!ExprResolveGroup(ctx, value, &grp)) {
+ log_err(info->keymap->ctx,
+ "Illegal group index for redirect of key %s; "
+ "Definition with non-integer group ignored\n",
+ KeyInfoText(info, keyi));
+ return false;
+ }
+
+ keyi->out_of_range_group_action = RANGE_REDIRECT;
+ keyi->out_of_range_group_number = grp - 1;
+ keyi->defined |= KEY_FIELD_GROUPINFO;
+ }
+ else {
+ log_err(info->keymap->ctx,
+ "Unknown field %s in a symbol interpretation; "
+ "Definition ignored\n",
+ field);
+ ok = false;
+ }
+
+ return ok;
+}
+
+static int
+SetGroupName(SymbolsInfo *info, ExprDef *arrayNdx, ExprDef *value)
+{
+ xkb_layout_index_t group, group_to_use;
+ xkb_atom_t name;
+
+ if (!arrayNdx) {
+ log_vrb(info->keymap->ctx, 1,
+ "You must specify an index when specifying a group name; "
+ "Group name definition without array subscript ignored\n");
+ return false;
+ }
+
+ if (!ExprResolveGroup(info->keymap->ctx, arrayNdx, &group)) {
+ log_err(info->keymap->ctx,
+ "Illegal index in group name definition; "
+ "Definition with non-integer array index ignored\n");
+ return false;
+ }
+
+ if (!ExprResolveString(info->keymap->ctx, value, &name)) {
+ log_err(info->keymap->ctx,
+ "Group name must be a string; "
+ "Illegal name for group %d ignored\n", group);
+ return false;
+ }
+
+ if (info->explicit_group == XKB_LAYOUT_INVALID) {
+ group_to_use = group - 1;
+ }
+ else if (group - 1 == 0) {
+ group_to_use = info->explicit_group;
+ }
+ else {
+ log_warn(info->keymap->ctx,
+ "An explicit group was specified for the '%s' map, "
+ "but it provides a name for a group other than Group1 (%d); "
+ "Ignoring group name '%s'\n",
+ info->name, group,
+ xkb_atom_text(info->keymap->ctx, name));
+ return false;
+ }
+
+ if (group_to_use >= darray_size(info->group_names))
+ darray_resize0(info->group_names, group_to_use + 1);
+ darray_item(info->group_names, group_to_use) = name;
+
+ return true;
+}
+
+static int
+HandleGlobalVar(SymbolsInfo *info, VarDef *stmt)
+{
+ const char *elem, *field;
+ ExprDef *arrayNdx;
+ bool ret;
+
+ if (ExprResolveLhs(info->keymap->ctx, stmt->name, &elem, &field,
+ &arrayNdx) == 0)
+ return 0; /* internal error, already reported */
+ if (elem && istreq(elem, "key")) {
+ ret = SetSymbolsField(info, &info->default_key, field, arrayNdx,
+ stmt->value);
+ }
+ else if (!elem && (istreq(field, "name") ||
+ istreq(field, "groupname"))) {
+ ret = SetGroupName(info, arrayNdx, stmt->value);
+ }
+ else if (!elem && (istreq(field, "groupswrap") ||
+ istreq(field, "wrapgroups"))) {
+ log_err(info->keymap->ctx,
+ "Global \"groupswrap\" not supported; Ignored\n");
+ ret = true;
+ }
+ else if (!elem && (istreq(field, "groupsclamp") ||
+ istreq(field, "clampgroups"))) {
+ log_err(info->keymap->ctx,
+ "Global \"groupsclamp\" not supported; Ignored\n");
+ ret = true;
+ }
+ else if (!elem && (istreq(field, "groupsredirect") ||
+ istreq(field, "redirectgroups"))) {
+ log_err(info->keymap->ctx,
+ "Global \"groupsredirect\" not supported; Ignored\n");
+ ret = true;
+ }
+ else if (!elem && istreq(field, "allownone")) {
+ log_err(info->keymap->ctx,
+ "Radio groups not supported; "
+ "Ignoring \"allownone\" specification\n");
+ ret = true;
+ }
+ else {
+ ret = SetActionField(info->keymap, elem, field, arrayNdx, stmt->value,
+ info->actions);
+ }
+
+ return ret;
+}
+
+static bool
+HandleSymbolsBody(SymbolsInfo *info, VarDef *def, KeyInfo *keyi)
+{
+ bool ok = true;
+ const char *elem, *field;
+ ExprDef *arrayNdx;
+
+ for (; def; def = (VarDef *) def->common.next) {
+ if (def->name && def->name->op == EXPR_FIELD_REF) {
+ log_err(info->keymap->ctx,
+ "Cannot set a global default value from within a key statement; "
+ "Move statements to the global file scope\n");
+ continue;
+ }
+
+ if (!def->name) {
+ if (!def->value || def->value->op == EXPR_KEYSYM_LIST)
+ field = "symbols";
+ else
+ field = "actions";
+ arrayNdx = NULL;
+ }
+ else {
+ ok = ExprResolveLhs(info->keymap->ctx, def->name, &elem, &field,
+ &arrayNdx);
+ }
+
+ if (ok)
+ ok = SetSymbolsField(info, keyi, field, arrayNdx, def->value);
+ }
+
+ return ok;
+}
+
+static bool
+SetExplicitGroup(SymbolsInfo *info, KeyInfo *keyi)
+{
+ xkb_layout_index_t i;
+ GroupInfo *groupi;
+ bool warn = false;
+
+ if (info->explicit_group == XKB_LAYOUT_INVALID)
+ return true;
+
+ darray_enumerate_from(i, groupi, keyi->groups, 1) {
+ if (groupi->defined) {
+ warn = true;
+ ClearGroupInfo(groupi);
+ InitGroupInfo(groupi);
+ }
+ }
+
+ if (warn)
+ log_warn(info->keymap->ctx,
+ "For the map %s an explicit group specified, "
+ "but key %s has more than one group defined; "
+ "All groups except first one will be ignored\n",
+ info->name, KeyInfoText(info, keyi));
+
+ darray_resize0(keyi->groups, info->explicit_group + 1);
+ if (info->explicit_group > 0) {
+ darray_item(keyi->groups, info->explicit_group) =
+ darray_item(keyi->groups, 0);
+ InitGroupInfo(&darray_item(keyi->groups, 0));
+ }
+
+ return true;
+}
+
+static int
+HandleSymbolsDef(SymbolsInfo *info, SymbolsDef *stmt)
+{
+ KeyInfo keyi;
+ xkb_layout_index_t i;
+
+ keyi = info->default_key;
+ darray_init(keyi.groups);
+ darray_copy(keyi.groups, info->default_key.groups);
+ for (i = 0; i < darray_size(keyi.groups); i++)
+ CopyGroupInfo(&darray_item(keyi.groups, i),
+ &darray_item(info->default_key.groups, i));
+ keyi.merge = stmt->merge;
+ keyi.name = stmt->keyName;
+
+ if (!HandleSymbolsBody(info, (VarDef *) stmt->symbols, &keyi)) {
+ info->errorCount++;
+ return false;
+ }
+
+ if (!SetExplicitGroup(info, &keyi)) {
+ info->errorCount++;
+ return false;
+ }
+
+ if (!AddKeySymbols(info, &keyi, true)) {
+ info->errorCount++;
+ return false;
+ }
+
+ return true;
+}
+
+static bool
+HandleModMapDef(SymbolsInfo *info, ModMapDef *def)
+{
+ ExprDef *key;
+ ModMapEntry tmp;
+ xkb_mod_index_t ndx;
+ bool ok;
+ struct xkb_context *ctx = info->keymap->ctx;
+
+ ndx = ModNameToIndex(info->keymap, def->modifier, MOD_REAL);
+ if (ndx == XKB_MOD_INVALID) {
+ log_err(info->keymap->ctx,
+ "Illegal modifier map definition; "
+ "Ignoring map for non-modifier \"%s\"\n",
+ xkb_atom_text(ctx, def->modifier));
+ return false;
+ }
+
+ ok = true;
+ tmp.modifier = ndx;
+
+ for (key = def->keys; key != NULL; key = (ExprDef *) key->common.next) {
+ xkb_keysym_t sym;
+
+ if (key->op == EXPR_VALUE && key->value_type == EXPR_TYPE_KEYNAME) {
+ tmp.haveSymbol = false;
+ tmp.u.keyName = key->value.keyName;
+ }
+ else if (ExprResolveKeySym(ctx, key, &sym)) {
+ tmp.haveSymbol = true;
+ tmp.u.keySym = sym;
+ }
+ else {
+ log_err(info->keymap->ctx,
+ "Modmap entries may contain only key names or keysyms; "
+ "Illegal definition for %s modifier ignored\n",
+ ModIndexText(info->keymap, tmp.modifier));
+ continue;
+ }
+
+ ok = AddModMapEntry(info, &tmp) && ok;
+ }
+ return ok;
+}
+
+static void
+HandleSymbolsFile(SymbolsInfo *info, XkbFile *file, enum merge_mode merge)
+{
+ bool ok;
+
+ free(info->name);
+ info->name = strdup_safe(file->name);
+
+ for (ParseCommon *stmt = file->defs; stmt; stmt = stmt->next) {
+ switch (stmt->type) {
+ case STMT_INCLUDE:
+ ok = HandleIncludeSymbols(info, (IncludeStmt *) stmt);
+ break;
+ case STMT_SYMBOLS:
+ ok = HandleSymbolsDef(info, (SymbolsDef *) stmt);
+ break;
+ case STMT_VAR:
+ ok = HandleGlobalVar(info, (VarDef *) stmt);
+ break;
+ case STMT_VMOD:
+ ok = HandleVModDef(info->keymap, (VModDef *) stmt);
+ break;
+ case STMT_MODMAP:
+ ok = HandleModMapDef(info, (ModMapDef *) stmt);
+ break;
+ default:
+ log_err(info->keymap->ctx,
+ "Interpretation files may not include other types; "
+ "Ignoring %s\n", stmt_type_to_string(stmt->type));
+ ok = false;
+ break;
+ }
+
+ if (!ok)
+ info->errorCount++;
+
+ if (info->errorCount > 10) {
+ log_err(info->keymap->ctx, "Abandoning symbols file \"%s\"\n",
+ file->topName);
+ break;
+ }
+ }
+}
+
+/**
+ * Given a keysym @sym, return a key which generates it, or NULL.
+ * This is used for example in a modifier map definition, such as:
+ * modifier_map Lock { Caps_Lock };
+ * where we want to add the Lock modifier to the modmap of the key
+ * which matches the keysym Caps_Lock.
+ * Since there can be many keys which generates the keysym, the key
+ * is chosen first by lowest group in which the keysym appears, than
+ * by lowest level and than by lowest key code.
+ */
+static struct xkb_key *
+FindKeyForSymbol(struct xkb_keymap *keymap, xkb_keysym_t sym)
+{
+ struct xkb_key *key, *ret = NULL;
+ xkb_layout_index_t group, min_group = UINT32_MAX;
+ xkb_level_index_t level, min_level = UINT16_MAX;
+
+ xkb_foreach_key(key, keymap) {
+ for (group = 0; group < key->num_groups; group++) {
+ for (level = 0; level < XkbKeyGroupWidth(key, group); level++) {
+ if (key->groups[group].levels[level].num_syms != 1 ||
+ key->groups[group].levels[level].u.sym != sym)
+ continue;
+
+ /*
+ * If the keysym was found in a group or level > 0, we must
+ * keep looking since we might find a key in which the keysym
+ * is in a lower group or level.
+ */
+ if (group < min_group ||
+ (group == min_group && level < min_level)) {
+ ret = key;
+ if (group == 0 && level == 0) {
+ return ret;
+ }
+ else {
+ min_group = group;
+ min_level = level;
+ }
+ }
+ }
+ }
+ }
+
+ return ret;
+}
+
+/*
+ * Find an appropriate type for a group and return its name.
+ *
+ * Simple recipe:
+ * - ONE_LEVEL for width 0/1
+ * - ALPHABETIC for 2 shift levels, with lower/upercase keysyms
+ * - KEYPAD for keypad keys.
+ * - TWO_LEVEL for other 2 shift level keys.
+ * and the same for four level keys.
+ *
+ * FIXME: Decide how to handle multiple-syms-per-level, and do it.
+ */
+static xkb_atom_t
+FindAutomaticType(struct xkb_context *ctx, GroupInfo *groupi)
+{
+ xkb_keysym_t sym0, sym1, sym2, sym3;
+ xkb_level_index_t width = darray_size(groupi->levels);
+
+#define GET_SYM(level) \
+ (darray_item(groupi->levels, level).num_syms == 0 ? \
+ XKB_KEY_NoSymbol : \
+ darray_item(groupi->levels, level).num_syms == 1 ? \
+ darray_item(groupi->levels, level).u.sym : \
+ /* num_syms > 1 */ \
+ darray_item(groupi->levels, level).u.syms[0])
+
+ if (width == 1 || width <= 0)
+ return xkb_atom_intern(ctx, "ONE_LEVEL");
+
+ sym0 = GET_SYM(0);
+ sym1 = GET_SYM(1);
+
+ if (width == 2) {
+ if (xkb_keysym_is_lower(sym0) && xkb_keysym_is_upper(sym1))
+ return xkb_atom_intern(ctx, "ALPHABETIC");
+
+ if (xkb_keysym_is_keypad(sym0) || xkb_keysym_is_keypad(sym1))
+ return xkb_atom_intern(ctx, "KEYPAD");
+
+ return xkb_atom_intern(ctx, "TWO_LEVEL");
+ }
+
+ if (width <= 4) {
+ if (xkb_keysym_is_lower(sym0) && xkb_keysym_is_upper(sym1)) {
+ sym2 = GET_SYM(2);
+ sym3 = (width == 4 ? GET_SYM(3) : XKB_KEY_NoSymbol);
+
+ if (xkb_keysym_is_lower(sym2) && xkb_keysym_is_upper(sym3))
+ return xkb_atom_intern(ctx, "FOUR_LEVEL_ALPHABETIC");
+
+ return xkb_atom_intern(ctx, "FOUR_LEVEL_SEMIALPHABETIC");
+ }
+
+ if (xkb_keysym_is_keypad(sym0) || xkb_keysym_is_keypad(sym1))
+ return xkb_atom_intern(ctx, "FOUR_LEVEL_KEYPAD");
+
+ return xkb_atom_intern(ctx, "FOUR_LEVEL");
+ }
+
+ return XKB_ATOM_NONE;
+
+#undef GET_SYM
+}
+
+static const struct xkb_key_type *
+FindTypeForGroup(struct xkb_keymap *keymap, KeyInfo *keyi,
+ xkb_layout_index_t group, bool *explicit_type)
+{
+ unsigned int i;
+ GroupInfo *groupi = &darray_item(keyi->groups, group);
+ xkb_atom_t type_name = groupi->type;
+
+ *explicit_type = true;
+
+ if (type_name == XKB_ATOM_NONE) {
+ if (keyi->default_type != XKB_ATOM_NONE) {
+ type_name = keyi->default_type;
+ }
+ else {
+ type_name = FindAutomaticType(keymap->ctx, groupi);
+ if (type_name != XKB_ATOM_NONE)
+ *explicit_type = false;
+ }
+ }
+
+ if (type_name == XKB_ATOM_NONE) {
+ log_warn(keymap->ctx,
+ "Couldn't find an automatic type for key '%s' group %d with %lu levels; "
+ "Using the default type\n",
+ KeyNameText(keymap->ctx, keyi->name), group + 1,
+ (unsigned long) darray_size(groupi->levels));
+ goto use_default;
+ }
+
+ for (i = 0; i < keymap->num_types; i++)
+ if (keymap->types[i].name == type_name)
+ break;
+
+ if (i >= keymap->num_types) {
+ log_warn(keymap->ctx,
+ "The type \"%s\" for key '%s' group %d was not previously defined; "
+ "Using the default type\n",
+ xkb_atom_text(keymap->ctx, type_name),
+ KeyNameText(keymap->ctx, keyi->name), group + 1);
+ goto use_default;
+ }
+
+ return &keymap->types[i];
+
+use_default:
+ /*
+ * Index 0 is guaranteed to contain something, usually
+ * ONE_LEVEL or at least some default one-level type.
+ */
+ return &keymap->types[0];
+}
+
+static bool
+CopySymbolsDef(SymbolsInfo *info, KeyInfo *keyi)
+{
+ struct xkb_keymap *keymap = info->keymap;
+ struct xkb_key *key;
+ GroupInfo *groupi;
+ const GroupInfo *group0;
+ xkb_layout_index_t i;
+
+ /*
+ * The name is guaranteed to be real and not an alias (see
+ * AddKeySymbols), so 'false' is safe here.
+ */
+ key = XkbKeyByName(keymap, keyi->name, false);
+ if (!key) {
+ log_vrb(info->keymap->ctx, 5,
+ "Key %s not found in keycodes; Symbols ignored\n",
+ KeyInfoText(info, keyi));
+ return false;
+ }
+
+ /* Find the range of groups we need. */
+ key->num_groups = 0;
+ darray_enumerate(i, groupi, keyi->groups)
+ if (groupi->defined)
+ key->num_groups = i + 1;
+
+ if (key->num_groups <= 0)
+ return false; /* WSGO */
+
+ darray_resize(keyi->groups, key->num_groups);
+
+ /*
+ * If there are empty groups between non-empty ones, fill them with data
+ * from the first group.
+ * We can make a wrong assumption here. But leaving gaps is worse.
+ */
+ group0 = &darray_item(keyi->groups, 0);
+ darray_foreach_from(groupi, keyi->groups, 1) {
+ if (groupi->defined)
+ continue;
+
+ CopyGroupInfo(groupi, group0);
+ }
+
+ key->groups = calloc(key->num_groups, sizeof(*key->groups));
+
+ /* Find and assign the groups' types in the keymap. */
+ darray_enumerate(i, groupi, keyi->groups) {
+ const struct xkb_key_type *type;
+ bool explicit_type;
+
+ type = FindTypeForGroup(keymap, keyi, i, &explicit_type);
+
+ /* Always have as many levels as the type specifies. */
+ if (type->num_levels < darray_size(groupi->levels)) {
+ struct xkb_level *leveli;
+
+ log_vrb(info->keymap->ctx, 1,
+ "Type \"%s\" has %d levels, but %s has %d levels; "
+ "Ignoring extra symbols\n",
+ xkb_atom_text(keymap->ctx, type->name), type->num_levels,
+ KeyInfoText(info, keyi),
+ (int) darray_size(groupi->levels));
+
+ darray_foreach_from(leveli, groupi->levels, type->num_levels)
+ ClearLevelInfo(leveli);
+ }
+ darray_resize0(groupi->levels, type->num_levels);
+
+ key->groups[i].explicit_type = explicit_type;
+ key->groups[i].type = type;
+ }
+
+ /* Copy levels. */
+ darray_enumerate(i, groupi, keyi->groups) {
+ key->groups[i].levels = darray_mem(groupi->levels, 0);
+ darray_init(groupi->levels);
+ }
+
+ key->out_of_range_group_number = keyi->out_of_range_group_number;
+ key->out_of_range_group_action = keyi->out_of_range_group_action;
+
+ if (keyi->defined & KEY_FIELD_VMODMAP) {
+ key->vmodmap = keyi->vmodmap;
+ key->explicit |= EXPLICIT_VMODMAP;
+ }
+
+ if (keyi->repeat != KEY_REPEAT_UNDEFINED) {
+ key->repeats = (keyi->repeat == KEY_REPEAT_YES);
+ key->explicit |= EXPLICIT_REPEAT;
+ }
+
+ darray_foreach(groupi, keyi->groups) {
+ if (groupi->defined & GROUP_FIELD_ACTS) {
+ key->explicit |= EXPLICIT_INTERP;
+ break;
+ }
+ }
+
+ return true;
+}
+
+static bool
+CopyModMapDef(SymbolsInfo *info, ModMapEntry *entry)
+{
+ struct xkb_key *key;
+ struct xkb_keymap *keymap = info->keymap;
+
+ if (!entry->haveSymbol) {
+ key = XkbKeyByName(keymap, entry->u.keyName, true);
+ if (!key) {
+ log_vrb(info->keymap->ctx, 5,
+ "Key %s not found in keycodes; "
+ "Modifier map entry for %s not updated\n",
+ KeyNameText(keymap->ctx, entry->u.keyName),
+ ModIndexText(info->keymap, entry->modifier));
+ return false;
+ }
+ }
+ else {
+ key = FindKeyForSymbol(keymap, entry->u.keySym);
+ if (!key) {
+ log_vrb(info->keymap->ctx, 5,
+ "Key \"%s\" not found in symbol map; "
+ "Modifier map entry for %s not updated\n",
+ KeysymText(info->keymap->ctx, entry->u.keySym),
+ ModIndexText(info->keymap, entry->modifier));
+ return false;
+ }
+ }
+
+ key->modmap |= (1 << entry->modifier);
+ return true;
+}
+
+static bool
+CopySymbolsToKeymap(struct xkb_keymap *keymap, SymbolsInfo *info)
+{
+ KeyInfo *keyi;
+ ModMapEntry *mm;
+ struct xkb_key *key;
+
+ keymap->symbols_section_name = strdup_safe(info->name);
+
+ keymap->num_group_names = darray_size(info->group_names);
+ keymap->group_names = darray_mem(info->group_names, 0);
+ darray_init(info->group_names);
+
+ darray_foreach(keyi, info->keys)
+ if (!CopySymbolsDef(info, keyi))
+ info->errorCount++;
+
+ if (xkb_context_get_log_verbosity(keymap->ctx) > 3) {
+ xkb_foreach_key(key, keymap) {
+ if (key->name == XKB_ATOM_NONE)
+ continue;
+
+ if (key->num_groups < 1)
+ log_info(keymap->ctx,
+ "No symbols defined for %s\n",
+ KeyNameText(keymap->ctx, key->name));
+ }
+ }
+
+ darray_foreach(mm, info->modMaps)
+ if (!CopyModMapDef(info, mm))
+ info->errorCount++;
+
+ /* XXX: If we don't ignore errorCount, things break. */
+ return true;
+}
+
+bool
+CompileSymbols(XkbFile *file, struct xkb_keymap *keymap,
+ enum merge_mode merge)
+{
+ SymbolsInfo info;
+ ActionsInfo *actions;
+
+ actions = NewActionsInfo();
+ if (!actions)
+ return false;
+
+ InitSymbolsInfo(&info, keymap, actions);
+ info.default_key.merge = merge;
+
+ HandleSymbolsFile(&info, file, merge);
+
+ if (darray_empty(info.keys))
+ goto err_info;
+
+ if (info.errorCount != 0)
+ goto err_info;
+
+ if (!CopySymbolsToKeymap(keymap, &info))
+ goto err_info;
+
+ ClearSymbolsInfo(&info);
+ FreeActionsInfo(actions);
+ return true;
+
+err_info:
+ FreeActionsInfo(actions);
+ ClearSymbolsInfo(&info);
+ return false;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/types.c b/src/3rdparty/xkbcommon/src/xkbcomp/types.c
new file mode 100644
index 0000000000..1eb1b73205
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/types.c
@@ -0,0 +1,842 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#include "xkbcomp-priv.h"
+#include "text.h"
+#include "vmod.h"
+#include "expr.h"
+#include "include.h"
+
+/*
+ * The xkb_types section
+ * =====================
+ * This section is the second to be processesed, after xkb_keycodes.
+ * However, it is completely independent and could have been the first
+ * to be processed (it does not refer to specific keys as specified in
+ * the xkb_keycodes section).
+ *
+ * This section defines key types, which, given a key and a keyboard
+ * state (i.e. modifier state and group), determine the shift level to
+ * be used in translating the key to keysyms. These types are assigned
+ * to each group in each key, in the xkb_symbols section.
+ *
+ * Key types are called this way because, in a way, they really describe
+ * the "type" of the key (or more correctly, a specific group of the
+ * key). For example, an ordinary keymap will provide a type called
+ * "KEYPAD", which consists of two levels, with the second level being
+ * chosen according to the state of the Num Lock (or Shift) modifiers.
+ * Another example is a type called "ONE_LEVEL", which is usually
+ * assigned to keys such as Escape; these have just one level and are
+ * not affected by the modifier state. Yet more common examples are
+ * "TWO_LEVEL" (with Shift choosing the second level), "ALPHABETIC"
+ * (where Caps Lock may also choose the second level), etc.
+ *
+ * Type definitions
+ * ----------------
+ * Statements of the form:
+ * type "FOUR_LEVEL" { ... }
+ *
+ * The above would create a new type named "FOUR_LEVEL".
+ * The body of the definition may include statements of the following
+ * forms:
+ *
+ * - level_name statements (mandatory for each level in the type):
+ * level_name[Level1] = "Base";
+ *
+ * Gives each level in this type a descriptive name. It isn't used
+ * for any thing.
+ * Note: A level may be specified as Level[1-8] or just a number (can
+ * be more than 8).
+ *
+ * - modifiers statement (mandatory, should be specified only once):
+ * modifiers = Shift+Lock+LevelThree;
+ *
+ * A mask of real and virtual modifiers. These are the only modifiers
+ * being considered when matching the modifier state against the type.
+ * The other modifiers, whether active or not, are masked out in the
+ * calculation.
+ *
+ * - map entry statements (should have at least as many mappings as there
+ * are levels in the type):
+ * map[Shift+LevelThree] = Level4;
+ *
+ * If the active modifiers, masked with the type's modifiers (as stated
+ * above), match (i.e. equal) the modifiers inside the map[] statement,
+ * then the level in the right hand side is chosen. For example, in the
+ * above, if in the current keyboard state the Shift and LevelThree
+ * modifiers are active, while the Lock modifier is not, then the
+ * keysym(s) in the 4th level of the group will be returned to the
+ * user.
+ *
+ * - preserve statements:
+ * map[Shift+Lock+LevelThree] = Level5;
+ * preserve[Shift+Lock+LevelThree] = Lock;
+ *
+ * When a map entry matches the active modifiers and the level it
+ * specified is chosen, then these modifiers are said to be "consumed";
+ * for example, in a simple US keymap where the "g" key is assigned an
+ * ordinary ALPHABETIC key type, if the Lock (Caps Lock) modifier is
+ * active and the key is pressed, then a "G" keysym is produced (as
+ * opposed to lower-case "g"). This is because the type definition has
+ * a map entry like the following:
+ * map[Lock] = Level2;
+ * And as such the Lock modifier is consumed. This information is
+ * relevant for applications which further process the modifiers,
+ * since by then the consumed modifiers have already "done their part"
+ * and should be masked out.
+ *
+ * However, sometimes even if a modifier is actually used to choose
+ * the shift level (as Lock above), it should *not* be reported as
+ * consumed, for various reasons. In this case, a preserve[] statement
+ * can be used to augment the map entry. The modifiers inside the square
+ * brackets should match one of the map[] statements in the type. The
+ * right hand side should consists of modifiers from the left hand
+ * side; these modifiers are then "preserved" and not reported as
+ * consumed.
+ *
+ * Virtual modifier statements
+ * ---------------------------
+ * Statements of the form:
+ * virtual_modifiers LControl;
+ *
+ * Can appear in the xkb_types, xkb_compat, xkb_symbols sections.
+ * TODO
+ *
+ * Effect on keymap
+ * ----------------
+ * After all of the xkb_types sections have been compiled, the following
+ * members of struct xkb_keymap are finalized:
+ * struct xkb_key_type *types;
+ * unsigned int num_types;
+ * char *types_section_name;
+ * TODO: virtual modifiers.
+ */
+
+enum type_field {
+ TYPE_FIELD_MASK = (1 << 0),
+ TYPE_FIELD_MAP = (1 << 1),
+ TYPE_FIELD_PRESERVE = (1 << 2),
+ TYPE_FIELD_LEVEL_NAME = (1 << 3),
+};
+
+typedef struct {
+ enum type_field defined;
+ enum merge_mode merge;
+
+ xkb_atom_t name;
+ xkb_mod_mask_t mods;
+ xkb_level_index_t num_levels;
+ darray(struct xkb_key_type_entry) entries;
+ darray(xkb_atom_t) level_names;
+} KeyTypeInfo;
+
+typedef struct {
+ char *name;
+ int errorCount;
+
+ darray(KeyTypeInfo) types;
+ struct xkb_keymap *keymap;
+} KeyTypesInfo;
+
+/***====================================================================***/
+
+static inline const char *
+MapEntryTxt(KeyTypesInfo *info, struct xkb_key_type_entry *entry)
+{
+ return ModMaskText(info->keymap, entry->mods.mods);
+}
+
+static inline const char *
+TypeTxt(KeyTypesInfo *info, KeyTypeInfo *type)
+{
+ return xkb_atom_text(info->keymap->ctx, type->name);
+}
+
+static inline const char *
+TypeMaskTxt(KeyTypesInfo *info, KeyTypeInfo *type)
+{
+ return ModMaskText(info->keymap, type->mods);
+}
+
+static inline bool
+ReportTypeShouldBeArray(KeyTypesInfo *info, KeyTypeInfo *type,
+ const char *field)
+{
+ return ReportShouldBeArray(info->keymap->ctx, "key type", field,
+ TypeTxt(info, type));
+}
+
+static inline bool
+ReportTypeBadType(KeyTypesInfo *info, KeyTypeInfo *type,
+ const char *field, const char *wanted)
+{
+ return ReportBadType(info->keymap->ctx, "key type", field,
+ TypeTxt(info, type), wanted);
+}
+
+static inline bool
+ReportTypeBadWidth(KeyTypesInfo *info, const char *type, int has, int needs)
+{
+ log_err(info->keymap->ctx,
+ "Key type \"%s\" has %d levels, must have %d; "
+ "Illegal type definition ignored\n",
+ type, has, needs);
+ return false;
+}
+
+/***====================================================================***/
+
+static void
+InitKeyTypesInfo(KeyTypesInfo *info, struct xkb_keymap *keymap)
+{
+ memset(info, 0, sizeof(*info));
+ info->keymap = keymap;
+}
+
+static void
+ClearKeyTypeInfo(KeyTypeInfo *type)
+{
+ darray_free(type->entries);
+ darray_free(type->level_names);
+}
+
+static void
+ClearKeyTypesInfo(KeyTypesInfo *info)
+{
+ free(info->name);
+ darray_free(info->types);
+}
+
+static KeyTypeInfo *
+FindMatchingKeyType(KeyTypesInfo *info, xkb_atom_t name)
+{
+ KeyTypeInfo *old;
+
+ darray_foreach(old, info->types)
+ if (old->name == name)
+ return old;
+
+ return NULL;
+}
+
+static bool
+AddKeyType(KeyTypesInfo *info, KeyTypeInfo *new, bool same_file)
+{
+ KeyTypeInfo *old;
+ const int verbosity = xkb_context_get_log_verbosity(info->keymap->ctx);
+
+ old = FindMatchingKeyType(info, new->name);
+ if (old) {
+ if (new->merge == MERGE_REPLACE || new->merge == MERGE_OVERRIDE) {
+ if ((same_file && verbosity > 0) || verbosity > 9) {
+ log_warn(info->keymap->ctx,
+ "Multiple definitions of the %s key type; "
+ "Earlier definition ignored\n",
+ xkb_atom_text(info->keymap->ctx, new->name));
+ }
+
+ ClearKeyTypeInfo(old);
+ *old = *new;
+ darray_init(new->entries);
+ darray_init(new->level_names);
+ return true;
+ }
+
+ if (same_file)
+ log_vrb(info->keymap->ctx, 4,
+ "Multiple definitions of the %s key type; "
+ "Later definition ignored\n",
+ xkb_atom_text(info->keymap->ctx, new->name));
+
+ ClearKeyTypeInfo(new);
+ return true;
+ }
+
+ darray_append(info->types, *new);
+ return true;
+}
+
+/***====================================================================***/
+
+static void
+MergeIncludedKeyTypes(KeyTypesInfo *into, KeyTypesInfo *from,
+ enum merge_mode merge)
+{
+ KeyTypeInfo *type;
+
+ if (from->errorCount > 0) {
+ into->errorCount += from->errorCount;
+ return;
+ }
+
+ if (into->name == NULL) {
+ into->name = from->name;
+ from->name = NULL;
+ }
+
+ darray_foreach(type, from->types) {
+ type->merge = (merge == MERGE_DEFAULT ? type->merge : merge);
+ if (!AddKeyType(into, type, false))
+ into->errorCount++;
+ }
+}
+
+static void
+HandleKeyTypesFile(KeyTypesInfo *info, XkbFile *file, enum merge_mode merge);
+
+static bool
+HandleIncludeKeyTypes(KeyTypesInfo *info, IncludeStmt *include)
+{
+ KeyTypesInfo included;
+
+ InitKeyTypesInfo(&included, info->keymap);
+ included.name = include->stmt;
+ include->stmt = NULL;
+
+ for (IncludeStmt *stmt = include; stmt; stmt = stmt->next_incl) {
+ KeyTypesInfo next_incl;
+ XkbFile *file;
+
+ file = ProcessIncludeFile(info->keymap->ctx, stmt, FILE_TYPE_TYPES);
+ if (!file) {
+ info->errorCount += 10;
+ ClearKeyTypesInfo(&included);
+ return false;
+ }
+
+ InitKeyTypesInfo(&next_incl, info->keymap);
+
+ HandleKeyTypesFile(&next_incl, file, stmt->merge);
+
+ MergeIncludedKeyTypes(&included, &next_incl, stmt->merge);
+
+ ClearKeyTypesInfo(&next_incl);
+ FreeXkbFile(file);
+ }
+
+ MergeIncludedKeyTypes(info, &included, include->merge);
+ ClearKeyTypesInfo(&included);
+
+ return (info->errorCount == 0);
+}
+
+/***====================================================================***/
+
+static bool
+SetModifiers(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx,
+ ExprDef *value)
+{
+ xkb_mod_mask_t mods;
+
+ if (arrayNdx)
+ log_warn(info->keymap->ctx,
+ "The modifiers field of a key type is not an array; "
+ "Illegal array subscript ignored\n");
+
+ if (!ExprResolveModMask(info->keymap, value, MOD_BOTH, &mods)) {
+ log_err(info->keymap->ctx,
+ "Key type mask field must be a modifier mask; "
+ "Key type definition ignored\n");
+ return false;
+ }
+
+ if (type->defined & TYPE_FIELD_MASK) {
+ log_warn(info->keymap->ctx,
+ "Multiple modifier mask definitions for key type %s; "
+ "Using %s, ignoring %s\n",
+ xkb_atom_text(info->keymap->ctx, type->name),
+ TypeMaskTxt(info, type),
+ ModMaskText(info->keymap, mods));
+ return false;
+ }
+
+ type->mods = mods;
+ return true;
+}
+
+/***====================================================================***/
+
+static struct xkb_key_type_entry *
+FindMatchingMapEntry(KeyTypeInfo *type, xkb_mod_mask_t mods)
+{
+ struct xkb_key_type_entry *entry;
+
+ darray_foreach(entry, type->entries)
+ if (entry->mods.mods == mods)
+ return entry;
+
+ return NULL;
+}
+
+static bool
+AddMapEntry(KeyTypesInfo *info, KeyTypeInfo *type,
+ struct xkb_key_type_entry *new, bool clobber, bool report)
+{
+ struct xkb_key_type_entry *old;
+
+ old = FindMatchingMapEntry(type, new->mods.mods);
+ if (old) {
+ if (report && old->level != new->level) {
+ log_warn(info->keymap->ctx,
+ "Multiple map entries for %s in %s; "
+ "Using %d, ignoring %d\n",
+ MapEntryTxt(info, new), TypeTxt(info, type),
+ (clobber ? new->level : old->level) + 1,
+ (clobber ? old->level : new->level) + 1);
+ }
+ else {
+ log_vrb(info->keymap->ctx, 10,
+ "Multiple occurrences of map[%s]= %d in %s; Ignored\n",
+ MapEntryTxt(info, new), new->level + 1,
+ TypeTxt(info, type));
+ return true;
+ }
+
+ if (clobber) {
+ if (new->level >= type->num_levels)
+ type->num_levels = new->level + 1;
+ old->level = new->level;
+ }
+
+ return true;
+ }
+
+ if (new->level >= type->num_levels)
+ type->num_levels = new->level + 1;
+
+ darray_append(type->entries, *new);
+ return true;
+}
+
+static bool
+SetMapEntry(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx,
+ ExprDef *value)
+{
+ struct xkb_key_type_entry entry;
+
+ if (arrayNdx == NULL)
+ return ReportTypeShouldBeArray(info, type, "map entry");
+
+ if (!ExprResolveModMask(info->keymap, arrayNdx, MOD_BOTH, &entry.mods.mods))
+ return ReportTypeBadType(info, type, "map entry", "modifier mask");
+
+ if (entry.mods.mods & (~type->mods)) {
+ log_vrb(info->keymap->ctx, 1,
+ "Map entry for unused modifiers in %s; "
+ "Using %s instead of %s\n",
+ TypeTxt(info, type),
+ ModMaskText(info->keymap, entry.mods.mods & type->mods),
+ MapEntryTxt(info, &entry));
+ entry.mods.mods &= type->mods;
+ }
+
+ if (!ExprResolveLevel(info->keymap->ctx, value, &entry.level)) {
+ log_err(info->keymap->ctx,
+ "Level specifications in a key type must be integer; "
+ "Ignoring malformed level specification\n");
+ return false;
+ }
+
+ entry.preserve.mods = 0;
+
+ return AddMapEntry(info, type, &entry, true, true);
+}
+
+/***====================================================================***/
+
+static bool
+AddPreserve(KeyTypesInfo *info, KeyTypeInfo *type,
+ xkb_mod_mask_t mods, xkb_mod_mask_t preserve_mods)
+{
+ struct xkb_key_type_entry *entry;
+ struct xkb_key_type_entry new;
+
+ darray_foreach(entry, type->entries) {
+ if (entry->mods.mods != mods)
+ continue;
+
+ /* Map exists without previous preserve (or "None"); override. */
+ if (entry->preserve.mods == 0) {
+ entry->preserve.mods = preserve_mods;
+ return true;
+ }
+
+ /* Map exists with same preserve; do nothing. */
+ if (entry->preserve.mods == preserve_mods) {
+ log_vrb(info->keymap->ctx, 10,
+ "Identical definitions for preserve[%s] in %s; "
+ "Ignored\n",
+ ModMaskText(info->keymap, mods),
+ TypeTxt(info, type));
+ return true;
+ }
+
+ /* Map exists with different preserve; latter wins. */
+ log_vrb(info->keymap->ctx, 1,
+ "Multiple definitions for preserve[%s] in %s; "
+ "Using %s, ignoring %s\n",
+ ModMaskText(info->keymap, mods),
+ TypeTxt(info, type),
+ ModMaskText(info->keymap, preserve_mods),
+ ModMaskText(info->keymap, entry->preserve.mods));
+
+ entry->preserve.mods = preserve_mods;
+ return true;
+ }
+
+ /*
+ * Map does not exist, i.e. preserve[] came before map[].
+ * Create a map with the specified mask mapping to Level1. The level
+ * may be overridden later with an explicit map[] statement.
+ */
+ new.level = 0;
+ new.mods.mods = mods;
+ new.preserve.mods = preserve_mods;
+ darray_append(type->entries, new);
+ return true;
+}
+
+static bool
+SetPreserve(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx,
+ ExprDef *value)
+{
+ xkb_mod_mask_t mods, preserve_mods;
+
+ if (arrayNdx == NULL)
+ return ReportTypeShouldBeArray(info, type, "preserve entry");
+
+ if (!ExprResolveModMask(info->keymap, arrayNdx, MOD_BOTH, &mods))
+ return ReportTypeBadType(info, type, "preserve entry",
+ "modifier mask");
+
+ if (mods & ~type->mods) {
+ const char *before, *after;
+
+ before = ModMaskText(info->keymap, mods);
+ mods &= type->mods;
+ after = ModMaskText(info->keymap, mods);
+
+ log_vrb(info->keymap->ctx, 1,
+ "Preserve for modifiers not used by the %s type; "
+ "Index %s converted to %s\n",
+ TypeTxt(info, type), before, after);
+ }
+
+ if (!ExprResolveModMask(info->keymap, value, MOD_BOTH, &preserve_mods)) {
+ log_err(info->keymap->ctx,
+ "Preserve value in a key type is not a modifier mask; "
+ "Ignoring preserve[%s] in type %s\n",
+ ModMaskText(info->keymap, mods),
+ TypeTxt(info, type));
+ return false;
+ }
+
+ if (preserve_mods & ~mods) {
+ const char *before, *after;
+
+ before = ModMaskText(info->keymap, preserve_mods);
+ preserve_mods &= mods;
+ after = ModMaskText(info->keymap, preserve_mods);
+
+ log_vrb(info->keymap->ctx, 1,
+ "Illegal value for preserve[%s] in type %s; "
+ "Converted %s to %s\n",
+ ModMaskText(info->keymap, mods),
+ TypeTxt(info, type), before, after);
+ }
+
+ return AddPreserve(info, type, mods, preserve_mods);
+}
+
+/***====================================================================***/
+
+static bool
+AddLevelName(KeyTypesInfo *info, KeyTypeInfo *type,
+ xkb_level_index_t level, xkb_atom_t name, bool clobber)
+{
+ /* New name. */
+ if (level >= darray_size(type->level_names)) {
+ darray_resize0(type->level_names, level + 1);
+ goto finish;
+ }
+
+ /* Same level, same name. */
+ if (darray_item(type->level_names, level) == name) {
+ log_vrb(info->keymap->ctx, 10,
+ "Duplicate names for level %d of key type %s; Ignored\n",
+ level + 1, TypeTxt(info, type));
+ return true;
+ }
+
+ /* Same level, different name. */
+ if (darray_item(type->level_names, level) != XKB_ATOM_NONE) {
+ const char *old, *new;
+ old = xkb_atom_text(info->keymap->ctx,
+ darray_item(type->level_names, level));
+ new = xkb_atom_text(info->keymap->ctx, name);
+ log_vrb(info->keymap->ctx, 1,
+ "Multiple names for level %d of key type %s; "
+ "Using %s, ignoring %s\n",
+ level + 1, TypeTxt(info, type),
+ (clobber ? new : old), (clobber ? old : new));
+
+ if (!clobber)
+ return true;
+ }
+
+ /* XXX: What about different level, same name? */
+
+finish:
+ darray_item(type->level_names, level) = name;
+ return true;
+}
+
+static bool
+SetLevelName(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx,
+ ExprDef *value)
+{
+ xkb_level_index_t level;
+ xkb_atom_t level_name;
+ struct xkb_context *ctx = info->keymap->ctx;
+
+ if (arrayNdx == NULL)
+ return ReportTypeShouldBeArray(info, type, "level name");
+
+ if (!ExprResolveLevel(ctx, arrayNdx, &level))
+ return ReportTypeBadType(info, type, "level name", "integer");
+
+ if (!ExprResolveString(ctx, value, &level_name)) {
+ log_err(info->keymap->ctx,
+ "Non-string name for level %d in key type %s; "
+ "Ignoring illegal level name definition\n",
+ level + 1, xkb_atom_text(ctx, type->name));
+ return false;
+ }
+
+ return AddLevelName(info, type, level, level_name, true);
+}
+
+/***====================================================================***/
+
+static bool
+SetKeyTypeField(KeyTypesInfo *info, KeyTypeInfo *type,
+ const char *field, ExprDef *arrayNdx, ExprDef *value)
+{
+ bool ok = false;
+ enum type_field type_field = 0;
+
+ if (istreq(field, "modifiers")) {
+ type_field = TYPE_FIELD_MASK;
+ ok = SetModifiers(info, type, arrayNdx, value);
+ }
+ else if (istreq(field, "map")) {
+ type_field = TYPE_FIELD_MAP;
+ ok = SetMapEntry(info, type, arrayNdx, value);
+ }
+ else if (istreq(field, "preserve")) {
+ type_field = TYPE_FIELD_PRESERVE;
+ ok = SetPreserve(info, type, arrayNdx, value);
+ }
+ else if (istreq(field, "levelname") || istreq(field, "level_name")) {
+ type_field = TYPE_FIELD_LEVEL_NAME;
+ ok = SetLevelName(info, type, arrayNdx, value);
+ } else {
+ log_err(info->keymap->ctx,
+ "Unknown field %s in key type %s; Definition ignored\n",
+ field, TypeTxt(info, type));
+ }
+
+ type->defined |= type_field;
+ return ok;
+}
+
+static bool
+HandleKeyTypeBody(KeyTypesInfo *info, VarDef *def, KeyTypeInfo *type)
+{
+ bool ok = true;
+ const char *elem, *field;
+ ExprDef *arrayNdx;
+
+ for (; def; def = (VarDef *) def->common.next) {
+ ok = ExprResolveLhs(info->keymap->ctx, def->name, &elem, &field,
+ &arrayNdx);
+ if (!ok)
+ continue;
+
+ if (elem && istreq(elem, "type")) {
+ log_err(info->keymap->ctx,
+ "Support for changing the default type has been removed; "
+ "Statement ignored\n");
+ continue;
+ }
+
+ ok = SetKeyTypeField(info, type, field, arrayNdx, def->value);
+ }
+
+ return ok;
+}
+
+static bool
+HandleKeyTypeDef(KeyTypesInfo *info, KeyTypeDef *def, enum merge_mode merge)
+{
+ KeyTypeInfo type = {
+ .defined = 0,
+ .merge = (def->merge == MERGE_DEFAULT ? merge : def->merge),
+ .name = def->name,
+ .mods = 0,
+ .num_levels = 1,
+ .entries = darray_new(),
+ .level_names = darray_new(),
+ };
+
+ if (!HandleKeyTypeBody(info, def->body, &type)) {
+ info->errorCount++;
+ return false;
+ }
+
+ if (!AddKeyType(info, &type, true)) {
+ info->errorCount++;
+ return false;
+ }
+
+ return true;
+}
+
+static void
+HandleKeyTypesFile(KeyTypesInfo *info, XkbFile *file, enum merge_mode merge)
+{
+ bool ok;
+
+ free(info->name);
+ info->name = strdup_safe(file->name);
+
+ for (ParseCommon *stmt = file->defs; stmt; stmt = stmt->next) {
+ switch (stmt->type) {
+ case STMT_INCLUDE:
+ ok = HandleIncludeKeyTypes(info, (IncludeStmt *) stmt);
+ break;
+ case STMT_TYPE:
+ ok = HandleKeyTypeDef(info, (KeyTypeDef *) stmt, merge);
+ break;
+ case STMT_VAR:
+ log_err(info->keymap->ctx,
+ "Support for changing the default type has been removed; "
+ "Statement ignored\n");
+ ok = true;
+ break;
+ case STMT_VMOD:
+ ok = HandleVModDef(info->keymap, (VModDef *) stmt);
+ break;
+ default:
+ log_err(info->keymap->ctx,
+ "Key type files may not include other declarations; "
+ "Ignoring %s\n", stmt_type_to_string(stmt->type));
+ ok = false;
+ break;
+ }
+
+ if (!ok)
+ info->errorCount++;
+
+ if (info->errorCount > 10) {
+ log_err(info->keymap->ctx,
+ "Abandoning keytypes file \"%s\"\n", file->topName);
+ break;
+ }
+ }
+}
+
+/***====================================================================***/
+
+static bool
+CopyKeyTypesToKeymap(struct xkb_keymap *keymap, KeyTypesInfo *info)
+{
+ keymap->types_section_name = strdup_safe(info->name);
+
+ keymap->num_types = darray_size(info->types);
+ if (keymap->num_types == 0)
+ keymap->num_types = 1;
+
+ keymap->types = calloc(keymap->num_types, sizeof(*keymap->types));
+
+ /*
+ * If no types were specified, a default unnamed one-level type is
+ * used for all keys.
+ */
+ if (darray_empty(info->types)) {
+ struct xkb_key_type *type = &keymap->types[0];
+
+ type->mods.mods = 0;
+ type->num_levels = 1;
+ type->entries = NULL;
+ type->num_entries = 0;
+ type->name = xkb_atom_intern(keymap->ctx, "default");
+ type->level_names = NULL;
+
+ return true;
+ }
+
+ for (unsigned i = 0; i < keymap->num_types; i++) {
+ KeyTypeInfo *def = &darray_item(info->types, i);
+ struct xkb_key_type *type = &keymap->types[i];
+
+ type->mods.mods = def->mods;
+ type->num_levels = def->num_levels;
+ type->entries = darray_mem(def->entries, 0);
+ type->num_entries = darray_size(def->entries);
+ darray_init(def->entries);
+ type->name = def->name;
+ type->level_names = darray_mem(def->level_names, 0);
+ darray_init(def->level_names);
+ }
+
+ return true;
+}
+
+/***====================================================================***/
+
+bool
+CompileKeyTypes(XkbFile *file, struct xkb_keymap *keymap,
+ enum merge_mode merge)
+{
+ KeyTypesInfo info;
+
+ InitKeyTypesInfo(&info, keymap);
+
+ HandleKeyTypesFile(&info, file, merge);
+ if (info.errorCount != 0)
+ goto err_info;
+
+ if (!CopyKeyTypesToKeymap(keymap, &info))
+ goto err_info;
+
+ ClearKeyTypesInfo(&info);
+ return true;
+
+err_info:
+ ClearKeyTypesInfo(&info);
+ return false;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/vmod.c b/src/3rdparty/xkbcommon/src/xkbcomp/vmod.c
new file mode 100644
index 0000000000..206e1624e6
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/vmod.c
@@ -0,0 +1,69 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#include "xkbcomp-priv.h"
+#include "text.h"
+#include "expr.h"
+#include "vmod.h"
+
+bool
+HandleVModDef(struct xkb_keymap *keymap, VModDef *stmt)
+{
+ xkb_mod_index_t i;
+ const struct xkb_mod *mod;
+ struct xkb_mod new;
+
+ if (stmt->value)
+ log_err(keymap->ctx,
+ "Support for setting a value in a virtual_modifiers statement has been removed; "
+ "Value ignored\n");
+
+ darray_enumerate(i, mod, keymap->mods) {
+ if (mod->name == stmt->name) {
+ if (mod->type == MOD_VIRT)
+ return true;
+
+ log_err(keymap->ctx,
+ "Can't add a virtual modifier named \"%s\"; "
+ "there is already a non-virtual modifier with this name! Ignored\n",
+ xkb_atom_text(keymap->ctx, mod->name));
+ return false;
+ }
+ }
+
+ if (darray_size(keymap->mods) >= XKB_MAX_MODS) {
+ log_err(keymap->ctx,
+ "Too many modifiers defined (maximum %d)\n",
+ XKB_MAX_MODS);
+ return false;
+ }
+
+ new.name = stmt->name;
+ new.mapping = 0;
+ new.type = MOD_VIRT;
+ darray_append(keymap->mods, new);
+ return true;
+}
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/vmod.h b/src/3rdparty/xkbcommon/src/xkbcomp/vmod.h
new file mode 100644
index 0000000000..991550735f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/vmod.h
@@ -0,0 +1,33 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#ifndef XKBCOMP_VMOD_H
+#define XKBCOMP_VMOD_H
+
+bool
+HandleVModDef(struct xkb_keymap *keymap, VModDef *stmt);
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-priv.h b/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-priv.h
new file mode 100644
index 0000000000..4d421b5f2f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-priv.h
@@ -0,0 +1,130 @@
+/************************************************************
+ * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+#ifndef XKBCOMP_PRIV_H
+#define XKBCOMP_PRIV_H
+
+#include "keymap.h"
+#include "ast.h"
+
+struct xkb_component_names {
+ char *keycodes;
+ char *types;
+ char *compat;
+ char *symbols;
+};
+
+char *
+text_v1_keymap_get_as_string(struct xkb_keymap *keymap);
+
+XkbFile *
+XkbParseFile(struct xkb_context *ctx, FILE *file,
+ const char *file_name, const char *map);
+
+XkbFile *
+XkbParseString(struct xkb_context *ctx, const char *string,
+ const char *file_name);
+
+XkbFile *
+XkbParseBuffer(struct xkb_context *ctx, char *buf, size_t length,
+ const char *file_name);
+
+void
+FreeXkbFile(XkbFile *file);
+
+XkbFile *
+XkbFileFromComponents(struct xkb_context *ctx,
+ const struct xkb_component_names *kkctgs);
+
+bool
+CompileKeycodes(XkbFile *file, struct xkb_keymap *keymap,
+ enum merge_mode merge);
+
+bool
+CompileKeyTypes(XkbFile *file, struct xkb_keymap *keymap,
+ enum merge_mode merge);
+
+bool
+CompileCompatMap(XkbFile *file, struct xkb_keymap *keymap,
+ enum merge_mode merge);
+
+bool
+CompileSymbols(XkbFile *file, struct xkb_keymap *keymap,
+ enum merge_mode merge);
+
+bool
+CompileKeymap(XkbFile *file, struct xkb_keymap *keymap,
+ enum merge_mode merge);
+
+bool
+LookupKeysym(const char *str, xkb_keysym_t *sym_rtrn);
+
+/***====================================================================***/
+
+static inline bool
+ReportNotArray(struct xkb_context *ctx, const char *type, const char *field,
+ const char *name)
+{
+ log_err(ctx,
+ "The %s %s field is not an array; "
+ "Ignoring illegal assignment in %s\n",
+ type, field, name);
+ return false;
+}
+
+static inline bool
+ReportShouldBeArray(struct xkb_context *ctx, const char *type,
+ const char *field, const char *name)
+{
+ log_err(ctx,
+ "Missing subscript for %s %s; "
+ "Ignoring illegal assignment in %s\n",
+ type, field, name);
+ return false;
+}
+
+static inline bool
+ReportBadType(struct xkb_context *ctx, const char *type, const char *field,
+ const char *name, const char *wanted)
+{
+ log_err(ctx, "The %s %s field must be a %s; "
+ "Ignoring illegal assignment in %s\n",
+ type, field, wanted, name);
+ return false;
+}
+
+static inline bool
+ReportBadField(struct xkb_context *ctx, const char *type, const char *field,
+ const char *name)
+{
+ log_err(ctx,
+ "Unknown %s field %s in %s; "
+ "Ignoring assignment to unknown field in %s\n",
+ type, field, name, name);
+ return false;
+}
+
+#endif
diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp.c b/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp.c
new file mode 100644
index 0000000000..b9a1b5ffa6
--- /dev/null
+++ b/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright © 2009 Dan Nicholson
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita <ran234@gmail.com>
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Authors: Dan Nicholson <dbn.lists@gmail.com>
+ * Ran Benita <ran234@gmail.com>
+ * Daniel Stone <daniel@fooishbar.org>
+ */
+
+#include "xkbcomp-priv.h"
+#include "rules.h"
+
+static bool
+compile_keymap_file(struct xkb_keymap *keymap, XkbFile *file)
+{
+ if (file->file_type != FILE_TYPE_KEYMAP) {
+ log_err(keymap->ctx,
+ "Cannot compile a %s file alone into a keymap\n",
+ xkb_file_type_to_string(file->file_type));
+ return false;
+ }
+
+ if (!CompileKeymap(file, keymap, MERGE_OVERRIDE)) {
+ log_err(keymap->ctx,
+ "Failed to compile keymap\n");
+ return false;
+ }
+
+ return true;
+}
+
+static bool
+text_v1_keymap_new_from_names(struct xkb_keymap *keymap,
+ const struct xkb_rule_names *rmlvo)
+{
+ bool ok;
+ struct xkb_component_names kccgst;
+ XkbFile *file;
+
+ log_dbg(keymap->ctx,
+ "Compiling from RMLVO: rules '%s', model '%s', layout '%s', "
+ "variant '%s', options '%s'\n",
+ rmlvo->rules, rmlvo->model, rmlvo->layout, rmlvo->variant,
+ rmlvo->options);
+
+ ok = xkb_components_from_rules(keymap->ctx, rmlvo, &kccgst);
+ if (!ok) {
+ log_err(keymap->ctx,
+ "Couldn't look up rules '%s', model '%s', layout '%s', "
+ "variant '%s', options '%s'\n",
+ rmlvo->rules, rmlvo->model, rmlvo->layout, rmlvo->variant,
+ rmlvo->options);
+ return false;
+ }
+
+ log_dbg(keymap->ctx,
+ "Compiling from KcCGST: keycodes '%s', types '%s', "
+ "compat '%s', symbols '%s'\n",
+ kccgst.keycodes, kccgst.types, kccgst.compat, kccgst.symbols);
+
+ file = XkbFileFromComponents(keymap->ctx, &kccgst);
+
+ free(kccgst.keycodes);
+ free(kccgst.types);
+ free(kccgst.compat);
+ free(kccgst.symbols);
+
+ if (!file) {
+ log_err(keymap->ctx,
+ "Failed to generate parsed XKB file from components\n");
+ return false;
+ }
+
+ ok = compile_keymap_file(keymap, file);
+ FreeXkbFile(file);
+ return ok;
+}
+
+static bool
+text_v1_keymap_new_from_string(struct xkb_keymap *keymap, const char *string)
+{
+ bool ok;
+ XkbFile *xkb_file;
+
+ xkb_file = XkbParseString(keymap->ctx, string, "(input string)");
+ if (!xkb_file) {
+ log_err(keymap->ctx, "Failed to parse input xkb string\n");
+ return NULL;
+ }
+
+ ok = compile_keymap_file(keymap, xkb_file);
+ FreeXkbFile(xkb_file);
+ return ok;
+}
+
+static bool
+text_v1_keymap_new_from_buffer(struct xkb_keymap *keymap,
+ const char *buffer, size_t length)
+{
+ bool ok;
+ XkbFile *xkb_file;
+ char *buf;
+
+ buf = malloc(length + 2);
+ if (!buf) {
+ log_err(keymap->ctx, "Cannot allocate memory for keymap\n");
+ return NULL;
+ }
+
+ /* yy_scan_buffer requires two terminating zero bytes */
+ memcpy(buf, buffer, length);
+ buf[length] = 0;
+ buf[length + 1] = 0;
+
+ xkb_file = XkbParseBuffer(keymap->ctx, buf, length + 2, "input");
+ if (!xkb_file) {
+ log_err(keymap->ctx, "Failed to parse input xkb file\n");
+ free(buf);
+ return NULL;
+ }
+
+ ok = compile_keymap_file(keymap, xkb_file);
+ FreeXkbFile(xkb_file);
+ free(buf);
+ return ok;
+}
+
+static bool
+text_v1_keymap_new_from_file(struct xkb_keymap *keymap, FILE *file)
+{
+ bool ok;
+ XkbFile *xkb_file;
+
+ xkb_file = XkbParseFile(keymap->ctx, file, "(unknown file)", NULL);
+ if (!xkb_file) {
+ log_err(keymap->ctx, "Failed to parse input xkb file\n");
+ return false;
+ }
+
+ ok = compile_keymap_file(keymap, xkb_file);
+ FreeXkbFile(xkb_file);
+ return ok;
+}
+
+const struct xkb_keymap_format_ops text_v1_keymap_format_ops = {
+ .keymap_new_from_names = text_v1_keymap_new_from_names,
+ .keymap_new_from_string = text_v1_keymap_new_from_string,
+ .keymap_new_from_buffer = text_v1_keymap_new_from_buffer,
+ .keymap_new_from_file = text_v1_keymap_new_from_file,
+ .keymap_get_as_string = text_v1_keymap_get_as_string,
+};
diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compat.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compat.h
new file mode 100644
index 0000000000..f96e4c806f
--- /dev/null
+++ b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compat.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright © 2012 Daniel Stone
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#ifndef _XKBCOMMON_COMPAT_H
+#define _XKBCOMMON_COMPAT_H
+
+/**
+ * Renamed keymap API.
+ */
+#define xkb_group_index_t xkb_layout_index_t
+#define xkb_group_mask_t xkb_layout_mask_t
+#define xkb_map_compile_flags xkb_keymap_compile_flags
+#define XKB_GROUP_INVALID XKB_LAYOUT_INVALID
+
+#define XKB_STATE_DEPRESSED \
+ (XKB_STATE_MODS_DEPRESSED | XKB_STATE_LAYOUT_DEPRESSED)
+#define XKB_STATE_LATCHED \
+ (XKB_STATE_MODS_LATCHED | XKB_STATE_LAYOUT_LATCHED)
+#define XKB_STATE_LOCKED \
+ (XKB_STATE_MODS_LOCKED | XKB_STATE_LAYOUT_LOCKED)
+#define XKB_STATE_EFFECTIVE \
+ (XKB_STATE_DEPRESSED | XKB_STATE_LATCHED | XKB_STATE_LOCKED | \
+ XKB_STATE_MODS_EFFECTIVE | XKB_STATE_LAYOUT_EFFECTIVE)
+
+#define xkb_map_new_from_names(context, names, flags) \
+ xkb_keymap_new_from_names(context, names, flags)
+#define xkb_map_new_from_file(context, file, format, flags) \
+ xkb_keymap_new_from_file(context, file, format, flags)
+#define xkb_map_new_from_string(context, string, format, flags) \
+ xkb_keymap_new_from_string(context, string, format, flags)
+#define xkb_map_get_as_string(keymap) \
+ xkb_keymap_get_as_string(keymap, XKB_KEYMAP_FORMAT_TEXT_V1)
+#define xkb_map_ref(keymap) xkb_keymap_ref(keymap)
+#define xkb_map_unref(keymap) xkb_keymap_unref(keymap)
+
+#define xkb_map_num_mods(keymap) xkb_keymap_num_mods(keymap)
+#define xkb_map_mod_get_name(keymap, idx) xkb_keymap_mod_get_name(keymap, idx)
+#define xkb_map_mod_get_index(keymap, str) xkb_keymap_mod_get_index(keymap, str)
+#define xkb_key_mod_index_is_consumed(state, key, mod) \
+ xkb_state_mod_index_is_consumed(state, key, mod)
+#define xkb_key_mod_mask_remove_consumed(state, key, modmask) \
+ xkb_state_mod_mask_remove_consumed(state, key, modmask)
+
+#define xkb_map_num_groups(keymap) xkb_keymap_num_layouts(keymap)
+#define xkb_key_num_groups(keymap, key) \
+ xkb_keymap_num_layouts_for_key(keymap, key)
+#define xkb_map_group_get_name(keymap, idx) \
+ xkb_keymap_layout_get_name(keymap, idx)
+#define xkb_map_group_get_index(keymap, str) \
+ xkb_keymap_layout_get_index(keymap, str)
+
+#define xkb_map_num_leds(keymap) xkb_keymap_num_leds(keymap)
+#define xkb_map_led_get_name(keymap, idx) xkb_keymap_led_get_name(keymap, idx)
+#define xkb_map_led_get_index(keymap, str) \
+ xkb_keymap_led_get_index(keymap, str)
+
+#define xkb_key_repeats(keymap, key) xkb_keymap_key_repeats(keymap, key)
+
+#define xkb_key_get_syms(state, key, syms_out) \
+ xkb_state_key_get_syms(state, key, syms_out)
+
+#define xkb_state_group_name_is_active(state, name, type) \
+ xkb_state_layout_name_is_active(state, name, type)
+#define xkb_state_group_index_is_active(state, idx, type) \
+ xkb_state_layout_index_is_active(state, idx, type)
+
+#define xkb_state_serialize_group(state, component) \
+ xkb_state_serialize_layout(state, component)
+
+#define xkb_state_get_map(state) xkb_state_get_keymap(state)
+
+#endif
diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-keysyms.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-keysyms.h
new file mode 100644
index 0000000000..253ea59ceb
--- /dev/null
+++ b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-keysyms.h
@@ -0,0 +1,3004 @@
+#ifndef _XKBCOMMON_KEYSYMS_H
+#define _XKBCOMMON_KEYSYMS_H
+
+/* This file is autogenerated from Makefile.am; please do not commit directly. */
+
+#define XKB_KEY_NoSymbol 0x000000 /* Special KeySym */
+
+/***********************************************************
+Copyright 1987, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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 OPEN GROUP 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 name of The Open Group 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 Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/*
+ * The "X11 Window System Protocol" standard defines in Appendix A the
+ * keysym codes. These 29-bit integer values identify characters or
+ * functions associated with each key (e.g., via the visible
+ * engraving) of a keyboard layout. This file assigns mnemonic macro
+ * names for these keysyms.
+ *
+ * This file is also compiled (by src/util/makekeys.c in libX11) into
+ * hash tables that can be accessed with X11 library functions such as
+ * XStringToKeysym() and XKeysymToString().
+ *
+ * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode
+ * character, this is noted in a comment that provides both the U+xxxx
+ * Unicode position, as well as the official Unicode name of the
+ * character.
+ *
+ * Where the correspondence is either not one-to-one or semantically
+ * unclear, the Unicode position and name are enclosed in
+ * parentheses. Such legacy keysyms should be considered deprecated
+ * and are not recommended for use in future keyboard mappings.
+ *
+ * For any future extension of the keysyms with characters already
+ * found in ISO 10646 / Unicode, the following algorithm shall be
+ * used. The new keysym code position will simply be the character's
+ * Unicode number plus 0x01000000. The keysym values in the range
+ * 0x01000100 to 0x0110ffff are reserved to represent Unicode
+ * characters in the range U+0100 to U+10FFFF.
+ *
+ * While most newer Unicode-based X11 clients do already accept
+ * Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it
+ * will remain necessary for clients -- in the interest of
+ * compatibility with existing servers -- to also understand the
+ * existing legacy keysym values in the range 0x0100 to 0x20ff.
+ *
+ * Where several mnemonic names are defined for the same keysym in this
+ * file, all but the first one listed should be considered deprecated.
+ *
+ * Mnemonic names for keysyms are defined in this file with lines
+ * that match one of these Perl regular expressions:
+ *
+ * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\* U+([0-9A-F]{4,6}) (.*) \*\/\s*$/
+ * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\(U+([0-9A-F]{4,6}) (.*)\)\*\/\s*$/
+ * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/
+ *
+ * Before adding new keysyms, please do consider the following: In
+ * addition to the keysym names defined in this file, the
+ * XStringToKeysym() and XKeysymToString() functions will also handle
+ * any keysym string of the form "U0020" to "U007E" and "U00A0" to
+ * "U10FFFF" for all possible Unicode characters. In other words,
+ * every possible Unicode character has already a keysym string
+ * defined algorithmically, even if it is not listed here. Therefore,
+ * defining an additional keysym macro is only necessary where a
+ * non-hexadecimal mnemonic name is needed, or where the new keysym
+ * does not represent any existing Unicode character.
+ *
+ * When adding new keysyms to this file, do not forget to also update the
+ * following as needed:
+ *
+ * - the mappings in src/KeyBind.c in the repo
+ * git://anongit.freedesktop.org/xorg/lib/libX11.git
+ *
+ * - the protocol specification in specs/keysyms.xml
+ * in the repo git://anongit.freedesktop.org/xorg/proto/x11proto.git
+ *
+ */
+
+#define XKB_KEY_VoidSymbol 0xffffff /* Void symbol */
+
+/*
+ * TTY function keys, cleverly chosen to map to ASCII, for convenience of
+ * programming, but could have been arbitrary (at the cost of lookup
+ * tables in client code).
+ */
+
+#define XKB_KEY_BackSpace 0xff08 /* Back space, back char */
+#define XKB_KEY_Tab 0xff09
+#define XKB_KEY_Linefeed 0xff0a /* Linefeed, LF */
+#define XKB_KEY_Clear 0xff0b
+#define XKB_KEY_Return 0xff0d /* Return, enter */
+#define XKB_KEY_Pause 0xff13 /* Pause, hold */
+#define XKB_KEY_Scroll_Lock 0xff14
+#define XKB_KEY_Sys_Req 0xff15
+#define XKB_KEY_Escape 0xff1b
+#define XKB_KEY_Delete 0xffff /* Delete, rubout */
+
+
+
+/* International & multi-key character composition */
+
+#define XKB_KEY_Multi_key 0xff20 /* Multi-key character compose */
+#define XKB_KEY_Codeinput 0xff37
+#define XKB_KEY_SingleCandidate 0xff3c
+#define XKB_KEY_MultipleCandidate 0xff3d
+#define XKB_KEY_PreviousCandidate 0xff3e
+
+/* Japanese keyboard support */
+
+#define XKB_KEY_Kanji 0xff21 /* Kanji, Kanji convert */
+#define XKB_KEY_Muhenkan 0xff22 /* Cancel Conversion */
+#define XKB_KEY_Henkan_Mode 0xff23 /* Start/Stop Conversion */
+#define XKB_KEY_Henkan 0xff23 /* Alias for Henkan_Mode */
+#define XKB_KEY_Romaji 0xff24 /* to Romaji */
+#define XKB_KEY_Hiragana 0xff25 /* to Hiragana */
+#define XKB_KEY_Katakana 0xff26 /* to Katakana */
+#define XKB_KEY_Hiragana_Katakana 0xff27 /* Hiragana/Katakana toggle */
+#define XKB_KEY_Zenkaku 0xff28 /* to Zenkaku */
+#define XKB_KEY_Hankaku 0xff29 /* to Hankaku */
+#define XKB_KEY_Zenkaku_Hankaku 0xff2a /* Zenkaku/Hankaku toggle */
+#define XKB_KEY_Touroku 0xff2b /* Add to Dictionary */
+#define XKB_KEY_Massyo 0xff2c /* Delete from Dictionary */
+#define XKB_KEY_Kana_Lock 0xff2d /* Kana Lock */
+#define XKB_KEY_Kana_Shift 0xff2e /* Kana Shift */
+#define XKB_KEY_Eisu_Shift 0xff2f /* Alphanumeric Shift */
+#define XKB_KEY_Eisu_toggle 0xff30 /* Alphanumeric toggle */
+#define XKB_KEY_Kanji_Bangou 0xff37 /* Codeinput */
+#define XKB_KEY_Zen_Koho 0xff3d /* Multiple/All Candidate(s) */
+#define XKB_KEY_Mae_Koho 0xff3e /* Previous Candidate */
+
+/* 0xff31 thru 0xff3f are under XK_KOREAN */
+
+/* Cursor control & motion */
+
+#define XKB_KEY_Home 0xff50
+#define XKB_KEY_Left 0xff51 /* Move left, left arrow */
+#define XKB_KEY_Up 0xff52 /* Move up, up arrow */
+#define XKB_KEY_Right 0xff53 /* Move right, right arrow */
+#define XKB_KEY_Down 0xff54 /* Move down, down arrow */
+#define XKB_KEY_Prior 0xff55 /* Prior, previous */
+#define XKB_KEY_Page_Up 0xff55
+#define XKB_KEY_Next 0xff56 /* Next */
+#define XKB_KEY_Page_Down 0xff56
+#define XKB_KEY_End 0xff57 /* EOL */
+#define XKB_KEY_Begin 0xff58 /* BOL */
+
+
+/* Misc functions */
+
+#define XKB_KEY_Select 0xff60 /* Select, mark */
+#define XKB_KEY_Print 0xff61
+#define XKB_KEY_Execute 0xff62 /* Execute, run, do */
+#define XKB_KEY_Insert 0xff63 /* Insert, insert here */
+#define XKB_KEY_Undo 0xff65
+#define XKB_KEY_Redo 0xff66 /* Redo, again */
+#define XKB_KEY_Menu 0xff67
+#define XKB_KEY_Find 0xff68 /* Find, search */
+#define XKB_KEY_Cancel 0xff69 /* Cancel, stop, abort, exit */
+#define XKB_KEY_Help 0xff6a /* Help */
+#define XKB_KEY_Break 0xff6b
+#define XKB_KEY_Mode_switch 0xff7e /* Character set switch */
+#define XKB_KEY_script_switch 0xff7e /* Alias for mode_switch */
+#define XKB_KEY_Num_Lock 0xff7f
+
+/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */
+
+#define XKB_KEY_KP_Space 0xff80 /* Space */
+#define XKB_KEY_KP_Tab 0xff89
+#define XKB_KEY_KP_Enter 0xff8d /* Enter */
+#define XKB_KEY_KP_F1 0xff91 /* PF1, KP_A, ... */
+#define XKB_KEY_KP_F2 0xff92
+#define XKB_KEY_KP_F3 0xff93
+#define XKB_KEY_KP_F4 0xff94
+#define XKB_KEY_KP_Home 0xff95
+#define XKB_KEY_KP_Left 0xff96
+#define XKB_KEY_KP_Up 0xff97
+#define XKB_KEY_KP_Right 0xff98
+#define XKB_KEY_KP_Down 0xff99
+#define XKB_KEY_KP_Prior 0xff9a
+#define XKB_KEY_KP_Page_Up 0xff9a
+#define XKB_KEY_KP_Next 0xff9b
+#define XKB_KEY_KP_Page_Down 0xff9b
+#define XKB_KEY_KP_End 0xff9c
+#define XKB_KEY_KP_Begin 0xff9d
+#define XKB_KEY_KP_Insert 0xff9e
+#define XKB_KEY_KP_Delete 0xff9f
+#define XKB_KEY_KP_Equal 0xffbd /* Equals */
+#define XKB_KEY_KP_Multiply 0xffaa
+#define XKB_KEY_KP_Add 0xffab
+#define XKB_KEY_KP_Separator 0xffac /* Separator, often comma */
+#define XKB_KEY_KP_Subtract 0xffad
+#define XKB_KEY_KP_Decimal 0xffae
+#define XKB_KEY_KP_Divide 0xffaf
+
+#define XKB_KEY_KP_0 0xffb0
+#define XKB_KEY_KP_1 0xffb1
+#define XKB_KEY_KP_2 0xffb2
+#define XKB_KEY_KP_3 0xffb3
+#define XKB_KEY_KP_4 0xffb4
+#define XKB_KEY_KP_5 0xffb5
+#define XKB_KEY_KP_6 0xffb6
+#define XKB_KEY_KP_7 0xffb7
+#define XKB_KEY_KP_8 0xffb8
+#define XKB_KEY_KP_9 0xffb9
+
+
+
+/*
+ * Auxiliary functions; note the duplicate definitions for left and right
+ * function keys; Sun keyboards and a few other manufacturers have such
+ * function key groups on the left and/or right sides of the keyboard.
+ * We've not found a keyboard with more than 35 function keys total.
+ */
+
+#define XKB_KEY_F1 0xffbe
+#define XKB_KEY_F2 0xffbf
+#define XKB_KEY_F3 0xffc0
+#define XKB_KEY_F4 0xffc1
+#define XKB_KEY_F5 0xffc2
+#define XKB_KEY_F6 0xffc3
+#define XKB_KEY_F7 0xffc4
+#define XKB_KEY_F8 0xffc5
+#define XKB_KEY_F9 0xffc6
+#define XKB_KEY_F10 0xffc7
+#define XKB_KEY_F11 0xffc8
+#define XKB_KEY_L1 0xffc8
+#define XKB_KEY_F12 0xffc9
+#define XKB_KEY_L2 0xffc9
+#define XKB_KEY_F13 0xffca
+#define XKB_KEY_L3 0xffca
+#define XKB_KEY_F14 0xffcb
+#define XKB_KEY_L4 0xffcb
+#define XKB_KEY_F15 0xffcc
+#define XKB_KEY_L5 0xffcc
+#define XKB_KEY_F16 0xffcd
+#define XKB_KEY_L6 0xffcd
+#define XKB_KEY_F17 0xffce
+#define XKB_KEY_L7 0xffce
+#define XKB_KEY_F18 0xffcf
+#define XKB_KEY_L8 0xffcf
+#define XKB_KEY_F19 0xffd0
+#define XKB_KEY_L9 0xffd0
+#define XKB_KEY_F20 0xffd1
+#define XKB_KEY_L10 0xffd1
+#define XKB_KEY_F21 0xffd2
+#define XKB_KEY_R1 0xffd2
+#define XKB_KEY_F22 0xffd3
+#define XKB_KEY_R2 0xffd3
+#define XKB_KEY_F23 0xffd4
+#define XKB_KEY_R3 0xffd4
+#define XKB_KEY_F24 0xffd5
+#define XKB_KEY_R4 0xffd5
+#define XKB_KEY_F25 0xffd6
+#define XKB_KEY_R5 0xffd6
+#define XKB_KEY_F26 0xffd7
+#define XKB_KEY_R6 0xffd7
+#define XKB_KEY_F27 0xffd8
+#define XKB_KEY_R7 0xffd8
+#define XKB_KEY_F28 0xffd9
+#define XKB_KEY_R8 0xffd9
+#define XKB_KEY_F29 0xffda
+#define XKB_KEY_R9 0xffda
+#define XKB_KEY_F30 0xffdb
+#define XKB_KEY_R10 0xffdb
+#define XKB_KEY_F31 0xffdc
+#define XKB_KEY_R11 0xffdc
+#define XKB_KEY_F32 0xffdd
+#define XKB_KEY_R12 0xffdd
+#define XKB_KEY_F33 0xffde
+#define XKB_KEY_R13 0xffde
+#define XKB_KEY_F34 0xffdf
+#define XKB_KEY_R14 0xffdf
+#define XKB_KEY_F35 0xffe0
+#define XKB_KEY_R15 0xffe0
+
+/* Modifiers */
+
+#define XKB_KEY_Shift_L 0xffe1 /* Left shift */
+#define XKB_KEY_Shift_R 0xffe2 /* Right shift */
+#define XKB_KEY_Control_L 0xffe3 /* Left control */
+#define XKB_KEY_Control_R 0xffe4 /* Right control */
+#define XKB_KEY_Caps_Lock 0xffe5 /* Caps lock */
+#define XKB_KEY_Shift_Lock 0xffe6 /* Shift lock */
+
+#define XKB_KEY_Meta_L 0xffe7 /* Left meta */
+#define XKB_KEY_Meta_R 0xffe8 /* Right meta */
+#define XKB_KEY_Alt_L 0xffe9 /* Left alt */
+#define XKB_KEY_Alt_R 0xffea /* Right alt */
+#define XKB_KEY_Super_L 0xffeb /* Left super */
+#define XKB_KEY_Super_R 0xffec /* Right super */
+#define XKB_KEY_Hyper_L 0xffed /* Left hyper */
+#define XKB_KEY_Hyper_R 0xffee /* Right hyper */
+
+/*
+ * Keyboard (XKB) Extension function and modifier keys
+ * (from Appendix C of "The X Keyboard Extension: Protocol Specification")
+ * Byte 3 = 0xfe
+ */
+
+#define XKB_KEY_ISO_Lock 0xfe01
+#define XKB_KEY_ISO_Level2_Latch 0xfe02
+#define XKB_KEY_ISO_Level3_Shift 0xfe03
+#define XKB_KEY_ISO_Level3_Latch 0xfe04
+#define XKB_KEY_ISO_Level3_Lock 0xfe05
+#define XKB_KEY_ISO_Level5_Shift 0xfe11
+#define XKB_KEY_ISO_Level5_Latch 0xfe12
+#define XKB_KEY_ISO_Level5_Lock 0xfe13
+#define XKB_KEY_ISO_Group_Shift 0xff7e /* Alias for mode_switch */
+#define XKB_KEY_ISO_Group_Latch 0xfe06
+#define XKB_KEY_ISO_Group_Lock 0xfe07
+#define XKB_KEY_ISO_Next_Group 0xfe08
+#define XKB_KEY_ISO_Next_Group_Lock 0xfe09
+#define XKB_KEY_ISO_Prev_Group 0xfe0a
+#define XKB_KEY_ISO_Prev_Group_Lock 0xfe0b
+#define XKB_KEY_ISO_First_Group 0xfe0c
+#define XKB_KEY_ISO_First_Group_Lock 0xfe0d
+#define XKB_KEY_ISO_Last_Group 0xfe0e
+#define XKB_KEY_ISO_Last_Group_Lock 0xfe0f
+
+#define XKB_KEY_ISO_Left_Tab 0xfe20
+#define XKB_KEY_ISO_Move_Line_Up 0xfe21
+#define XKB_KEY_ISO_Move_Line_Down 0xfe22
+#define XKB_KEY_ISO_Partial_Line_Up 0xfe23
+#define XKB_KEY_ISO_Partial_Line_Down 0xfe24
+#define XKB_KEY_ISO_Partial_Space_Left 0xfe25
+#define XKB_KEY_ISO_Partial_Space_Right 0xfe26
+#define XKB_KEY_ISO_Set_Margin_Left 0xfe27
+#define XKB_KEY_ISO_Set_Margin_Right 0xfe28
+#define XKB_KEY_ISO_Release_Margin_Left 0xfe29
+#define XKB_KEY_ISO_Release_Margin_Right 0xfe2a
+#define XKB_KEY_ISO_Release_Both_Margins 0xfe2b
+#define XKB_KEY_ISO_Fast_Cursor_Left 0xfe2c
+#define XKB_KEY_ISO_Fast_Cursor_Right 0xfe2d
+#define XKB_KEY_ISO_Fast_Cursor_Up 0xfe2e
+#define XKB_KEY_ISO_Fast_Cursor_Down 0xfe2f
+#define XKB_KEY_ISO_Continuous_Underline 0xfe30
+#define XKB_KEY_ISO_Discontinuous_Underline 0xfe31
+#define XKB_KEY_ISO_Emphasize 0xfe32
+#define XKB_KEY_ISO_Center_Object 0xfe33
+#define XKB_KEY_ISO_Enter 0xfe34
+
+#define XKB_KEY_dead_grave 0xfe50
+#define XKB_KEY_dead_acute 0xfe51
+#define XKB_KEY_dead_circumflex 0xfe52
+#define XKB_KEY_dead_tilde 0xfe53
+#define XKB_KEY_dead_perispomeni 0xfe53 /* alias for dead_tilde */
+#define XKB_KEY_dead_macron 0xfe54
+#define XKB_KEY_dead_breve 0xfe55
+#define XKB_KEY_dead_abovedot 0xfe56
+#define XKB_KEY_dead_diaeresis 0xfe57
+#define XKB_KEY_dead_abovering 0xfe58
+#define XKB_KEY_dead_doubleacute 0xfe59
+#define XKB_KEY_dead_caron 0xfe5a
+#define XKB_KEY_dead_cedilla 0xfe5b
+#define XKB_KEY_dead_ogonek 0xfe5c
+#define XKB_KEY_dead_iota 0xfe5d
+#define XKB_KEY_dead_voiced_sound 0xfe5e
+#define XKB_KEY_dead_semivoiced_sound 0xfe5f
+#define XKB_KEY_dead_belowdot 0xfe60
+#define XKB_KEY_dead_hook 0xfe61
+#define XKB_KEY_dead_horn 0xfe62
+#define XKB_KEY_dead_stroke 0xfe63
+#define XKB_KEY_dead_abovecomma 0xfe64
+#define XKB_KEY_dead_psili 0xfe64 /* alias for dead_abovecomma */
+#define XKB_KEY_dead_abovereversedcomma 0xfe65
+#define XKB_KEY_dead_dasia 0xfe65 /* alias for dead_abovereversedcomma */
+#define XKB_KEY_dead_doublegrave 0xfe66
+#define XKB_KEY_dead_belowring 0xfe67
+#define XKB_KEY_dead_belowmacron 0xfe68
+#define XKB_KEY_dead_belowcircumflex 0xfe69
+#define XKB_KEY_dead_belowtilde 0xfe6a
+#define XKB_KEY_dead_belowbreve 0xfe6b
+#define XKB_KEY_dead_belowdiaeresis 0xfe6c
+#define XKB_KEY_dead_invertedbreve 0xfe6d
+#define XKB_KEY_dead_belowcomma 0xfe6e
+#define XKB_KEY_dead_currency 0xfe6f
+
+/* dead vowels for universal syllable entry */
+#define XKB_KEY_dead_a 0xfe80
+#define XKB_KEY_dead_A 0xfe81
+#define XKB_KEY_dead_e 0xfe82
+#define XKB_KEY_dead_E 0xfe83
+#define XKB_KEY_dead_i 0xfe84
+#define XKB_KEY_dead_I 0xfe85
+#define XKB_KEY_dead_o 0xfe86
+#define XKB_KEY_dead_O 0xfe87
+#define XKB_KEY_dead_u 0xfe88
+#define XKB_KEY_dead_U 0xfe89
+#define XKB_KEY_dead_small_schwa 0xfe8a
+#define XKB_KEY_dead_capital_schwa 0xfe8b
+
+#define XKB_KEY_dead_greek 0xfe8c
+
+#define XKB_KEY_First_Virtual_Screen 0xfed0
+#define XKB_KEY_Prev_Virtual_Screen 0xfed1
+#define XKB_KEY_Next_Virtual_Screen 0xfed2
+#define XKB_KEY_Last_Virtual_Screen 0xfed4
+#define XKB_KEY_Terminate_Server 0xfed5
+
+#define XKB_KEY_AccessX_Enable 0xfe70
+#define XKB_KEY_AccessX_Feedback_Enable 0xfe71
+#define XKB_KEY_RepeatKeys_Enable 0xfe72
+#define XKB_KEY_SlowKeys_Enable 0xfe73
+#define XKB_KEY_BounceKeys_Enable 0xfe74
+#define XKB_KEY_StickyKeys_Enable 0xfe75
+#define XKB_KEY_MouseKeys_Enable 0xfe76
+#define XKB_KEY_MouseKeys_Accel_Enable 0xfe77
+#define XKB_KEY_Overlay1_Enable 0xfe78
+#define XKB_KEY_Overlay2_Enable 0xfe79
+#define XKB_KEY_AudibleBell_Enable 0xfe7a
+
+#define XKB_KEY_Pointer_Left 0xfee0
+#define XKB_KEY_Pointer_Right 0xfee1
+#define XKB_KEY_Pointer_Up 0xfee2
+#define XKB_KEY_Pointer_Down 0xfee3
+#define XKB_KEY_Pointer_UpLeft 0xfee4
+#define XKB_KEY_Pointer_UpRight 0xfee5
+#define XKB_KEY_Pointer_DownLeft 0xfee6
+#define XKB_KEY_Pointer_DownRight 0xfee7
+#define XKB_KEY_Pointer_Button_Dflt 0xfee8
+#define XKB_KEY_Pointer_Button1 0xfee9
+#define XKB_KEY_Pointer_Button2 0xfeea
+#define XKB_KEY_Pointer_Button3 0xfeeb
+#define XKB_KEY_Pointer_Button4 0xfeec
+#define XKB_KEY_Pointer_Button5 0xfeed
+#define XKB_KEY_Pointer_DblClick_Dflt 0xfeee
+#define XKB_KEY_Pointer_DblClick1 0xfeef
+#define XKB_KEY_Pointer_DblClick2 0xfef0
+#define XKB_KEY_Pointer_DblClick3 0xfef1
+#define XKB_KEY_Pointer_DblClick4 0xfef2
+#define XKB_KEY_Pointer_DblClick5 0xfef3
+#define XKB_KEY_Pointer_Drag_Dflt 0xfef4
+#define XKB_KEY_Pointer_Drag1 0xfef5
+#define XKB_KEY_Pointer_Drag2 0xfef6
+#define XKB_KEY_Pointer_Drag3 0xfef7
+#define XKB_KEY_Pointer_Drag4 0xfef8
+#define XKB_KEY_Pointer_Drag5 0xfefd
+
+#define XKB_KEY_Pointer_EnableKeys 0xfef9
+#define XKB_KEY_Pointer_Accelerate 0xfefa
+#define XKB_KEY_Pointer_DfltBtnNext 0xfefb
+#define XKB_KEY_Pointer_DfltBtnPrev 0xfefc
+
+/* Single-Stroke Multiple-Character N-Graph Keysyms For The X Input Method */
+
+#define XKB_KEY_ch 0xfea0
+#define XKB_KEY_Ch 0xfea1
+#define XKB_KEY_CH 0xfea2
+#define XKB_KEY_c_h 0xfea3
+#define XKB_KEY_C_h 0xfea4
+#define XKB_KEY_C_H 0xfea5
+
+
+/*
+ * 3270 Terminal Keys
+ * Byte 3 = 0xfd
+ */
+
+#define XKB_KEY_3270_Duplicate 0xfd01
+#define XKB_KEY_3270_FieldMark 0xfd02
+#define XKB_KEY_3270_Right2 0xfd03
+#define XKB_KEY_3270_Left2 0xfd04
+#define XKB_KEY_3270_BackTab 0xfd05
+#define XKB_KEY_3270_EraseEOF 0xfd06
+#define XKB_KEY_3270_EraseInput 0xfd07
+#define XKB_KEY_3270_Reset 0xfd08
+#define XKB_KEY_3270_Quit 0xfd09
+#define XKB_KEY_3270_PA1 0xfd0a
+#define XKB_KEY_3270_PA2 0xfd0b
+#define XKB_KEY_3270_PA3 0xfd0c
+#define XKB_KEY_3270_Test 0xfd0d
+#define XKB_KEY_3270_Attn 0xfd0e
+#define XKB_KEY_3270_CursorBlink 0xfd0f
+#define XKB_KEY_3270_AltCursor 0xfd10
+#define XKB_KEY_3270_KeyClick 0xfd11
+#define XKB_KEY_3270_Jump 0xfd12
+#define XKB_KEY_3270_Ident 0xfd13
+#define XKB_KEY_3270_Rule 0xfd14
+#define XKB_KEY_3270_Copy 0xfd15
+#define XKB_KEY_3270_Play 0xfd16
+#define XKB_KEY_3270_Setup 0xfd17
+#define XKB_KEY_3270_Record 0xfd18
+#define XKB_KEY_3270_ChangeScreen 0xfd19
+#define XKB_KEY_3270_DeleteWord 0xfd1a
+#define XKB_KEY_3270_ExSelect 0xfd1b
+#define XKB_KEY_3270_CursorSelect 0xfd1c
+#define XKB_KEY_3270_PrintScreen 0xfd1d
+#define XKB_KEY_3270_Enter 0xfd1e
+
+/*
+ * Latin 1
+ * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF)
+ * Byte 3 = 0
+ */
+#define XKB_KEY_space 0x0020 /* U+0020 SPACE */
+#define XKB_KEY_exclam 0x0021 /* U+0021 EXCLAMATION MARK */
+#define XKB_KEY_quotedbl 0x0022 /* U+0022 QUOTATION MARK */
+#define XKB_KEY_numbersign 0x0023 /* U+0023 NUMBER SIGN */
+#define XKB_KEY_dollar 0x0024 /* U+0024 DOLLAR SIGN */
+#define XKB_KEY_percent 0x0025 /* U+0025 PERCENT SIGN */
+#define XKB_KEY_ampersand 0x0026 /* U+0026 AMPERSAND */
+#define XKB_KEY_apostrophe 0x0027 /* U+0027 APOSTROPHE */
+#define XKB_KEY_quoteright 0x0027 /* deprecated */
+#define XKB_KEY_parenleft 0x0028 /* U+0028 LEFT PARENTHESIS */
+#define XKB_KEY_parenright 0x0029 /* U+0029 RIGHT PARENTHESIS */
+#define XKB_KEY_asterisk 0x002a /* U+002A ASTERISK */
+#define XKB_KEY_plus 0x002b /* U+002B PLUS SIGN */
+#define XKB_KEY_comma 0x002c /* U+002C COMMA */
+#define XKB_KEY_minus 0x002d /* U+002D HYPHEN-MINUS */
+#define XKB_KEY_period 0x002e /* U+002E FULL STOP */
+#define XKB_KEY_slash 0x002f /* U+002F SOLIDUS */
+#define XKB_KEY_0 0x0030 /* U+0030 DIGIT ZERO */
+#define XKB_KEY_1 0x0031 /* U+0031 DIGIT ONE */
+#define XKB_KEY_2 0x0032 /* U+0032 DIGIT TWO */
+#define XKB_KEY_3 0x0033 /* U+0033 DIGIT THREE */
+#define XKB_KEY_4 0x0034 /* U+0034 DIGIT FOUR */
+#define XKB_KEY_5 0x0035 /* U+0035 DIGIT FIVE */
+#define XKB_KEY_6 0x0036 /* U+0036 DIGIT SIX */
+#define XKB_KEY_7 0x0037 /* U+0037 DIGIT SEVEN */
+#define XKB_KEY_8 0x0038 /* U+0038 DIGIT EIGHT */
+#define XKB_KEY_9 0x0039 /* U+0039 DIGIT NINE */
+#define XKB_KEY_colon 0x003a /* U+003A COLON */
+#define XKB_KEY_semicolon 0x003b /* U+003B SEMICOLON */
+#define XKB_KEY_less 0x003c /* U+003C LESS-THAN SIGN */
+#define XKB_KEY_equal 0x003d /* U+003D EQUALS SIGN */
+#define XKB_KEY_greater 0x003e /* U+003E GREATER-THAN SIGN */
+#define XKB_KEY_question 0x003f /* U+003F QUESTION MARK */
+#define XKB_KEY_at 0x0040 /* U+0040 COMMERCIAL AT */
+#define XKB_KEY_A 0x0041 /* U+0041 LATIN CAPITAL LETTER A */
+#define XKB_KEY_B 0x0042 /* U+0042 LATIN CAPITAL LETTER B */
+#define XKB_KEY_C 0x0043 /* U+0043 LATIN CAPITAL LETTER C */
+#define XKB_KEY_D 0x0044 /* U+0044 LATIN CAPITAL LETTER D */
+#define XKB_KEY_E 0x0045 /* U+0045 LATIN CAPITAL LETTER E */
+#define XKB_KEY_F 0x0046 /* U+0046 LATIN CAPITAL LETTER F */
+#define XKB_KEY_G 0x0047 /* U+0047 LATIN CAPITAL LETTER G */
+#define XKB_KEY_H 0x0048 /* U+0048 LATIN CAPITAL LETTER H */
+#define XKB_KEY_I 0x0049 /* U+0049 LATIN CAPITAL LETTER I */
+#define XKB_KEY_J 0x004a /* U+004A LATIN CAPITAL LETTER J */
+#define XKB_KEY_K 0x004b /* U+004B LATIN CAPITAL LETTER K */
+#define XKB_KEY_L 0x004c /* U+004C LATIN CAPITAL LETTER L */
+#define XKB_KEY_M 0x004d /* U+004D LATIN CAPITAL LETTER M */
+#define XKB_KEY_N 0x004e /* U+004E LATIN CAPITAL LETTER N */
+#define XKB_KEY_O 0x004f /* U+004F LATIN CAPITAL LETTER O */
+#define XKB_KEY_P 0x0050 /* U+0050 LATIN CAPITAL LETTER P */
+#define XKB_KEY_Q 0x0051 /* U+0051 LATIN CAPITAL LETTER Q */
+#define XKB_KEY_R 0x0052 /* U+0052 LATIN CAPITAL LETTER R */
+#define XKB_KEY_S 0x0053 /* U+0053 LATIN CAPITAL LETTER S */
+#define XKB_KEY_T 0x0054 /* U+0054 LATIN CAPITAL LETTER T */
+#define XKB_KEY_U 0x0055 /* U+0055 LATIN CAPITAL LETTER U */
+#define XKB_KEY_V 0x0056 /* U+0056 LATIN CAPITAL LETTER V */
+#define XKB_KEY_W 0x0057 /* U+0057 LATIN CAPITAL LETTER W */
+#define XKB_KEY_X 0x0058 /* U+0058 LATIN CAPITAL LETTER X */
+#define XKB_KEY_Y 0x0059 /* U+0059 LATIN CAPITAL LETTER Y */
+#define XKB_KEY_Z 0x005a /* U+005A LATIN CAPITAL LETTER Z */
+#define XKB_KEY_bracketleft 0x005b /* U+005B LEFT SQUARE BRACKET */
+#define XKB_KEY_backslash 0x005c /* U+005C REVERSE SOLIDUS */
+#define XKB_KEY_bracketright 0x005d /* U+005D RIGHT SQUARE BRACKET */
+#define XKB_KEY_asciicircum 0x005e /* U+005E CIRCUMFLEX ACCENT */
+#define XKB_KEY_underscore 0x005f /* U+005F LOW LINE */
+#define XKB_KEY_grave 0x0060 /* U+0060 GRAVE ACCENT */
+#define XKB_KEY_quoteleft 0x0060 /* deprecated */
+#define XKB_KEY_a 0x0061 /* U+0061 LATIN SMALL LETTER A */
+#define XKB_KEY_b 0x0062 /* U+0062 LATIN SMALL LETTER B */
+#define XKB_KEY_c 0x0063 /* U+0063 LATIN SMALL LETTER C */
+#define XKB_KEY_d 0x0064 /* U+0064 LATIN SMALL LETTER D */
+#define XKB_KEY_e 0x0065 /* U+0065 LATIN SMALL LETTER E */
+#define XKB_KEY_f 0x0066 /* U+0066 LATIN SMALL LETTER F */
+#define XKB_KEY_g 0x0067 /* U+0067 LATIN SMALL LETTER G */
+#define XKB_KEY_h 0x0068 /* U+0068 LATIN SMALL LETTER H */
+#define XKB_KEY_i 0x0069 /* U+0069 LATIN SMALL LETTER I */
+#define XKB_KEY_j 0x006a /* U+006A LATIN SMALL LETTER J */
+#define XKB_KEY_k 0x006b /* U+006B LATIN SMALL LETTER K */
+#define XKB_KEY_l 0x006c /* U+006C LATIN SMALL LETTER L */
+#define XKB_KEY_m 0x006d /* U+006D LATIN SMALL LETTER M */
+#define XKB_KEY_n 0x006e /* U+006E LATIN SMALL LETTER N */
+#define XKB_KEY_o 0x006f /* U+006F LATIN SMALL LETTER O */
+#define XKB_KEY_p 0x0070 /* U+0070 LATIN SMALL LETTER P */
+#define XKB_KEY_q 0x0071 /* U+0071 LATIN SMALL LETTER Q */
+#define XKB_KEY_r 0x0072 /* U+0072 LATIN SMALL LETTER R */
+#define XKB_KEY_s 0x0073 /* U+0073 LATIN SMALL LETTER S */
+#define XKB_KEY_t 0x0074 /* U+0074 LATIN SMALL LETTER T */
+#define XKB_KEY_u 0x0075 /* U+0075 LATIN SMALL LETTER U */
+#define XKB_KEY_v 0x0076 /* U+0076 LATIN SMALL LETTER V */
+#define XKB_KEY_w 0x0077 /* U+0077 LATIN SMALL LETTER W */
+#define XKB_KEY_x 0x0078 /* U+0078 LATIN SMALL LETTER X */
+#define XKB_KEY_y 0x0079 /* U+0079 LATIN SMALL LETTER Y */
+#define XKB_KEY_z 0x007a /* U+007A LATIN SMALL LETTER Z */
+#define XKB_KEY_braceleft 0x007b /* U+007B LEFT CURLY BRACKET */
+#define XKB_KEY_bar 0x007c /* U+007C VERTICAL LINE */
+#define XKB_KEY_braceright 0x007d /* U+007D RIGHT CURLY BRACKET */
+#define XKB_KEY_asciitilde 0x007e /* U+007E TILDE */
+
+#define XKB_KEY_nobreakspace 0x00a0 /* U+00A0 NO-BREAK SPACE */
+#define XKB_KEY_exclamdown 0x00a1 /* U+00A1 INVERTED EXCLAMATION MARK */
+#define XKB_KEY_cent 0x00a2 /* U+00A2 CENT SIGN */
+#define XKB_KEY_sterling 0x00a3 /* U+00A3 POUND SIGN */
+#define XKB_KEY_currency 0x00a4 /* U+00A4 CURRENCY SIGN */
+#define XKB_KEY_yen 0x00a5 /* U+00A5 YEN SIGN */
+#define XKB_KEY_brokenbar 0x00a6 /* U+00A6 BROKEN BAR */
+#define XKB_KEY_section 0x00a7 /* U+00A7 SECTION SIGN */
+#define XKB_KEY_diaeresis 0x00a8 /* U+00A8 DIAERESIS */
+#define XKB_KEY_copyright 0x00a9 /* U+00A9 COPYRIGHT SIGN */
+#define XKB_KEY_ordfeminine 0x00aa /* U+00AA FEMININE ORDINAL INDICATOR */
+#define XKB_KEY_guillemotleft 0x00ab /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
+#define XKB_KEY_notsign 0x00ac /* U+00AC NOT SIGN */
+#define XKB_KEY_hyphen 0x00ad /* U+00AD SOFT HYPHEN */
+#define XKB_KEY_registered 0x00ae /* U+00AE REGISTERED SIGN */
+#define XKB_KEY_macron 0x00af /* U+00AF MACRON */
+#define XKB_KEY_degree 0x00b0 /* U+00B0 DEGREE SIGN */
+#define XKB_KEY_plusminus 0x00b1 /* U+00B1 PLUS-MINUS SIGN */
+#define XKB_KEY_twosuperior 0x00b2 /* U+00B2 SUPERSCRIPT TWO */
+#define XKB_KEY_threesuperior 0x00b3 /* U+00B3 SUPERSCRIPT THREE */
+#define XKB_KEY_acute 0x00b4 /* U+00B4 ACUTE ACCENT */
+#define XKB_KEY_mu 0x00b5 /* U+00B5 MICRO SIGN */
+#define XKB_KEY_paragraph 0x00b6 /* U+00B6 PILCROW SIGN */
+#define XKB_KEY_periodcentered 0x00b7 /* U+00B7 MIDDLE DOT */
+#define XKB_KEY_cedilla 0x00b8 /* U+00B8 CEDILLA */
+#define XKB_KEY_onesuperior 0x00b9 /* U+00B9 SUPERSCRIPT ONE */
+#define XKB_KEY_masculine 0x00ba /* U+00BA MASCULINE ORDINAL INDICATOR */
+#define XKB_KEY_guillemotright 0x00bb /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
+#define XKB_KEY_onequarter 0x00bc /* U+00BC VULGAR FRACTION ONE QUARTER */
+#define XKB_KEY_onehalf 0x00bd /* U+00BD VULGAR FRACTION ONE HALF */
+#define XKB_KEY_threequarters 0x00be /* U+00BE VULGAR FRACTION THREE QUARTERS */
+#define XKB_KEY_questiondown 0x00bf /* U+00BF INVERTED QUESTION MARK */
+#define XKB_KEY_Agrave 0x00c0 /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */
+#define XKB_KEY_Aacute 0x00c1 /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */
+#define XKB_KEY_Acircumflex 0x00c2 /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
+#define XKB_KEY_Atilde 0x00c3 /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */
+#define XKB_KEY_Adiaeresis 0x00c4 /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */
+#define XKB_KEY_Aring 0x00c5 /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */
+#define XKB_KEY_AE 0x00c6 /* U+00C6 LATIN CAPITAL LETTER AE */
+#define XKB_KEY_Ccedilla 0x00c7 /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */
+#define XKB_KEY_Egrave 0x00c8 /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */
+#define XKB_KEY_Eacute 0x00c9 /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */
+#define XKB_KEY_Ecircumflex 0x00ca /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
+#define XKB_KEY_Ediaeresis 0x00cb /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */
+#define XKB_KEY_Igrave 0x00cc /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */
+#define XKB_KEY_Iacute 0x00cd /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */
+#define XKB_KEY_Icircumflex 0x00ce /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
+#define XKB_KEY_Idiaeresis 0x00cf /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */
+#define XKB_KEY_ETH 0x00d0 /* U+00D0 LATIN CAPITAL LETTER ETH */
+#define XKB_KEY_Eth 0x00d0 /* deprecated */
+#define XKB_KEY_Ntilde 0x00d1 /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */
+#define XKB_KEY_Ograve 0x00d2 /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */
+#define XKB_KEY_Oacute 0x00d3 /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */
+#define XKB_KEY_Ocircumflex 0x00d4 /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
+#define XKB_KEY_Otilde 0x00d5 /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */
+#define XKB_KEY_Odiaeresis 0x00d6 /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */
+#define XKB_KEY_multiply 0x00d7 /* U+00D7 MULTIPLICATION SIGN */
+#define XKB_KEY_Oslash 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
+#define XKB_KEY_Ooblique 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
+#define XKB_KEY_Ugrave 0x00d9 /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */
+#define XKB_KEY_Uacute 0x00da /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */
+#define XKB_KEY_Ucircumflex 0x00db /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
+#define XKB_KEY_Udiaeresis 0x00dc /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */
+#define XKB_KEY_Yacute 0x00dd /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */
+#define XKB_KEY_THORN 0x00de /* U+00DE LATIN CAPITAL LETTER THORN */
+#define XKB_KEY_Thorn 0x00de /* deprecated */
+#define XKB_KEY_ssharp 0x00df /* U+00DF LATIN SMALL LETTER SHARP S */
+#define XKB_KEY_agrave 0x00e0 /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */
+#define XKB_KEY_aacute 0x00e1 /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */
+#define XKB_KEY_acircumflex 0x00e2 /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */
+#define XKB_KEY_atilde 0x00e3 /* U+00E3 LATIN SMALL LETTER A WITH TILDE */
+#define XKB_KEY_adiaeresis 0x00e4 /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */
+#define XKB_KEY_aring 0x00e5 /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */
+#define XKB_KEY_ae 0x00e6 /* U+00E6 LATIN SMALL LETTER AE */
+#define XKB_KEY_ccedilla 0x00e7 /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */
+#define XKB_KEY_egrave 0x00e8 /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */
+#define XKB_KEY_eacute 0x00e9 /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */
+#define XKB_KEY_ecircumflex 0x00ea /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */
+#define XKB_KEY_ediaeresis 0x00eb /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */
+#define XKB_KEY_igrave 0x00ec /* U+00EC LATIN SMALL LETTER I WITH GRAVE */
+#define XKB_KEY_iacute 0x00ed /* U+00ED LATIN SMALL LETTER I WITH ACUTE */
+#define XKB_KEY_icircumflex 0x00ee /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */
+#define XKB_KEY_idiaeresis 0x00ef /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */
+#define XKB_KEY_eth 0x00f0 /* U+00F0 LATIN SMALL LETTER ETH */
+#define XKB_KEY_ntilde 0x00f1 /* U+00F1 LATIN SMALL LETTER N WITH TILDE */
+#define XKB_KEY_ograve 0x00f2 /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */
+#define XKB_KEY_oacute 0x00f3 /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */
+#define XKB_KEY_ocircumflex 0x00f4 /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */
+#define XKB_KEY_otilde 0x00f5 /* U+00F5 LATIN SMALL LETTER O WITH TILDE */
+#define XKB_KEY_odiaeresis 0x00f6 /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */
+#define XKB_KEY_division 0x00f7 /* U+00F7 DIVISION SIGN */
+#define XKB_KEY_oslash 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
+#define XKB_KEY_ooblique 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
+#define XKB_KEY_ugrave 0x00f9 /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */
+#define XKB_KEY_uacute 0x00fa /* U+00FA LATIN SMALL LETTER U WITH ACUTE */
+#define XKB_KEY_ucircumflex 0x00fb /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */
+#define XKB_KEY_udiaeresis 0x00fc /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */
+#define XKB_KEY_yacute 0x00fd /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */
+#define XKB_KEY_thorn 0x00fe /* U+00FE LATIN SMALL LETTER THORN */
+#define XKB_KEY_ydiaeresis 0x00ff /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */
+
+/*
+ * Latin 2
+ * Byte 3 = 1
+ */
+
+#define XKB_KEY_Aogonek 0x01a1 /* U+0104 LATIN CAPITAL LETTER A WITH OGONEK */
+#define XKB_KEY_breve 0x01a2 /* U+02D8 BREVE */
+#define XKB_KEY_Lstroke 0x01a3 /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */
+#define XKB_KEY_Lcaron 0x01a5 /* U+013D LATIN CAPITAL LETTER L WITH CARON */
+#define XKB_KEY_Sacute 0x01a6 /* U+015A LATIN CAPITAL LETTER S WITH ACUTE */
+#define XKB_KEY_Scaron 0x01a9 /* U+0160 LATIN CAPITAL LETTER S WITH CARON */
+#define XKB_KEY_Scedilla 0x01aa /* U+015E LATIN CAPITAL LETTER S WITH CEDILLA */
+#define XKB_KEY_Tcaron 0x01ab /* U+0164 LATIN CAPITAL LETTER T WITH CARON */
+#define XKB_KEY_Zacute 0x01ac /* U+0179 LATIN CAPITAL LETTER Z WITH ACUTE */
+#define XKB_KEY_Zcaron 0x01ae /* U+017D LATIN CAPITAL LETTER Z WITH CARON */
+#define XKB_KEY_Zabovedot 0x01af /* U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE */
+#define XKB_KEY_aogonek 0x01b1 /* U+0105 LATIN SMALL LETTER A WITH OGONEK */
+#define XKB_KEY_ogonek 0x01b2 /* U+02DB OGONEK */
+#define XKB_KEY_lstroke 0x01b3 /* U+0142 LATIN SMALL LETTER L WITH STROKE */
+#define XKB_KEY_lcaron 0x01b5 /* U+013E LATIN SMALL LETTER L WITH CARON */
+#define XKB_KEY_sacute 0x01b6 /* U+015B LATIN SMALL LETTER S WITH ACUTE */
+#define XKB_KEY_caron 0x01b7 /* U+02C7 CARON */
+#define XKB_KEY_scaron 0x01b9 /* U+0161 LATIN SMALL LETTER S WITH CARON */
+#define XKB_KEY_scedilla 0x01ba /* U+015F LATIN SMALL LETTER S WITH CEDILLA */
+#define XKB_KEY_tcaron 0x01bb /* U+0165 LATIN SMALL LETTER T WITH CARON */
+#define XKB_KEY_zacute 0x01bc /* U+017A LATIN SMALL LETTER Z WITH ACUTE */
+#define XKB_KEY_doubleacute 0x01bd /* U+02DD DOUBLE ACUTE ACCENT */
+#define XKB_KEY_zcaron 0x01be /* U+017E LATIN SMALL LETTER Z WITH CARON */
+#define XKB_KEY_zabovedot 0x01bf /* U+017C LATIN SMALL LETTER Z WITH DOT ABOVE */
+#define XKB_KEY_Racute 0x01c0 /* U+0154 LATIN CAPITAL LETTER R WITH ACUTE */
+#define XKB_KEY_Abreve 0x01c3 /* U+0102 LATIN CAPITAL LETTER A WITH BREVE */
+#define XKB_KEY_Lacute 0x01c5 /* U+0139 LATIN CAPITAL LETTER L WITH ACUTE */
+#define XKB_KEY_Cacute 0x01c6 /* U+0106 LATIN CAPITAL LETTER C WITH ACUTE */
+#define XKB_KEY_Ccaron 0x01c8 /* U+010C LATIN CAPITAL LETTER C WITH CARON */
+#define XKB_KEY_Eogonek 0x01ca /* U+0118 LATIN CAPITAL LETTER E WITH OGONEK */
+#define XKB_KEY_Ecaron 0x01cc /* U+011A LATIN CAPITAL LETTER E WITH CARON */
+#define XKB_KEY_Dcaron 0x01cf /* U+010E LATIN CAPITAL LETTER D WITH CARON */
+#define XKB_KEY_Dstroke 0x01d0 /* U+0110 LATIN CAPITAL LETTER D WITH STROKE */
+#define XKB_KEY_Nacute 0x01d1 /* U+0143 LATIN CAPITAL LETTER N WITH ACUTE */
+#define XKB_KEY_Ncaron 0x01d2 /* U+0147 LATIN CAPITAL LETTER N WITH CARON */
+#define XKB_KEY_Odoubleacute 0x01d5 /* U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */
+#define XKB_KEY_Rcaron 0x01d8 /* U+0158 LATIN CAPITAL LETTER R WITH CARON */
+#define XKB_KEY_Uring 0x01d9 /* U+016E LATIN CAPITAL LETTER U WITH RING ABOVE */
+#define XKB_KEY_Udoubleacute 0x01db /* U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */
+#define XKB_KEY_Tcedilla 0x01de /* U+0162 LATIN CAPITAL LETTER T WITH CEDILLA */
+#define XKB_KEY_racute 0x01e0 /* U+0155 LATIN SMALL LETTER R WITH ACUTE */
+#define XKB_KEY_abreve 0x01e3 /* U+0103 LATIN SMALL LETTER A WITH BREVE */
+#define XKB_KEY_lacute 0x01e5 /* U+013A LATIN SMALL LETTER L WITH ACUTE */
+#define XKB_KEY_cacute 0x01e6 /* U+0107 LATIN SMALL LETTER C WITH ACUTE */
+#define XKB_KEY_ccaron 0x01e8 /* U+010D LATIN SMALL LETTER C WITH CARON */
+#define XKB_KEY_eogonek 0x01ea /* U+0119 LATIN SMALL LETTER E WITH OGONEK */
+#define XKB_KEY_ecaron 0x01ec /* U+011B LATIN SMALL LETTER E WITH CARON */
+#define XKB_KEY_dcaron 0x01ef /* U+010F LATIN SMALL LETTER D WITH CARON */
+#define XKB_KEY_dstroke 0x01f0 /* U+0111 LATIN SMALL LETTER D WITH STROKE */
+#define XKB_KEY_nacute 0x01f1 /* U+0144 LATIN SMALL LETTER N WITH ACUTE */
+#define XKB_KEY_ncaron 0x01f2 /* U+0148 LATIN SMALL LETTER N WITH CARON */
+#define XKB_KEY_odoubleacute 0x01f5 /* U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE */
+#define XKB_KEY_rcaron 0x01f8 /* U+0159 LATIN SMALL LETTER R WITH CARON */
+#define XKB_KEY_uring 0x01f9 /* U+016F LATIN SMALL LETTER U WITH RING ABOVE */
+#define XKB_KEY_udoubleacute 0x01fb /* U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE */
+#define XKB_KEY_tcedilla 0x01fe /* U+0163 LATIN SMALL LETTER T WITH CEDILLA */
+#define XKB_KEY_abovedot 0x01ff /* U+02D9 DOT ABOVE */
+
+/*
+ * Latin 3
+ * Byte 3 = 2
+ */
+
+#define XKB_KEY_Hstroke 0x02a1 /* U+0126 LATIN CAPITAL LETTER H WITH STROKE */
+#define XKB_KEY_Hcircumflex 0x02a6 /* U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */
+#define XKB_KEY_Iabovedot 0x02a9 /* U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE */
+#define XKB_KEY_Gbreve 0x02ab /* U+011E LATIN CAPITAL LETTER G WITH BREVE */
+#define XKB_KEY_Jcircumflex 0x02ac /* U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX */
+#define XKB_KEY_hstroke 0x02b1 /* U+0127 LATIN SMALL LETTER H WITH STROKE */
+#define XKB_KEY_hcircumflex 0x02b6 /* U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX */
+#define XKB_KEY_idotless 0x02b9 /* U+0131 LATIN SMALL LETTER DOTLESS I */
+#define XKB_KEY_gbreve 0x02bb /* U+011F LATIN SMALL LETTER G WITH BREVE */
+#define XKB_KEY_jcircumflex 0x02bc /* U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX */
+#define XKB_KEY_Cabovedot 0x02c5 /* U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE */
+#define XKB_KEY_Ccircumflex 0x02c6 /* U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */
+#define XKB_KEY_Gabovedot 0x02d5 /* U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE */
+#define XKB_KEY_Gcircumflex 0x02d8 /* U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX */
+#define XKB_KEY_Ubreve 0x02dd /* U+016C LATIN CAPITAL LETTER U WITH BREVE */
+#define XKB_KEY_Scircumflex 0x02de /* U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX */
+#define XKB_KEY_cabovedot 0x02e5 /* U+010B LATIN SMALL LETTER C WITH DOT ABOVE */
+#define XKB_KEY_ccircumflex 0x02e6 /* U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX */
+#define XKB_KEY_gabovedot 0x02f5 /* U+0121 LATIN SMALL LETTER G WITH DOT ABOVE */
+#define XKB_KEY_gcircumflex 0x02f8 /* U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX */
+#define XKB_KEY_ubreve 0x02fd /* U+016D LATIN SMALL LETTER U WITH BREVE */
+#define XKB_KEY_scircumflex 0x02fe /* U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX */
+
+
+/*
+ * Latin 4
+ * Byte 3 = 3
+ */
+
+#define XKB_KEY_kra 0x03a2 /* U+0138 LATIN SMALL LETTER KRA */
+#define XKB_KEY_kappa 0x03a2 /* deprecated */
+#define XKB_KEY_Rcedilla 0x03a3 /* U+0156 LATIN CAPITAL LETTER R WITH CEDILLA */
+#define XKB_KEY_Itilde 0x03a5 /* U+0128 LATIN CAPITAL LETTER I WITH TILDE */
+#define XKB_KEY_Lcedilla 0x03a6 /* U+013B LATIN CAPITAL LETTER L WITH CEDILLA */
+#define XKB_KEY_Emacron 0x03aa /* U+0112 LATIN CAPITAL LETTER E WITH MACRON */
+#define XKB_KEY_Gcedilla 0x03ab /* U+0122 LATIN CAPITAL LETTER G WITH CEDILLA */
+#define XKB_KEY_Tslash 0x03ac /* U+0166 LATIN CAPITAL LETTER T WITH STROKE */
+#define XKB_KEY_rcedilla 0x03b3 /* U+0157 LATIN SMALL LETTER R WITH CEDILLA */
+#define XKB_KEY_itilde 0x03b5 /* U+0129 LATIN SMALL LETTER I WITH TILDE */
+#define XKB_KEY_lcedilla 0x03b6 /* U+013C LATIN SMALL LETTER L WITH CEDILLA */
+#define XKB_KEY_emacron 0x03ba /* U+0113 LATIN SMALL LETTER E WITH MACRON */
+#define XKB_KEY_gcedilla 0x03bb /* U+0123 LATIN SMALL LETTER G WITH CEDILLA */
+#define XKB_KEY_tslash 0x03bc /* U+0167 LATIN SMALL LETTER T WITH STROKE */
+#define XKB_KEY_ENG 0x03bd /* U+014A LATIN CAPITAL LETTER ENG */
+#define XKB_KEY_eng 0x03bf /* U+014B LATIN SMALL LETTER ENG */
+#define XKB_KEY_Amacron 0x03c0 /* U+0100 LATIN CAPITAL LETTER A WITH MACRON */
+#define XKB_KEY_Iogonek 0x03c7 /* U+012E LATIN CAPITAL LETTER I WITH OGONEK */
+#define XKB_KEY_Eabovedot 0x03cc /* U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE */
+#define XKB_KEY_Imacron 0x03cf /* U+012A LATIN CAPITAL LETTER I WITH MACRON */
+#define XKB_KEY_Ncedilla 0x03d1 /* U+0145 LATIN CAPITAL LETTER N WITH CEDILLA */
+#define XKB_KEY_Omacron 0x03d2 /* U+014C LATIN CAPITAL LETTER O WITH MACRON */
+#define XKB_KEY_Kcedilla 0x03d3 /* U+0136 LATIN CAPITAL LETTER K WITH CEDILLA */
+#define XKB_KEY_Uogonek 0x03d9 /* U+0172 LATIN CAPITAL LETTER U WITH OGONEK */
+#define XKB_KEY_Utilde 0x03dd /* U+0168 LATIN CAPITAL LETTER U WITH TILDE */
+#define XKB_KEY_Umacron 0x03de /* U+016A LATIN CAPITAL LETTER U WITH MACRON */
+#define XKB_KEY_amacron 0x03e0 /* U+0101 LATIN SMALL LETTER A WITH MACRON */
+#define XKB_KEY_iogonek 0x03e7 /* U+012F LATIN SMALL LETTER I WITH OGONEK */
+#define XKB_KEY_eabovedot 0x03ec /* U+0117 LATIN SMALL LETTER E WITH DOT ABOVE */
+#define XKB_KEY_imacron 0x03ef /* U+012B LATIN SMALL LETTER I WITH MACRON */
+#define XKB_KEY_ncedilla 0x03f1 /* U+0146 LATIN SMALL LETTER N WITH CEDILLA */
+#define XKB_KEY_omacron 0x03f2 /* U+014D LATIN SMALL LETTER O WITH MACRON */
+#define XKB_KEY_kcedilla 0x03f3 /* U+0137 LATIN SMALL LETTER K WITH CEDILLA */
+#define XKB_KEY_uogonek 0x03f9 /* U+0173 LATIN SMALL LETTER U WITH OGONEK */
+#define XKB_KEY_utilde 0x03fd /* U+0169 LATIN SMALL LETTER U WITH TILDE */
+#define XKB_KEY_umacron 0x03fe /* U+016B LATIN SMALL LETTER U WITH MACRON */
+
+/*
+ * Latin 8
+ */
+#define XKB_KEY_Wcircumflex 0x1000174 /* U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX */
+#define XKB_KEY_wcircumflex 0x1000175 /* U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX */
+#define XKB_KEY_Ycircumflex 0x1000176 /* U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */
+#define XKB_KEY_ycircumflex 0x1000177 /* U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX */
+#define XKB_KEY_Babovedot 0x1001e02 /* U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE */
+#define XKB_KEY_babovedot 0x1001e03 /* U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE */
+#define XKB_KEY_Dabovedot 0x1001e0a /* U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE */
+#define XKB_KEY_dabovedot 0x1001e0b /* U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE */
+#define XKB_KEY_Fabovedot 0x1001e1e /* U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE */
+#define XKB_KEY_fabovedot 0x1001e1f /* U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE */
+#define XKB_KEY_Mabovedot 0x1001e40 /* U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE */
+#define XKB_KEY_mabovedot 0x1001e41 /* U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE */
+#define XKB_KEY_Pabovedot 0x1001e56 /* U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE */
+#define XKB_KEY_pabovedot 0x1001e57 /* U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE */
+#define XKB_KEY_Sabovedot 0x1001e60 /* U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE */
+#define XKB_KEY_sabovedot 0x1001e61 /* U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE */
+#define XKB_KEY_Tabovedot 0x1001e6a /* U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE */
+#define XKB_KEY_tabovedot 0x1001e6b /* U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE */
+#define XKB_KEY_Wgrave 0x1001e80 /* U+1E80 LATIN CAPITAL LETTER W WITH GRAVE */
+#define XKB_KEY_wgrave 0x1001e81 /* U+1E81 LATIN SMALL LETTER W WITH GRAVE */
+#define XKB_KEY_Wacute 0x1001e82 /* U+1E82 LATIN CAPITAL LETTER W WITH ACUTE */
+#define XKB_KEY_wacute 0x1001e83 /* U+1E83 LATIN SMALL LETTER W WITH ACUTE */
+#define XKB_KEY_Wdiaeresis 0x1001e84 /* U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS */
+#define XKB_KEY_wdiaeresis 0x1001e85 /* U+1E85 LATIN SMALL LETTER W WITH DIAERESIS */
+#define XKB_KEY_Ygrave 0x1001ef2 /* U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE */
+#define XKB_KEY_ygrave 0x1001ef3 /* U+1EF3 LATIN SMALL LETTER Y WITH GRAVE */
+
+/*
+ * Latin 9
+ * Byte 3 = 0x13
+ */
+
+#define XKB_KEY_OE 0x13bc /* U+0152 LATIN CAPITAL LIGATURE OE */
+#define XKB_KEY_oe 0x13bd /* U+0153 LATIN SMALL LIGATURE OE */
+#define XKB_KEY_Ydiaeresis 0x13be /* U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS */
+
+/*
+ * Katakana
+ * Byte 3 = 4
+ */
+
+#define XKB_KEY_overline 0x047e /* U+203E OVERLINE */
+#define XKB_KEY_kana_fullstop 0x04a1 /* U+3002 IDEOGRAPHIC FULL STOP */
+#define XKB_KEY_kana_openingbracket 0x04a2 /* U+300C LEFT CORNER BRACKET */
+#define XKB_KEY_kana_closingbracket 0x04a3 /* U+300D RIGHT CORNER BRACKET */
+#define XKB_KEY_kana_comma 0x04a4 /* U+3001 IDEOGRAPHIC COMMA */
+#define XKB_KEY_kana_conjunctive 0x04a5 /* U+30FB KATAKANA MIDDLE DOT */
+#define XKB_KEY_kana_middledot 0x04a5 /* deprecated */
+#define XKB_KEY_kana_WO 0x04a6 /* U+30F2 KATAKANA LETTER WO */
+#define XKB_KEY_kana_a 0x04a7 /* U+30A1 KATAKANA LETTER SMALL A */
+#define XKB_KEY_kana_i 0x04a8 /* U+30A3 KATAKANA LETTER SMALL I */
+#define XKB_KEY_kana_u 0x04a9 /* U+30A5 KATAKANA LETTER SMALL U */
+#define XKB_KEY_kana_e 0x04aa /* U+30A7 KATAKANA LETTER SMALL E */
+#define XKB_KEY_kana_o 0x04ab /* U+30A9 KATAKANA LETTER SMALL O */
+#define XKB_KEY_kana_ya 0x04ac /* U+30E3 KATAKANA LETTER SMALL YA */
+#define XKB_KEY_kana_yu 0x04ad /* U+30E5 KATAKANA LETTER SMALL YU */
+#define XKB_KEY_kana_yo 0x04ae /* U+30E7 KATAKANA LETTER SMALL YO */
+#define XKB_KEY_kana_tsu 0x04af /* U+30C3 KATAKANA LETTER SMALL TU */
+#define XKB_KEY_kana_tu 0x04af /* deprecated */
+#define XKB_KEY_prolongedsound 0x04b0 /* U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK */
+#define XKB_KEY_kana_A 0x04b1 /* U+30A2 KATAKANA LETTER A */
+#define XKB_KEY_kana_I 0x04b2 /* U+30A4 KATAKANA LETTER I */
+#define XKB_KEY_kana_U 0x04b3 /* U+30A6 KATAKANA LETTER U */
+#define XKB_KEY_kana_E 0x04b4 /* U+30A8 KATAKANA LETTER E */
+#define XKB_KEY_kana_O 0x04b5 /* U+30AA KATAKANA LETTER O */
+#define XKB_KEY_kana_KA 0x04b6 /* U+30AB KATAKANA LETTER KA */
+#define XKB_KEY_kana_KI 0x04b7 /* U+30AD KATAKANA LETTER KI */
+#define XKB_KEY_kana_KU 0x04b8 /* U+30AF KATAKANA LETTER KU */
+#define XKB_KEY_kana_KE 0x04b9 /* U+30B1 KATAKANA LETTER KE */
+#define XKB_KEY_kana_KO 0x04ba /* U+30B3 KATAKANA LETTER KO */
+#define XKB_KEY_kana_SA 0x04bb /* U+30B5 KATAKANA LETTER SA */
+#define XKB_KEY_kana_SHI 0x04bc /* U+30B7 KATAKANA LETTER SI */
+#define XKB_KEY_kana_SU 0x04bd /* U+30B9 KATAKANA LETTER SU */
+#define XKB_KEY_kana_SE 0x04be /* U+30BB KATAKANA LETTER SE */
+#define XKB_KEY_kana_SO 0x04bf /* U+30BD KATAKANA LETTER SO */
+#define XKB_KEY_kana_TA 0x04c0 /* U+30BF KATAKANA LETTER TA */
+#define XKB_KEY_kana_CHI 0x04c1 /* U+30C1 KATAKANA LETTER TI */
+#define XKB_KEY_kana_TI 0x04c1 /* deprecated */
+#define XKB_KEY_kana_TSU 0x04c2 /* U+30C4 KATAKANA LETTER TU */
+#define XKB_KEY_kana_TU 0x04c2 /* deprecated */
+#define XKB_KEY_kana_TE 0x04c3 /* U+30C6 KATAKANA LETTER TE */
+#define XKB_KEY_kana_TO 0x04c4 /* U+30C8 KATAKANA LETTER TO */
+#define XKB_KEY_kana_NA 0x04c5 /* U+30CA KATAKANA LETTER NA */
+#define XKB_KEY_kana_NI 0x04c6 /* U+30CB KATAKANA LETTER NI */
+#define XKB_KEY_kana_NU 0x04c7 /* U+30CC KATAKANA LETTER NU */
+#define XKB_KEY_kana_NE 0x04c8 /* U+30CD KATAKANA LETTER NE */
+#define XKB_KEY_kana_NO 0x04c9 /* U+30CE KATAKANA LETTER NO */
+#define XKB_KEY_kana_HA 0x04ca /* U+30CF KATAKANA LETTER HA */
+#define XKB_KEY_kana_HI 0x04cb /* U+30D2 KATAKANA LETTER HI */
+#define XKB_KEY_kana_FU 0x04cc /* U+30D5 KATAKANA LETTER HU */
+#define XKB_KEY_kana_HU 0x04cc /* deprecated */
+#define XKB_KEY_kana_HE 0x04cd /* U+30D8 KATAKANA LETTER HE */
+#define XKB_KEY_kana_HO 0x04ce /* U+30DB KATAKANA LETTER HO */
+#define XKB_KEY_kana_MA 0x04cf /* U+30DE KATAKANA LETTER MA */
+#define XKB_KEY_kana_MI 0x04d0 /* U+30DF KATAKANA LETTER MI */
+#define XKB_KEY_kana_MU 0x04d1 /* U+30E0 KATAKANA LETTER MU */
+#define XKB_KEY_kana_ME 0x04d2 /* U+30E1 KATAKANA LETTER ME */
+#define XKB_KEY_kana_MO 0x04d3 /* U+30E2 KATAKANA LETTER MO */
+#define XKB_KEY_kana_YA 0x04d4 /* U+30E4 KATAKANA LETTER YA */
+#define XKB_KEY_kana_YU 0x04d5 /* U+30E6 KATAKANA LETTER YU */
+#define XKB_KEY_kana_YO 0x04d6 /* U+30E8 KATAKANA LETTER YO */
+#define XKB_KEY_kana_RA 0x04d7 /* U+30E9 KATAKANA LETTER RA */
+#define XKB_KEY_kana_RI 0x04d8 /* U+30EA KATAKANA LETTER RI */
+#define XKB_KEY_kana_RU 0x04d9 /* U+30EB KATAKANA LETTER RU */
+#define XKB_KEY_kana_RE 0x04da /* U+30EC KATAKANA LETTER RE */
+#define XKB_KEY_kana_RO 0x04db /* U+30ED KATAKANA LETTER RO */
+#define XKB_KEY_kana_WA 0x04dc /* U+30EF KATAKANA LETTER WA */
+#define XKB_KEY_kana_N 0x04dd /* U+30F3 KATAKANA LETTER N */
+#define XKB_KEY_voicedsound 0x04de /* U+309B KATAKANA-HIRAGANA VOICED SOUND MARK */
+#define XKB_KEY_semivoicedsound 0x04df /* U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */
+#define XKB_KEY_kana_switch 0xff7e /* Alias for mode_switch */
+
+/*
+ * Arabic
+ * Byte 3 = 5
+ */
+
+#define XKB_KEY_Farsi_0 0x10006f0 /* U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO */
+#define XKB_KEY_Farsi_1 0x10006f1 /* U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE */
+#define XKB_KEY_Farsi_2 0x10006f2 /* U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO */
+#define XKB_KEY_Farsi_3 0x10006f3 /* U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE */
+#define XKB_KEY_Farsi_4 0x10006f4 /* U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR */
+#define XKB_KEY_Farsi_5 0x10006f5 /* U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE */
+#define XKB_KEY_Farsi_6 0x10006f6 /* U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX */
+#define XKB_KEY_Farsi_7 0x10006f7 /* U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN */
+#define XKB_KEY_Farsi_8 0x10006f8 /* U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT */
+#define XKB_KEY_Farsi_9 0x10006f9 /* U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE */
+#define XKB_KEY_Arabic_percent 0x100066a /* U+066A ARABIC PERCENT SIGN */
+#define XKB_KEY_Arabic_superscript_alef 0x1000670 /* U+0670 ARABIC LETTER SUPERSCRIPT ALEF */
+#define XKB_KEY_Arabic_tteh 0x1000679 /* U+0679 ARABIC LETTER TTEH */
+#define XKB_KEY_Arabic_peh 0x100067e /* U+067E ARABIC LETTER PEH */
+#define XKB_KEY_Arabic_tcheh 0x1000686 /* U+0686 ARABIC LETTER TCHEH */
+#define XKB_KEY_Arabic_ddal 0x1000688 /* U+0688 ARABIC LETTER DDAL */
+#define XKB_KEY_Arabic_rreh 0x1000691 /* U+0691 ARABIC LETTER RREH */
+#define XKB_KEY_Arabic_comma 0x05ac /* U+060C ARABIC COMMA */
+#define XKB_KEY_Arabic_fullstop 0x10006d4 /* U+06D4 ARABIC FULL STOP */
+#define XKB_KEY_Arabic_0 0x1000660 /* U+0660 ARABIC-INDIC DIGIT ZERO */
+#define XKB_KEY_Arabic_1 0x1000661 /* U+0661 ARABIC-INDIC DIGIT ONE */
+#define XKB_KEY_Arabic_2 0x1000662 /* U+0662 ARABIC-INDIC DIGIT TWO */
+#define XKB_KEY_Arabic_3 0x1000663 /* U+0663 ARABIC-INDIC DIGIT THREE */
+#define XKB_KEY_Arabic_4 0x1000664 /* U+0664 ARABIC-INDIC DIGIT FOUR */
+#define XKB_KEY_Arabic_5 0x1000665 /* U+0665 ARABIC-INDIC DIGIT FIVE */
+#define XKB_KEY_Arabic_6 0x1000666 /* U+0666 ARABIC-INDIC DIGIT SIX */
+#define XKB_KEY_Arabic_7 0x1000667 /* U+0667 ARABIC-INDIC DIGIT SEVEN */
+#define XKB_KEY_Arabic_8 0x1000668 /* U+0668 ARABIC-INDIC DIGIT EIGHT */
+#define XKB_KEY_Arabic_9 0x1000669 /* U+0669 ARABIC-INDIC DIGIT NINE */
+#define XKB_KEY_Arabic_semicolon 0x05bb /* U+061B ARABIC SEMICOLON */
+#define XKB_KEY_Arabic_question_mark 0x05bf /* U+061F ARABIC QUESTION MARK */
+#define XKB_KEY_Arabic_hamza 0x05c1 /* U+0621 ARABIC LETTER HAMZA */
+#define XKB_KEY_Arabic_maddaonalef 0x05c2 /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */
+#define XKB_KEY_Arabic_hamzaonalef 0x05c3 /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */
+#define XKB_KEY_Arabic_hamzaonwaw 0x05c4 /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */
+#define XKB_KEY_Arabic_hamzaunderalef 0x05c5 /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */
+#define XKB_KEY_Arabic_hamzaonyeh 0x05c6 /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */
+#define XKB_KEY_Arabic_alef 0x05c7 /* U+0627 ARABIC LETTER ALEF */
+#define XKB_KEY_Arabic_beh 0x05c8 /* U+0628 ARABIC LETTER BEH */
+#define XKB_KEY_Arabic_tehmarbuta 0x05c9 /* U+0629 ARABIC LETTER TEH MARBUTA */
+#define XKB_KEY_Arabic_teh 0x05ca /* U+062A ARABIC LETTER TEH */
+#define XKB_KEY_Arabic_theh 0x05cb /* U+062B ARABIC LETTER THEH */
+#define XKB_KEY_Arabic_jeem 0x05cc /* U+062C ARABIC LETTER JEEM */
+#define XKB_KEY_Arabic_hah 0x05cd /* U+062D ARABIC LETTER HAH */
+#define XKB_KEY_Arabic_khah 0x05ce /* U+062E ARABIC LETTER KHAH */
+#define XKB_KEY_Arabic_dal 0x05cf /* U+062F ARABIC LETTER DAL */
+#define XKB_KEY_Arabic_thal 0x05d0 /* U+0630 ARABIC LETTER THAL */
+#define XKB_KEY_Arabic_ra 0x05d1 /* U+0631 ARABIC LETTER REH */
+#define XKB_KEY_Arabic_zain 0x05d2 /* U+0632 ARABIC LETTER ZAIN */
+#define XKB_KEY_Arabic_seen 0x05d3 /* U+0633 ARABIC LETTER SEEN */
+#define XKB_KEY_Arabic_sheen 0x05d4 /* U+0634 ARABIC LETTER SHEEN */
+#define XKB_KEY_Arabic_sad 0x05d5 /* U+0635 ARABIC LETTER SAD */
+#define XKB_KEY_Arabic_dad 0x05d6 /* U+0636 ARABIC LETTER DAD */
+#define XKB_KEY_Arabic_tah 0x05d7 /* U+0637 ARABIC LETTER TAH */
+#define XKB_KEY_Arabic_zah 0x05d8 /* U+0638 ARABIC LETTER ZAH */
+#define XKB_KEY_Arabic_ain 0x05d9 /* U+0639 ARABIC LETTER AIN */
+#define XKB_KEY_Arabic_ghain 0x05da /* U+063A ARABIC LETTER GHAIN */
+#define XKB_KEY_Arabic_tatweel 0x05e0 /* U+0640 ARABIC TATWEEL */
+#define XKB_KEY_Arabic_feh 0x05e1 /* U+0641 ARABIC LETTER FEH */
+#define XKB_KEY_Arabic_qaf 0x05e2 /* U+0642 ARABIC LETTER QAF */
+#define XKB_KEY_Arabic_kaf 0x05e3 /* U+0643 ARABIC LETTER KAF */
+#define XKB_KEY_Arabic_lam 0x05e4 /* U+0644 ARABIC LETTER LAM */
+#define XKB_KEY_Arabic_meem 0x05e5 /* U+0645 ARABIC LETTER MEEM */
+#define XKB_KEY_Arabic_noon 0x05e6 /* U+0646 ARABIC LETTER NOON */
+#define XKB_KEY_Arabic_ha 0x05e7 /* U+0647 ARABIC LETTER HEH */
+#define XKB_KEY_Arabic_heh 0x05e7 /* deprecated */
+#define XKB_KEY_Arabic_waw 0x05e8 /* U+0648 ARABIC LETTER WAW */
+#define XKB_KEY_Arabic_alefmaksura 0x05e9 /* U+0649 ARABIC LETTER ALEF MAKSURA */
+#define XKB_KEY_Arabic_yeh 0x05ea /* U+064A ARABIC LETTER YEH */
+#define XKB_KEY_Arabic_fathatan 0x05eb /* U+064B ARABIC FATHATAN */
+#define XKB_KEY_Arabic_dammatan 0x05ec /* U+064C ARABIC DAMMATAN */
+#define XKB_KEY_Arabic_kasratan 0x05ed /* U+064D ARABIC KASRATAN */
+#define XKB_KEY_Arabic_fatha 0x05ee /* U+064E ARABIC FATHA */
+#define XKB_KEY_Arabic_damma 0x05ef /* U+064F ARABIC DAMMA */
+#define XKB_KEY_Arabic_kasra 0x05f0 /* U+0650 ARABIC KASRA */
+#define XKB_KEY_Arabic_shadda 0x05f1 /* U+0651 ARABIC SHADDA */
+#define XKB_KEY_Arabic_sukun 0x05f2 /* U+0652 ARABIC SUKUN */
+#define XKB_KEY_Arabic_madda_above 0x1000653 /* U+0653 ARABIC MADDAH ABOVE */
+#define XKB_KEY_Arabic_hamza_above 0x1000654 /* U+0654 ARABIC HAMZA ABOVE */
+#define XKB_KEY_Arabic_hamza_below 0x1000655 /* U+0655 ARABIC HAMZA BELOW */
+#define XKB_KEY_Arabic_jeh 0x1000698 /* U+0698 ARABIC LETTER JEH */
+#define XKB_KEY_Arabic_veh 0x10006a4 /* U+06A4 ARABIC LETTER VEH */
+#define XKB_KEY_Arabic_keheh 0x10006a9 /* U+06A9 ARABIC LETTER KEHEH */
+#define XKB_KEY_Arabic_gaf 0x10006af /* U+06AF ARABIC LETTER GAF */
+#define XKB_KEY_Arabic_noon_ghunna 0x10006ba /* U+06BA ARABIC LETTER NOON GHUNNA */
+#define XKB_KEY_Arabic_heh_doachashmee 0x10006be /* U+06BE ARABIC LETTER HEH DOACHASHMEE */
+#define XKB_KEY_Farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
+#define XKB_KEY_Arabic_farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
+#define XKB_KEY_Arabic_yeh_baree 0x10006d2 /* U+06D2 ARABIC LETTER YEH BARREE */
+#define XKB_KEY_Arabic_heh_goal 0x10006c1 /* U+06C1 ARABIC LETTER HEH GOAL */
+#define XKB_KEY_Arabic_switch 0xff7e /* Alias for mode_switch */
+
+/*
+ * Cyrillic
+ * Byte 3 = 6
+ */
+#define XKB_KEY_Cyrillic_GHE_bar 0x1000492 /* U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE */
+#define XKB_KEY_Cyrillic_ghe_bar 0x1000493 /* U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE */
+#define XKB_KEY_Cyrillic_ZHE_descender 0x1000496 /* U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */
+#define XKB_KEY_Cyrillic_zhe_descender 0x1000497 /* U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER */
+#define XKB_KEY_Cyrillic_KA_descender 0x100049a /* U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER */
+#define XKB_KEY_Cyrillic_ka_descender 0x100049b /* U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER */
+#define XKB_KEY_Cyrillic_KA_vertstroke 0x100049c /* U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */
+#define XKB_KEY_Cyrillic_ka_vertstroke 0x100049d /* U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE */
+#define XKB_KEY_Cyrillic_EN_descender 0x10004a2 /* U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER */
+#define XKB_KEY_Cyrillic_en_descender 0x10004a3 /* U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER */
+#define XKB_KEY_Cyrillic_U_straight 0x10004ae /* U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U */
+#define XKB_KEY_Cyrillic_u_straight 0x10004af /* U+04AF CYRILLIC SMALL LETTER STRAIGHT U */
+#define XKB_KEY_Cyrillic_U_straight_bar 0x10004b0 /* U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */
+#define XKB_KEY_Cyrillic_u_straight_bar 0x10004b1 /* U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE */
+#define XKB_KEY_Cyrillic_HA_descender 0x10004b2 /* U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER */
+#define XKB_KEY_Cyrillic_ha_descender 0x10004b3 /* U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER */
+#define XKB_KEY_Cyrillic_CHE_descender 0x10004b6 /* U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */
+#define XKB_KEY_Cyrillic_che_descender 0x10004b7 /* U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER */
+#define XKB_KEY_Cyrillic_CHE_vertstroke 0x10004b8 /* U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */
+#define XKB_KEY_Cyrillic_che_vertstroke 0x10004b9 /* U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE */
+#define XKB_KEY_Cyrillic_SHHA 0x10004ba /* U+04BA CYRILLIC CAPITAL LETTER SHHA */
+#define XKB_KEY_Cyrillic_shha 0x10004bb /* U+04BB CYRILLIC SMALL LETTER SHHA */
+
+#define XKB_KEY_Cyrillic_SCHWA 0x10004d8 /* U+04D8 CYRILLIC CAPITAL LETTER SCHWA */
+#define XKB_KEY_Cyrillic_schwa 0x10004d9 /* U+04D9 CYRILLIC SMALL LETTER SCHWA */
+#define XKB_KEY_Cyrillic_I_macron 0x10004e2 /* U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON */
+#define XKB_KEY_Cyrillic_i_macron 0x10004e3 /* U+04E3 CYRILLIC SMALL LETTER I WITH MACRON */
+#define XKB_KEY_Cyrillic_O_bar 0x10004e8 /* U+04E8 CYRILLIC CAPITAL LETTER BARRED O */
+#define XKB_KEY_Cyrillic_o_bar 0x10004e9 /* U+04E9 CYRILLIC SMALL LETTER BARRED O */
+#define XKB_KEY_Cyrillic_U_macron 0x10004ee /* U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON */
+#define XKB_KEY_Cyrillic_u_macron 0x10004ef /* U+04EF CYRILLIC SMALL LETTER U WITH MACRON */
+
+#define XKB_KEY_Serbian_dje 0x06a1 /* U+0452 CYRILLIC SMALL LETTER DJE */
+#define XKB_KEY_Macedonia_gje 0x06a2 /* U+0453 CYRILLIC SMALL LETTER GJE */
+#define XKB_KEY_Cyrillic_io 0x06a3 /* U+0451 CYRILLIC SMALL LETTER IO */
+#define XKB_KEY_Ukrainian_ie 0x06a4 /* U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE */
+#define XKB_KEY_Ukranian_je 0x06a4 /* deprecated */
+#define XKB_KEY_Macedonia_dse 0x06a5 /* U+0455 CYRILLIC SMALL LETTER DZE */
+#define XKB_KEY_Ukrainian_i 0x06a6 /* U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */
+#define XKB_KEY_Ukranian_i 0x06a6 /* deprecated */
+#define XKB_KEY_Ukrainian_yi 0x06a7 /* U+0457 CYRILLIC SMALL LETTER YI */
+#define XKB_KEY_Ukranian_yi 0x06a7 /* deprecated */
+#define XKB_KEY_Cyrillic_je 0x06a8 /* U+0458 CYRILLIC SMALL LETTER JE */
+#define XKB_KEY_Serbian_je 0x06a8 /* deprecated */
+#define XKB_KEY_Cyrillic_lje 0x06a9 /* U+0459 CYRILLIC SMALL LETTER LJE */
+#define XKB_KEY_Serbian_lje 0x06a9 /* deprecated */
+#define XKB_KEY_Cyrillic_nje 0x06aa /* U+045A CYRILLIC SMALL LETTER NJE */
+#define XKB_KEY_Serbian_nje 0x06aa /* deprecated */
+#define XKB_KEY_Serbian_tshe 0x06ab /* U+045B CYRILLIC SMALL LETTER TSHE */
+#define XKB_KEY_Macedonia_kje 0x06ac /* U+045C CYRILLIC SMALL LETTER KJE */
+#define XKB_KEY_Ukrainian_ghe_with_upturn 0x06ad /* U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN */
+#define XKB_KEY_Byelorussian_shortu 0x06ae /* U+045E CYRILLIC SMALL LETTER SHORT U */
+#define XKB_KEY_Cyrillic_dzhe 0x06af /* U+045F CYRILLIC SMALL LETTER DZHE */
+#define XKB_KEY_Serbian_dze 0x06af /* deprecated */
+#define XKB_KEY_numerosign 0x06b0 /* U+2116 NUMERO SIGN */
+#define XKB_KEY_Serbian_DJE 0x06b1 /* U+0402 CYRILLIC CAPITAL LETTER DJE */
+#define XKB_KEY_Macedonia_GJE 0x06b2 /* U+0403 CYRILLIC CAPITAL LETTER GJE */
+#define XKB_KEY_Cyrillic_IO 0x06b3 /* U+0401 CYRILLIC CAPITAL LETTER IO */
+#define XKB_KEY_Ukrainian_IE 0x06b4 /* U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE */
+#define XKB_KEY_Ukranian_JE 0x06b4 /* deprecated */
+#define XKB_KEY_Macedonia_DSE 0x06b5 /* U+0405 CYRILLIC CAPITAL LETTER DZE */
+#define XKB_KEY_Ukrainian_I 0x06b6 /* U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */
+#define XKB_KEY_Ukranian_I 0x06b6 /* deprecated */
+#define XKB_KEY_Ukrainian_YI 0x06b7 /* U+0407 CYRILLIC CAPITAL LETTER YI */
+#define XKB_KEY_Ukranian_YI 0x06b7 /* deprecated */
+#define XKB_KEY_Cyrillic_JE 0x06b8 /* U+0408 CYRILLIC CAPITAL LETTER JE */
+#define XKB_KEY_Serbian_JE 0x06b8 /* deprecated */
+#define XKB_KEY_Cyrillic_LJE 0x06b9 /* U+0409 CYRILLIC CAPITAL LETTER LJE */
+#define XKB_KEY_Serbian_LJE 0x06b9 /* deprecated */
+#define XKB_KEY_Cyrillic_NJE 0x06ba /* U+040A CYRILLIC CAPITAL LETTER NJE */
+#define XKB_KEY_Serbian_NJE 0x06ba /* deprecated */
+#define XKB_KEY_Serbian_TSHE 0x06bb /* U+040B CYRILLIC CAPITAL LETTER TSHE */
+#define XKB_KEY_Macedonia_KJE 0x06bc /* U+040C CYRILLIC CAPITAL LETTER KJE */
+#define XKB_KEY_Ukrainian_GHE_WITH_UPTURN 0x06bd /* U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN */
+#define XKB_KEY_Byelorussian_SHORTU 0x06be /* U+040E CYRILLIC CAPITAL LETTER SHORT U */
+#define XKB_KEY_Cyrillic_DZHE 0x06bf /* U+040F CYRILLIC CAPITAL LETTER DZHE */
+#define XKB_KEY_Serbian_DZE 0x06bf /* deprecated */
+#define XKB_KEY_Cyrillic_yu 0x06c0 /* U+044E CYRILLIC SMALL LETTER YU */
+#define XKB_KEY_Cyrillic_a 0x06c1 /* U+0430 CYRILLIC SMALL LETTER A */
+#define XKB_KEY_Cyrillic_be 0x06c2 /* U+0431 CYRILLIC SMALL LETTER BE */
+#define XKB_KEY_Cyrillic_tse 0x06c3 /* U+0446 CYRILLIC SMALL LETTER TSE */
+#define XKB_KEY_Cyrillic_de 0x06c4 /* U+0434 CYRILLIC SMALL LETTER DE */
+#define XKB_KEY_Cyrillic_ie 0x06c5 /* U+0435 CYRILLIC SMALL LETTER IE */
+#define XKB_KEY_Cyrillic_ef 0x06c6 /* U+0444 CYRILLIC SMALL LETTER EF */
+#define XKB_KEY_Cyrillic_ghe 0x06c7 /* U+0433 CYRILLIC SMALL LETTER GHE */
+#define XKB_KEY_Cyrillic_ha 0x06c8 /* U+0445 CYRILLIC SMALL LETTER HA */
+#define XKB_KEY_Cyrillic_i 0x06c9 /* U+0438 CYRILLIC SMALL LETTER I */
+#define XKB_KEY_Cyrillic_shorti 0x06ca /* U+0439 CYRILLIC SMALL LETTER SHORT I */
+#define XKB_KEY_Cyrillic_ka 0x06cb /* U+043A CYRILLIC SMALL LETTER KA */
+#define XKB_KEY_Cyrillic_el 0x06cc /* U+043B CYRILLIC SMALL LETTER EL */
+#define XKB_KEY_Cyrillic_em 0x06cd /* U+043C CYRILLIC SMALL LETTER EM */
+#define XKB_KEY_Cyrillic_en 0x06ce /* U+043D CYRILLIC SMALL LETTER EN */
+#define XKB_KEY_Cyrillic_o 0x06cf /* U+043E CYRILLIC SMALL LETTER O */
+#define XKB_KEY_Cyrillic_pe 0x06d0 /* U+043F CYRILLIC SMALL LETTER PE */
+#define XKB_KEY_Cyrillic_ya 0x06d1 /* U+044F CYRILLIC SMALL LETTER YA */
+#define XKB_KEY_Cyrillic_er 0x06d2 /* U+0440 CYRILLIC SMALL LETTER ER */
+#define XKB_KEY_Cyrillic_es 0x06d3 /* U+0441 CYRILLIC SMALL LETTER ES */
+#define XKB_KEY_Cyrillic_te 0x06d4 /* U+0442 CYRILLIC SMALL LETTER TE */
+#define XKB_KEY_Cyrillic_u 0x06d5 /* U+0443 CYRILLIC SMALL LETTER U */
+#define XKB_KEY_Cyrillic_zhe 0x06d6 /* U+0436 CYRILLIC SMALL LETTER ZHE */
+#define XKB_KEY_Cyrillic_ve 0x06d7 /* U+0432 CYRILLIC SMALL LETTER VE */
+#define XKB_KEY_Cyrillic_softsign 0x06d8 /* U+044C CYRILLIC SMALL LETTER SOFT SIGN */
+#define XKB_KEY_Cyrillic_yeru 0x06d9 /* U+044B CYRILLIC SMALL LETTER YERU */
+#define XKB_KEY_Cyrillic_ze 0x06da /* U+0437 CYRILLIC SMALL LETTER ZE */
+#define XKB_KEY_Cyrillic_sha 0x06db /* U+0448 CYRILLIC SMALL LETTER SHA */
+#define XKB_KEY_Cyrillic_e 0x06dc /* U+044D CYRILLIC SMALL LETTER E */
+#define XKB_KEY_Cyrillic_shcha 0x06dd /* U+0449 CYRILLIC SMALL LETTER SHCHA */
+#define XKB_KEY_Cyrillic_che 0x06de /* U+0447 CYRILLIC SMALL LETTER CHE */
+#define XKB_KEY_Cyrillic_hardsign 0x06df /* U+044A CYRILLIC SMALL LETTER HARD SIGN */
+#define XKB_KEY_Cyrillic_YU 0x06e0 /* U+042E CYRILLIC CAPITAL LETTER YU */
+#define XKB_KEY_Cyrillic_A 0x06e1 /* U+0410 CYRILLIC CAPITAL LETTER A */
+#define XKB_KEY_Cyrillic_BE 0x06e2 /* U+0411 CYRILLIC CAPITAL LETTER BE */
+#define XKB_KEY_Cyrillic_TSE 0x06e3 /* U+0426 CYRILLIC CAPITAL LETTER TSE */
+#define XKB_KEY_Cyrillic_DE 0x06e4 /* U+0414 CYRILLIC CAPITAL LETTER DE */
+#define XKB_KEY_Cyrillic_IE 0x06e5 /* U+0415 CYRILLIC CAPITAL LETTER IE */
+#define XKB_KEY_Cyrillic_EF 0x06e6 /* U+0424 CYRILLIC CAPITAL LETTER EF */
+#define XKB_KEY_Cyrillic_GHE 0x06e7 /* U+0413 CYRILLIC CAPITAL LETTER GHE */
+#define XKB_KEY_Cyrillic_HA 0x06e8 /* U+0425 CYRILLIC CAPITAL LETTER HA */
+#define XKB_KEY_Cyrillic_I 0x06e9 /* U+0418 CYRILLIC CAPITAL LETTER I */
+#define XKB_KEY_Cyrillic_SHORTI 0x06ea /* U+0419 CYRILLIC CAPITAL LETTER SHORT I */
+#define XKB_KEY_Cyrillic_KA 0x06eb /* U+041A CYRILLIC CAPITAL LETTER KA */
+#define XKB_KEY_Cyrillic_EL 0x06ec /* U+041B CYRILLIC CAPITAL LETTER EL */
+#define XKB_KEY_Cyrillic_EM 0x06ed /* U+041C CYRILLIC CAPITAL LETTER EM */
+#define XKB_KEY_Cyrillic_EN 0x06ee /* U+041D CYRILLIC CAPITAL LETTER EN */
+#define XKB_KEY_Cyrillic_O 0x06ef /* U+041E CYRILLIC CAPITAL LETTER O */
+#define XKB_KEY_Cyrillic_PE 0x06f0 /* U+041F CYRILLIC CAPITAL LETTER PE */
+#define XKB_KEY_Cyrillic_YA 0x06f1 /* U+042F CYRILLIC CAPITAL LETTER YA */
+#define XKB_KEY_Cyrillic_ER 0x06f2 /* U+0420 CYRILLIC CAPITAL LETTER ER */
+#define XKB_KEY_Cyrillic_ES 0x06f3 /* U+0421 CYRILLIC CAPITAL LETTER ES */
+#define XKB_KEY_Cyrillic_TE 0x06f4 /* U+0422 CYRILLIC CAPITAL LETTER TE */
+#define XKB_KEY_Cyrillic_U 0x06f5 /* U+0423 CYRILLIC CAPITAL LETTER U */
+#define XKB_KEY_Cyrillic_ZHE 0x06f6 /* U+0416 CYRILLIC CAPITAL LETTER ZHE */
+#define XKB_KEY_Cyrillic_VE 0x06f7 /* U+0412 CYRILLIC CAPITAL LETTER VE */
+#define XKB_KEY_Cyrillic_SOFTSIGN 0x06f8 /* U+042C CYRILLIC CAPITAL LETTER SOFT SIGN */
+#define XKB_KEY_Cyrillic_YERU 0x06f9 /* U+042B CYRILLIC CAPITAL LETTER YERU */
+#define XKB_KEY_Cyrillic_ZE 0x06fa /* U+0417 CYRILLIC CAPITAL LETTER ZE */
+#define XKB_KEY_Cyrillic_SHA 0x06fb /* U+0428 CYRILLIC CAPITAL LETTER SHA */
+#define XKB_KEY_Cyrillic_E 0x06fc /* U+042D CYRILLIC CAPITAL LETTER E */
+#define XKB_KEY_Cyrillic_SHCHA 0x06fd /* U+0429 CYRILLIC CAPITAL LETTER SHCHA */
+#define XKB_KEY_Cyrillic_CHE 0x06fe /* U+0427 CYRILLIC CAPITAL LETTER CHE */
+#define XKB_KEY_Cyrillic_HARDSIGN 0x06ff /* U+042A CYRILLIC CAPITAL LETTER HARD SIGN */
+
+/*
+ * Greek
+ * (based on an early draft of, and not quite identical to, ISO/IEC 8859-7)
+ * Byte 3 = 7
+ */
+
+#define XKB_KEY_Greek_ALPHAaccent 0x07a1 /* U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS */
+#define XKB_KEY_Greek_EPSILONaccent 0x07a2 /* U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS */
+#define XKB_KEY_Greek_ETAaccent 0x07a3 /* U+0389 GREEK CAPITAL LETTER ETA WITH TONOS */
+#define XKB_KEY_Greek_IOTAaccent 0x07a4 /* U+038A GREEK CAPITAL LETTER IOTA WITH TONOS */
+#define XKB_KEY_Greek_IOTAdieresis 0x07a5 /* U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */
+#define XKB_KEY_Greek_IOTAdiaeresis 0x07a5 /* old typo */
+#define XKB_KEY_Greek_OMICRONaccent 0x07a7 /* U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS */
+#define XKB_KEY_Greek_UPSILONaccent 0x07a8 /* U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS */
+#define XKB_KEY_Greek_UPSILONdieresis 0x07a9 /* U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */
+#define XKB_KEY_Greek_OMEGAaccent 0x07ab /* U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS */
+#define XKB_KEY_Greek_accentdieresis 0x07ae /* U+0385 GREEK DIALYTIKA TONOS */
+#define XKB_KEY_Greek_horizbar 0x07af /* U+2015 HORIZONTAL BAR */
+#define XKB_KEY_Greek_alphaaccent 0x07b1 /* U+03AC GREEK SMALL LETTER ALPHA WITH TONOS */
+#define XKB_KEY_Greek_epsilonaccent 0x07b2 /* U+03AD GREEK SMALL LETTER EPSILON WITH TONOS */
+#define XKB_KEY_Greek_etaaccent 0x07b3 /* U+03AE GREEK SMALL LETTER ETA WITH TONOS */
+#define XKB_KEY_Greek_iotaaccent 0x07b4 /* U+03AF GREEK SMALL LETTER IOTA WITH TONOS */
+#define XKB_KEY_Greek_iotadieresis 0x07b5 /* U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA */
+#define XKB_KEY_Greek_iotaaccentdieresis 0x07b6 /* U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */
+#define XKB_KEY_Greek_omicronaccent 0x07b7 /* U+03CC GREEK SMALL LETTER OMICRON WITH TONOS */
+#define XKB_KEY_Greek_upsilonaccent 0x07b8 /* U+03CD GREEK SMALL LETTER UPSILON WITH TONOS */
+#define XKB_KEY_Greek_upsilondieresis 0x07b9 /* U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA */
+#define XKB_KEY_Greek_upsilonaccentdieresis 0x07ba /* U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */
+#define XKB_KEY_Greek_omegaaccent 0x07bb /* U+03CE GREEK SMALL LETTER OMEGA WITH TONOS */
+#define XKB_KEY_Greek_ALPHA 0x07c1 /* U+0391 GREEK CAPITAL LETTER ALPHA */
+#define XKB_KEY_Greek_BETA 0x07c2 /* U+0392 GREEK CAPITAL LETTER BETA */
+#define XKB_KEY_Greek_GAMMA 0x07c3 /* U+0393 GREEK CAPITAL LETTER GAMMA */
+#define XKB_KEY_Greek_DELTA 0x07c4 /* U+0394 GREEK CAPITAL LETTER DELTA */
+#define XKB_KEY_Greek_EPSILON 0x07c5 /* U+0395 GREEK CAPITAL LETTER EPSILON */
+#define XKB_KEY_Greek_ZETA 0x07c6 /* U+0396 GREEK CAPITAL LETTER ZETA */
+#define XKB_KEY_Greek_ETA 0x07c7 /* U+0397 GREEK CAPITAL LETTER ETA */
+#define XKB_KEY_Greek_THETA 0x07c8 /* U+0398 GREEK CAPITAL LETTER THETA */
+#define XKB_KEY_Greek_IOTA 0x07c9 /* U+0399 GREEK CAPITAL LETTER IOTA */
+#define XKB_KEY_Greek_KAPPA 0x07ca /* U+039A GREEK CAPITAL LETTER KAPPA */
+#define XKB_KEY_Greek_LAMDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
+#define XKB_KEY_Greek_LAMBDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
+#define XKB_KEY_Greek_MU 0x07cc /* U+039C GREEK CAPITAL LETTER MU */
+#define XKB_KEY_Greek_NU 0x07cd /* U+039D GREEK CAPITAL LETTER NU */
+#define XKB_KEY_Greek_XI 0x07ce /* U+039E GREEK CAPITAL LETTER XI */
+#define XKB_KEY_Greek_OMICRON 0x07cf /* U+039F GREEK CAPITAL LETTER OMICRON */
+#define XKB_KEY_Greek_PI 0x07d0 /* U+03A0 GREEK CAPITAL LETTER PI */
+#define XKB_KEY_Greek_RHO 0x07d1 /* U+03A1 GREEK CAPITAL LETTER RHO */
+#define XKB_KEY_Greek_SIGMA 0x07d2 /* U+03A3 GREEK CAPITAL LETTER SIGMA */
+#define XKB_KEY_Greek_TAU 0x07d4 /* U+03A4 GREEK CAPITAL LETTER TAU */
+#define XKB_KEY_Greek_UPSILON 0x07d5 /* U+03A5 GREEK CAPITAL LETTER UPSILON */
+#define XKB_KEY_Greek_PHI 0x07d6 /* U+03A6 GREEK CAPITAL LETTER PHI */
+#define XKB_KEY_Greek_CHI 0x07d7 /* U+03A7 GREEK CAPITAL LETTER CHI */
+#define XKB_KEY_Greek_PSI 0x07d8 /* U+03A8 GREEK CAPITAL LETTER PSI */
+#define XKB_KEY_Greek_OMEGA 0x07d9 /* U+03A9 GREEK CAPITAL LETTER OMEGA */
+#define XKB_KEY_Greek_alpha 0x07e1 /* U+03B1 GREEK SMALL LETTER ALPHA */
+#define XKB_KEY_Greek_beta 0x07e2 /* U+03B2 GREEK SMALL LETTER BETA */
+#define XKB_KEY_Greek_gamma 0x07e3 /* U+03B3 GREEK SMALL LETTER GAMMA */
+#define XKB_KEY_Greek_delta 0x07e4 /* U+03B4 GREEK SMALL LETTER DELTA */
+#define XKB_KEY_Greek_epsilon 0x07e5 /* U+03B5 GREEK SMALL LETTER EPSILON */
+#define XKB_KEY_Greek_zeta 0x07e6 /* U+03B6 GREEK SMALL LETTER ZETA */
+#define XKB_KEY_Greek_eta 0x07e7 /* U+03B7 GREEK SMALL LETTER ETA */
+#define XKB_KEY_Greek_theta 0x07e8 /* U+03B8 GREEK SMALL LETTER THETA */
+#define XKB_KEY_Greek_iota 0x07e9 /* U+03B9 GREEK SMALL LETTER IOTA */
+#define XKB_KEY_Greek_kappa 0x07ea /* U+03BA GREEK SMALL LETTER KAPPA */
+#define XKB_KEY_Greek_lamda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
+#define XKB_KEY_Greek_lambda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
+#define XKB_KEY_Greek_mu 0x07ec /* U+03BC GREEK SMALL LETTER MU */
+#define XKB_KEY_Greek_nu 0x07ed /* U+03BD GREEK SMALL LETTER NU */
+#define XKB_KEY_Greek_xi 0x07ee /* U+03BE GREEK SMALL LETTER XI */
+#define XKB_KEY_Greek_omicron 0x07ef /* U+03BF GREEK SMALL LETTER OMICRON */
+#define XKB_KEY_Greek_pi 0x07f0 /* U+03C0 GREEK SMALL LETTER PI */
+#define XKB_KEY_Greek_rho 0x07f1 /* U+03C1 GREEK SMALL LETTER RHO */
+#define XKB_KEY_Greek_sigma 0x07f2 /* U+03C3 GREEK SMALL LETTER SIGMA */
+#define XKB_KEY_Greek_finalsmallsigma 0x07f3 /* U+03C2 GREEK SMALL LETTER FINAL SIGMA */
+#define XKB_KEY_Greek_tau 0x07f4 /* U+03C4 GREEK SMALL LETTER TAU */
+#define XKB_KEY_Greek_upsilon 0x07f5 /* U+03C5 GREEK SMALL LETTER UPSILON */
+#define XKB_KEY_Greek_phi 0x07f6 /* U+03C6 GREEK SMALL LETTER PHI */
+#define XKB_KEY_Greek_chi 0x07f7 /* U+03C7 GREEK SMALL LETTER CHI */
+#define XKB_KEY_Greek_psi 0x07f8 /* U+03C8 GREEK SMALL LETTER PSI */
+#define XKB_KEY_Greek_omega 0x07f9 /* U+03C9 GREEK SMALL LETTER OMEGA */
+#define XKB_KEY_Greek_switch 0xff7e /* Alias for mode_switch */
+
+/*
+ * Technical
+ * (from the DEC VT330/VT420 Technical Character Set, http://vt100.net/charsets/technical.html)
+ * Byte 3 = 8
+ */
+
+#define XKB_KEY_leftradical 0x08a1 /* U+23B7 RADICAL SYMBOL BOTTOM */
+#define XKB_KEY_topleftradical 0x08a2 /*(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)*/
+#define XKB_KEY_horizconnector 0x08a3 /*(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)*/
+#define XKB_KEY_topintegral 0x08a4 /* U+2320 TOP HALF INTEGRAL */
+#define XKB_KEY_botintegral 0x08a5 /* U+2321 BOTTOM HALF INTEGRAL */
+#define XKB_KEY_vertconnector 0x08a6 /*(U+2502 BOX DRAWINGS LIGHT VERTICAL)*/
+#define XKB_KEY_topleftsqbracket 0x08a7 /* U+23A1 LEFT SQUARE BRACKET UPPER CORNER */
+#define XKB_KEY_botleftsqbracket 0x08a8 /* U+23A3 LEFT SQUARE BRACKET LOWER CORNER */
+#define XKB_KEY_toprightsqbracket 0x08a9 /* U+23A4 RIGHT SQUARE BRACKET UPPER CORNER */
+#define XKB_KEY_botrightsqbracket 0x08aa /* U+23A6 RIGHT SQUARE BRACKET LOWER CORNER */
+#define XKB_KEY_topleftparens 0x08ab /* U+239B LEFT PARENTHESIS UPPER HOOK */
+#define XKB_KEY_botleftparens 0x08ac /* U+239D LEFT PARENTHESIS LOWER HOOK */
+#define XKB_KEY_toprightparens 0x08ad /* U+239E RIGHT PARENTHESIS UPPER HOOK */
+#define XKB_KEY_botrightparens 0x08ae /* U+23A0 RIGHT PARENTHESIS LOWER HOOK */
+#define XKB_KEY_leftmiddlecurlybrace 0x08af /* U+23A8 LEFT CURLY BRACKET MIDDLE PIECE */
+#define XKB_KEY_rightmiddlecurlybrace 0x08b0 /* U+23AC RIGHT CURLY BRACKET MIDDLE PIECE */
+#define XKB_KEY_topleftsummation 0x08b1
+#define XKB_KEY_botleftsummation 0x08b2
+#define XKB_KEY_topvertsummationconnector 0x08b3
+#define XKB_KEY_botvertsummationconnector 0x08b4
+#define XKB_KEY_toprightsummation 0x08b5
+#define XKB_KEY_botrightsummation 0x08b6
+#define XKB_KEY_rightmiddlesummation 0x08b7
+#define XKB_KEY_lessthanequal 0x08bc /* U+2264 LESS-THAN OR EQUAL TO */
+#define XKB_KEY_notequal 0x08bd /* U+2260 NOT EQUAL TO */
+#define XKB_KEY_greaterthanequal 0x08be /* U+2265 GREATER-THAN OR EQUAL TO */
+#define XKB_KEY_integral 0x08bf /* U+222B INTEGRAL */
+#define XKB_KEY_therefore 0x08c0 /* U+2234 THEREFORE */
+#define XKB_KEY_variation 0x08c1 /* U+221D PROPORTIONAL TO */
+#define XKB_KEY_infinity 0x08c2 /* U+221E INFINITY */
+#define XKB_KEY_nabla 0x08c5 /* U+2207 NABLA */
+#define XKB_KEY_approximate 0x08c8 /* U+223C TILDE OPERATOR */
+#define XKB_KEY_similarequal 0x08c9 /* U+2243 ASYMPTOTICALLY EQUAL TO */
+#define XKB_KEY_ifonlyif 0x08cd /* U+21D4 LEFT RIGHT DOUBLE ARROW */
+#define XKB_KEY_implies 0x08ce /* U+21D2 RIGHTWARDS DOUBLE ARROW */
+#define XKB_KEY_identical 0x08cf /* U+2261 IDENTICAL TO */
+#define XKB_KEY_radical 0x08d6 /* U+221A SQUARE ROOT */
+#define XKB_KEY_includedin 0x08da /* U+2282 SUBSET OF */
+#define XKB_KEY_includes 0x08db /* U+2283 SUPERSET OF */
+#define XKB_KEY_intersection 0x08dc /* U+2229 INTERSECTION */
+#define XKB_KEY_union 0x08dd /* U+222A UNION */
+#define XKB_KEY_logicaland 0x08de /* U+2227 LOGICAL AND */
+#define XKB_KEY_logicalor 0x08df /* U+2228 LOGICAL OR */
+#define XKB_KEY_partialderivative 0x08ef /* U+2202 PARTIAL DIFFERENTIAL */
+#define XKB_KEY_function 0x08f6 /* U+0192 LATIN SMALL LETTER F WITH HOOK */
+#define XKB_KEY_leftarrow 0x08fb /* U+2190 LEFTWARDS ARROW */
+#define XKB_KEY_uparrow 0x08fc /* U+2191 UPWARDS ARROW */
+#define XKB_KEY_rightarrow 0x08fd /* U+2192 RIGHTWARDS ARROW */
+#define XKB_KEY_downarrow 0x08fe /* U+2193 DOWNWARDS ARROW */
+
+/*
+ * Special
+ * (from the DEC VT100 Special Graphics Character Set)
+ * Byte 3 = 9
+ */
+
+#define XKB_KEY_blank 0x09df
+#define XKB_KEY_soliddiamond 0x09e0 /* U+25C6 BLACK DIAMOND */
+#define XKB_KEY_checkerboard 0x09e1 /* U+2592 MEDIUM SHADE */
+#define XKB_KEY_ht 0x09e2 /* U+2409 SYMBOL FOR HORIZONTAL TABULATION */
+#define XKB_KEY_ff 0x09e3 /* U+240C SYMBOL FOR FORM FEED */
+#define XKB_KEY_cr 0x09e4 /* U+240D SYMBOL FOR CARRIAGE RETURN */
+#define XKB_KEY_lf 0x09e5 /* U+240A SYMBOL FOR LINE FEED */
+#define XKB_KEY_nl 0x09e8 /* U+2424 SYMBOL FOR NEWLINE */
+#define XKB_KEY_vt 0x09e9 /* U+240B SYMBOL FOR VERTICAL TABULATION */
+#define XKB_KEY_lowrightcorner 0x09ea /* U+2518 BOX DRAWINGS LIGHT UP AND LEFT */
+#define XKB_KEY_uprightcorner 0x09eb /* U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT */
+#define XKB_KEY_upleftcorner 0x09ec /* U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT */
+#define XKB_KEY_lowleftcorner 0x09ed /* U+2514 BOX DRAWINGS LIGHT UP AND RIGHT */
+#define XKB_KEY_crossinglines 0x09ee /* U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */
+#define XKB_KEY_horizlinescan1 0x09ef /* U+23BA HORIZONTAL SCAN LINE-1 */
+#define XKB_KEY_horizlinescan3 0x09f0 /* U+23BB HORIZONTAL SCAN LINE-3 */
+#define XKB_KEY_horizlinescan5 0x09f1 /* U+2500 BOX DRAWINGS LIGHT HORIZONTAL */
+#define XKB_KEY_horizlinescan7 0x09f2 /* U+23BC HORIZONTAL SCAN LINE-7 */
+#define XKB_KEY_horizlinescan9 0x09f3 /* U+23BD HORIZONTAL SCAN LINE-9 */
+#define XKB_KEY_leftt 0x09f4 /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */
+#define XKB_KEY_rightt 0x09f5 /* U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT */
+#define XKB_KEY_bott 0x09f6 /* U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL */
+#define XKB_KEY_topt 0x09f7 /* U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */
+#define XKB_KEY_vertbar 0x09f8 /* U+2502 BOX DRAWINGS LIGHT VERTICAL */
+
+/*
+ * Publishing
+ * (these are probably from a long forgotten DEC Publishing
+ * font that once shipped with DECwrite)
+ * Byte 3 = 0x0a
+ */
+
+#define XKB_KEY_emspace 0x0aa1 /* U+2003 EM SPACE */
+#define XKB_KEY_enspace 0x0aa2 /* U+2002 EN SPACE */
+#define XKB_KEY_em3space 0x0aa3 /* U+2004 THREE-PER-EM SPACE */
+#define XKB_KEY_em4space 0x0aa4 /* U+2005 FOUR-PER-EM SPACE */
+#define XKB_KEY_digitspace 0x0aa5 /* U+2007 FIGURE SPACE */
+#define XKB_KEY_punctspace 0x0aa6 /* U+2008 PUNCTUATION SPACE */
+#define XKB_KEY_thinspace 0x0aa7 /* U+2009 THIN SPACE */
+#define XKB_KEY_hairspace 0x0aa8 /* U+200A HAIR SPACE */
+#define XKB_KEY_emdash 0x0aa9 /* U+2014 EM DASH */
+#define XKB_KEY_endash 0x0aaa /* U+2013 EN DASH */
+#define XKB_KEY_signifblank 0x0aac /*(U+2423 OPEN BOX)*/
+#define XKB_KEY_ellipsis 0x0aae /* U+2026 HORIZONTAL ELLIPSIS */
+#define XKB_KEY_doubbaselinedot 0x0aaf /* U+2025 TWO DOT LEADER */
+#define XKB_KEY_onethird 0x0ab0 /* U+2153 VULGAR FRACTION ONE THIRD */
+#define XKB_KEY_twothirds 0x0ab1 /* U+2154 VULGAR FRACTION TWO THIRDS */
+#define XKB_KEY_onefifth 0x0ab2 /* U+2155 VULGAR FRACTION ONE FIFTH */
+#define XKB_KEY_twofifths 0x0ab3 /* U+2156 VULGAR FRACTION TWO FIFTHS */
+#define XKB_KEY_threefifths 0x0ab4 /* U+2157 VULGAR FRACTION THREE FIFTHS */
+#define XKB_KEY_fourfifths 0x0ab5 /* U+2158 VULGAR FRACTION FOUR FIFTHS */
+#define XKB_KEY_onesixth 0x0ab6 /* U+2159 VULGAR FRACTION ONE SIXTH */
+#define XKB_KEY_fivesixths 0x0ab7 /* U+215A VULGAR FRACTION FIVE SIXTHS */
+#define XKB_KEY_careof 0x0ab8 /* U+2105 CARE OF */
+#define XKB_KEY_figdash 0x0abb /* U+2012 FIGURE DASH */
+#define XKB_KEY_leftanglebracket 0x0abc /*(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)*/
+#define XKB_KEY_decimalpoint 0x0abd /*(U+002E FULL STOP)*/
+#define XKB_KEY_rightanglebracket 0x0abe /*(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)*/
+#define XKB_KEY_marker 0x0abf
+#define XKB_KEY_oneeighth 0x0ac3 /* U+215B VULGAR FRACTION ONE EIGHTH */
+#define XKB_KEY_threeeighths 0x0ac4 /* U+215C VULGAR FRACTION THREE EIGHTHS */
+#define XKB_KEY_fiveeighths 0x0ac5 /* U+215D VULGAR FRACTION FIVE EIGHTHS */
+#define XKB_KEY_seveneighths 0x0ac6 /* U+215E VULGAR FRACTION SEVEN EIGHTHS */
+#define XKB_KEY_trademark 0x0ac9 /* U+2122 TRADE MARK SIGN */
+#define XKB_KEY_signaturemark 0x0aca /*(U+2613 SALTIRE)*/
+#define XKB_KEY_trademarkincircle 0x0acb
+#define XKB_KEY_leftopentriangle 0x0acc /*(U+25C1 WHITE LEFT-POINTING TRIANGLE)*/
+#define XKB_KEY_rightopentriangle 0x0acd /*(U+25B7 WHITE RIGHT-POINTING TRIANGLE)*/
+#define XKB_KEY_emopencircle 0x0ace /*(U+25CB WHITE CIRCLE)*/
+#define XKB_KEY_emopenrectangle 0x0acf /*(U+25AF WHITE VERTICAL RECTANGLE)*/
+#define XKB_KEY_leftsinglequotemark 0x0ad0 /* U+2018 LEFT SINGLE QUOTATION MARK */
+#define XKB_KEY_rightsinglequotemark 0x0ad1 /* U+2019 RIGHT SINGLE QUOTATION MARK */
+#define XKB_KEY_leftdoublequotemark 0x0ad2 /* U+201C LEFT DOUBLE QUOTATION MARK */
+#define XKB_KEY_rightdoublequotemark 0x0ad3 /* U+201D RIGHT DOUBLE QUOTATION MARK */
+#define XKB_KEY_prescription 0x0ad4 /* U+211E PRESCRIPTION TAKE */
+#define XKB_KEY_permille 0x0ad5 /* U+2030 PER MILLE SIGN */
+#define XKB_KEY_minutes 0x0ad6 /* U+2032 PRIME */
+#define XKB_KEY_seconds 0x0ad7 /* U+2033 DOUBLE PRIME */
+#define XKB_KEY_latincross 0x0ad9 /* U+271D LATIN CROSS */
+#define XKB_KEY_hexagram 0x0ada
+#define XKB_KEY_filledrectbullet 0x0adb /*(U+25AC BLACK RECTANGLE)*/
+#define XKB_KEY_filledlefttribullet 0x0adc /*(U+25C0 BLACK LEFT-POINTING TRIANGLE)*/
+#define XKB_KEY_filledrighttribullet 0x0add /*(U+25B6 BLACK RIGHT-POINTING TRIANGLE)*/
+#define XKB_KEY_emfilledcircle 0x0ade /*(U+25CF BLACK CIRCLE)*/
+#define XKB_KEY_emfilledrect 0x0adf /*(U+25AE BLACK VERTICAL RECTANGLE)*/
+#define XKB_KEY_enopencircbullet 0x0ae0 /*(U+25E6 WHITE BULLET)*/
+#define XKB_KEY_enopensquarebullet 0x0ae1 /*(U+25AB WHITE SMALL SQUARE)*/
+#define XKB_KEY_openrectbullet 0x0ae2 /*(U+25AD WHITE RECTANGLE)*/
+#define XKB_KEY_opentribulletup 0x0ae3 /*(U+25B3 WHITE UP-POINTING TRIANGLE)*/
+#define XKB_KEY_opentribulletdown 0x0ae4 /*(U+25BD WHITE DOWN-POINTING TRIANGLE)*/
+#define XKB_KEY_openstar 0x0ae5 /*(U+2606 WHITE STAR)*/
+#define XKB_KEY_enfilledcircbullet 0x0ae6 /*(U+2022 BULLET)*/
+#define XKB_KEY_enfilledsqbullet 0x0ae7 /*(U+25AA BLACK SMALL SQUARE)*/
+#define XKB_KEY_filledtribulletup 0x0ae8 /*(U+25B2 BLACK UP-POINTING TRIANGLE)*/
+#define XKB_KEY_filledtribulletdown 0x0ae9 /*(U+25BC BLACK DOWN-POINTING TRIANGLE)*/
+#define XKB_KEY_leftpointer 0x0aea /*(U+261C WHITE LEFT POINTING INDEX)*/
+#define XKB_KEY_rightpointer 0x0aeb /*(U+261E WHITE RIGHT POINTING INDEX)*/
+#define XKB_KEY_club 0x0aec /* U+2663 BLACK CLUB SUIT */
+#define XKB_KEY_diamond 0x0aed /* U+2666 BLACK DIAMOND SUIT */
+#define XKB_KEY_heart 0x0aee /* U+2665 BLACK HEART SUIT */
+#define XKB_KEY_maltesecross 0x0af0 /* U+2720 MALTESE CROSS */
+#define XKB_KEY_dagger 0x0af1 /* U+2020 DAGGER */
+#define XKB_KEY_doubledagger 0x0af2 /* U+2021 DOUBLE DAGGER */
+#define XKB_KEY_checkmark 0x0af3 /* U+2713 CHECK MARK */
+#define XKB_KEY_ballotcross 0x0af4 /* U+2717 BALLOT X */
+#define XKB_KEY_musicalsharp 0x0af5 /* U+266F MUSIC SHARP SIGN */
+#define XKB_KEY_musicalflat 0x0af6 /* U+266D MUSIC FLAT SIGN */
+#define XKB_KEY_malesymbol 0x0af7 /* U+2642 MALE SIGN */
+#define XKB_KEY_femalesymbol 0x0af8 /* U+2640 FEMALE SIGN */
+#define XKB_KEY_telephone 0x0af9 /* U+260E BLACK TELEPHONE */
+#define XKB_KEY_telephonerecorder 0x0afa /* U+2315 TELEPHONE RECORDER */
+#define XKB_KEY_phonographcopyright 0x0afb /* U+2117 SOUND RECORDING COPYRIGHT */
+#define XKB_KEY_caret 0x0afc /* U+2038 CARET */
+#define XKB_KEY_singlelowquotemark 0x0afd /* U+201A SINGLE LOW-9 QUOTATION MARK */
+#define XKB_KEY_doublelowquotemark 0x0afe /* U+201E DOUBLE LOW-9 QUOTATION MARK */
+#define XKB_KEY_cursor 0x0aff
+
+/*
+ * APL
+ * Byte 3 = 0x0b
+ */
+
+#define XKB_KEY_leftcaret 0x0ba3 /*(U+003C LESS-THAN SIGN)*/
+#define XKB_KEY_rightcaret 0x0ba6 /*(U+003E GREATER-THAN SIGN)*/
+#define XKB_KEY_downcaret 0x0ba8 /*(U+2228 LOGICAL OR)*/
+#define XKB_KEY_upcaret 0x0ba9 /*(U+2227 LOGICAL AND)*/
+#define XKB_KEY_overbar 0x0bc0 /*(U+00AF MACRON)*/
+#define XKB_KEY_downtack 0x0bc2 /* U+22A4 DOWN TACK */
+#define XKB_KEY_upshoe 0x0bc3 /*(U+2229 INTERSECTION)*/
+#define XKB_KEY_downstile 0x0bc4 /* U+230A LEFT FLOOR */
+#define XKB_KEY_underbar 0x0bc6 /*(U+005F LOW LINE)*/
+#define XKB_KEY_jot 0x0bca /* U+2218 RING OPERATOR */
+#define XKB_KEY_quad 0x0bcc /* U+2395 APL FUNCTIONAL SYMBOL QUAD */
+#define XKB_KEY_uptack 0x0bce /* U+22A5 UP TACK */
+#define XKB_KEY_circle 0x0bcf /* U+25CB WHITE CIRCLE */
+#define XKB_KEY_upstile 0x0bd3 /* U+2308 LEFT CEILING */
+#define XKB_KEY_downshoe 0x0bd6 /*(U+222A UNION)*/
+#define XKB_KEY_rightshoe 0x0bd8 /*(U+2283 SUPERSET OF)*/
+#define XKB_KEY_leftshoe 0x0bda /*(U+2282 SUBSET OF)*/
+#define XKB_KEY_lefttack 0x0bdc /* U+22A3 LEFT TACK */
+#define XKB_KEY_righttack 0x0bfc /* U+22A2 RIGHT TACK */
+
+/*
+ * Hebrew
+ * Byte 3 = 0x0c
+ */
+
+#define XKB_KEY_hebrew_doublelowline 0x0cdf /* U+2017 DOUBLE LOW LINE */
+#define XKB_KEY_hebrew_aleph 0x0ce0 /* U+05D0 HEBREW LETTER ALEF */
+#define XKB_KEY_hebrew_bet 0x0ce1 /* U+05D1 HEBREW LETTER BET */
+#define XKB_KEY_hebrew_beth 0x0ce1 /* deprecated */
+#define XKB_KEY_hebrew_gimel 0x0ce2 /* U+05D2 HEBREW LETTER GIMEL */
+#define XKB_KEY_hebrew_gimmel 0x0ce2 /* deprecated */
+#define XKB_KEY_hebrew_dalet 0x0ce3 /* U+05D3 HEBREW LETTER DALET */
+#define XKB_KEY_hebrew_daleth 0x0ce3 /* deprecated */
+#define XKB_KEY_hebrew_he 0x0ce4 /* U+05D4 HEBREW LETTER HE */
+#define XKB_KEY_hebrew_waw 0x0ce5 /* U+05D5 HEBREW LETTER VAV */
+#define XKB_KEY_hebrew_zain 0x0ce6 /* U+05D6 HEBREW LETTER ZAYIN */
+#define XKB_KEY_hebrew_zayin 0x0ce6 /* deprecated */
+#define XKB_KEY_hebrew_chet 0x0ce7 /* U+05D7 HEBREW LETTER HET */
+#define XKB_KEY_hebrew_het 0x0ce7 /* deprecated */
+#define XKB_KEY_hebrew_tet 0x0ce8 /* U+05D8 HEBREW LETTER TET */
+#define XKB_KEY_hebrew_teth 0x0ce8 /* deprecated */
+#define XKB_KEY_hebrew_yod 0x0ce9 /* U+05D9 HEBREW LETTER YOD */
+#define XKB_KEY_hebrew_finalkaph 0x0cea /* U+05DA HEBREW LETTER FINAL KAF */
+#define XKB_KEY_hebrew_kaph 0x0ceb /* U+05DB HEBREW LETTER KAF */
+#define XKB_KEY_hebrew_lamed 0x0cec /* U+05DC HEBREW LETTER LAMED */
+#define XKB_KEY_hebrew_finalmem 0x0ced /* U+05DD HEBREW LETTER FINAL MEM */
+#define XKB_KEY_hebrew_mem 0x0cee /* U+05DE HEBREW LETTER MEM */
+#define XKB_KEY_hebrew_finalnun 0x0cef /* U+05DF HEBREW LETTER FINAL NUN */
+#define XKB_KEY_hebrew_nun 0x0cf0 /* U+05E0 HEBREW LETTER NUN */
+#define XKB_KEY_hebrew_samech 0x0cf1 /* U+05E1 HEBREW LETTER SAMEKH */
+#define XKB_KEY_hebrew_samekh 0x0cf1 /* deprecated */
+#define XKB_KEY_hebrew_ayin 0x0cf2 /* U+05E2 HEBREW LETTER AYIN */
+#define XKB_KEY_hebrew_finalpe 0x0cf3 /* U+05E3 HEBREW LETTER FINAL PE */
+#define XKB_KEY_hebrew_pe 0x0cf4 /* U+05E4 HEBREW LETTER PE */
+#define XKB_KEY_hebrew_finalzade 0x0cf5 /* U+05E5 HEBREW LETTER FINAL TSADI */
+#define XKB_KEY_hebrew_finalzadi 0x0cf5 /* deprecated */
+#define XKB_KEY_hebrew_zade 0x0cf6 /* U+05E6 HEBREW LETTER TSADI */
+#define XKB_KEY_hebrew_zadi 0x0cf6 /* deprecated */
+#define XKB_KEY_hebrew_qoph 0x0cf7 /* U+05E7 HEBREW LETTER QOF */
+#define XKB_KEY_hebrew_kuf 0x0cf7 /* deprecated */
+#define XKB_KEY_hebrew_resh 0x0cf8 /* U+05E8 HEBREW LETTER RESH */
+#define XKB_KEY_hebrew_shin 0x0cf9 /* U+05E9 HEBREW LETTER SHIN */
+#define XKB_KEY_hebrew_taw 0x0cfa /* U+05EA HEBREW LETTER TAV */
+#define XKB_KEY_hebrew_taf 0x0cfa /* deprecated */
+#define XKB_KEY_Hebrew_switch 0xff7e /* Alias for mode_switch */
+
+/*
+ * Thai
+ * Byte 3 = 0x0d
+ */
+
+#define XKB_KEY_Thai_kokai 0x0da1 /* U+0E01 THAI CHARACTER KO KAI */
+#define XKB_KEY_Thai_khokhai 0x0da2 /* U+0E02 THAI CHARACTER KHO KHAI */
+#define XKB_KEY_Thai_khokhuat 0x0da3 /* U+0E03 THAI CHARACTER KHO KHUAT */
+#define XKB_KEY_Thai_khokhwai 0x0da4 /* U+0E04 THAI CHARACTER KHO KHWAI */
+#define XKB_KEY_Thai_khokhon 0x0da5 /* U+0E05 THAI CHARACTER KHO KHON */
+#define XKB_KEY_Thai_khorakhang 0x0da6 /* U+0E06 THAI CHARACTER KHO RAKHANG */
+#define XKB_KEY_Thai_ngongu 0x0da7 /* U+0E07 THAI CHARACTER NGO NGU */
+#define XKB_KEY_Thai_chochan 0x0da8 /* U+0E08 THAI CHARACTER CHO CHAN */
+#define XKB_KEY_Thai_choching 0x0da9 /* U+0E09 THAI CHARACTER CHO CHING */
+#define XKB_KEY_Thai_chochang 0x0daa /* U+0E0A THAI CHARACTER CHO CHANG */
+#define XKB_KEY_Thai_soso 0x0dab /* U+0E0B THAI CHARACTER SO SO */
+#define XKB_KEY_Thai_chochoe 0x0dac /* U+0E0C THAI CHARACTER CHO CHOE */
+#define XKB_KEY_Thai_yoying 0x0dad /* U+0E0D THAI CHARACTER YO YING */
+#define XKB_KEY_Thai_dochada 0x0dae /* U+0E0E THAI CHARACTER DO CHADA */
+#define XKB_KEY_Thai_topatak 0x0daf /* U+0E0F THAI CHARACTER TO PATAK */
+#define XKB_KEY_Thai_thothan 0x0db0 /* U+0E10 THAI CHARACTER THO THAN */
+#define XKB_KEY_Thai_thonangmontho 0x0db1 /* U+0E11 THAI CHARACTER THO NANGMONTHO */
+#define XKB_KEY_Thai_thophuthao 0x0db2 /* U+0E12 THAI CHARACTER THO PHUTHAO */
+#define XKB_KEY_Thai_nonen 0x0db3 /* U+0E13 THAI CHARACTER NO NEN */
+#define XKB_KEY_Thai_dodek 0x0db4 /* U+0E14 THAI CHARACTER DO DEK */
+#define XKB_KEY_Thai_totao 0x0db5 /* U+0E15 THAI CHARACTER TO TAO */
+#define XKB_KEY_Thai_thothung 0x0db6 /* U+0E16 THAI CHARACTER THO THUNG */
+#define XKB_KEY_Thai_thothahan 0x0db7 /* U+0E17 THAI CHARACTER THO THAHAN */
+#define XKB_KEY_Thai_thothong 0x0db8 /* U+0E18 THAI CHARACTER THO THONG */
+#define XKB_KEY_Thai_nonu 0x0db9 /* U+0E19 THAI CHARACTER NO NU */
+#define XKB_KEY_Thai_bobaimai 0x0dba /* U+0E1A THAI CHARACTER BO BAIMAI */
+#define XKB_KEY_Thai_popla 0x0dbb /* U+0E1B THAI CHARACTER PO PLA */
+#define XKB_KEY_Thai_phophung 0x0dbc /* U+0E1C THAI CHARACTER PHO PHUNG */
+#define XKB_KEY_Thai_fofa 0x0dbd /* U+0E1D THAI CHARACTER FO FA */
+#define XKB_KEY_Thai_phophan 0x0dbe /* U+0E1E THAI CHARACTER PHO PHAN */
+#define XKB_KEY_Thai_fofan 0x0dbf /* U+0E1F THAI CHARACTER FO FAN */
+#define XKB_KEY_Thai_phosamphao 0x0dc0 /* U+0E20 THAI CHARACTER PHO SAMPHAO */
+#define XKB_KEY_Thai_moma 0x0dc1 /* U+0E21 THAI CHARACTER MO MA */
+#define XKB_KEY_Thai_yoyak 0x0dc2 /* U+0E22 THAI CHARACTER YO YAK */
+#define XKB_KEY_Thai_rorua 0x0dc3 /* U+0E23 THAI CHARACTER RO RUA */
+#define XKB_KEY_Thai_ru 0x0dc4 /* U+0E24 THAI CHARACTER RU */
+#define XKB_KEY_Thai_loling 0x0dc5 /* U+0E25 THAI CHARACTER LO LING */
+#define XKB_KEY_Thai_lu 0x0dc6 /* U+0E26 THAI CHARACTER LU */
+#define XKB_KEY_Thai_wowaen 0x0dc7 /* U+0E27 THAI CHARACTER WO WAEN */
+#define XKB_KEY_Thai_sosala 0x0dc8 /* U+0E28 THAI CHARACTER SO SALA */
+#define XKB_KEY_Thai_sorusi 0x0dc9 /* U+0E29 THAI CHARACTER SO RUSI */
+#define XKB_KEY_Thai_sosua 0x0dca /* U+0E2A THAI CHARACTER SO SUA */
+#define XKB_KEY_Thai_hohip 0x0dcb /* U+0E2B THAI CHARACTER HO HIP */
+#define XKB_KEY_Thai_lochula 0x0dcc /* U+0E2C THAI CHARACTER LO CHULA */
+#define XKB_KEY_Thai_oang 0x0dcd /* U+0E2D THAI CHARACTER O ANG */
+#define XKB_KEY_Thai_honokhuk 0x0dce /* U+0E2E THAI CHARACTER HO NOKHUK */
+#define XKB_KEY_Thai_paiyannoi 0x0dcf /* U+0E2F THAI CHARACTER PAIYANNOI */
+#define XKB_KEY_Thai_saraa 0x0dd0 /* U+0E30 THAI CHARACTER SARA A */
+#define XKB_KEY_Thai_maihanakat 0x0dd1 /* U+0E31 THAI CHARACTER MAI HAN-AKAT */
+#define XKB_KEY_Thai_saraaa 0x0dd2 /* U+0E32 THAI CHARACTER SARA AA */
+#define XKB_KEY_Thai_saraam 0x0dd3 /* U+0E33 THAI CHARACTER SARA AM */
+#define XKB_KEY_Thai_sarai 0x0dd4 /* U+0E34 THAI CHARACTER SARA I */
+#define XKB_KEY_Thai_saraii 0x0dd5 /* U+0E35 THAI CHARACTER SARA II */
+#define XKB_KEY_Thai_saraue 0x0dd6 /* U+0E36 THAI CHARACTER SARA UE */
+#define XKB_KEY_Thai_sarauee 0x0dd7 /* U+0E37 THAI CHARACTER SARA UEE */
+#define XKB_KEY_Thai_sarau 0x0dd8 /* U+0E38 THAI CHARACTER SARA U */
+#define XKB_KEY_Thai_sarauu 0x0dd9 /* U+0E39 THAI CHARACTER SARA UU */
+#define XKB_KEY_Thai_phinthu 0x0dda /* U+0E3A THAI CHARACTER PHINTHU */
+#define XKB_KEY_Thai_maihanakat_maitho 0x0dde
+#define XKB_KEY_Thai_baht 0x0ddf /* U+0E3F THAI CURRENCY SYMBOL BAHT */
+#define XKB_KEY_Thai_sarae 0x0de0 /* U+0E40 THAI CHARACTER SARA E */
+#define XKB_KEY_Thai_saraae 0x0de1 /* U+0E41 THAI CHARACTER SARA AE */
+#define XKB_KEY_Thai_sarao 0x0de2 /* U+0E42 THAI CHARACTER SARA O */
+#define XKB_KEY_Thai_saraaimaimuan 0x0de3 /* U+0E43 THAI CHARACTER SARA AI MAIMUAN */
+#define XKB_KEY_Thai_saraaimaimalai 0x0de4 /* U+0E44 THAI CHARACTER SARA AI MAIMALAI */
+#define XKB_KEY_Thai_lakkhangyao 0x0de5 /* U+0E45 THAI CHARACTER LAKKHANGYAO */
+#define XKB_KEY_Thai_maiyamok 0x0de6 /* U+0E46 THAI CHARACTER MAIYAMOK */
+#define XKB_KEY_Thai_maitaikhu 0x0de7 /* U+0E47 THAI CHARACTER MAITAIKHU */
+#define XKB_KEY_Thai_maiek 0x0de8 /* U+0E48 THAI CHARACTER MAI EK */
+#define XKB_KEY_Thai_maitho 0x0de9 /* U+0E49 THAI CHARACTER MAI THO */
+#define XKB_KEY_Thai_maitri 0x0dea /* U+0E4A THAI CHARACTER MAI TRI */
+#define XKB_KEY_Thai_maichattawa 0x0deb /* U+0E4B THAI CHARACTER MAI CHATTAWA */
+#define XKB_KEY_Thai_thanthakhat 0x0dec /* U+0E4C THAI CHARACTER THANTHAKHAT */
+#define XKB_KEY_Thai_nikhahit 0x0ded /* U+0E4D THAI CHARACTER NIKHAHIT */
+#define XKB_KEY_Thai_leksun 0x0df0 /* U+0E50 THAI DIGIT ZERO */
+#define XKB_KEY_Thai_leknung 0x0df1 /* U+0E51 THAI DIGIT ONE */
+#define XKB_KEY_Thai_leksong 0x0df2 /* U+0E52 THAI DIGIT TWO */
+#define XKB_KEY_Thai_leksam 0x0df3 /* U+0E53 THAI DIGIT THREE */
+#define XKB_KEY_Thai_leksi 0x0df4 /* U+0E54 THAI DIGIT FOUR */
+#define XKB_KEY_Thai_lekha 0x0df5 /* U+0E55 THAI DIGIT FIVE */
+#define XKB_KEY_Thai_lekhok 0x0df6 /* U+0E56 THAI DIGIT SIX */
+#define XKB_KEY_Thai_lekchet 0x0df7 /* U+0E57 THAI DIGIT SEVEN */
+#define XKB_KEY_Thai_lekpaet 0x0df8 /* U+0E58 THAI DIGIT EIGHT */
+#define XKB_KEY_Thai_lekkao 0x0df9 /* U+0E59 THAI DIGIT NINE */
+
+/*
+ * Korean
+ * Byte 3 = 0x0e
+ */
+
+
+#define XKB_KEY_Hangul 0xff31 /* Hangul start/stop(toggle) */
+#define XKB_KEY_Hangul_Start 0xff32 /* Hangul start */
+#define XKB_KEY_Hangul_End 0xff33 /* Hangul end, English start */
+#define XKB_KEY_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */
+#define XKB_KEY_Hangul_Jamo 0xff35 /* Hangul Jamo mode */
+#define XKB_KEY_Hangul_Romaja 0xff36 /* Hangul Romaja mode */
+#define XKB_KEY_Hangul_Codeinput 0xff37 /* Hangul code input mode */
+#define XKB_KEY_Hangul_Jeonja 0xff38 /* Jeonja mode */
+#define XKB_KEY_Hangul_Banja 0xff39 /* Banja mode */
+#define XKB_KEY_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */
+#define XKB_KEY_Hangul_PostHanja 0xff3b /* Post Hanja conversion */
+#define XKB_KEY_Hangul_SingleCandidate 0xff3c /* Single candidate */
+#define XKB_KEY_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */
+#define XKB_KEY_Hangul_PreviousCandidate 0xff3e /* Previous candidate */
+#define XKB_KEY_Hangul_Special 0xff3f /* Special symbols */
+#define XKB_KEY_Hangul_switch 0xff7e /* Alias for mode_switch */
+
+/* Hangul Consonant Characters */
+#define XKB_KEY_Hangul_Kiyeog 0x0ea1
+#define XKB_KEY_Hangul_SsangKiyeog 0x0ea2
+#define XKB_KEY_Hangul_KiyeogSios 0x0ea3
+#define XKB_KEY_Hangul_Nieun 0x0ea4
+#define XKB_KEY_Hangul_NieunJieuj 0x0ea5
+#define XKB_KEY_Hangul_NieunHieuh 0x0ea6
+#define XKB_KEY_Hangul_Dikeud 0x0ea7
+#define XKB_KEY_Hangul_SsangDikeud 0x0ea8
+#define XKB_KEY_Hangul_Rieul 0x0ea9
+#define XKB_KEY_Hangul_RieulKiyeog 0x0eaa
+#define XKB_KEY_Hangul_RieulMieum 0x0eab
+#define XKB_KEY_Hangul_RieulPieub 0x0eac
+#define XKB_KEY_Hangul_RieulSios 0x0ead
+#define XKB_KEY_Hangul_RieulTieut 0x0eae
+#define XKB_KEY_Hangul_RieulPhieuf 0x0eaf
+#define XKB_KEY_Hangul_RieulHieuh 0x0eb0
+#define XKB_KEY_Hangul_Mieum 0x0eb1
+#define XKB_KEY_Hangul_Pieub 0x0eb2
+#define XKB_KEY_Hangul_SsangPieub 0x0eb3
+#define XKB_KEY_Hangul_PieubSios 0x0eb4
+#define XKB_KEY_Hangul_Sios 0x0eb5
+#define XKB_KEY_Hangul_SsangSios 0x0eb6
+#define XKB_KEY_Hangul_Ieung 0x0eb7
+#define XKB_KEY_Hangul_Jieuj 0x0eb8
+#define XKB_KEY_Hangul_SsangJieuj 0x0eb9
+#define XKB_KEY_Hangul_Cieuc 0x0eba
+#define XKB_KEY_Hangul_Khieuq 0x0ebb
+#define XKB_KEY_Hangul_Tieut 0x0ebc
+#define XKB_KEY_Hangul_Phieuf 0x0ebd
+#define XKB_KEY_Hangul_Hieuh 0x0ebe
+
+/* Hangul Vowel Characters */
+#define XKB_KEY_Hangul_A 0x0ebf
+#define XKB_KEY_Hangul_AE 0x0ec0
+#define XKB_KEY_Hangul_YA 0x0ec1
+#define XKB_KEY_Hangul_YAE 0x0ec2
+#define XKB_KEY_Hangul_EO 0x0ec3
+#define XKB_KEY_Hangul_E 0x0ec4
+#define XKB_KEY_Hangul_YEO 0x0ec5
+#define XKB_KEY_Hangul_YE 0x0ec6
+#define XKB_KEY_Hangul_O 0x0ec7
+#define XKB_KEY_Hangul_WA 0x0ec8
+#define XKB_KEY_Hangul_WAE 0x0ec9
+#define XKB_KEY_Hangul_OE 0x0eca
+#define XKB_KEY_Hangul_YO 0x0ecb
+#define XKB_KEY_Hangul_U 0x0ecc
+#define XKB_KEY_Hangul_WEO 0x0ecd
+#define XKB_KEY_Hangul_WE 0x0ece
+#define XKB_KEY_Hangul_WI 0x0ecf
+#define XKB_KEY_Hangul_YU 0x0ed0
+#define XKB_KEY_Hangul_EU 0x0ed1
+#define XKB_KEY_Hangul_YI 0x0ed2
+#define XKB_KEY_Hangul_I 0x0ed3
+
+/* Hangul syllable-final (JongSeong) Characters */
+#define XKB_KEY_Hangul_J_Kiyeog 0x0ed4
+#define XKB_KEY_Hangul_J_SsangKiyeog 0x0ed5
+#define XKB_KEY_Hangul_J_KiyeogSios 0x0ed6
+#define XKB_KEY_Hangul_J_Nieun 0x0ed7
+#define XKB_KEY_Hangul_J_NieunJieuj 0x0ed8
+#define XKB_KEY_Hangul_J_NieunHieuh 0x0ed9
+#define XKB_KEY_Hangul_J_Dikeud 0x0eda
+#define XKB_KEY_Hangul_J_Rieul 0x0edb
+#define XKB_KEY_Hangul_J_RieulKiyeog 0x0edc
+#define XKB_KEY_Hangul_J_RieulMieum 0x0edd
+#define XKB_KEY_Hangul_J_RieulPieub 0x0ede
+#define XKB_KEY_Hangul_J_RieulSios 0x0edf
+#define XKB_KEY_Hangul_J_RieulTieut 0x0ee0
+#define XKB_KEY_Hangul_J_RieulPhieuf 0x0ee1
+#define XKB_KEY_Hangul_J_RieulHieuh 0x0ee2
+#define XKB_KEY_Hangul_J_Mieum 0x0ee3
+#define XKB_KEY_Hangul_J_Pieub 0x0ee4
+#define XKB_KEY_Hangul_J_PieubSios 0x0ee5
+#define XKB_KEY_Hangul_J_Sios 0x0ee6
+#define XKB_KEY_Hangul_J_SsangSios 0x0ee7
+#define XKB_KEY_Hangul_J_Ieung 0x0ee8
+#define XKB_KEY_Hangul_J_Jieuj 0x0ee9
+#define XKB_KEY_Hangul_J_Cieuc 0x0eea
+#define XKB_KEY_Hangul_J_Khieuq 0x0eeb
+#define XKB_KEY_Hangul_J_Tieut 0x0eec
+#define XKB_KEY_Hangul_J_Phieuf 0x0eed
+#define XKB_KEY_Hangul_J_Hieuh 0x0eee
+
+/* Ancient Hangul Consonant Characters */
+#define XKB_KEY_Hangul_RieulYeorinHieuh 0x0eef
+#define XKB_KEY_Hangul_SunkyeongeumMieum 0x0ef0
+#define XKB_KEY_Hangul_SunkyeongeumPieub 0x0ef1
+#define XKB_KEY_Hangul_PanSios 0x0ef2
+#define XKB_KEY_Hangul_KkogjiDalrinIeung 0x0ef3
+#define XKB_KEY_Hangul_SunkyeongeumPhieuf 0x0ef4
+#define XKB_KEY_Hangul_YeorinHieuh 0x0ef5
+
+/* Ancient Hangul Vowel Characters */
+#define XKB_KEY_Hangul_AraeA 0x0ef6
+#define XKB_KEY_Hangul_AraeAE 0x0ef7
+
+/* Ancient Hangul syllable-final (JongSeong) Characters */
+#define XKB_KEY_Hangul_J_PanSios 0x0ef8
+#define XKB_KEY_Hangul_J_KkogjiDalrinIeung 0x0ef9
+#define XKB_KEY_Hangul_J_YeorinHieuh 0x0efa
+
+/* Korean currency symbol */
+#define XKB_KEY_Korean_Won 0x0eff /*(U+20A9 WON SIGN)*/
+
+
+/*
+ * Armenian
+ */
+
+#define XKB_KEY_Armenian_ligature_ew 0x1000587 /* U+0587 ARMENIAN SMALL LIGATURE ECH YIWN */
+#define XKB_KEY_Armenian_full_stop 0x1000589 /* U+0589 ARMENIAN FULL STOP */
+#define XKB_KEY_Armenian_verjaket 0x1000589 /* U+0589 ARMENIAN FULL STOP */
+#define XKB_KEY_Armenian_separation_mark 0x100055d /* U+055D ARMENIAN COMMA */
+#define XKB_KEY_Armenian_but 0x100055d /* U+055D ARMENIAN COMMA */
+#define XKB_KEY_Armenian_hyphen 0x100058a /* U+058A ARMENIAN HYPHEN */
+#define XKB_KEY_Armenian_yentamna 0x100058a /* U+058A ARMENIAN HYPHEN */
+#define XKB_KEY_Armenian_exclam 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
+#define XKB_KEY_Armenian_amanak 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
+#define XKB_KEY_Armenian_accent 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
+#define XKB_KEY_Armenian_shesht 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
+#define XKB_KEY_Armenian_question 0x100055e /* U+055E ARMENIAN QUESTION MARK */
+#define XKB_KEY_Armenian_paruyk 0x100055e /* U+055E ARMENIAN QUESTION MARK */
+#define XKB_KEY_Armenian_AYB 0x1000531 /* U+0531 ARMENIAN CAPITAL LETTER AYB */
+#define XKB_KEY_Armenian_ayb 0x1000561 /* U+0561 ARMENIAN SMALL LETTER AYB */
+#define XKB_KEY_Armenian_BEN 0x1000532 /* U+0532 ARMENIAN CAPITAL LETTER BEN */
+#define XKB_KEY_Armenian_ben 0x1000562 /* U+0562 ARMENIAN SMALL LETTER BEN */
+#define XKB_KEY_Armenian_GIM 0x1000533 /* U+0533 ARMENIAN CAPITAL LETTER GIM */
+#define XKB_KEY_Armenian_gim 0x1000563 /* U+0563 ARMENIAN SMALL LETTER GIM */
+#define XKB_KEY_Armenian_DA 0x1000534 /* U+0534 ARMENIAN CAPITAL LETTER DA */
+#define XKB_KEY_Armenian_da 0x1000564 /* U+0564 ARMENIAN SMALL LETTER DA */
+#define XKB_KEY_Armenian_YECH 0x1000535 /* U+0535 ARMENIAN CAPITAL LETTER ECH */
+#define XKB_KEY_Armenian_yech 0x1000565 /* U+0565 ARMENIAN SMALL LETTER ECH */
+#define XKB_KEY_Armenian_ZA 0x1000536 /* U+0536 ARMENIAN CAPITAL LETTER ZA */
+#define XKB_KEY_Armenian_za 0x1000566 /* U+0566 ARMENIAN SMALL LETTER ZA */
+#define XKB_KEY_Armenian_E 0x1000537 /* U+0537 ARMENIAN CAPITAL LETTER EH */
+#define XKB_KEY_Armenian_e 0x1000567 /* U+0567 ARMENIAN SMALL LETTER EH */
+#define XKB_KEY_Armenian_AT 0x1000538 /* U+0538 ARMENIAN CAPITAL LETTER ET */
+#define XKB_KEY_Armenian_at 0x1000568 /* U+0568 ARMENIAN SMALL LETTER ET */
+#define XKB_KEY_Armenian_TO 0x1000539 /* U+0539 ARMENIAN CAPITAL LETTER TO */
+#define XKB_KEY_Armenian_to 0x1000569 /* U+0569 ARMENIAN SMALL LETTER TO */
+#define XKB_KEY_Armenian_ZHE 0x100053a /* U+053A ARMENIAN CAPITAL LETTER ZHE */
+#define XKB_KEY_Armenian_zhe 0x100056a /* U+056A ARMENIAN SMALL LETTER ZHE */
+#define XKB_KEY_Armenian_INI 0x100053b /* U+053B ARMENIAN CAPITAL LETTER INI */
+#define XKB_KEY_Armenian_ini 0x100056b /* U+056B ARMENIAN SMALL LETTER INI */
+#define XKB_KEY_Armenian_LYUN 0x100053c /* U+053C ARMENIAN CAPITAL LETTER LIWN */
+#define XKB_KEY_Armenian_lyun 0x100056c /* U+056C ARMENIAN SMALL LETTER LIWN */
+#define XKB_KEY_Armenian_KHE 0x100053d /* U+053D ARMENIAN CAPITAL LETTER XEH */
+#define XKB_KEY_Armenian_khe 0x100056d /* U+056D ARMENIAN SMALL LETTER XEH */
+#define XKB_KEY_Armenian_TSA 0x100053e /* U+053E ARMENIAN CAPITAL LETTER CA */
+#define XKB_KEY_Armenian_tsa 0x100056e /* U+056E ARMENIAN SMALL LETTER CA */
+#define XKB_KEY_Armenian_KEN 0x100053f /* U+053F ARMENIAN CAPITAL LETTER KEN */
+#define XKB_KEY_Armenian_ken 0x100056f /* U+056F ARMENIAN SMALL LETTER KEN */
+#define XKB_KEY_Armenian_HO 0x1000540 /* U+0540 ARMENIAN CAPITAL LETTER HO */
+#define XKB_KEY_Armenian_ho 0x1000570 /* U+0570 ARMENIAN SMALL LETTER HO */
+#define XKB_KEY_Armenian_DZA 0x1000541 /* U+0541 ARMENIAN CAPITAL LETTER JA */
+#define XKB_KEY_Armenian_dza 0x1000571 /* U+0571 ARMENIAN SMALL LETTER JA */
+#define XKB_KEY_Armenian_GHAT 0x1000542 /* U+0542 ARMENIAN CAPITAL LETTER GHAD */
+#define XKB_KEY_Armenian_ghat 0x1000572 /* U+0572 ARMENIAN SMALL LETTER GHAD */
+#define XKB_KEY_Armenian_TCHE 0x1000543 /* U+0543 ARMENIAN CAPITAL LETTER CHEH */
+#define XKB_KEY_Armenian_tche 0x1000573 /* U+0573 ARMENIAN SMALL LETTER CHEH */
+#define XKB_KEY_Armenian_MEN 0x1000544 /* U+0544 ARMENIAN CAPITAL LETTER MEN */
+#define XKB_KEY_Armenian_men 0x1000574 /* U+0574 ARMENIAN SMALL LETTER MEN */
+#define XKB_KEY_Armenian_HI 0x1000545 /* U+0545 ARMENIAN CAPITAL LETTER YI */
+#define XKB_KEY_Armenian_hi 0x1000575 /* U+0575 ARMENIAN SMALL LETTER YI */
+#define XKB_KEY_Armenian_NU 0x1000546 /* U+0546 ARMENIAN CAPITAL LETTER NOW */
+#define XKB_KEY_Armenian_nu 0x1000576 /* U+0576 ARMENIAN SMALL LETTER NOW */
+#define XKB_KEY_Armenian_SHA 0x1000547 /* U+0547 ARMENIAN CAPITAL LETTER SHA */
+#define XKB_KEY_Armenian_sha 0x1000577 /* U+0577 ARMENIAN SMALL LETTER SHA */
+#define XKB_KEY_Armenian_VO 0x1000548 /* U+0548 ARMENIAN CAPITAL LETTER VO */
+#define XKB_KEY_Armenian_vo 0x1000578 /* U+0578 ARMENIAN SMALL LETTER VO */
+#define XKB_KEY_Armenian_CHA 0x1000549 /* U+0549 ARMENIAN CAPITAL LETTER CHA */
+#define XKB_KEY_Armenian_cha 0x1000579 /* U+0579 ARMENIAN SMALL LETTER CHA */
+#define XKB_KEY_Armenian_PE 0x100054a /* U+054A ARMENIAN CAPITAL LETTER PEH */
+#define XKB_KEY_Armenian_pe 0x100057a /* U+057A ARMENIAN SMALL LETTER PEH */
+#define XKB_KEY_Armenian_JE 0x100054b /* U+054B ARMENIAN CAPITAL LETTER JHEH */
+#define XKB_KEY_Armenian_je 0x100057b /* U+057B ARMENIAN SMALL LETTER JHEH */
+#define XKB_KEY_Armenian_RA 0x100054c /* U+054C ARMENIAN CAPITAL LETTER RA */
+#define XKB_KEY_Armenian_ra 0x100057c /* U+057C ARMENIAN SMALL LETTER RA */
+#define XKB_KEY_Armenian_SE 0x100054d /* U+054D ARMENIAN CAPITAL LETTER SEH */
+#define XKB_KEY_Armenian_se 0x100057d /* U+057D ARMENIAN SMALL LETTER SEH */
+#define XKB_KEY_Armenian_VEV 0x100054e /* U+054E ARMENIAN CAPITAL LETTER VEW */
+#define XKB_KEY_Armenian_vev 0x100057e /* U+057E ARMENIAN SMALL LETTER VEW */
+#define XKB_KEY_Armenian_TYUN 0x100054f /* U+054F ARMENIAN CAPITAL LETTER TIWN */
+#define XKB_KEY_Armenian_tyun 0x100057f /* U+057F ARMENIAN SMALL LETTER TIWN */
+#define XKB_KEY_Armenian_RE 0x1000550 /* U+0550 ARMENIAN CAPITAL LETTER REH */
+#define XKB_KEY_Armenian_re 0x1000580 /* U+0580 ARMENIAN SMALL LETTER REH */
+#define XKB_KEY_Armenian_TSO 0x1000551 /* U+0551 ARMENIAN CAPITAL LETTER CO */
+#define XKB_KEY_Armenian_tso 0x1000581 /* U+0581 ARMENIAN SMALL LETTER CO */
+#define XKB_KEY_Armenian_VYUN 0x1000552 /* U+0552 ARMENIAN CAPITAL LETTER YIWN */
+#define XKB_KEY_Armenian_vyun 0x1000582 /* U+0582 ARMENIAN SMALL LETTER YIWN */
+#define XKB_KEY_Armenian_PYUR 0x1000553 /* U+0553 ARMENIAN CAPITAL LETTER PIWR */
+#define XKB_KEY_Armenian_pyur 0x1000583 /* U+0583 ARMENIAN SMALL LETTER PIWR */
+#define XKB_KEY_Armenian_KE 0x1000554 /* U+0554 ARMENIAN CAPITAL LETTER KEH */
+#define XKB_KEY_Armenian_ke 0x1000584 /* U+0584 ARMENIAN SMALL LETTER KEH */
+#define XKB_KEY_Armenian_O 0x1000555 /* U+0555 ARMENIAN CAPITAL LETTER OH */
+#define XKB_KEY_Armenian_o 0x1000585 /* U+0585 ARMENIAN SMALL LETTER OH */
+#define XKB_KEY_Armenian_FE 0x1000556 /* U+0556 ARMENIAN CAPITAL LETTER FEH */
+#define XKB_KEY_Armenian_fe 0x1000586 /* U+0586 ARMENIAN SMALL LETTER FEH */
+#define XKB_KEY_Armenian_apostrophe 0x100055a /* U+055A ARMENIAN APOSTROPHE */
+
+/*
+ * Georgian
+ */
+
+#define XKB_KEY_Georgian_an 0x10010d0 /* U+10D0 GEORGIAN LETTER AN */
+#define XKB_KEY_Georgian_ban 0x10010d1 /* U+10D1 GEORGIAN LETTER BAN */
+#define XKB_KEY_Georgian_gan 0x10010d2 /* U+10D2 GEORGIAN LETTER GAN */
+#define XKB_KEY_Georgian_don 0x10010d3 /* U+10D3 GEORGIAN LETTER DON */
+#define XKB_KEY_Georgian_en 0x10010d4 /* U+10D4 GEORGIAN LETTER EN */
+#define XKB_KEY_Georgian_vin 0x10010d5 /* U+10D5 GEORGIAN LETTER VIN */
+#define XKB_KEY_Georgian_zen 0x10010d6 /* U+10D6 GEORGIAN LETTER ZEN */
+#define XKB_KEY_Georgian_tan 0x10010d7 /* U+10D7 GEORGIAN LETTER TAN */
+#define XKB_KEY_Georgian_in 0x10010d8 /* U+10D8 GEORGIAN LETTER IN */
+#define XKB_KEY_Georgian_kan 0x10010d9 /* U+10D9 GEORGIAN LETTER KAN */
+#define XKB_KEY_Georgian_las 0x10010da /* U+10DA GEORGIAN LETTER LAS */
+#define XKB_KEY_Georgian_man 0x10010db /* U+10DB GEORGIAN LETTER MAN */
+#define XKB_KEY_Georgian_nar 0x10010dc /* U+10DC GEORGIAN LETTER NAR */
+#define XKB_KEY_Georgian_on 0x10010dd /* U+10DD GEORGIAN LETTER ON */
+#define XKB_KEY_Georgian_par 0x10010de /* U+10DE GEORGIAN LETTER PAR */
+#define XKB_KEY_Georgian_zhar 0x10010df /* U+10DF GEORGIAN LETTER ZHAR */
+#define XKB_KEY_Georgian_rae 0x10010e0 /* U+10E0 GEORGIAN LETTER RAE */
+#define XKB_KEY_Georgian_san 0x10010e1 /* U+10E1 GEORGIAN LETTER SAN */
+#define XKB_KEY_Georgian_tar 0x10010e2 /* U+10E2 GEORGIAN LETTER TAR */
+#define XKB_KEY_Georgian_un 0x10010e3 /* U+10E3 GEORGIAN LETTER UN */
+#define XKB_KEY_Georgian_phar 0x10010e4 /* U+10E4 GEORGIAN LETTER PHAR */
+#define XKB_KEY_Georgian_khar 0x10010e5 /* U+10E5 GEORGIAN LETTER KHAR */
+#define XKB_KEY_Georgian_ghan 0x10010e6 /* U+10E6 GEORGIAN LETTER GHAN */
+#define XKB_KEY_Georgian_qar 0x10010e7 /* U+10E7 GEORGIAN LETTER QAR */
+#define XKB_KEY_Georgian_shin 0x10010e8 /* U+10E8 GEORGIAN LETTER SHIN */
+#define XKB_KEY_Georgian_chin 0x10010e9 /* U+10E9 GEORGIAN LETTER CHIN */
+#define XKB_KEY_Georgian_can 0x10010ea /* U+10EA GEORGIAN LETTER CAN */
+#define XKB_KEY_Georgian_jil 0x10010eb /* U+10EB GEORGIAN LETTER JIL */
+#define XKB_KEY_Georgian_cil 0x10010ec /* U+10EC GEORGIAN LETTER CIL */
+#define XKB_KEY_Georgian_char 0x10010ed /* U+10ED GEORGIAN LETTER CHAR */
+#define XKB_KEY_Georgian_xan 0x10010ee /* U+10EE GEORGIAN LETTER XAN */
+#define XKB_KEY_Georgian_jhan 0x10010ef /* U+10EF GEORGIAN LETTER JHAN */
+#define XKB_KEY_Georgian_hae 0x10010f0 /* U+10F0 GEORGIAN LETTER HAE */
+#define XKB_KEY_Georgian_he 0x10010f1 /* U+10F1 GEORGIAN LETTER HE */
+#define XKB_KEY_Georgian_hie 0x10010f2 /* U+10F2 GEORGIAN LETTER HIE */
+#define XKB_KEY_Georgian_we 0x10010f3 /* U+10F3 GEORGIAN LETTER WE */
+#define XKB_KEY_Georgian_har 0x10010f4 /* U+10F4 GEORGIAN LETTER HAR */
+#define XKB_KEY_Georgian_hoe 0x10010f5 /* U+10F5 GEORGIAN LETTER HOE */
+#define XKB_KEY_Georgian_fi 0x10010f6 /* U+10F6 GEORGIAN LETTER FI */
+
+/*
+ * Azeri (and other Turkic or Caucasian languages)
+ */
+
+/* latin */
+#define XKB_KEY_Xabovedot 0x1001e8a /* U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE */
+#define XKB_KEY_Ibreve 0x100012c /* U+012C LATIN CAPITAL LETTER I WITH BREVE */
+#define XKB_KEY_Zstroke 0x10001b5 /* U+01B5 LATIN CAPITAL LETTER Z WITH STROKE */
+#define XKB_KEY_Gcaron 0x10001e6 /* U+01E6 LATIN CAPITAL LETTER G WITH CARON */
+#define XKB_KEY_Ocaron 0x10001d1 /* U+01D2 LATIN CAPITAL LETTER O WITH CARON */
+#define XKB_KEY_Obarred 0x100019f /* U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE */
+#define XKB_KEY_xabovedot 0x1001e8b /* U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE */
+#define XKB_KEY_ibreve 0x100012d /* U+012D LATIN SMALL LETTER I WITH BREVE */
+#define XKB_KEY_zstroke 0x10001b6 /* U+01B6 LATIN SMALL LETTER Z WITH STROKE */
+#define XKB_KEY_gcaron 0x10001e7 /* U+01E7 LATIN SMALL LETTER G WITH CARON */
+#define XKB_KEY_ocaron 0x10001d2 /* U+01D2 LATIN SMALL LETTER O WITH CARON */
+#define XKB_KEY_obarred 0x1000275 /* U+0275 LATIN SMALL LETTER BARRED O */
+#define XKB_KEY_SCHWA 0x100018f /* U+018F LATIN CAPITAL LETTER SCHWA */
+#define XKB_KEY_schwa 0x1000259 /* U+0259 LATIN SMALL LETTER SCHWA */
+#define XKB_KEY_EZH 0x10001b7 /* U+01B7 LATIN CAPITAL LETTER EZH */
+#define XKB_KEY_ezh 0x1000292 /* U+0292 LATIN SMALL LETTER EZH */
+/* those are not really Caucasus */
+/* For Inupiak */
+#define XKB_KEY_Lbelowdot 0x1001e36 /* U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW */
+#define XKB_KEY_lbelowdot 0x1001e37 /* U+1E37 LATIN SMALL LETTER L WITH DOT BELOW */
+
+/*
+ * Vietnamese
+ */
+
+#define XKB_KEY_Abelowdot 0x1001ea0 /* U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW */
+#define XKB_KEY_abelowdot 0x1001ea1 /* U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW */
+#define XKB_KEY_Ahook 0x1001ea2 /* U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE */
+#define XKB_KEY_ahook 0x1001ea3 /* U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE */
+#define XKB_KEY_Acircumflexacute 0x1001ea4 /* U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */
+#define XKB_KEY_acircumflexacute 0x1001ea5 /* U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */
+#define XKB_KEY_Acircumflexgrave 0x1001ea6 /* U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */
+#define XKB_KEY_acircumflexgrave 0x1001ea7 /* U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */
+#define XKB_KEY_Acircumflexhook 0x1001ea8 /* U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XKB_KEY_acircumflexhook 0x1001ea9 /* U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XKB_KEY_Acircumflextilde 0x1001eaa /* U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */
+#define XKB_KEY_acircumflextilde 0x1001eab /* U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */
+#define XKB_KEY_Acircumflexbelowdot 0x1001eac /* U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
+#define XKB_KEY_acircumflexbelowdot 0x1001ead /* U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
+#define XKB_KEY_Abreveacute 0x1001eae /* U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */
+#define XKB_KEY_abreveacute 0x1001eaf /* U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE */
+#define XKB_KEY_Abrevegrave 0x1001eb0 /* U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */
+#define XKB_KEY_abrevegrave 0x1001eb1 /* U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE */
+#define XKB_KEY_Abrevehook 0x1001eb2 /* U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */
+#define XKB_KEY_abrevehook 0x1001eb3 /* U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */
+#define XKB_KEY_Abrevetilde 0x1001eb4 /* U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE */
+#define XKB_KEY_abrevetilde 0x1001eb5 /* U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE */
+#define XKB_KEY_Abrevebelowdot 0x1001eb6 /* U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */
+#define XKB_KEY_abrevebelowdot 0x1001eb7 /* U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */
+#define XKB_KEY_Ebelowdot 0x1001eb8 /* U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW */
+#define XKB_KEY_ebelowdot 0x1001eb9 /* U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW */
+#define XKB_KEY_Ehook 0x1001eba /* U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE */
+#define XKB_KEY_ehook 0x1001ebb /* U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE */
+#define XKB_KEY_Etilde 0x1001ebc /* U+1EBC LATIN CAPITAL LETTER E WITH TILDE */
+#define XKB_KEY_etilde 0x1001ebd /* U+1EBD LATIN SMALL LETTER E WITH TILDE */
+#define XKB_KEY_Ecircumflexacute 0x1001ebe /* U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */
+#define XKB_KEY_ecircumflexacute 0x1001ebf /* U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */
+#define XKB_KEY_Ecircumflexgrave 0x1001ec0 /* U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */
+#define XKB_KEY_ecircumflexgrave 0x1001ec1 /* U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */
+#define XKB_KEY_Ecircumflexhook 0x1001ec2 /* U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XKB_KEY_ecircumflexhook 0x1001ec3 /* U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XKB_KEY_Ecircumflextilde 0x1001ec4 /* U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */
+#define XKB_KEY_ecircumflextilde 0x1001ec5 /* U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */
+#define XKB_KEY_Ecircumflexbelowdot 0x1001ec6 /* U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
+#define XKB_KEY_ecircumflexbelowdot 0x1001ec7 /* U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
+#define XKB_KEY_Ihook 0x1001ec8 /* U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE */
+#define XKB_KEY_ihook 0x1001ec9 /* U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE */
+#define XKB_KEY_Ibelowdot 0x1001eca /* U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW */
+#define XKB_KEY_ibelowdot 0x1001ecb /* U+1ECB LATIN SMALL LETTER I WITH DOT BELOW */
+#define XKB_KEY_Obelowdot 0x1001ecc /* U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW */
+#define XKB_KEY_obelowdot 0x1001ecd /* U+1ECD LATIN SMALL LETTER O WITH DOT BELOW */
+#define XKB_KEY_Ohook 0x1001ece /* U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE */
+#define XKB_KEY_ohook 0x1001ecf /* U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE */
+#define XKB_KEY_Ocircumflexacute 0x1001ed0 /* U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */
+#define XKB_KEY_ocircumflexacute 0x1001ed1 /* U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */
+#define XKB_KEY_Ocircumflexgrave 0x1001ed2 /* U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */
+#define XKB_KEY_ocircumflexgrave 0x1001ed3 /* U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */
+#define XKB_KEY_Ocircumflexhook 0x1001ed4 /* U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XKB_KEY_ocircumflexhook 0x1001ed5 /* U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XKB_KEY_Ocircumflextilde 0x1001ed6 /* U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */
+#define XKB_KEY_ocircumflextilde 0x1001ed7 /* U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */
+#define XKB_KEY_Ocircumflexbelowdot 0x1001ed8 /* U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
+#define XKB_KEY_ocircumflexbelowdot 0x1001ed9 /* U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
+#define XKB_KEY_Ohornacute 0x1001eda /* U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE */
+#define XKB_KEY_ohornacute 0x1001edb /* U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE */
+#define XKB_KEY_Ohorngrave 0x1001edc /* U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE */
+#define XKB_KEY_ohorngrave 0x1001edd /* U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE */
+#define XKB_KEY_Ohornhook 0x1001ede /* U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */
+#define XKB_KEY_ohornhook 0x1001edf /* U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */
+#define XKB_KEY_Ohorntilde 0x1001ee0 /* U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE */
+#define XKB_KEY_ohorntilde 0x1001ee1 /* U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE */
+#define XKB_KEY_Ohornbelowdot 0x1001ee2 /* U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */
+#define XKB_KEY_ohornbelowdot 0x1001ee3 /* U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW */
+#define XKB_KEY_Ubelowdot 0x1001ee4 /* U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW */
+#define XKB_KEY_ubelowdot 0x1001ee5 /* U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW */
+#define XKB_KEY_Uhook 0x1001ee6 /* U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE */
+#define XKB_KEY_uhook 0x1001ee7 /* U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE */
+#define XKB_KEY_Uhornacute 0x1001ee8 /* U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE */
+#define XKB_KEY_uhornacute 0x1001ee9 /* U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE */
+#define XKB_KEY_Uhorngrave 0x1001eea /* U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE */
+#define XKB_KEY_uhorngrave 0x1001eeb /* U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE */
+#define XKB_KEY_Uhornhook 0x1001eec /* U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */
+#define XKB_KEY_uhornhook 0x1001eed /* U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */
+#define XKB_KEY_Uhorntilde 0x1001eee /* U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE */
+#define XKB_KEY_uhorntilde 0x1001eef /* U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE */
+#define XKB_KEY_Uhornbelowdot 0x1001ef0 /* U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */
+#define XKB_KEY_uhornbelowdot 0x1001ef1 /* U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */
+#define XKB_KEY_Ybelowdot 0x1001ef4 /* U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW */
+#define XKB_KEY_ybelowdot 0x1001ef5 /* U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW */
+#define XKB_KEY_Yhook 0x1001ef6 /* U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE */
+#define XKB_KEY_yhook 0x1001ef7 /* U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE */
+#define XKB_KEY_Ytilde 0x1001ef8 /* U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE */
+#define XKB_KEY_ytilde 0x1001ef9 /* U+1EF9 LATIN SMALL LETTER Y WITH TILDE */
+#define XKB_KEY_Ohorn 0x10001a0 /* U+01A0 LATIN CAPITAL LETTER O WITH HORN */
+#define XKB_KEY_ohorn 0x10001a1 /* U+01A1 LATIN SMALL LETTER O WITH HORN */
+#define XKB_KEY_Uhorn 0x10001af /* U+01AF LATIN CAPITAL LETTER U WITH HORN */
+#define XKB_KEY_uhorn 0x10001b0 /* U+01B0 LATIN SMALL LETTER U WITH HORN */
+
+
+#define XKB_KEY_EcuSign 0x10020a0 /* U+20A0 EURO-CURRENCY SIGN */
+#define XKB_KEY_ColonSign 0x10020a1 /* U+20A1 COLON SIGN */
+#define XKB_KEY_CruzeiroSign 0x10020a2 /* U+20A2 CRUZEIRO SIGN */
+#define XKB_KEY_FFrancSign 0x10020a3 /* U+20A3 FRENCH FRANC SIGN */
+#define XKB_KEY_LiraSign 0x10020a4 /* U+20A4 LIRA SIGN */
+#define XKB_KEY_MillSign 0x10020a5 /* U+20A5 MILL SIGN */
+#define XKB_KEY_NairaSign 0x10020a6 /* U+20A6 NAIRA SIGN */
+#define XKB_KEY_PesetaSign 0x10020a7 /* U+20A7 PESETA SIGN */
+#define XKB_KEY_RupeeSign 0x10020a8 /* U+20A8 RUPEE SIGN */
+#define XKB_KEY_WonSign 0x10020a9 /* U+20A9 WON SIGN */
+#define XKB_KEY_NewSheqelSign 0x10020aa /* U+20AA NEW SHEQEL SIGN */
+#define XKB_KEY_DongSign 0x10020ab /* U+20AB DONG SIGN */
+#define XKB_KEY_EuroSign 0x20ac /* U+20AC EURO SIGN */
+
+/* one, two and three are defined above. */
+#define XKB_KEY_zerosuperior 0x1002070 /* U+2070 SUPERSCRIPT ZERO */
+#define XKB_KEY_foursuperior 0x1002074 /* U+2074 SUPERSCRIPT FOUR */
+#define XKB_KEY_fivesuperior 0x1002075 /* U+2075 SUPERSCRIPT FIVE */
+#define XKB_KEY_sixsuperior 0x1002076 /* U+2076 SUPERSCRIPT SIX */
+#define XKB_KEY_sevensuperior 0x1002077 /* U+2077 SUPERSCRIPT SEVEN */
+#define XKB_KEY_eightsuperior 0x1002078 /* U+2078 SUPERSCRIPT EIGHT */
+#define XKB_KEY_ninesuperior 0x1002079 /* U+2079 SUPERSCRIPT NINE */
+#define XKB_KEY_zerosubscript 0x1002080 /* U+2080 SUBSCRIPT ZERO */
+#define XKB_KEY_onesubscript 0x1002081 /* U+2081 SUBSCRIPT ONE */
+#define XKB_KEY_twosubscript 0x1002082 /* U+2082 SUBSCRIPT TWO */
+#define XKB_KEY_threesubscript 0x1002083 /* U+2083 SUBSCRIPT THREE */
+#define XKB_KEY_foursubscript 0x1002084 /* U+2084 SUBSCRIPT FOUR */
+#define XKB_KEY_fivesubscript 0x1002085 /* U+2085 SUBSCRIPT FIVE */
+#define XKB_KEY_sixsubscript 0x1002086 /* U+2086 SUBSCRIPT SIX */
+#define XKB_KEY_sevensubscript 0x1002087 /* U+2087 SUBSCRIPT SEVEN */
+#define XKB_KEY_eightsubscript 0x1002088 /* U+2088 SUBSCRIPT EIGHT */
+#define XKB_KEY_ninesubscript 0x1002089 /* U+2089 SUBSCRIPT NINE */
+#define XKB_KEY_partdifferential 0x1002202 /* U+2202 PARTIAL DIFFERENTIAL */
+#define XKB_KEY_emptyset 0x1002205 /* U+2205 NULL SET */
+#define XKB_KEY_elementof 0x1002208 /* U+2208 ELEMENT OF */
+#define XKB_KEY_notelementof 0x1002209 /* U+2209 NOT AN ELEMENT OF */
+#define XKB_KEY_containsas 0x100220B /* U+220B CONTAINS AS MEMBER */
+#define XKB_KEY_squareroot 0x100221A /* U+221A SQUARE ROOT */
+#define XKB_KEY_cuberoot 0x100221B /* U+221B CUBE ROOT */
+#define XKB_KEY_fourthroot 0x100221C /* U+221C FOURTH ROOT */
+#define XKB_KEY_dintegral 0x100222C /* U+222C DOUBLE INTEGRAL */
+#define XKB_KEY_tintegral 0x100222D /* U+222D TRIPLE INTEGRAL */
+#define XKB_KEY_because 0x1002235 /* U+2235 BECAUSE */
+#define XKB_KEY_approxeq 0x1002248 /* U+2245 ALMOST EQUAL TO */
+#define XKB_KEY_notapproxeq 0x1002247 /* U+2247 NOT ALMOST EQUAL TO */
+#define XKB_KEY_notidentical 0x1002262 /* U+2262 NOT IDENTICAL TO */
+#define XKB_KEY_stricteq 0x1002263 /* U+2263 STRICTLY EQUIVALENT TO */
+
+#define XKB_KEY_braille_dot_1 0xfff1
+#define XKB_KEY_braille_dot_2 0xfff2
+#define XKB_KEY_braille_dot_3 0xfff3
+#define XKB_KEY_braille_dot_4 0xfff4
+#define XKB_KEY_braille_dot_5 0xfff5
+#define XKB_KEY_braille_dot_6 0xfff6
+#define XKB_KEY_braille_dot_7 0xfff7
+#define XKB_KEY_braille_dot_8 0xfff8
+#define XKB_KEY_braille_dot_9 0xfff9
+#define XKB_KEY_braille_dot_10 0xfffa
+#define XKB_KEY_braille_blank 0x1002800 /* U+2800 BRAILLE PATTERN BLANK */
+#define XKB_KEY_braille_dots_1 0x1002801 /* U+2801 BRAILLE PATTERN DOTS-1 */
+#define XKB_KEY_braille_dots_2 0x1002802 /* U+2802 BRAILLE PATTERN DOTS-2 */
+#define XKB_KEY_braille_dots_12 0x1002803 /* U+2803 BRAILLE PATTERN DOTS-12 */
+#define XKB_KEY_braille_dots_3 0x1002804 /* U+2804 BRAILLE PATTERN DOTS-3 */
+#define XKB_KEY_braille_dots_13 0x1002805 /* U+2805 BRAILLE PATTERN DOTS-13 */
+#define XKB_KEY_braille_dots_23 0x1002806 /* U+2806 BRAILLE PATTERN DOTS-23 */
+#define XKB_KEY_braille_dots_123 0x1002807 /* U+2807 BRAILLE PATTERN DOTS-123 */
+#define XKB_KEY_braille_dots_4 0x1002808 /* U+2808 BRAILLE PATTERN DOTS-4 */
+#define XKB_KEY_braille_dots_14 0x1002809 /* U+2809 BRAILLE PATTERN DOTS-14 */
+#define XKB_KEY_braille_dots_24 0x100280a /* U+280a BRAILLE PATTERN DOTS-24 */
+#define XKB_KEY_braille_dots_124 0x100280b /* U+280b BRAILLE PATTERN DOTS-124 */
+#define XKB_KEY_braille_dots_34 0x100280c /* U+280c BRAILLE PATTERN DOTS-34 */
+#define XKB_KEY_braille_dots_134 0x100280d /* U+280d BRAILLE PATTERN DOTS-134 */
+#define XKB_KEY_braille_dots_234 0x100280e /* U+280e BRAILLE PATTERN DOTS-234 */
+#define XKB_KEY_braille_dots_1234 0x100280f /* U+280f BRAILLE PATTERN DOTS-1234 */
+#define XKB_KEY_braille_dots_5 0x1002810 /* U+2810 BRAILLE PATTERN DOTS-5 */
+#define XKB_KEY_braille_dots_15 0x1002811 /* U+2811 BRAILLE PATTERN DOTS-15 */
+#define XKB_KEY_braille_dots_25 0x1002812 /* U+2812 BRAILLE PATTERN DOTS-25 */
+#define XKB_KEY_braille_dots_125 0x1002813 /* U+2813 BRAILLE PATTERN DOTS-125 */
+#define XKB_KEY_braille_dots_35 0x1002814 /* U+2814 BRAILLE PATTERN DOTS-35 */
+#define XKB_KEY_braille_dots_135 0x1002815 /* U+2815 BRAILLE PATTERN DOTS-135 */
+#define XKB_KEY_braille_dots_235 0x1002816 /* U+2816 BRAILLE PATTERN DOTS-235 */
+#define XKB_KEY_braille_dots_1235 0x1002817 /* U+2817 BRAILLE PATTERN DOTS-1235 */
+#define XKB_KEY_braille_dots_45 0x1002818 /* U+2818 BRAILLE PATTERN DOTS-45 */
+#define XKB_KEY_braille_dots_145 0x1002819 /* U+2819 BRAILLE PATTERN DOTS-145 */
+#define XKB_KEY_braille_dots_245 0x100281a /* U+281a BRAILLE PATTERN DOTS-245 */
+#define XKB_KEY_braille_dots_1245 0x100281b /* U+281b BRAILLE PATTERN DOTS-1245 */
+#define XKB_KEY_braille_dots_345 0x100281c /* U+281c BRAILLE PATTERN DOTS-345 */
+#define XKB_KEY_braille_dots_1345 0x100281d /* U+281d BRAILLE PATTERN DOTS-1345 */
+#define XKB_KEY_braille_dots_2345 0x100281e /* U+281e BRAILLE PATTERN DOTS-2345 */
+#define XKB_KEY_braille_dots_12345 0x100281f /* U+281f BRAILLE PATTERN DOTS-12345 */
+#define XKB_KEY_braille_dots_6 0x1002820 /* U+2820 BRAILLE PATTERN DOTS-6 */
+#define XKB_KEY_braille_dots_16 0x1002821 /* U+2821 BRAILLE PATTERN DOTS-16 */
+#define XKB_KEY_braille_dots_26 0x1002822 /* U+2822 BRAILLE PATTERN DOTS-26 */
+#define XKB_KEY_braille_dots_126 0x1002823 /* U+2823 BRAILLE PATTERN DOTS-126 */
+#define XKB_KEY_braille_dots_36 0x1002824 /* U+2824 BRAILLE PATTERN DOTS-36 */
+#define XKB_KEY_braille_dots_136 0x1002825 /* U+2825 BRAILLE PATTERN DOTS-136 */
+#define XKB_KEY_braille_dots_236 0x1002826 /* U+2826 BRAILLE PATTERN DOTS-236 */
+#define XKB_KEY_braille_dots_1236 0x1002827 /* U+2827 BRAILLE PATTERN DOTS-1236 */
+#define XKB_KEY_braille_dots_46 0x1002828 /* U+2828 BRAILLE PATTERN DOTS-46 */
+#define XKB_KEY_braille_dots_146 0x1002829 /* U+2829 BRAILLE PATTERN DOTS-146 */
+#define XKB_KEY_braille_dots_246 0x100282a /* U+282a BRAILLE PATTERN DOTS-246 */
+#define XKB_KEY_braille_dots_1246 0x100282b /* U+282b BRAILLE PATTERN DOTS-1246 */
+#define XKB_KEY_braille_dots_346 0x100282c /* U+282c BRAILLE PATTERN DOTS-346 */
+#define XKB_KEY_braille_dots_1346 0x100282d /* U+282d BRAILLE PATTERN DOTS-1346 */
+#define XKB_KEY_braille_dots_2346 0x100282e /* U+282e BRAILLE PATTERN DOTS-2346 */
+#define XKB_KEY_braille_dots_12346 0x100282f /* U+282f BRAILLE PATTERN DOTS-12346 */
+#define XKB_KEY_braille_dots_56 0x1002830 /* U+2830 BRAILLE PATTERN DOTS-56 */
+#define XKB_KEY_braille_dots_156 0x1002831 /* U+2831 BRAILLE PATTERN DOTS-156 */
+#define XKB_KEY_braille_dots_256 0x1002832 /* U+2832 BRAILLE PATTERN DOTS-256 */
+#define XKB_KEY_braille_dots_1256 0x1002833 /* U+2833 BRAILLE PATTERN DOTS-1256 */
+#define XKB_KEY_braille_dots_356 0x1002834 /* U+2834 BRAILLE PATTERN DOTS-356 */
+#define XKB_KEY_braille_dots_1356 0x1002835 /* U+2835 BRAILLE PATTERN DOTS-1356 */
+#define XKB_KEY_braille_dots_2356 0x1002836 /* U+2836 BRAILLE PATTERN DOTS-2356 */
+#define XKB_KEY_braille_dots_12356 0x1002837 /* U+2837 BRAILLE PATTERN DOTS-12356 */
+#define XKB_KEY_braille_dots_456 0x1002838 /* U+2838 BRAILLE PATTERN DOTS-456 */
+#define XKB_KEY_braille_dots_1456 0x1002839 /* U+2839 BRAILLE PATTERN DOTS-1456 */
+#define XKB_KEY_braille_dots_2456 0x100283a /* U+283a BRAILLE PATTERN DOTS-2456 */
+#define XKB_KEY_braille_dots_12456 0x100283b /* U+283b BRAILLE PATTERN DOTS-12456 */
+#define XKB_KEY_braille_dots_3456 0x100283c /* U+283c BRAILLE PATTERN DOTS-3456 */
+#define XKB_KEY_braille_dots_13456 0x100283d /* U+283d BRAILLE PATTERN DOTS-13456 */
+#define XKB_KEY_braille_dots_23456 0x100283e /* U+283e BRAILLE PATTERN DOTS-23456 */
+#define XKB_KEY_braille_dots_123456 0x100283f /* U+283f BRAILLE PATTERN DOTS-123456 */
+#define XKB_KEY_braille_dots_7 0x1002840 /* U+2840 BRAILLE PATTERN DOTS-7 */
+#define XKB_KEY_braille_dots_17 0x1002841 /* U+2841 BRAILLE PATTERN DOTS-17 */
+#define XKB_KEY_braille_dots_27 0x1002842 /* U+2842 BRAILLE PATTERN DOTS-27 */
+#define XKB_KEY_braille_dots_127 0x1002843 /* U+2843 BRAILLE PATTERN DOTS-127 */
+#define XKB_KEY_braille_dots_37 0x1002844 /* U+2844 BRAILLE PATTERN DOTS-37 */
+#define XKB_KEY_braille_dots_137 0x1002845 /* U+2845 BRAILLE PATTERN DOTS-137 */
+#define XKB_KEY_braille_dots_237 0x1002846 /* U+2846 BRAILLE PATTERN DOTS-237 */
+#define XKB_KEY_braille_dots_1237 0x1002847 /* U+2847 BRAILLE PATTERN DOTS-1237 */
+#define XKB_KEY_braille_dots_47 0x1002848 /* U+2848 BRAILLE PATTERN DOTS-47 */
+#define XKB_KEY_braille_dots_147 0x1002849 /* U+2849 BRAILLE PATTERN DOTS-147 */
+#define XKB_KEY_braille_dots_247 0x100284a /* U+284a BRAILLE PATTERN DOTS-247 */
+#define XKB_KEY_braille_dots_1247 0x100284b /* U+284b BRAILLE PATTERN DOTS-1247 */
+#define XKB_KEY_braille_dots_347 0x100284c /* U+284c BRAILLE PATTERN DOTS-347 */
+#define XKB_KEY_braille_dots_1347 0x100284d /* U+284d BRAILLE PATTERN DOTS-1347 */
+#define XKB_KEY_braille_dots_2347 0x100284e /* U+284e BRAILLE PATTERN DOTS-2347 */
+#define XKB_KEY_braille_dots_12347 0x100284f /* U+284f BRAILLE PATTERN DOTS-12347 */
+#define XKB_KEY_braille_dots_57 0x1002850 /* U+2850 BRAILLE PATTERN DOTS-57 */
+#define XKB_KEY_braille_dots_157 0x1002851 /* U+2851 BRAILLE PATTERN DOTS-157 */
+#define XKB_KEY_braille_dots_257 0x1002852 /* U+2852 BRAILLE PATTERN DOTS-257 */
+#define XKB_KEY_braille_dots_1257 0x1002853 /* U+2853 BRAILLE PATTERN DOTS-1257 */
+#define XKB_KEY_braille_dots_357 0x1002854 /* U+2854 BRAILLE PATTERN DOTS-357 */
+#define XKB_KEY_braille_dots_1357 0x1002855 /* U+2855 BRAILLE PATTERN DOTS-1357 */
+#define XKB_KEY_braille_dots_2357 0x1002856 /* U+2856 BRAILLE PATTERN DOTS-2357 */
+#define XKB_KEY_braille_dots_12357 0x1002857 /* U+2857 BRAILLE PATTERN DOTS-12357 */
+#define XKB_KEY_braille_dots_457 0x1002858 /* U+2858 BRAILLE PATTERN DOTS-457 */
+#define XKB_KEY_braille_dots_1457 0x1002859 /* U+2859 BRAILLE PATTERN DOTS-1457 */
+#define XKB_KEY_braille_dots_2457 0x100285a /* U+285a BRAILLE PATTERN DOTS-2457 */
+#define XKB_KEY_braille_dots_12457 0x100285b /* U+285b BRAILLE PATTERN DOTS-12457 */
+#define XKB_KEY_braille_dots_3457 0x100285c /* U+285c BRAILLE PATTERN DOTS-3457 */
+#define XKB_KEY_braille_dots_13457 0x100285d /* U+285d BRAILLE PATTERN DOTS-13457 */
+#define XKB_KEY_braille_dots_23457 0x100285e /* U+285e BRAILLE PATTERN DOTS-23457 */
+#define XKB_KEY_braille_dots_123457 0x100285f /* U+285f BRAILLE PATTERN DOTS-123457 */
+#define XKB_KEY_braille_dots_67 0x1002860 /* U+2860 BRAILLE PATTERN DOTS-67 */
+#define XKB_KEY_braille_dots_167 0x1002861 /* U+2861 BRAILLE PATTERN DOTS-167 */
+#define XKB_KEY_braille_dots_267 0x1002862 /* U+2862 BRAILLE PATTERN DOTS-267 */
+#define XKB_KEY_braille_dots_1267 0x1002863 /* U+2863 BRAILLE PATTERN DOTS-1267 */
+#define XKB_KEY_braille_dots_367 0x1002864 /* U+2864 BRAILLE PATTERN DOTS-367 */
+#define XKB_KEY_braille_dots_1367 0x1002865 /* U+2865 BRAILLE PATTERN DOTS-1367 */
+#define XKB_KEY_braille_dots_2367 0x1002866 /* U+2866 BRAILLE PATTERN DOTS-2367 */
+#define XKB_KEY_braille_dots_12367 0x1002867 /* U+2867 BRAILLE PATTERN DOTS-12367 */
+#define XKB_KEY_braille_dots_467 0x1002868 /* U+2868 BRAILLE PATTERN DOTS-467 */
+#define XKB_KEY_braille_dots_1467 0x1002869 /* U+2869 BRAILLE PATTERN DOTS-1467 */
+#define XKB_KEY_braille_dots_2467 0x100286a /* U+286a BRAILLE PATTERN DOTS-2467 */
+#define XKB_KEY_braille_dots_12467 0x100286b /* U+286b BRAILLE PATTERN DOTS-12467 */
+#define XKB_KEY_braille_dots_3467 0x100286c /* U+286c BRAILLE PATTERN DOTS-3467 */
+#define XKB_KEY_braille_dots_13467 0x100286d /* U+286d BRAILLE PATTERN DOTS-13467 */
+#define XKB_KEY_braille_dots_23467 0x100286e /* U+286e BRAILLE PATTERN DOTS-23467 */
+#define XKB_KEY_braille_dots_123467 0x100286f /* U+286f BRAILLE PATTERN DOTS-123467 */
+#define XKB_KEY_braille_dots_567 0x1002870 /* U+2870 BRAILLE PATTERN DOTS-567 */
+#define XKB_KEY_braille_dots_1567 0x1002871 /* U+2871 BRAILLE PATTERN DOTS-1567 */
+#define XKB_KEY_braille_dots_2567 0x1002872 /* U+2872 BRAILLE PATTERN DOTS-2567 */
+#define XKB_KEY_braille_dots_12567 0x1002873 /* U+2873 BRAILLE PATTERN DOTS-12567 */
+#define XKB_KEY_braille_dots_3567 0x1002874 /* U+2874 BRAILLE PATTERN DOTS-3567 */
+#define XKB_KEY_braille_dots_13567 0x1002875 /* U+2875 BRAILLE PATTERN DOTS-13567 */
+#define XKB_KEY_braille_dots_23567 0x1002876 /* U+2876 BRAILLE PATTERN DOTS-23567 */
+#define XKB_KEY_braille_dots_123567 0x1002877 /* U+2877 BRAILLE PATTERN DOTS-123567 */
+#define XKB_KEY_braille_dots_4567 0x1002878 /* U+2878 BRAILLE PATTERN DOTS-4567 */
+#define XKB_KEY_braille_dots_14567 0x1002879 /* U+2879 BRAILLE PATTERN DOTS-14567 */
+#define XKB_KEY_braille_dots_24567 0x100287a /* U+287a BRAILLE PATTERN DOTS-24567 */
+#define XKB_KEY_braille_dots_124567 0x100287b /* U+287b BRAILLE PATTERN DOTS-124567 */
+#define XKB_KEY_braille_dots_34567 0x100287c /* U+287c BRAILLE PATTERN DOTS-34567 */
+#define XKB_KEY_braille_dots_134567 0x100287d /* U+287d BRAILLE PATTERN DOTS-134567 */
+#define XKB_KEY_braille_dots_234567 0x100287e /* U+287e BRAILLE PATTERN DOTS-234567 */
+#define XKB_KEY_braille_dots_1234567 0x100287f /* U+287f BRAILLE PATTERN DOTS-1234567 */
+#define XKB_KEY_braille_dots_8 0x1002880 /* U+2880 BRAILLE PATTERN DOTS-8 */
+#define XKB_KEY_braille_dots_18 0x1002881 /* U+2881 BRAILLE PATTERN DOTS-18 */
+#define XKB_KEY_braille_dots_28 0x1002882 /* U+2882 BRAILLE PATTERN DOTS-28 */
+#define XKB_KEY_braille_dots_128 0x1002883 /* U+2883 BRAILLE PATTERN DOTS-128 */
+#define XKB_KEY_braille_dots_38 0x1002884 /* U+2884 BRAILLE PATTERN DOTS-38 */
+#define XKB_KEY_braille_dots_138 0x1002885 /* U+2885 BRAILLE PATTERN DOTS-138 */
+#define XKB_KEY_braille_dots_238 0x1002886 /* U+2886 BRAILLE PATTERN DOTS-238 */
+#define XKB_KEY_braille_dots_1238 0x1002887 /* U+2887 BRAILLE PATTERN DOTS-1238 */
+#define XKB_KEY_braille_dots_48 0x1002888 /* U+2888 BRAILLE PATTERN DOTS-48 */
+#define XKB_KEY_braille_dots_148 0x1002889 /* U+2889 BRAILLE PATTERN DOTS-148 */
+#define XKB_KEY_braille_dots_248 0x100288a /* U+288a BRAILLE PATTERN DOTS-248 */
+#define XKB_KEY_braille_dots_1248 0x100288b /* U+288b BRAILLE PATTERN DOTS-1248 */
+#define XKB_KEY_braille_dots_348 0x100288c /* U+288c BRAILLE PATTERN DOTS-348 */
+#define XKB_KEY_braille_dots_1348 0x100288d /* U+288d BRAILLE PATTERN DOTS-1348 */
+#define XKB_KEY_braille_dots_2348 0x100288e /* U+288e BRAILLE PATTERN DOTS-2348 */
+#define XKB_KEY_braille_dots_12348 0x100288f /* U+288f BRAILLE PATTERN DOTS-12348 */
+#define XKB_KEY_braille_dots_58 0x1002890 /* U+2890 BRAILLE PATTERN DOTS-58 */
+#define XKB_KEY_braille_dots_158 0x1002891 /* U+2891 BRAILLE PATTERN DOTS-158 */
+#define XKB_KEY_braille_dots_258 0x1002892 /* U+2892 BRAILLE PATTERN DOTS-258 */
+#define XKB_KEY_braille_dots_1258 0x1002893 /* U+2893 BRAILLE PATTERN DOTS-1258 */
+#define XKB_KEY_braille_dots_358 0x1002894 /* U+2894 BRAILLE PATTERN DOTS-358 */
+#define XKB_KEY_braille_dots_1358 0x1002895 /* U+2895 BRAILLE PATTERN DOTS-1358 */
+#define XKB_KEY_braille_dots_2358 0x1002896 /* U+2896 BRAILLE PATTERN DOTS-2358 */
+#define XKB_KEY_braille_dots_12358 0x1002897 /* U+2897 BRAILLE PATTERN DOTS-12358 */
+#define XKB_KEY_braille_dots_458 0x1002898 /* U+2898 BRAILLE PATTERN DOTS-458 */
+#define XKB_KEY_braille_dots_1458 0x1002899 /* U+2899 BRAILLE PATTERN DOTS-1458 */
+#define XKB_KEY_braille_dots_2458 0x100289a /* U+289a BRAILLE PATTERN DOTS-2458 */
+#define XKB_KEY_braille_dots_12458 0x100289b /* U+289b BRAILLE PATTERN DOTS-12458 */
+#define XKB_KEY_braille_dots_3458 0x100289c /* U+289c BRAILLE PATTERN DOTS-3458 */
+#define XKB_KEY_braille_dots_13458 0x100289d /* U+289d BRAILLE PATTERN DOTS-13458 */
+#define XKB_KEY_braille_dots_23458 0x100289e /* U+289e BRAILLE PATTERN DOTS-23458 */
+#define XKB_KEY_braille_dots_123458 0x100289f /* U+289f BRAILLE PATTERN DOTS-123458 */
+#define XKB_KEY_braille_dots_68 0x10028a0 /* U+28a0 BRAILLE PATTERN DOTS-68 */
+#define XKB_KEY_braille_dots_168 0x10028a1 /* U+28a1 BRAILLE PATTERN DOTS-168 */
+#define XKB_KEY_braille_dots_268 0x10028a2 /* U+28a2 BRAILLE PATTERN DOTS-268 */
+#define XKB_KEY_braille_dots_1268 0x10028a3 /* U+28a3 BRAILLE PATTERN DOTS-1268 */
+#define XKB_KEY_braille_dots_368 0x10028a4 /* U+28a4 BRAILLE PATTERN DOTS-368 */
+#define XKB_KEY_braille_dots_1368 0x10028a5 /* U+28a5 BRAILLE PATTERN DOTS-1368 */
+#define XKB_KEY_braille_dots_2368 0x10028a6 /* U+28a6 BRAILLE PATTERN DOTS-2368 */
+#define XKB_KEY_braille_dots_12368 0x10028a7 /* U+28a7 BRAILLE PATTERN DOTS-12368 */
+#define XKB_KEY_braille_dots_468 0x10028a8 /* U+28a8 BRAILLE PATTERN DOTS-468 */
+#define XKB_KEY_braille_dots_1468 0x10028a9 /* U+28a9 BRAILLE PATTERN DOTS-1468 */
+#define XKB_KEY_braille_dots_2468 0x10028aa /* U+28aa BRAILLE PATTERN DOTS-2468 */
+#define XKB_KEY_braille_dots_12468 0x10028ab /* U+28ab BRAILLE PATTERN DOTS-12468 */
+#define XKB_KEY_braille_dots_3468 0x10028ac /* U+28ac BRAILLE PATTERN DOTS-3468 */
+#define XKB_KEY_braille_dots_13468 0x10028ad /* U+28ad BRAILLE PATTERN DOTS-13468 */
+#define XKB_KEY_braille_dots_23468 0x10028ae /* U+28ae BRAILLE PATTERN DOTS-23468 */
+#define XKB_KEY_braille_dots_123468 0x10028af /* U+28af BRAILLE PATTERN DOTS-123468 */
+#define XKB_KEY_braille_dots_568 0x10028b0 /* U+28b0 BRAILLE PATTERN DOTS-568 */
+#define XKB_KEY_braille_dots_1568 0x10028b1 /* U+28b1 BRAILLE PATTERN DOTS-1568 */
+#define XKB_KEY_braille_dots_2568 0x10028b2 /* U+28b2 BRAILLE PATTERN DOTS-2568 */
+#define XKB_KEY_braille_dots_12568 0x10028b3 /* U+28b3 BRAILLE PATTERN DOTS-12568 */
+#define XKB_KEY_braille_dots_3568 0x10028b4 /* U+28b4 BRAILLE PATTERN DOTS-3568 */
+#define XKB_KEY_braille_dots_13568 0x10028b5 /* U+28b5 BRAILLE PATTERN DOTS-13568 */
+#define XKB_KEY_braille_dots_23568 0x10028b6 /* U+28b6 BRAILLE PATTERN DOTS-23568 */
+#define XKB_KEY_braille_dots_123568 0x10028b7 /* U+28b7 BRAILLE PATTERN DOTS-123568 */
+#define XKB_KEY_braille_dots_4568 0x10028b8 /* U+28b8 BRAILLE PATTERN DOTS-4568 */
+#define XKB_KEY_braille_dots_14568 0x10028b9 /* U+28b9 BRAILLE PATTERN DOTS-14568 */
+#define XKB_KEY_braille_dots_24568 0x10028ba /* U+28ba BRAILLE PATTERN DOTS-24568 */
+#define XKB_KEY_braille_dots_124568 0x10028bb /* U+28bb BRAILLE PATTERN DOTS-124568 */
+#define XKB_KEY_braille_dots_34568 0x10028bc /* U+28bc BRAILLE PATTERN DOTS-34568 */
+#define XKB_KEY_braille_dots_134568 0x10028bd /* U+28bd BRAILLE PATTERN DOTS-134568 */
+#define XKB_KEY_braille_dots_234568 0x10028be /* U+28be BRAILLE PATTERN DOTS-234568 */
+#define XKB_KEY_braille_dots_1234568 0x10028bf /* U+28bf BRAILLE PATTERN DOTS-1234568 */
+#define XKB_KEY_braille_dots_78 0x10028c0 /* U+28c0 BRAILLE PATTERN DOTS-78 */
+#define XKB_KEY_braille_dots_178 0x10028c1 /* U+28c1 BRAILLE PATTERN DOTS-178 */
+#define XKB_KEY_braille_dots_278 0x10028c2 /* U+28c2 BRAILLE PATTERN DOTS-278 */
+#define XKB_KEY_braille_dots_1278 0x10028c3 /* U+28c3 BRAILLE PATTERN DOTS-1278 */
+#define XKB_KEY_braille_dots_378 0x10028c4 /* U+28c4 BRAILLE PATTERN DOTS-378 */
+#define XKB_KEY_braille_dots_1378 0x10028c5 /* U+28c5 BRAILLE PATTERN DOTS-1378 */
+#define XKB_KEY_braille_dots_2378 0x10028c6 /* U+28c6 BRAILLE PATTERN DOTS-2378 */
+#define XKB_KEY_braille_dots_12378 0x10028c7 /* U+28c7 BRAILLE PATTERN DOTS-12378 */
+#define XKB_KEY_braille_dots_478 0x10028c8 /* U+28c8 BRAILLE PATTERN DOTS-478 */
+#define XKB_KEY_braille_dots_1478 0x10028c9 /* U+28c9 BRAILLE PATTERN DOTS-1478 */
+#define XKB_KEY_braille_dots_2478 0x10028ca /* U+28ca BRAILLE PATTERN DOTS-2478 */
+#define XKB_KEY_braille_dots_12478 0x10028cb /* U+28cb BRAILLE PATTERN DOTS-12478 */
+#define XKB_KEY_braille_dots_3478 0x10028cc /* U+28cc BRAILLE PATTERN DOTS-3478 */
+#define XKB_KEY_braille_dots_13478 0x10028cd /* U+28cd BRAILLE PATTERN DOTS-13478 */
+#define XKB_KEY_braille_dots_23478 0x10028ce /* U+28ce BRAILLE PATTERN DOTS-23478 */
+#define XKB_KEY_braille_dots_123478 0x10028cf /* U+28cf BRAILLE PATTERN DOTS-123478 */
+#define XKB_KEY_braille_dots_578 0x10028d0 /* U+28d0 BRAILLE PATTERN DOTS-578 */
+#define XKB_KEY_braille_dots_1578 0x10028d1 /* U+28d1 BRAILLE PATTERN DOTS-1578 */
+#define XKB_KEY_braille_dots_2578 0x10028d2 /* U+28d2 BRAILLE PATTERN DOTS-2578 */
+#define XKB_KEY_braille_dots_12578 0x10028d3 /* U+28d3 BRAILLE PATTERN DOTS-12578 */
+#define XKB_KEY_braille_dots_3578 0x10028d4 /* U+28d4 BRAILLE PATTERN DOTS-3578 */
+#define XKB_KEY_braille_dots_13578 0x10028d5 /* U+28d5 BRAILLE PATTERN DOTS-13578 */
+#define XKB_KEY_braille_dots_23578 0x10028d6 /* U+28d6 BRAILLE PATTERN DOTS-23578 */
+#define XKB_KEY_braille_dots_123578 0x10028d7 /* U+28d7 BRAILLE PATTERN DOTS-123578 */
+#define XKB_KEY_braille_dots_4578 0x10028d8 /* U+28d8 BRAILLE PATTERN DOTS-4578 */
+#define XKB_KEY_braille_dots_14578 0x10028d9 /* U+28d9 BRAILLE PATTERN DOTS-14578 */
+#define XKB_KEY_braille_dots_24578 0x10028da /* U+28da BRAILLE PATTERN DOTS-24578 */
+#define XKB_KEY_braille_dots_124578 0x10028db /* U+28db BRAILLE PATTERN DOTS-124578 */
+#define XKB_KEY_braille_dots_34578 0x10028dc /* U+28dc BRAILLE PATTERN DOTS-34578 */
+#define XKB_KEY_braille_dots_134578 0x10028dd /* U+28dd BRAILLE PATTERN DOTS-134578 */
+#define XKB_KEY_braille_dots_234578 0x10028de /* U+28de BRAILLE PATTERN DOTS-234578 */
+#define XKB_KEY_braille_dots_1234578 0x10028df /* U+28df BRAILLE PATTERN DOTS-1234578 */
+#define XKB_KEY_braille_dots_678 0x10028e0 /* U+28e0 BRAILLE PATTERN DOTS-678 */
+#define XKB_KEY_braille_dots_1678 0x10028e1 /* U+28e1 BRAILLE PATTERN DOTS-1678 */
+#define XKB_KEY_braille_dots_2678 0x10028e2 /* U+28e2 BRAILLE PATTERN DOTS-2678 */
+#define XKB_KEY_braille_dots_12678 0x10028e3 /* U+28e3 BRAILLE PATTERN DOTS-12678 */
+#define XKB_KEY_braille_dots_3678 0x10028e4 /* U+28e4 BRAILLE PATTERN DOTS-3678 */
+#define XKB_KEY_braille_dots_13678 0x10028e5 /* U+28e5 BRAILLE PATTERN DOTS-13678 */
+#define XKB_KEY_braille_dots_23678 0x10028e6 /* U+28e6 BRAILLE PATTERN DOTS-23678 */
+#define XKB_KEY_braille_dots_123678 0x10028e7 /* U+28e7 BRAILLE PATTERN DOTS-123678 */
+#define XKB_KEY_braille_dots_4678 0x10028e8 /* U+28e8 BRAILLE PATTERN DOTS-4678 */
+#define XKB_KEY_braille_dots_14678 0x10028e9 /* U+28e9 BRAILLE PATTERN DOTS-14678 */
+#define XKB_KEY_braille_dots_24678 0x10028ea /* U+28ea BRAILLE PATTERN DOTS-24678 */
+#define XKB_KEY_braille_dots_124678 0x10028eb /* U+28eb BRAILLE PATTERN DOTS-124678 */
+#define XKB_KEY_braille_dots_34678 0x10028ec /* U+28ec BRAILLE PATTERN DOTS-34678 */
+#define XKB_KEY_braille_dots_134678 0x10028ed /* U+28ed BRAILLE PATTERN DOTS-134678 */
+#define XKB_KEY_braille_dots_234678 0x10028ee /* U+28ee BRAILLE PATTERN DOTS-234678 */
+#define XKB_KEY_braille_dots_1234678 0x10028ef /* U+28ef BRAILLE PATTERN DOTS-1234678 */
+#define XKB_KEY_braille_dots_5678 0x10028f0 /* U+28f0 BRAILLE PATTERN DOTS-5678 */
+#define XKB_KEY_braille_dots_15678 0x10028f1 /* U+28f1 BRAILLE PATTERN DOTS-15678 */
+#define XKB_KEY_braille_dots_25678 0x10028f2 /* U+28f2 BRAILLE PATTERN DOTS-25678 */
+#define XKB_KEY_braille_dots_125678 0x10028f3 /* U+28f3 BRAILLE PATTERN DOTS-125678 */
+#define XKB_KEY_braille_dots_35678 0x10028f4 /* U+28f4 BRAILLE PATTERN DOTS-35678 */
+#define XKB_KEY_braille_dots_135678 0x10028f5 /* U+28f5 BRAILLE PATTERN DOTS-135678 */
+#define XKB_KEY_braille_dots_235678 0x10028f6 /* U+28f6 BRAILLE PATTERN DOTS-235678 */
+#define XKB_KEY_braille_dots_1235678 0x10028f7 /* U+28f7 BRAILLE PATTERN DOTS-1235678 */
+#define XKB_KEY_braille_dots_45678 0x10028f8 /* U+28f8 BRAILLE PATTERN DOTS-45678 */
+#define XKB_KEY_braille_dots_145678 0x10028f9 /* U+28f9 BRAILLE PATTERN DOTS-145678 */
+#define XKB_KEY_braille_dots_245678 0x10028fa /* U+28fa BRAILLE PATTERN DOTS-245678 */
+#define XKB_KEY_braille_dots_1245678 0x10028fb /* U+28fb BRAILLE PATTERN DOTS-1245678 */
+#define XKB_KEY_braille_dots_345678 0x10028fc /* U+28fc BRAILLE PATTERN DOTS-345678 */
+#define XKB_KEY_braille_dots_1345678 0x10028fd /* U+28fd BRAILLE PATTERN DOTS-1345678 */
+#define XKB_KEY_braille_dots_2345678 0x10028fe /* U+28fe BRAILLE PATTERN DOTS-2345678 */
+#define XKB_KEY_braille_dots_12345678 0x10028ff /* U+28ff BRAILLE PATTERN DOTS-12345678 */
+
+/*
+ * Sinhala (http://unicode.org/charts/PDF/U0D80.pdf)
+ * http://www.nongnu.org/sinhala/doc/transliteration/sinhala-transliteration_6.html
+ */
+
+#define XKB_KEY_Sinh_ng 0x1000d82 /* U+0D82 SINHALA ANUSVARAYA */
+#define XKB_KEY_Sinh_h2 0x1000d83 /* U+0D83 SINHALA VISARGAYA */
+#define XKB_KEY_Sinh_a 0x1000d85 /* U+0D85 SINHALA AYANNA */
+#define XKB_KEY_Sinh_aa 0x1000d86 /* U+0D86 SINHALA AAYANNA */
+#define XKB_KEY_Sinh_ae 0x1000d87 /* U+0D87 SINHALA AEYANNA */
+#define XKB_KEY_Sinh_aee 0x1000d88 /* U+0D88 SINHALA AEEYANNA */
+#define XKB_KEY_Sinh_i 0x1000d89 /* U+0D89 SINHALA IYANNA */
+#define XKB_KEY_Sinh_ii 0x1000d8a /* U+0D8A SINHALA IIYANNA */
+#define XKB_KEY_Sinh_u 0x1000d8b /* U+0D8B SINHALA UYANNA */
+#define XKB_KEY_Sinh_uu 0x1000d8c /* U+0D8C SINHALA UUYANNA */
+#define XKB_KEY_Sinh_ri 0x1000d8d /* U+0D8D SINHALA IRUYANNA */
+#define XKB_KEY_Sinh_rii 0x1000d8e /* U+0D8E SINHALA IRUUYANNA */
+#define XKB_KEY_Sinh_lu 0x1000d8f /* U+0D8F SINHALA ILUYANNA */
+#define XKB_KEY_Sinh_luu 0x1000d90 /* U+0D90 SINHALA ILUUYANNA */
+#define XKB_KEY_Sinh_e 0x1000d91 /* U+0D91 SINHALA EYANNA */
+#define XKB_KEY_Sinh_ee 0x1000d92 /* U+0D92 SINHALA EEYANNA */
+#define XKB_KEY_Sinh_ai 0x1000d93 /* U+0D93 SINHALA AIYANNA */
+#define XKB_KEY_Sinh_o 0x1000d94 /* U+0D94 SINHALA OYANNA */
+#define XKB_KEY_Sinh_oo 0x1000d95 /* U+0D95 SINHALA OOYANNA */
+#define XKB_KEY_Sinh_au 0x1000d96 /* U+0D96 SINHALA AUYANNA */
+#define XKB_KEY_Sinh_ka 0x1000d9a /* U+0D9A SINHALA KAYANNA */
+#define XKB_KEY_Sinh_kha 0x1000d9b /* U+0D9B SINHALA MAHA. KAYANNA */
+#define XKB_KEY_Sinh_ga 0x1000d9c /* U+0D9C SINHALA GAYANNA */
+#define XKB_KEY_Sinh_gha 0x1000d9d /* U+0D9D SINHALA MAHA. GAYANNA */
+#define XKB_KEY_Sinh_ng2 0x1000d9e /* U+0D9E SINHALA KANTAJA NAASIKYAYA */
+#define XKB_KEY_Sinh_nga 0x1000d9f /* U+0D9F SINHALA SANYAKA GAYANNA */
+#define XKB_KEY_Sinh_ca 0x1000da0 /* U+0DA0 SINHALA CAYANNA */
+#define XKB_KEY_Sinh_cha 0x1000da1 /* U+0DA1 SINHALA MAHA. CAYANNA */
+#define XKB_KEY_Sinh_ja 0x1000da2 /* U+0DA2 SINHALA JAYANNA */
+#define XKB_KEY_Sinh_jha 0x1000da3 /* U+0DA3 SINHALA MAHA. JAYANNA */
+#define XKB_KEY_Sinh_nya 0x1000da4 /* U+0DA4 SINHALA TAALUJA NAASIKYAYA */
+#define XKB_KEY_Sinh_jnya 0x1000da5 /* U+0DA5 SINHALA TAALUJA SANYOOGA NAASIKYAYA */
+#define XKB_KEY_Sinh_nja 0x1000da6 /* U+0DA6 SINHALA SANYAKA JAYANNA */
+#define XKB_KEY_Sinh_tta 0x1000da7 /* U+0DA7 SINHALA TTAYANNA */
+#define XKB_KEY_Sinh_ttha 0x1000da8 /* U+0DA8 SINHALA MAHA. TTAYANNA */
+#define XKB_KEY_Sinh_dda 0x1000da9 /* U+0DA9 SINHALA DDAYANNA */
+#define XKB_KEY_Sinh_ddha 0x1000daa /* U+0DAA SINHALA MAHA. DDAYANNA */
+#define XKB_KEY_Sinh_nna 0x1000dab /* U+0DAB SINHALA MUURDHAJA NAYANNA */
+#define XKB_KEY_Sinh_ndda 0x1000dac /* U+0DAC SINHALA SANYAKA DDAYANNA */
+#define XKB_KEY_Sinh_tha 0x1000dad /* U+0DAD SINHALA TAYANNA */
+#define XKB_KEY_Sinh_thha 0x1000dae /* U+0DAE SINHALA MAHA. TAYANNA */
+#define XKB_KEY_Sinh_dha 0x1000daf /* U+0DAF SINHALA DAYANNA */
+#define XKB_KEY_Sinh_dhha 0x1000db0 /* U+0DB0 SINHALA MAHA. DAYANNA */
+#define XKB_KEY_Sinh_na 0x1000db1 /* U+0DB1 SINHALA DANTAJA NAYANNA */
+#define XKB_KEY_Sinh_ndha 0x1000db3 /* U+0DB3 SINHALA SANYAKA DAYANNA */
+#define XKB_KEY_Sinh_pa 0x1000db4 /* U+0DB4 SINHALA PAYANNA */
+#define XKB_KEY_Sinh_pha 0x1000db5 /* U+0DB5 SINHALA MAHA. PAYANNA */
+#define XKB_KEY_Sinh_ba 0x1000db6 /* U+0DB6 SINHALA BAYANNA */
+#define XKB_KEY_Sinh_bha 0x1000db7 /* U+0DB7 SINHALA MAHA. BAYANNA */
+#define XKB_KEY_Sinh_ma 0x1000db8 /* U+0DB8 SINHALA MAYANNA */
+#define XKB_KEY_Sinh_mba 0x1000db9 /* U+0DB9 SINHALA AMBA BAYANNA */
+#define XKB_KEY_Sinh_ya 0x1000dba /* U+0DBA SINHALA YAYANNA */
+#define XKB_KEY_Sinh_ra 0x1000dbb /* U+0DBB SINHALA RAYANNA */
+#define XKB_KEY_Sinh_la 0x1000dbd /* U+0DBD SINHALA DANTAJA LAYANNA */
+#define XKB_KEY_Sinh_va 0x1000dc0 /* U+0DC0 SINHALA VAYANNA */
+#define XKB_KEY_Sinh_sha 0x1000dc1 /* U+0DC1 SINHALA TAALUJA SAYANNA */
+#define XKB_KEY_Sinh_ssha 0x1000dc2 /* U+0DC2 SINHALA MUURDHAJA SAYANNA */
+#define XKB_KEY_Sinh_sa 0x1000dc3 /* U+0DC3 SINHALA DANTAJA SAYANNA */
+#define XKB_KEY_Sinh_ha 0x1000dc4 /* U+0DC4 SINHALA HAYANNA */
+#define XKB_KEY_Sinh_lla 0x1000dc5 /* U+0DC5 SINHALA MUURDHAJA LAYANNA */
+#define XKB_KEY_Sinh_fa 0x1000dc6 /* U+0DC6 SINHALA FAYANNA */
+#define XKB_KEY_Sinh_al 0x1000dca /* U+0DCA SINHALA AL-LAKUNA */
+#define XKB_KEY_Sinh_aa2 0x1000dcf /* U+0DCF SINHALA AELA-PILLA */
+#define XKB_KEY_Sinh_ae2 0x1000dd0 /* U+0DD0 SINHALA AEDA-PILLA */
+#define XKB_KEY_Sinh_aee2 0x1000dd1 /* U+0DD1 SINHALA DIGA AEDA-PILLA */
+#define XKB_KEY_Sinh_i2 0x1000dd2 /* U+0DD2 SINHALA IS-PILLA */
+#define XKB_KEY_Sinh_ii2 0x1000dd3 /* U+0DD3 SINHALA DIGA IS-PILLA */
+#define XKB_KEY_Sinh_u2 0x1000dd4 /* U+0DD4 SINHALA PAA-PILLA */
+#define XKB_KEY_Sinh_uu2 0x1000dd6 /* U+0DD6 SINHALA DIGA PAA-PILLA */
+#define XKB_KEY_Sinh_ru2 0x1000dd8 /* U+0DD8 SINHALA GAETTA-PILLA */
+#define XKB_KEY_Sinh_e2 0x1000dd9 /* U+0DD9 SINHALA KOMBUVA */
+#define XKB_KEY_Sinh_ee2 0x1000dda /* U+0DDA SINHALA DIGA KOMBUVA */
+#define XKB_KEY_Sinh_ai2 0x1000ddb /* U+0DDB SINHALA KOMBU DEKA */
+#define XKB_KEY_Sinh_o2 0x1000ddc /* U+0DDC SINHALA KOMBUVA HAA AELA-PILLA*/
+#define XKB_KEY_Sinh_oo2 0x1000ddd /* U+0DDD SINHALA KOMBUVA HAA DIGA AELA-PILLA*/
+#define XKB_KEY_Sinh_au2 0x1000dde /* U+0DDE SINHALA KOMBUVA HAA GAYANUKITTA */
+#define XKB_KEY_Sinh_lu2 0x1000ddf /* U+0DDF SINHALA GAYANUKITTA */
+#define XKB_KEY_Sinh_ruu2 0x1000df2 /* U+0DF2 SINHALA DIGA GAETTA-PILLA */
+#define XKB_KEY_Sinh_luu2 0x1000df3 /* U+0DF3 SINHALA DIGA GAYANUKITTA */
+#define XKB_KEY_Sinh_kunddaliya 0x1000df4 /* U+0DF4 SINHALA KUNDDALIYA */
+/*
+ * XFree86 vendor specific keysyms.
+ *
+ * The XFree86 keysym range is 0x10080001 - 0x1008FFFF.
+ *
+ * When adding new entries, the xc/lib/XKeysymDB file should also be
+ * updated to make the new entries visible to Xlib.
+ */
+
+/*
+ * ModeLock
+ *
+ * This one is old, and not really used any more since XKB offers this
+ * functionality.
+ */
+
+#define XKB_KEY_XF86ModeLock 0x1008FF01 /* Mode Switch Lock */
+
+/*
+ * Note, 0x1008FF07 - 0x1008FF0F are free and should be used for misc new
+ * keysyms that don't fit into any of the groups below.
+ *
+ * 0x1008FF64, 0x1008FF6F, 0x1008FF71, 0x1008FF83 are no longer used,
+ * and should be used first for new keysyms.
+ *
+ * Check in keysymdef.h for generic symbols before adding new XFree86-specific
+ * symbols here.
+ *
+ * X.Org will not be adding to the XF86 set of keysyms, though they have
+ * been adopted and are considered a "standard" part of X keysym definitions.
+ * XFree86 never properly commented these keysyms, so we have done our
+ * best to explain the semantic meaning of these keys.
+ *
+ * XFree86 has removed their mail archives of the period, that might have
+ * shed more light on some of these definitions. Until/unless we resurrect
+ * these archives, these are from memory and usage.
+ */
+
+
+/* Backlight controls. */
+#define XKB_KEY_XF86MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */
+#define XKB_KEY_XF86MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */
+#define XKB_KEY_XF86KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */
+#define XKB_KEY_XF86KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */
+#define XKB_KEY_XF86KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */
+
+/*
+ * Keys found on some "Internet" keyboards.
+ */
+#define XKB_KEY_XF86Standby 0x1008FF10 /* System into standby mode */
+#define XKB_KEY_XF86AudioLowerVolume 0x1008FF11 /* Volume control down */
+#define XKB_KEY_XF86AudioMute 0x1008FF12 /* Mute sound from the system */
+#define XKB_KEY_XF86AudioRaiseVolume 0x1008FF13 /* Volume control up */
+#define XKB_KEY_XF86AudioPlay 0x1008FF14 /* Start playing of audio > */
+#define XKB_KEY_XF86AudioStop 0x1008FF15 /* Stop playing audio */
+#define XKB_KEY_XF86AudioPrev 0x1008FF16 /* Previous track */
+#define XKB_KEY_XF86AudioNext 0x1008FF17 /* Next track */
+#define XKB_KEY_XF86HomePage 0x1008FF18 /* Display user's home page */
+#define XKB_KEY_XF86Mail 0x1008FF19 /* Invoke user's mail program */
+#define XKB_KEY_XF86Start 0x1008FF1A /* Start application */
+#define XKB_KEY_XF86Search 0x1008FF1B /* Search */
+#define XKB_KEY_XF86AudioRecord 0x1008FF1C /* Record audio application */
+
+/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */
+#define XKB_KEY_XF86Calculator 0x1008FF1D /* Invoke calculator program */
+#define XKB_KEY_XF86Memo 0x1008FF1E /* Invoke Memo taking program */
+#define XKB_KEY_XF86ToDoList 0x1008FF1F /* Invoke To Do List program */
+#define XKB_KEY_XF86Calendar 0x1008FF20 /* Invoke Calendar program */
+#define XKB_KEY_XF86PowerDown 0x1008FF21 /* Deep sleep the system */
+#define XKB_KEY_XF86ContrastAdjust 0x1008FF22 /* Adjust screen contrast */
+#define XKB_KEY_XF86RockerUp 0x1008FF23 /* Rocker switches exist up */
+#define XKB_KEY_XF86RockerDown 0x1008FF24 /* and down */
+#define XKB_KEY_XF86RockerEnter 0x1008FF25 /* and let you press them */
+
+/* Some more "Internet" keyboard symbols */
+#define XKB_KEY_XF86Back 0x1008FF26 /* Like back on a browser */
+#define XKB_KEY_XF86Forward 0x1008FF27 /* Like forward on a browser */
+#define XKB_KEY_XF86Stop 0x1008FF28 /* Stop current operation */
+#define XKB_KEY_XF86Refresh 0x1008FF29 /* Refresh the page */
+#define XKB_KEY_XF86PowerOff 0x1008FF2A /* Power off system entirely */
+#define XKB_KEY_XF86WakeUp 0x1008FF2B /* Wake up system from sleep */
+#define XKB_KEY_XF86Eject 0x1008FF2C /* Eject device (e.g. DVD) */
+#define XKB_KEY_XF86ScreenSaver 0x1008FF2D /* Invoke screensaver */
+#define XKB_KEY_XF86WWW 0x1008FF2E /* Invoke web browser */
+#define XKB_KEY_XF86Sleep 0x1008FF2F /* Put system to sleep */
+#define XKB_KEY_XF86Favorites 0x1008FF30 /* Show favorite locations */
+#define XKB_KEY_XF86AudioPause 0x1008FF31 /* Pause audio playing */
+#define XKB_KEY_XF86AudioMedia 0x1008FF32 /* Launch media collection app */
+#define XKB_KEY_XF86MyComputer 0x1008FF33 /* Display "My Computer" window */
+#define XKB_KEY_XF86VendorHome 0x1008FF34 /* Display vendor home web site */
+#define XKB_KEY_XF86LightBulb 0x1008FF35 /* Light bulb keys exist */
+#define XKB_KEY_XF86Shop 0x1008FF36 /* Display shopping web site */
+#define XKB_KEY_XF86History 0x1008FF37 /* Show history of web surfing */
+#define XKB_KEY_XF86OpenURL 0x1008FF38 /* Open selected URL */
+#define XKB_KEY_XF86AddFavorite 0x1008FF39 /* Add URL to favorites list */
+#define XKB_KEY_XF86HotLinks 0x1008FF3A /* Show "hot" links */
+#define XKB_KEY_XF86BrightnessAdjust 0x1008FF3B /* Invoke brightness adj. UI */
+#define XKB_KEY_XF86Finance 0x1008FF3C /* Display financial site */
+#define XKB_KEY_XF86Community 0x1008FF3D /* Display user's community */
+#define XKB_KEY_XF86AudioRewind 0x1008FF3E /* "rewind" audio track */
+#define XKB_KEY_XF86BackForward 0x1008FF3F /* ??? */
+#define XKB_KEY_XF86Launch0 0x1008FF40 /* Launch Application */
+#define XKB_KEY_XF86Launch1 0x1008FF41 /* Launch Application */
+#define XKB_KEY_XF86Launch2 0x1008FF42 /* Launch Application */
+#define XKB_KEY_XF86Launch3 0x1008FF43 /* Launch Application */
+#define XKB_KEY_XF86Launch4 0x1008FF44 /* Launch Application */
+#define XKB_KEY_XF86Launch5 0x1008FF45 /* Launch Application */
+#define XKB_KEY_XF86Launch6 0x1008FF46 /* Launch Application */
+#define XKB_KEY_XF86Launch7 0x1008FF47 /* Launch Application */
+#define XKB_KEY_XF86Launch8 0x1008FF48 /* Launch Application */
+#define XKB_KEY_XF86Launch9 0x1008FF49 /* Launch Application */
+#define XKB_KEY_XF86LaunchA 0x1008FF4A /* Launch Application */
+#define XKB_KEY_XF86LaunchB 0x1008FF4B /* Launch Application */
+#define XKB_KEY_XF86LaunchC 0x1008FF4C /* Launch Application */
+#define XKB_KEY_XF86LaunchD 0x1008FF4D /* Launch Application */
+#define XKB_KEY_XF86LaunchE 0x1008FF4E /* Launch Application */
+#define XKB_KEY_XF86LaunchF 0x1008FF4F /* Launch Application */
+
+#define XKB_KEY_XF86ApplicationLeft 0x1008FF50 /* switch to application, left */
+#define XKB_KEY_XF86ApplicationRight 0x1008FF51 /* switch to application, right*/
+#define XKB_KEY_XF86Book 0x1008FF52 /* Launch bookreader */
+#define XKB_KEY_XF86CD 0x1008FF53 /* Launch CD/DVD player */
+#define XKB_KEY_XF86Calculater 0x1008FF54 /* Launch Calculater */
+#define XKB_KEY_XF86Clear 0x1008FF55 /* Clear window, screen */
+#define XKB_KEY_XF86Close 0x1008FF56 /* Close window */
+#define XKB_KEY_XF86Copy 0x1008FF57 /* Copy selection */
+#define XKB_KEY_XF86Cut 0x1008FF58 /* Cut selection */
+#define XKB_KEY_XF86Display 0x1008FF59 /* Output switch key */
+#define XKB_KEY_XF86DOS 0x1008FF5A /* Launch DOS (emulation) */
+#define XKB_KEY_XF86Documents 0x1008FF5B /* Open documents window */
+#define XKB_KEY_XF86Excel 0x1008FF5C /* Launch spread sheet */
+#define XKB_KEY_XF86Explorer 0x1008FF5D /* Launch file explorer */
+#define XKB_KEY_XF86Game 0x1008FF5E /* Launch game */
+#define XKB_KEY_XF86Go 0x1008FF5F /* Go to URL */
+#define XKB_KEY_XF86iTouch 0x1008FF60 /* Logitch iTouch- don't use */
+#define XKB_KEY_XF86LogOff 0x1008FF61 /* Log off system */
+#define XKB_KEY_XF86Market 0x1008FF62 /* ?? */
+#define XKB_KEY_XF86Meeting 0x1008FF63 /* enter meeting in calendar */
+#define XKB_KEY_XF86MenuKB 0x1008FF65 /* distingush keyboard from PB */
+#define XKB_KEY_XF86MenuPB 0x1008FF66 /* distinuish PB from keyboard */
+#define XKB_KEY_XF86MySites 0x1008FF67 /* Favourites */
+#define XKB_KEY_XF86New 0x1008FF68 /* New (folder, document... */
+#define XKB_KEY_XF86News 0x1008FF69 /* News */
+#define XKB_KEY_XF86OfficeHome 0x1008FF6A /* Office home (old Staroffice)*/
+#define XKB_KEY_XF86Open 0x1008FF6B /* Open */
+#define XKB_KEY_XF86Option 0x1008FF6C /* ?? */
+#define XKB_KEY_XF86Paste 0x1008FF6D /* Paste */
+#define XKB_KEY_XF86Phone 0x1008FF6E /* Launch phone; dial number */
+#define XKB_KEY_XF86Q 0x1008FF70 /* Compaq's Q - don't use */
+#define XKB_KEY_XF86Reply 0x1008FF72 /* Reply e.g., mail */
+#define XKB_KEY_XF86Reload 0x1008FF73 /* Reload web page, file, etc. */
+#define XKB_KEY_XF86RotateWindows 0x1008FF74 /* Rotate windows e.g. xrandr */
+#define XKB_KEY_XF86RotationPB 0x1008FF75 /* don't use */
+#define XKB_KEY_XF86RotationKB 0x1008FF76 /* don't use */
+#define XKB_KEY_XF86Save 0x1008FF77 /* Save (file, document, state */
+#define XKB_KEY_XF86ScrollUp 0x1008FF78 /* Scroll window/contents up */
+#define XKB_KEY_XF86ScrollDown 0x1008FF79 /* Scrool window/contentd down */
+#define XKB_KEY_XF86ScrollClick 0x1008FF7A /* Use XKB mousekeys instead */
+#define XKB_KEY_XF86Send 0x1008FF7B /* Send mail, file, object */
+#define XKB_KEY_XF86Spell 0x1008FF7C /* Spell checker */
+#define XKB_KEY_XF86SplitScreen 0x1008FF7D /* Split window or screen */
+#define XKB_KEY_XF86Support 0x1008FF7E /* Get support (??) */
+#define XKB_KEY_XF86TaskPane 0x1008FF7F /* Show tasks */
+#define XKB_KEY_XF86Terminal 0x1008FF80 /* Launch terminal emulator */
+#define XKB_KEY_XF86Tools 0x1008FF81 /* toolbox of desktop/app. */
+#define XKB_KEY_XF86Travel 0x1008FF82 /* ?? */
+#define XKB_KEY_XF86UserPB 0x1008FF84 /* ?? */
+#define XKB_KEY_XF86User1KB 0x1008FF85 /* ?? */
+#define XKB_KEY_XF86User2KB 0x1008FF86 /* ?? */
+#define XKB_KEY_XF86Video 0x1008FF87 /* Launch video player */
+#define XKB_KEY_XF86WheelButton 0x1008FF88 /* button from a mouse wheel */
+#define XKB_KEY_XF86Word 0x1008FF89 /* Launch word processor */
+#define XKB_KEY_XF86Xfer 0x1008FF8A
+#define XKB_KEY_XF86ZoomIn 0x1008FF8B /* zoom in view, map, etc. */
+#define XKB_KEY_XF86ZoomOut 0x1008FF8C /* zoom out view, map, etc. */
+
+#define XKB_KEY_XF86Away 0x1008FF8D /* mark yourself as away */
+#define XKB_KEY_XF86Messenger 0x1008FF8E /* as in instant messaging */
+#define XKB_KEY_XF86WebCam 0x1008FF8F /* Launch web camera app. */
+#define XKB_KEY_XF86MailForward 0x1008FF90 /* Forward in mail */
+#define XKB_KEY_XF86Pictures 0x1008FF91 /* Show pictures */
+#define XKB_KEY_XF86Music 0x1008FF92 /* Launch music application */
+
+#define XKB_KEY_XF86Battery 0x1008FF93 /* Display battery information */
+#define XKB_KEY_XF86Bluetooth 0x1008FF94 /* Enable/disable Bluetooth */
+#define XKB_KEY_XF86WLAN 0x1008FF95 /* Enable/disable WLAN */
+#define XKB_KEY_XF86UWB 0x1008FF96 /* Enable/disable UWB */
+
+#define XKB_KEY_XF86AudioForward 0x1008FF97 /* fast-forward audio track */
+#define XKB_KEY_XF86AudioRepeat 0x1008FF98 /* toggle repeat mode */
+#define XKB_KEY_XF86AudioRandomPlay 0x1008FF99 /* toggle shuffle mode */
+#define XKB_KEY_XF86Subtitle 0x1008FF9A /* cycle through subtitle */
+#define XKB_KEY_XF86AudioCycleTrack 0x1008FF9B /* cycle through audio tracks */
+#define XKB_KEY_XF86CycleAngle 0x1008FF9C /* cycle through angles */
+#define XKB_KEY_XF86FrameBack 0x1008FF9D /* video: go one frame back */
+#define XKB_KEY_XF86FrameForward 0x1008FF9E /* video: go one frame forward */
+#define XKB_KEY_XF86Time 0x1008FF9F /* display, or shows an entry for time seeking */
+#define XKB_KEY_XF86Select 0x1008FFA0 /* Select button on joypads and remotes */
+#define XKB_KEY_XF86View 0x1008FFA1 /* Show a view options/properties */
+#define XKB_KEY_XF86TopMenu 0x1008FFA2 /* Go to a top-level menu in a video */
+
+#define XKB_KEY_XF86Red 0x1008FFA3 /* Red button */
+#define XKB_KEY_XF86Green 0x1008FFA4 /* Green button */
+#define XKB_KEY_XF86Yellow 0x1008FFA5 /* Yellow button */
+#define XKB_KEY_XF86Blue 0x1008FFA6 /* Blue button */
+
+#define XKB_KEY_XF86Suspend 0x1008FFA7 /* Sleep to RAM */
+#define XKB_KEY_XF86Hibernate 0x1008FFA8 /* Sleep to disk */
+#define XKB_KEY_XF86TouchpadToggle 0x1008FFA9 /* Toggle between touchpad/trackstick */
+#define XKB_KEY_XF86TouchpadOn 0x1008FFB0 /* The touchpad got switched on */
+#define XKB_KEY_XF86TouchpadOff 0x1008FFB1 /* The touchpad got switched off */
+
+/* Keys for special action keys (hot keys) */
+/* Virtual terminals on some operating systems */
+#define XKB_KEY_XF86Switch_VT_1 0x1008FE01
+#define XKB_KEY_XF86Switch_VT_2 0x1008FE02
+#define XKB_KEY_XF86Switch_VT_3 0x1008FE03
+#define XKB_KEY_XF86Switch_VT_4 0x1008FE04
+#define XKB_KEY_XF86Switch_VT_5 0x1008FE05
+#define XKB_KEY_XF86Switch_VT_6 0x1008FE06
+#define XKB_KEY_XF86Switch_VT_7 0x1008FE07
+#define XKB_KEY_XF86Switch_VT_8 0x1008FE08
+#define XKB_KEY_XF86Switch_VT_9 0x1008FE09
+#define XKB_KEY_XF86Switch_VT_10 0x1008FE0A
+#define XKB_KEY_XF86Switch_VT_11 0x1008FE0B
+#define XKB_KEY_XF86Switch_VT_12 0x1008FE0C
+
+#define XKB_KEY_XF86Ungrab 0x1008FE20 /* force ungrab */
+#define XKB_KEY_XF86ClearGrab 0x1008FE21 /* kill application with grab */
+#define XKB_KEY_XF86Next_VMode 0x1008FE22 /* next video mode available */
+#define XKB_KEY_XF86Prev_VMode 0x1008FE23 /* prev. video mode available */
+#define XKB_KEY_XF86LogWindowTree 0x1008FE24 /* print window tree to log */
+#define XKB_KEY_XF86LogGrabInfo 0x1008FE25 /* print all active grabs to log */
+/*
+ * Copyright (c) 1991, Oracle and/or its affiliates. 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ */
+/************************************************************
+
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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 name of The Open Group 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 Open Group.
+
+***********************************************************/
+
+/*
+ * Floating Accent
+ */
+
+#define XKB_KEY_SunFA_Grave 0x1005FF00
+#define XKB_KEY_SunFA_Circum 0x1005FF01
+#define XKB_KEY_SunFA_Tilde 0x1005FF02
+#define XKB_KEY_SunFA_Acute 0x1005FF03
+#define XKB_KEY_SunFA_Diaeresis 0x1005FF04
+#define XKB_KEY_SunFA_Cedilla 0x1005FF05
+
+/*
+ * Miscellaneous Functions
+ */
+
+#define XKB_KEY_SunF36 0x1005FF10 /* Labeled F11 */
+#define XKB_KEY_SunF37 0x1005FF11 /* Labeled F12 */
+
+#define XKB_KEY_SunSys_Req 0x1005FF60
+#define XKB_KEY_SunPrint_Screen 0x0000FF61 /* Same as XK_Print */
+
+/*
+ * International & Multi-Key Character Composition
+ */
+
+#define XKB_KEY_SunCompose 0x0000FF20 /* Same as XK_Multi_key */
+#define XKB_KEY_SunAltGraph 0x0000FF7E /* Same as XK_Mode_switch */
+
+/*
+ * Cursor Control
+ */
+
+#define XKB_KEY_SunPageUp 0x0000FF55 /* Same as XK_Prior */
+#define XKB_KEY_SunPageDown 0x0000FF56 /* Same as XK_Next */
+
+/*
+ * Open Look Functions
+ */
+
+#define XKB_KEY_SunUndo 0x0000FF65 /* Same as XK_Undo */
+#define XKB_KEY_SunAgain 0x0000FF66 /* Same as XK_Redo */
+#define XKB_KEY_SunFind 0x0000FF68 /* Same as XK_Find */
+#define XKB_KEY_SunStop 0x0000FF69 /* Same as XK_Cancel */
+#define XKB_KEY_SunProps 0x1005FF70
+#define XKB_KEY_SunFront 0x1005FF71
+#define XKB_KEY_SunCopy 0x1005FF72
+#define XKB_KEY_SunOpen 0x1005FF73
+#define XKB_KEY_SunPaste 0x1005FF74
+#define XKB_KEY_SunCut 0x1005FF75
+
+#define XKB_KEY_SunPowerSwitch 0x1005FF76
+#define XKB_KEY_SunAudioLowerVolume 0x1005FF77
+#define XKB_KEY_SunAudioMute 0x1005FF78
+#define XKB_KEY_SunAudioRaiseVolume 0x1005FF79
+#define XKB_KEY_SunVideoDegauss 0x1005FF7A
+#define XKB_KEY_SunVideoLowerBrightness 0x1005FF7B
+#define XKB_KEY_SunVideoRaiseBrightness 0x1005FF7C
+#define XKB_KEY_SunPowerSwitchShift 0x1005FF7D
+/***********************************************************
+
+Copyright 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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 name of The Open Group 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 Open Group.
+
+
+Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/*
+ * DEC private keysyms
+ * (29th bit set)
+ */
+
+/* two-key compose sequence initiators, chosen to map to Latin1 characters */
+
+#define XKB_KEY_Dring_accent 0x1000FEB0
+#define XKB_KEY_Dcircumflex_accent 0x1000FE5E
+#define XKB_KEY_Dcedilla_accent 0x1000FE2C
+#define XKB_KEY_Dacute_accent 0x1000FE27
+#define XKB_KEY_Dgrave_accent 0x1000FE60
+#define XKB_KEY_Dtilde 0x1000FE7E
+#define XKB_KEY_Ddiaeresis 0x1000FE22
+
+/* special keysym for LK2** "Remove" key on editing keypad */
+
+#define XKB_KEY_DRemove 0x1000FF00 /* Remove */
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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 OPEN GROUP 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 name of The Open Group 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 Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Hewlett Packard
+or Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
+TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. Hewlett-Packard shall not be liable for errors
+contained herein or direct, indirect, special, incidental or
+consequential damages in connection with the furnishing,
+performance, or use of this material.
+
+*/
+
+
+
+#define XKB_KEY_hpClearLine 0x1000FF6F
+#define XKB_KEY_hpInsertLine 0x1000FF70
+#define XKB_KEY_hpDeleteLine 0x1000FF71
+#define XKB_KEY_hpInsertChar 0x1000FF72
+#define XKB_KEY_hpDeleteChar 0x1000FF73
+#define XKB_KEY_hpBackTab 0x1000FF74
+#define XKB_KEY_hpKP_BackTab 0x1000FF75
+#define XKB_KEY_hpModelock1 0x1000FF48
+#define XKB_KEY_hpModelock2 0x1000FF49
+#define XKB_KEY_hpReset 0x1000FF6C
+#define XKB_KEY_hpSystem 0x1000FF6D
+#define XKB_KEY_hpUser 0x1000FF6E
+#define XKB_KEY_hpmute_acute 0x100000A8
+#define XKB_KEY_hpmute_grave 0x100000A9
+#define XKB_KEY_hpmute_asciicircum 0x100000AA
+#define XKB_KEY_hpmute_diaeresis 0x100000AB
+#define XKB_KEY_hpmute_asciitilde 0x100000AC
+#define XKB_KEY_hplira 0x100000AF
+#define XKB_KEY_hpguilder 0x100000BE
+#define XKB_KEY_hpYdiaeresis 0x100000EE
+#define XKB_KEY_hpIO 0x100000EE
+#define XKB_KEY_hplongminus 0x100000F6
+#define XKB_KEY_hpblock 0x100000FC
+
+
+
+#define XKB_KEY_osfCopy 0x1004FF02
+#define XKB_KEY_osfCut 0x1004FF03
+#define XKB_KEY_osfPaste 0x1004FF04
+#define XKB_KEY_osfBackTab 0x1004FF07
+#define XKB_KEY_osfBackSpace 0x1004FF08
+#define XKB_KEY_osfClear 0x1004FF0B
+#define XKB_KEY_osfEscape 0x1004FF1B
+#define XKB_KEY_osfAddMode 0x1004FF31
+#define XKB_KEY_osfPrimaryPaste 0x1004FF32
+#define XKB_KEY_osfQuickPaste 0x1004FF33
+#define XKB_KEY_osfPageLeft 0x1004FF40
+#define XKB_KEY_osfPageUp 0x1004FF41
+#define XKB_KEY_osfPageDown 0x1004FF42
+#define XKB_KEY_osfPageRight 0x1004FF43
+#define XKB_KEY_osfActivate 0x1004FF44
+#define XKB_KEY_osfMenuBar 0x1004FF45
+#define XKB_KEY_osfLeft 0x1004FF51
+#define XKB_KEY_osfUp 0x1004FF52
+#define XKB_KEY_osfRight 0x1004FF53
+#define XKB_KEY_osfDown 0x1004FF54
+#define XKB_KEY_osfEndLine 0x1004FF57
+#define XKB_KEY_osfBeginLine 0x1004FF58
+#define XKB_KEY_osfEndData 0x1004FF59
+#define XKB_KEY_osfBeginData 0x1004FF5A
+#define XKB_KEY_osfPrevMenu 0x1004FF5B
+#define XKB_KEY_osfNextMenu 0x1004FF5C
+#define XKB_KEY_osfPrevField 0x1004FF5D
+#define XKB_KEY_osfNextField 0x1004FF5E
+#define XKB_KEY_osfSelect 0x1004FF60
+#define XKB_KEY_osfInsert 0x1004FF63
+#define XKB_KEY_osfUndo 0x1004FF65
+#define XKB_KEY_osfMenu 0x1004FF67
+#define XKB_KEY_osfCancel 0x1004FF69
+#define XKB_KEY_osfHelp 0x1004FF6A
+#define XKB_KEY_osfSelectAll 0x1004FF71
+#define XKB_KEY_osfDeselectAll 0x1004FF72
+#define XKB_KEY_osfReselect 0x1004FF73
+#define XKB_KEY_osfExtend 0x1004FF74
+#define XKB_KEY_osfRestore 0x1004FF78
+#define XKB_KEY_osfDelete 0x1004FFFF
+
+
+
+/**************************************************************
+ * The use of the following macros is deprecated.
+ * They are listed below only for backwards compatibility.
+ */
+#define XKB_KEY_Reset 0x1000FF6C
+#define XKB_KEY_System 0x1000FF6D
+#define XKB_KEY_User 0x1000FF6E
+#define XKB_KEY_ClearLine 0x1000FF6F
+#define XKB_KEY_InsertLine 0x1000FF70
+#define XKB_KEY_DeleteLine 0x1000FF71
+#define XKB_KEY_InsertChar 0x1000FF72
+#define XKB_KEY_DeleteChar 0x1000FF73
+#define XKB_KEY_BackTab 0x1000FF74
+#define XKB_KEY_KP_BackTab 0x1000FF75
+#define XKB_KEY_Ext16bit_L 0x1000FF76
+#define XKB_KEY_Ext16bit_R 0x1000FF77
+#define XKB_KEY_mute_acute 0x100000a8
+#define XKB_KEY_mute_grave 0x100000a9
+#define XKB_KEY_mute_asciicircum 0x100000aa
+#define XKB_KEY_mute_diaeresis 0x100000ab
+#define XKB_KEY_mute_asciitilde 0x100000ac
+#define XKB_KEY_lira 0x100000af
+#define XKB_KEY_guilder 0x100000be
+#define XKB_KEY_IO 0x100000ee
+#define XKB_KEY_longminus 0x100000f6
+#define XKB_KEY_block 0x100000fc
+
+
+
+#endif
diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-names.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-names.h
new file mode 100644
index 0000000000..db071d8a2a
--- /dev/null
+++ b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-names.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#ifndef _XKBCOMMON_NAMES_H
+#define _XKBCOMMON_NAMES_H
+
+/**
+ * @file
+ * @brief Predefined names for common modifiers and LEDs.
+ */
+
+#define XKB_MOD_NAME_SHIFT "Shift"
+#define XKB_MOD_NAME_CAPS "Lock"
+#define XKB_MOD_NAME_CTRL "Control"
+#define XKB_MOD_NAME_ALT "Mod1"
+#define XKB_MOD_NAME_LOGO "Mod4"
+
+#define XKB_LED_NAME_CAPS "Caps Lock"
+#define XKB_LED_NAME_NUM "Num Lock"
+#define XKB_LED_NAME_SCROLL "Scroll Lock"
+
+#endif
diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon.h
new file mode 100644
index 0000000000..a2aecfbb2a
--- /dev/null
+++ b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon.h
@@ -0,0 +1,1495 @@
+/*
+ * Copyright 1985, 1987, 1990, 1998 The Open Group
+ * Copyright 2008 Dan Nicholson
+ *
+ * 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.
+ */
+
+/************************************************************
+ * Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the name of Silicon Graphics not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific prior written permission.
+ * Silicon Graphics makes no representation about the suitability
+ * of this software for any purpose. It is provided "as is"
+ * without any express or implied warranty.
+ *
+ * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ * THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ ********************************************************/
+
+/*
+ * Copyright © 2009-2012 Daniel Stone
+ * Copyright © 2012 Intel Corporation
+ * Copyright © 2012 Ran Benita
+ *
+ * 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 (including the next
+ * paragraph) 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 OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#ifndef _XKBCOMMON_H_
+#define _XKBCOMMON_H_
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include <xkbcommon/xkbcommon-names.h>
+#include <xkbcommon/xkbcommon-keysyms.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file
+ * Main libxkbcommon API.
+ */
+
+/**
+ * @struct xkb_context
+ * Opaque top level library context object.
+ *
+ * The context contains various general library data and state, like
+ * logging level and include paths.
+ *
+ * Objects are created in a specific context, and multiple contexts may
+ * coexist simultaneously. Objects from different contexts are completely
+ * separated and do not share any memory or state.
+ */
+struct xkb_context;
+
+/**
+ * @struct xkb_keymap
+ * Opaque compiled keymap object.
+ *
+ * The keymap object holds all of the static keyboard information obtained
+ * from compiling XKB files.
+ *
+ * A keymap is immutable after it is created (besides reference counts, etc.);
+ * if you need to change it, you must create a new one.
+ */
+struct xkb_keymap;
+
+/**
+ * @struct xkb_state
+ * Opaque keyboard state object.
+ *
+ * State objects contain the active state of a keyboard (or keyboards), such
+ * as the currently effective layout and the active modifiers. It acts as a
+ * simple state machine, wherein key presses and releases are the input, and
+ * key symbols (keysyms) are the output.
+ */
+struct xkb_state;
+
+/**
+ * A number used to represent a physical key on a keyboard.
+ *
+ * A standard PC-compatible keyboard might have 102 keys. An appropriate
+ * keymap would assign each of them a keycode, by which the user should
+ * refer to the key throughout the library.
+ *
+ * Historically, the X11 protocol, and consequentially the XKB protocol,
+ * assign only 8 bits for keycodes. This limits the number of different
+ * keys that can be used simultaneously in a single keymap to 256
+ * (disregarding other limitations). This library does not share this limit;
+ * keycodes beyond 255 ('extended keycodes') are not treated specially.
+ * Keymaps and applications which are compatible with X11 should not use
+ * these keycodes.
+ *
+ * The values of specific keycodes are determined by the keymap and the
+ * underlying input system. For example, with an X11-compatible keymap
+ * and Linux evdev scan codes (see linux/input.h), a fixed offset is used:
+ *
+ * @code
+ * xkb_keycode_t keycode_A = KEY_A + 8;
+ * @endcode
+ *
+ * @sa xkb_keycode_is_legal_ext() xkb_keycode_is_legal_x11()
+ */
+typedef uint32_t xkb_keycode_t;
+
+/**
+ * A number used to represent the symbols generated from a key on a keyboard.
+ *
+ * A key, represented by a keycode, may generate different symbols according
+ * to keyboard state. For example, on a QWERTY keyboard, pressing the key
+ * labled \<A\> generates the symbol 'a'. If the Shift key is held, it
+ * generates the symbol 'A'. If a different layout is used, say Greek,
+ * it generates the symbol 'α'. And so on.
+ *
+ * Each such symbol is represented by a keysym. Note that keysyms are
+ * somewhat more general, in that they can also represent some "function",
+ * such as "Left" or "Right" for the arrow keys. For more information,
+ * see:
+ * http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#keysym_encoding
+ *
+ * Specifically named keysyms can be found in the
+ * xkbcommon/xkbcommon-keysyms.h header file. Their name does not include
+ * the XKB_KEY_ prefix.
+ *
+ * Besides those, any Unicode/ISO 10646 character in the range U0100 to
+ * U10FFFF can be represented by a keysym value in the range 0x01000100 to
+ * 0x0110FFFF. The name of Unicode keysyms is "U<codepoint>", e.g. "UA1B2".
+ *
+ * The name of other unnamed keysyms is the hexadecimal representation of
+ * their value, e.g. "0xabcd1234".
+ *
+ * Keysym names are case-sensitive.
+ */
+typedef uint32_t xkb_keysym_t;
+
+/**
+ * Index of a keyboard layout.
+ *
+ * The layout index is a state component which detemines which <em>keyboard
+ * layout</em> is active. These may be different alphabets, different key
+ * arrangements, etc.
+ *
+ * Layout indexes are consecutive. The first layout has index 0.
+ *
+ * Each layout is not required to have a name, and the names are not
+ * guaranteed to be unique (though they are usually provided and unique).
+ * Therefore, it is not safe to use the name as a unique identifier for a
+ * layout. Layout names are case-sensitive.
+ *
+ * Layouts are also called "groups" by XKB.
+ *
+ * @sa xkb_keymap_num_layouts() xkb_keymap_num_layouts_for_key()
+ */
+typedef uint32_t xkb_layout_index_t;
+/** A mask of layout indexes. */
+typedef uint32_t xkb_layout_mask_t;
+
+/**
+ * Index of a shift level.
+ *
+ * @todo Explain what are shift levels.
+ */
+typedef uint32_t xkb_level_index_t;
+
+/**
+ * Index of a modifier.
+ *
+ * A @e modifier is a state component which changes the way keys are
+ * interpreted. A keymap defines a set of modifiers, such as Alt, Shift,
+ * Num Lock or Meta, and specifies which keys may @e activate which
+ * modifiers (in a many-to-many relationship, i.e. a key can activate
+ * several modifiers, and a modifier may be activated by several keys.
+ * Different keymaps do this differently).
+ *
+ * When retrieving the keysyms for a key, the active modifier set is
+ * consulted; this detemines the correct shift level to use within the
+ * currently active layout (see xkb_level_index_t).
+ *
+ * Modifier indexes are consecutive. The first modifier has index 0.
+ *
+ * Each modifier must have a name, and the names are unique. Therefore, it
+ * is safe to use the name as a unique identifier for a modifier. The names
+ * of some common modifiers are provided in the xkbcommon/xkbcommon-names.h
+ * header file. Modifier names are case-sensitive.
+ *
+ * @sa xkb_keymap_num_mods()
+ */
+typedef uint32_t xkb_mod_index_t;
+/** A mask of modifier indexes. */
+typedef uint32_t xkb_mod_mask_t;
+
+/**
+ * Index of a keyboard LED.
+ *
+ * @todo Explain what are LEDs.
+ *
+ * LED indexes are non-consecutive. The first LED has index 0.
+ *
+ * Each LED must have a name, and the names are unique. Therefore,
+ * it is safe to use the name as a unique identifier for a LED. The names
+ * of some common LEDs are provided in the xkbcommon/xkbcommon-names.h
+ * header file. LED names are case-sensitive.
+ *
+ * @warning A given keymap may specify an exact index for a given LED.
+ * Therefore, LED indexing is not necessarily sequential, as opposed to
+ * modifiers and layouts. This means that when iterating over the LEDs
+ * in a keymap using e.g. xkb_keymap_num_leds(), some indexes might be
+ * invalid. Given such an index, functions like xkb_keymap_led_get_name()
+ * will return NULL, and xkb_state_led_index_is_active() will return -1.
+ *
+ * LEDs are also called "indicators" by XKB.
+ *
+ * @sa xkb_keymap_num_leds()
+ */
+typedef uint32_t xkb_led_index_t;
+/** A mask of LED indexes. */
+typedef uint32_t xkb_led_mask_t;
+
+#define XKB_KEYCODE_INVALID (0xffffffff)
+#define XKB_LAYOUT_INVALID (0xffffffff)
+#define XKB_LEVEL_INVALID (0xffffffff)
+#define XKB_MOD_INVALID (0xffffffff)
+#define XKB_LED_INVALID (0xffffffff)
+
+#define XKB_KEYCODE_MAX (0xffffffff - 1)
+
+/**
+ * Test whether a value is a valid extended keycode.
+ * @sa xkb_keycode_t
+ **/
+#define xkb_keycode_is_legal_ext(key) (key <= XKB_KEYCODE_MAX)
+
+/**
+ * Test whether a value is a valid X11 keycode.
+ * @sa xkb_keycode_t
+ */
+#define xkb_keycode_is_legal_x11(key) (key >= 8 && key <= 255)
+
+/**
+ * Names to compile a keymap with, also known as RMLVO.
+ *
+ * These names together are the primary identifier for a keymap.
+ * If any of the members is NULL or an empty string (""), a default value is
+ * used. It is recommended to use the system default by passing NULL for
+ * unspecified values, instead of providing your own defaults.
+ */
+struct xkb_rule_names {
+ /** The rules file to use. The rules file describes how to interpret
+ * the values of the model, layout, variant and options fields. */
+ const char *rules;
+ /** The keyboard model by which to interpret keycodes and LEDs. */
+ const char *model;
+ /** A comma separated list of layouts (languages) to include in the
+ * keymap. */
+ const char *layout;
+ /** A comma separated list of variants, one per layout, which may
+ * modify or augment the respective layout in various ways. */
+ const char *variant;
+ /** A comma separated list of options, through which the user specifies
+ * non-layout related preferences, like which key combinations are used
+ * for switching layouts, or which key is the Compose key. */
+ const char *options;
+};
+
+/**
+ * @defgroup keysyms Keysyms
+ * Utility functions related to keysyms.
+ *
+ * @{
+ */
+
+/**
+ * Get the name of a keysym.
+ *
+ * For a description of how keysyms are named, see @ref xkb_keysym_t.
+ *
+ * @param[in] keysym The keysym.
+ * @param[out] buffer A string buffer to write the name into.
+ * @param[in] size Size of the buffer.
+ *
+ * @warning If the buffer passed is too small, the string is truncated
+ * (though still NUL-terminated); a size of at least 64 bytes is recommended.
+ *
+ * @returns The number of bytes in the name, excluding the NUL byte. If
+ * the keysym is invalid, returns -1.
+ *
+ * You may check if truncation has occurred by comparing the return value
+ * with the length of buffer, similarly to the snprintf(3) function.
+ *
+ * @sa xkb_keysym_t
+ */
+int
+xkb_keysym_get_name(xkb_keysym_t keysym, char *buffer, size_t size);
+
+/** Flags for xkb_keysym_from_name(). */
+enum xkb_keysym_flags {
+ /** Find keysym by case-insensitive search. */
+ XKB_KEYSYM_CASE_INSENSITIVE = (1 << 0)
+};
+
+/**
+ * Get a keysym from its name.
+ *
+ * @param name The name of a keysym. See remarks in xkb_keysym_get_name();
+ * this function will accept any name returned by that function.
+ * @param flags A set of flags controlling how the search is done. If
+ * invalid flags are passed, this will fail with XKB_KEY_NoSymbol.
+ *
+ * If you use the XKB_KEYSYM_CASE_INSENSITIVE flag and two keysym names
+ * differ only by case, then the lower-case keysym is returned. For
+ * instance, for KEY_a and KEY_A, this function would return KEY_a for the
+ * case-insensitive search. If this functionality is needed, it is
+ * recommended to first call this function without this flag; and if that
+ * fails, only then to try with this flag, while possibly warning the user
+ * he had misspelled the name, and might get wrong results.
+ *
+ * @returns The keysym. If the name is invalid, returns XKB_KEY_NoSymbol.
+ *
+ * @sa xkb_keysym_t
+ */
+xkb_keysym_t
+xkb_keysym_from_name(const char *name, enum xkb_keysym_flags flags);
+
+/**
+ * Get the Unicode/UTF-8 representation of a keysym.
+ *
+ * @param[in] keysym The keysym.
+ * @param[out] buffer A buffer to write the UTF-8 string into.
+ * @param[in] size The size of buffer. Must be at least 7.
+ *
+ * @returns The number of bytes written to the buffer (including the
+ * terminating byte). If the keysym does not have a Unicode
+ * representation, returns 0. If the buffer is too small, returns -1.
+ */
+int
+xkb_keysym_to_utf8(xkb_keysym_t keysym, char *buffer, size_t size);
+
+/**
+ * Get the Unicode/UTF-32 representation of a keysym.
+ *
+ * @returns The Unicode/UTF-32 representation of keysym, which is also
+ * compatible with UCS-4. If the keysym does not have a Unicode
+ * representation, returns 0.
+ */
+uint32_t
+xkb_keysym_to_utf32(xkb_keysym_t keysym);
+
+/** @} */
+
+/**
+ * @defgroup context Library Context
+ * Creating, destroying and using library contexts.
+ *
+ * Every keymap compilation request must have a context associated with
+ * it. The context keeps around state such as the include path.
+ *
+ * @{
+ */
+
+/** Flags for context creation. */
+enum xkb_context_flags {
+ /** Create this context with an empty include path. */
+ XKB_CONTEXT_NO_DEFAULT_INCLUDES = (1 << 0),
+ /** Don't take RMLVO names from the environment. */
+ XKB_CONTEXT_NO_ENVIRONMENT_NAMES = (1 << 1),
+};
+
+/**
+ * Create a new context.
+ *
+ * @param flags Optional flags for the context, or 0.
+ *
+ * @returns A new context, or NULL on failure.
+ *
+ * The user may set some environment variables to affect default values in
+ * the context. See e.g. xkb_context_set_log_level() and
+ * xkb_context_set_log_verbosity().
+ *
+ * @memberof xkb_context
+ */
+struct xkb_context *
+xkb_context_new(enum xkb_context_flags flags);
+
+/**
+ * Take a new reference on a context.
+ *
+ * @returns The passed in context.
+ *
+ * @memberof xkb_context
+ */
+struct xkb_context *
+xkb_context_ref(struct xkb_context *context);
+
+/**
+ * Release a reference on a context, and possibly free it.
+ *
+ * @param context The context. If it is NULL, this function does nothing.
+ *
+ * @memberof xkb_context
+ */
+void
+xkb_context_unref(struct xkb_context *context);
+
+/**
+ * Store custom user data in the context.
+ *
+ * This may be useful in conjunction with xkb_context_set_log_fn() or other
+ * callbacks.
+ *
+ * @memberof xkb_context
+ */
+void
+xkb_context_set_user_data(struct xkb_context *context, void *user_data);
+
+/**
+ * Retrieves stored user data from the context.
+ *
+ * @returns The stored user data. If the user data wasn't set, or the
+ * passed in context is NULL, returns NULL.
+ *
+ * This may be useful to access private user data from callbacks like a
+ * custom logging function.
+ *
+ * @memberof xkb_context
+ **/
+void *
+xkb_context_get_user_data(struct xkb_context *context);
+
+/** @} */
+
+/**
+ * @defgroup include-path Include Paths
+ * Manipulating the include paths in a context.
+ *
+ * The include paths are the file-system paths that are searched when an
+ * include statement is encountered during keymap compilation.
+ * In most cases, the default include paths are sufficient.
+ *
+ * @{
+ */
+
+/**
+ * Append a new entry to the context's include path.
+ *
+ * @returns 1 on success, or 0 if the include path could not be added or is
+ * inaccessible.
+ *
+ * @memberof xkb_context
+ */
+int
+xkb_context_include_path_append(struct xkb_context *context, const char *path);
+
+/**
+ * Append the default include paths to the context's include path.
+ *
+ * @returns 1 on success, or 0 if the primary include path could not be added.
+ *
+ * @memberof xkb_context
+ */
+int
+xkb_context_include_path_append_default(struct xkb_context *context);
+
+/**
+ * Reset the context's include path to the default.
+ *
+ * Removes all entries from the context's include path, and inserts the
+ * default paths.
+ *
+ * @returns 1 on success, or 0 if the primary include path could not be added.
+ *
+ * @memberof xkb_context
+ */
+int
+xkb_context_include_path_reset_defaults(struct xkb_context *context);
+
+/**
+ * Remove all entries from the context's include path.
+ *
+ * @memberof xkb_context
+ */
+void
+xkb_context_include_path_clear(struct xkb_context *context);
+
+/**
+ * Get the number of paths in the context's include path.
+ *
+ * @memberof xkb_context
+ */
+unsigned int
+xkb_context_num_include_paths(struct xkb_context *context);
+
+/**
+ * Get a specific include path from the context's include path.
+ *
+ * @returns The include path at the specified index. If the index is
+ * invalid, returns NULL.
+ *
+ * @memberof xkb_context
+ */
+const char *
+xkb_context_include_path_get(struct xkb_context *context, unsigned int index);
+
+/** @} */
+
+/**
+ * @defgroup logging Logging Handling
+ * Manipulating how logging from this library is handled.
+ *
+ * @{
+ */
+
+/** Specifies a logging level. */
+enum xkb_log_level {
+ XKB_LOG_LEVEL_CRITICAL = 10, /**< Log critical internal errors only. */
+ XKB_LOG_LEVEL_ERROR = 20, /**< Log all errors. */
+ XKB_LOG_LEVEL_WARNING = 30, /**< Log warnings and errors. */
+ XKB_LOG_LEVEL_INFO = 40, /**< Log information, warnings, and errors. */
+ XKB_LOG_LEVEL_DEBUG = 50 /**< Log everything. */
+};
+
+/**
+ * Set the current logging level.
+ *
+ * @param context The context in which to set the logging level.
+ * @param level The logging level to use. Only messages from this level
+ * and below will be logged.
+ *
+ * The default level is XKB_LOG_LEVEL_ERROR. The environment variable
+ * XKB_LOG_LEVEL, if set in the time the context was created, overrides the
+ * default value. It may be specified as a level number or name.
+ *
+ * @memberof xkb_context
+ */
+void
+xkb_context_set_log_level(struct xkb_context *context,
+ enum xkb_log_level level);
+
+/**
+ * Get the current logging level.
+ *
+ * @memberof xkb_context
+ */
+enum xkb_log_level
+xkb_context_get_log_level(struct xkb_context *context);
+
+/**
+ * Sets the current logging verbosity.
+ *
+ * The library can generate a number of warnings which are not helpful to
+ * ordinary users of the library. The verbosity may be increased if more
+ * information is desired (e.g. when developing a new keymap).
+ *
+ * The default verbosity is 0. The environment variable XKB_LOG_VERBOSITY,
+ * if set in the time the context was created, overrides the default value.
+ *
+ * @param context The context in which to use the set verbosity.
+ * @param verbosity The verbosity to use. Currently used values are
+ * 1 to 10, higher values being more verbose. 0 would result in no verbose
+ * messages being logged.
+ *
+ * Most verbose messages are of level XKB_LOG_LEVEL_WARNING or lower.
+ *
+ * @memberof xkb_context
+ */
+void
+xkb_context_set_log_verbosity(struct xkb_context *context, int verbosity);
+
+/**
+ * Get the current logging verbosity of the context.
+ *
+ * @memberof xkb_context
+ */
+int
+xkb_context_get_log_verbosity(struct xkb_context *context);
+
+/**
+ * Set a custom function to handle logging messages.
+ *
+ * @param context The context in which to use the set logging function.
+ * @param log_fn The function that will be called for logging messages.
+ * Passing NULL restores the default function, which logs to stderr.
+ *
+ * By default, log messages from this library are printed to stderr. This
+ * function allows you to replace the default behavior with a custom
+ * handler. The handler is only called with messages which match the
+ * current logging level and verbosity settings for the context.
+ * level is the logging level of the message. @a format and @a args are
+ * the same as in the vprintf(3) function.
+ *
+ * You may use xkb_context_set_user_data() on the context, and then call
+ * xkb_context_get_user_data() from within the logging function to provide
+ * it with additional private context.
+ *
+ * @memberof xkb_context
+ */
+void
+xkb_context_set_log_fn(struct xkb_context *context,
+ void (*log_fn)(struct xkb_context *context,
+ enum xkb_log_level level,
+ const char *format, va_list args));
+
+/** @} */
+
+/**
+ * @defgroup keymap Keymap Creation
+ * Creating and destroying keymaps.
+ *
+ * @{
+ */
+
+/** Flags for keymap compilation. */
+enum xkb_keymap_compile_flags {
+ /** Apparently you can't have empty enums. What a drag. */
+ XKB_MAP_COMPILE_PLACEHOLDER = 0
+};
+
+/**
+ * Create a keymap from RMLVO names.
+ *
+ * The primary keymap entry point: creates a new XKB keymap from a set of
+ * RMLVO (Rules + Model + Layouts + Variants + Options) names.
+ *
+ * You should almost certainly be using this and nothing else to create
+ * keymaps.
+ *
+ * @param context The context in which to create the keymap.
+ * @param names The RMLVO names to use. In xkbcommon versions prior
+ * to 0.2.1, this field must be non-NULL. In later
+ * versions, passing NULL will use the default keymap.
+ * @param flags Optional flags for the keymap, or 0.
+ *
+ * @returns A keymap compiled according to the RMLVO names, or NULL if
+ * the compilation failed.
+ *
+ * @sa xkb_rule_names
+ * @memberof xkb_keymap
+ */
+struct xkb_keymap *
+xkb_keymap_new_from_names(struct xkb_context *context,
+ const struct xkb_rule_names *names,
+ enum xkb_keymap_compile_flags flags);
+
+/** The possible keymap formats. */
+enum xkb_keymap_format {
+ /** The current/classic XKB text format, as generated by xkbcomp -xkb. */
+ XKB_KEYMAP_FORMAT_TEXT_V1 = 1
+};
+
+/**
+ * Create a keymap from a keymap file.
+ *
+ * @param context The context in which to create the keymap.
+ * @param file The keymap file to compile.
+ * @param format The text format of the keymap file to compile.
+ * @param flags Optional flags for the keymap, or 0.
+ *
+ * @returns A keymap compiled from the given XKB keymap file, or NULL if
+ * the compilation failed.
+ *
+ * The file must contain a complete keymap. For example, in the
+ * XKB_KEYMAP_FORMAT_TEXT_V1 format, this means the file must contain one
+ * top level '%xkb_keymap' section, which in turn contains other required
+ * sections.
+ *
+ * @memberof xkb_keymap
+ */
+struct xkb_keymap *
+xkb_keymap_new_from_file(struct xkb_context *context, FILE *file,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags);
+
+/**
+ * Create a keymap from a keymap string.
+ *
+ * This is just like xkb_keymap_new_from_file(), but instead of a file, gets
+ * the keymap as one enormous string.
+ *
+ * @see xkb_keymap_new_from_string()
+ * @memberof xkb_keymap
+ */
+struct xkb_keymap *
+xkb_keymap_new_from_string(struct xkb_context *context, const char *string,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags);
+
+/**
+ * Create a keymap from a memory buffer.
+ *
+ * This is just like xkb_keymap_new_from_string(), but takes a length argument
+ * so the input string does not have to be zero-terminated.
+ *
+ * @see xkb_keymap_new_from_string()
+ * @memberof xkb_keymap
+ */
+struct xkb_keymap *
+xkb_keymap_new_from_buffer(struct xkb_context *context, const char *buffer,
+ size_t length, enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags);
+
+/**
+ * Take a new reference on a keymap.
+ *
+ * @returns The passed in keymap.
+ *
+ * @memberof xkb_keymap
+ */
+struct xkb_keymap *
+xkb_keymap_ref(struct xkb_keymap *keymap);
+
+/**
+ * Release a reference on a keymap, and possibly free it.
+ *
+ * @param keymap The keymap. If it is NULL, this function does nothing.
+ *
+ * @memberof xkb_keymap
+ */
+void
+xkb_keymap_unref(struct xkb_keymap *keymap);
+
+/**
+ * Get the keymap as a string in the format from which it was created.
+ * @sa xkb_keymap_get_as_string()
+ **/
+#define XKB_KEYMAP_USE_ORIGINAL_FORMAT ((enum xkb_keymap_format) -1)
+
+/**
+ * Get the compiled keymap as a string.
+ *
+ * @param keymap The keymap to get as a string.
+ * @param format The keymap format to use for the string. You can pass
+ * in the special value XKB_KEYMAP_USE_ORIGINAL_FORMAT to use the format
+ * from which the keymap was originally created.
+ *
+ * @returns The keymap as a NUL-terminated string, or NULL if unsuccessful.
+ *
+ * The returned string may be fed back into xkb_map_new_from_string() to get
+ * the exact same keymap (possibly in another process, etc.).
+ *
+ * The returned string is dynamically allocated and should be freed by the
+ * caller.
+ *
+ * @memberof xkb_keymap
+ */
+char *
+xkb_keymap_get_as_string(struct xkb_keymap *keymap,
+ enum xkb_keymap_format format);
+
+/** @} */
+
+/**
+ * @defgroup components Keymap Components
+ * Enumeration of state components in a keymap.
+ *
+ * @{
+ */
+
+/**
+ * Get the number of modifiers in the keymap.
+ *
+ * @sa xkb_mod_index_t
+ * @memberof xkb_keymap
+ */
+xkb_mod_index_t
+xkb_keymap_num_mods(struct xkb_keymap *keymap);
+
+/**
+ * Get the name of a modifier by index.
+ *
+ * @returns The name. If the index is invalid, returns NULL.
+ *
+ * @sa xkb_mod_index_t
+ * @memberof xkb_keymap
+ */
+const char *
+xkb_keymap_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx);
+
+/**
+ * Get the index of a modifier by name.
+ *
+ * @returns The index. If no modifier with this name exists, returns
+ * XKB_MOD_INVALID.
+ *
+ * @sa xkb_mod_index_t
+ * @memberof xkb_keymap
+ */
+xkb_mod_index_t
+xkb_keymap_mod_get_index(struct xkb_keymap *keymap, const char *name);
+
+/**
+ * Get the number of layouts in the keymap.
+ *
+ * @sa xkb_layout_index_t xkb_rule_names xkb_keymap_num_layouts_for_key()
+ * @memberof xkb_keymap
+ */
+xkb_layout_index_t
+xkb_keymap_num_layouts(struct xkb_keymap *keymap);
+
+/**
+ * Get the name of a layout by index.
+ *
+ * @returns The name. If the index is invalid, or the layout does not have
+ * a name, returns NULL.
+ *
+ * @sa xkb_layout_index_t
+ * @memberof xkb_keymap
+ */
+const char *
+xkb_keymap_layout_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx);
+
+/**
+ * Get the index of a layout by name.
+ *
+ * @returns The index. If no layout exists with this name, returns
+ * XKB_LAYOUT_INVALID. If more than one layout in the keymap has this name,
+ * returns the lowest index among them.
+ *
+ * @memberof xkb_keymap
+ */
+xkb_layout_index_t
+xkb_keymap_layout_get_index(struct xkb_keymap *keymap, const char *name);
+
+/**
+ * Get the number of layouts for a specific key.
+ *
+ * This number can be different from xkb_keymap_num_layouts(), but is always
+ * smaller. It is the appropriate value to use when iterating over the
+ * layouts of a key.
+ *
+ * @sa xkb_layout_index_t
+ * @memberof xkb_keymap
+ */
+xkb_layout_index_t
+xkb_keymap_num_layouts_for_key(struct xkb_keymap *keymap, xkb_keycode_t key);
+
+/**
+ * Get the number of shift levels for a specific key and layout.
+ *
+ * If @c layout is out of range for this key (that is, larger or equal to
+ * the value returned by xkb_keymap_num_layouts_for_key()), it is brought
+ * back into range in a manner consistent with xkb_state_key_get_layout().
+ *
+ * @sa xkb_level_index_t
+ * @memberof xkb_keymap
+ */
+xkb_level_index_t
+xkb_keymap_num_levels_for_key(struct xkb_keymap *keymap, xkb_keycode_t key,
+ xkb_layout_index_t layout);
+
+/**
+ * Get the keysyms obtained from pressing a key in a given layout and
+ * shift level.
+ *
+ * This function is like xkb_state_key_get_syms(), only the layout and
+ * shift level are not derived from the keyboard state but are instead
+ * specified explicitly.
+ *
+ * @param[in] keymap The keymap.
+ * @param[in] key The keycode of the key.
+ * @param[in] layout The layout for which to get the keysyms.
+ * @param[in] level The shift level in the layout for which to get the
+ * keysyms. This must be smaller than:
+ * @code xkb_keymap_num_layouts_for_key(keymap, key) @endcode
+ * @param[out] syms_out An immutible array of keysyms corresponding to the
+ * key in the given layout and shift level.
+ *
+ * If @c layout is out of range for this key (that is, larger or equal to
+ * the value returned by xkb_keymap_num_layouts_for_key()), it is brought
+ * back into range in a manner consistent with xkb_state_key_get_layout().
+ *
+ * @returns The number of keysyms in the syms_out array. If no keysyms
+ * are produced by the key in the given layout and shift level, returns 0
+ * and sets syms_out to NULL.
+ *
+ * @sa xkb_state_key_get_syms()
+ * @memberof xkb_keymap
+ */
+int
+xkb_keymap_key_get_syms_by_level(struct xkb_keymap *keymap,
+ xkb_keycode_t key,
+ xkb_layout_index_t layout,
+ xkb_level_index_t level,
+ const xkb_keysym_t **syms_out);
+
+/**
+ * Get the number of LEDs in the keymap.
+ *
+ * @warning The range [ 0...xkb_keymap_num_leds() ) includes all of the LEDs
+ * in the keymap, but may also contain inactive LEDs. When iterating over
+ * this range, you need the handle this case when calling functions such as
+ * xkb_keymap_led_get_name() or xkb_state_led_index_is_active().
+ *
+ * @sa xkb_led_index_t
+ * @memberof xkb_keymap
+ */
+xkb_led_index_t
+xkb_keymap_num_leds(struct xkb_keymap *keymap);
+
+/**
+ * Get the name of a LED by index.
+ *
+ * @returns The name. If the index is invalid, returns NULL.
+ *
+ * @memberof xkb_keymap
+ */
+const char *
+xkb_keymap_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx);
+
+/**
+ * Get the index of a LED by name.
+ *
+ * @returns The index. If no LED with this name exists, returns
+ * XKB_LED_INVALID.
+ *
+ * @memberof xkb_keymap
+ */
+xkb_led_index_t
+xkb_keymap_led_get_index(struct xkb_keymap *keymap, const char *name);
+
+/**
+ * Determine whether a key should repeat or not.
+ *
+ * A keymap may specify different repeat behaviors for different keys.
+ * Most keys should generally exhibit repeat behavior; for example, holding
+ * the 'a' key down in a text editor should normally insert a single 'a'
+ * character every few milliseconds, until the key is released. However,
+ * there are keys which should not or do not need to be repeated. For
+ * example, repeating modifier keys such as Left/Right Shift or Caps Lock
+ * is not generally useful or desired.
+ *
+ * @returns 1 if the key should repeat, 0 otherwise.
+ *
+ * @memberof xkb_keymap
+ */
+int
+xkb_keymap_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t key);
+
+/** @} */
+
+/**
+ * @defgroup state Keyboard State
+ * Creating, destroying and manipulating keyboard state objects.
+ *
+ * @{
+ */
+
+/**
+ * Create a new keyboard state object for a keymap.
+ *
+ * @param keymap The keymap for which to create the state.
+ *
+ * @returns A new keyboard state object, or NULL on failure.
+ *
+ * @memberof xkb_state
+ */
+struct xkb_state *
+xkb_state_new(struct xkb_keymap *keymap);
+
+/**
+ * Take a new reference on a keyboard state object.
+ *
+ * @returns The passed in object.
+ *
+ * @memberof xkb_state
+ */
+struct xkb_state *
+xkb_state_ref(struct xkb_state *state);
+
+/**
+ * Release a reference on a keybaord state object, and possibly free it.
+ *
+ * @param state The state. If it is NULL, this function does nothing.
+ *
+ * @memberof xkb_state
+ */
+void
+xkb_state_unref(struct xkb_state *state);
+
+/**
+ * Get the keymap from which a keyboard state object was created.
+ *
+ * @returns The keymap which was used in xkb_state_new() to create this
+ * state object.
+ *
+ * This function does not take a new reference on the keymap; you must
+ * explicitly reference it yourself if you plan to use it beyond the
+ * lifetime of the state.
+ *
+ * @memberof xkb_state
+ */
+struct xkb_keymap *
+xkb_state_get_keymap(struct xkb_state *state);
+
+/** Specifies the direction of the key (press / release). */
+enum xkb_key_direction {
+ XKB_KEY_UP, /**< The key was released. */
+ XKB_KEY_DOWN /**< The key was pressed. */
+};
+
+/**
+ * Modifier and layout types for state objects. This enum is bitmaskable,
+ * e.g. (XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LATCHED) is valid to
+ * exclude locked modifiers.
+ *
+ * In XKB, the DEPRESSED components are also known as 'base'.
+ */
+enum xkb_state_component {
+ /** Depressed modifiers, i.e. a key is physically holding them. */
+ XKB_STATE_MODS_DEPRESSED = (1 << 0),
+ /** Latched modifiers, i.e. will be unset after the next non-modifier
+ * key press. */
+ XKB_STATE_MODS_LATCHED = (1 << 1),
+ /** Locked modifiers, i.e. will be unset after the key provoking the
+ * lock has been pressed again. */
+ XKB_STATE_MODS_LOCKED = (1 << 2),
+ /** Effective modifiers, i.e. currently active and affect key
+ * processing (derived from the other state components). */
+ XKB_STATE_MODS_EFFECTIVE = (1 << 3),
+ /** Depressed layout, i.e. a key is physically holding it. */
+ XKB_STATE_LAYOUT_DEPRESSED = (1 << 4),
+ /** Latched layout, i.e. will be unset after the next non-modifier
+ * key press. */
+ XKB_STATE_LAYOUT_LATCHED = (1 << 5),
+ /** Locked layout, i.e. will be unset after the key provoking the lock
+ * has been pressed again. */
+ XKB_STATE_LAYOUT_LOCKED = (1 << 6),
+ /** Effective layout, i.e. currently active and affects key processing
+ * (derived from the other state components). */
+ XKB_STATE_LAYOUT_EFFECTIVE = (1 << 7),
+ /** LEDs (derived from the other state components). */
+ XKB_STATE_LEDS = (1 << 8)
+};
+
+/**
+ * Update the keyboard state to reflect a given key being pressed or
+ * released.
+ *
+ * @returns A mask of state components that have changed as a result of
+ * the update. If nothing in the state has changed, returns 0.
+ *
+ * @memberof xkb_state
+ */
+enum xkb_state_component
+xkb_state_update_key(struct xkb_state *state, xkb_keycode_t key,
+ enum xkb_key_direction direction);
+
+/**
+ * Get the keysyms obtained from pressing a particular key in a given
+ * keyboard state.
+ *
+ * Get the keysyms for a key according to the current active layout,
+ * modifiers and shift level for the key, as determined by a keyboard
+ * state.
+ *
+ * @param[in] state The keyboard state object.
+ * @param[in] key The keycode of the key.
+ * @param[out] syms_out An immutable array of keysyms corresponding the
+ * key in the given keyboard state.
+ *
+ * As an extension to XKB, this function can return more than one keysym.
+ * If you do not want to handle this case, you can use
+ * xkb_state_key_get_one_sym().
+ *
+ * @returns The number of keysyms in the syms_out array. If no keysyms
+ * are produced by the key in the given keyboard state, returns 0 and sets
+ * syms_out to NULL.
+ *
+ * @memberof xkb_state
+ */
+int
+xkb_state_key_get_syms(struct xkb_state *state, xkb_keycode_t key,
+ const xkb_keysym_t **syms_out);
+
+/**
+ * Get the single keysym obtained from pressing a particular key in a
+ * given keyboard state.
+ *
+ * This function is similar to xkb_state_key_get_syms(), but with a
+ * simplified interface for users which cannot or do not want to handle
+ * the case where multiple keysyms are returned.
+ *
+ * @returns The keysym. If the key does not have exactly one keysym,
+ * returns XKB_KEY_NoSymbol
+ *
+ * @sa xkb_state_key_get_syms()
+ * @memberof xkb_state
+ */
+xkb_keysym_t
+xkb_state_key_get_one_sym(struct xkb_state *state, xkb_keycode_t key);
+
+/**
+ * Get the effective layout index for a key in a given keyboard state.
+ *
+ * @returns The layout index for the key in the given keyboard state. If
+ * the given keycode is invalid, or if the key is not included in any
+ * layout at all, returns XKB_LAYOUT_INVALID.
+ *
+ * @invariant If the returned layout is valid, the following always holds:
+ * @code
+ * xkb_state_key_get_layout(state, key) < xkb_keymap_num_layouts_for_key(keymap, key)
+ * @endcode
+ *
+ * @memberof xkb_state
+ */
+xkb_layout_index_t
+xkb_state_key_get_layout(struct xkb_state *state, xkb_keycode_t key);
+
+/**
+ * Get the effective shift level for a key in a given keyboard state and
+ * layout.
+ *
+ * @param state The keyboard state.
+ * @param key The keycode of the key.
+ * @param layout The layout for which to get the shift level. This must be
+ * smaller than:
+ * @code xkb_keymap_num_layouts_for_key(keymap, key) @endcode
+ * usually it would be:
+ * @code xkb_state_key_get_layout(state, key) @endcode
+ *
+ * @return The shift level index. If the key or layout are invalid,
+ * returns XKB_LEVEL_INVALID.
+ *
+ * @invariant If the returned level is valid, the following always holds:
+ * @code
+ * xkb_state_key_get_level(state, key, layout) < xkb_keymap_num_levels_for_key(keymap, key, layout)
+ * @endcode
+ *
+ * @memberof xkb_state
+ */
+xkb_level_index_t
+xkb_state_key_get_level(struct xkb_state *state, xkb_keycode_t key,
+ xkb_layout_index_t layout);
+
+/**
+ * Match flags for xkb_state_mod_indices_are_active and
+ * xkb_state_mod_names_are_active, specifying how the conditions for a
+ * successful match. XKB_STATE_MATCH_NON_EXCLUSIVE is bitmaskable with
+ * the other modes.
+ */
+enum xkb_state_match {
+ /** Returns true if any of the modifiers are active. */
+ XKB_STATE_MATCH_ANY = (1 << 0),
+ /** Returns true if all of the modifiers are active. */
+ XKB_STATE_MATCH_ALL = (1 << 1),
+ /** Makes matching non-exclusive, i.e. will not return false if a
+ * modifier not specified in the arguments is active. */
+ XKB_STATE_MATCH_NON_EXCLUSIVE = (1 << 16)
+};
+
+/**
+ * Update a keyboard state from a set of explicit masks.
+ *
+ * This entry point is really only for window systems and the like, where a
+ * master process holds an xkb_state, then serializes it over a wire
+ * protocol, and clients then use the serialization to feed in to their own
+ * xkb_state.
+ *
+ * All parameters must always be passed, or the resulting state may be
+ * incoherent.
+ *
+ * The serialization is lossy and will not survive round trips; it must only
+ * be used to feed slave state objects, and must not be used to update the
+ * master state.
+ *
+ * Please do not use this unless you fit the description above.
+ *
+ * @returns A mask of state components that have changed as a result of
+ * the update. If nothing in the state has changed, returns 0.
+ *
+ * @memberof xkb_state
+ *
+ * @sa xkb_state_component
+ */
+enum xkb_state_component
+xkb_state_update_mask(struct xkb_state *state,
+ xkb_mod_mask_t depressed_mods,
+ xkb_mod_mask_t latched_mods,
+ xkb_mod_mask_t locked_mods,
+ xkb_layout_index_t depressed_layout,
+ xkb_layout_index_t latched_layout,
+ xkb_layout_index_t locked_layout);
+
+/**
+ * The counterpart to xkb_state_update_mask for modifiers, to be used on
+ * the server side of serialization.
+ *
+ * @param state The keyboard state.
+ * @param components A mask of the modifier state components to serialize.
+ * State components other than XKB_STATE_MODS_* are ignored.
+ * If XKB_STATE_MODS_EFFECTIVE is included, all other state components are
+ * ignored.
+ *
+ * @returns A xkb_mod_mask_t representing the given components of the
+ * modifier state.
+ *
+ * This function should not be used in regular clients; please use the
+ * xkb_state_mod_*_is_active API instead.
+ *
+ * @memberof xkb_state
+ */
+xkb_mod_mask_t
+xkb_state_serialize_mods(struct xkb_state *state,
+ enum xkb_state_component components);
+
+/**
+ * The counterpart to xkb_state_update_mask for layouts, to be used on
+ * the server side of serialization.
+ *
+ * @param state The keyboard state.
+ * @param components A mask of the layout state components to serialize.
+ * State components other than XKB_STATE_LAYOUT_* are ignored.
+ * If XKB_STATE_LAYOUT_EFFECTIVE is included, all other state components are
+ * ignored.
+ *
+ * @returns A layout index representing the given components of the
+ * layout state.
+ *
+ * This function should not be used in regular clients; please use the
+ * xkb_state_layout_*_is_active API instead.
+ *
+ * @memberof xkb_state
+ */
+xkb_layout_index_t
+xkb_state_serialize_layout(struct xkb_state *state,
+ enum xkb_state_component components);
+
+/**
+ * Test whether a modifier is active in a given keyboard state by name.
+ *
+ * @returns 1 if the modifier is active, 0 if it is not. If the modifier
+ * name does not exist in the keymap, returns -1.
+ *
+ * @memberof xkb_state
+ */
+int
+xkb_state_mod_name_is_active(struct xkb_state *state, const char *name,
+ enum xkb_state_component type);
+
+/**
+ * Test whether a set of modifiers are active in a given keyboard state by
+ * name.
+ *
+ * @param state The keyboard state.
+ * @param type The component of the state against which to match the
+ * given modifiers.
+ * @param match The manner by which to match the state against the
+ * given modifiers.
+ * @param ... The set of of modifier names to test, terminated by a NULL
+ * argument (sentinel).
+ *
+ * @returns 1 if the modifiers are active, 0 if they are not. If any of
+ * the modifier names do not exist in the keymap, returns -1.
+ *
+ * @memberof xkb_state
+ */
+int
+xkb_state_mod_names_are_active(struct xkb_state *state,
+ enum xkb_state_component type,
+ enum xkb_state_match match,
+ ...);
+
+/**
+ * Test whether a modifier is active in a given keyboard state by index.
+ *
+ * @returns 1 if the modifier is active, 0 if it is not. If the modifier
+ * index is invalid in the keymap, returns -1.
+ *
+ * @memberof xkb_state
+ */
+int
+xkb_state_mod_index_is_active(struct xkb_state *state, xkb_mod_index_t idx,
+ enum xkb_state_component type);
+
+/**
+ * Test whether a set of modifiers are active in a given keyboard state by
+ * index.
+ *
+ * @param state The keyboard state.
+ * @param type The component of the state against which to match the
+ * given modifiers.
+ * @param match The manner by which to match the state against the
+ * given modifiers.
+ * @param ... The set of of modifier indexes to test, terminated by a
+ * XKB_MOD_INVALID argument (sentinel).
+ *
+ * @returns 1 if the modifiers are active, 0 if they are not. If any of
+ * the modifier indexes are invalid in the keymap, returns -1.
+ *
+ * @memberof xkb_state
+ */
+int
+xkb_state_mod_indices_are_active(struct xkb_state *state,
+ enum xkb_state_component type,
+ enum xkb_state_match match,
+ ...);
+
+/**
+ * Test whether a modifier is consumed by keyboard state translation for
+ * a key.
+ *
+ * Some functions, like xkb_state_key_get_syms(), look at the state of
+ * the modifiers in the keymap and derive from it the correct shift level
+ * to use for the key. For example, in a US layout, pressing the key
+ * labeled \<A\> while the Shift modifier is active, generates the keysym 'A'.
+ * In this case, the Shift modifier is said to be consumed. However, the
+ * Num Lock modifier does not affect this translation at all, even if it
+ * active, so it is not consumed by this translation.
+ *
+ * It may be desirable for some application to not reuse consumed modifiers
+ * for further processing, e.g. for hotkeys or keyboard shortcuts. To
+ * understand why, consider some requirements from a standard shortcut
+ * mechanism, and how they are implemented:
+ *
+ * 1. The shortcut's modifiers must match exactly to the state. For example,
+ * it is possible to bind separate actions to \<Alt\>\<Tab\> and to
+ * \<Alt\>\<Shift\>\<Tab\>. Further, if only \<Alt\>\<Tab\> is bound to
+ * an action, pressing \<Alt\>\<Shift\>\<Tab\> should not trigger the
+ * shortcut.
+ * Effectively, this means that the modifiers are compared using the
+ * equality operator (==).
+ * 2. Only relevant modifiers are considered for the matching. For example,
+ * Caps Lock and Num Lock should not generally affect the matching, e.g.
+ * when matching \<Alt\>\<Tab\> against the state, it does not matter
+ * whether Num Lock is active or not. These relevant, or significant,
+ * modifiers usually include Alt, Control, Shift, Super and similar.
+ * Effectively, this means that non-significant modifiers are masked out,
+ * before doing the comparison as described above.
+ * 3. The matching must be independent of the layout/keymap. For example,
+ * the \<Plus\> (+) symbol is found on the first level on some layouts,
+ * and requires holding Shift on others. If you simply bind the action
+ * to the \<Plus\> keysym, it would work for the unshifted kind, but
+ * not for the others, because the match against Shift would fail. If
+ * you bind the action to \<Shift\>\<Plus\>, only the shifted kind would
+ * work. So what is needed is to recognize that Shift is used up in the
+ * translation of the keysym itself, and therefore should not be included
+ * in the matching.
+ * Effectively, this means that consumed modifiers (Shift in this example)
+ * are masked out as well, before doing the comparison.
+ *
+ * To summarize, this is how the matching would be performed:
+ * @code
+ * (keysym == shortcut_keysym) &&
+ * ((state_modifiers & ~consumed_modifiers & significant_modifiers) == shortcut_modifiers)
+ * @endcode
+ *
+ * @c state_modifiers are the modifiers reported by
+ * xkb_state_mod_index_is_active() and similar functions.
+ * @c consumed_modifiers are the modifiers reported by
+ * xkb_state_mod_index_is_consumed().
+ * @c significant_modifiers are decided upon by the application/toolkit/user;
+ * it is up to them to decide whether these are configurable or hard-coded.
+ *
+ * @returns 1 if the modifier is consumed, 0 if it is not. If the modifier
+ * index is not valid in the keymap, returns -1.
+ *
+ * @sa xkb_state_mod_mask_remove_consumed()
+ * @memberof xkb_state
+ */
+int
+xkb_state_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t key,
+ xkb_mod_index_t idx);
+
+/**
+ * Remove consumed modifiers from a modifier mask for a key.
+ *
+ * Takes the given modifier mask, and removes all modifiers which are
+ * consumed for that particular key (as in xkb_state_mod_index_is_consumed()).
+ *
+ * @sa xkb_state_mod_index_is_consumed()
+ * @memberof xkb_state
+ */
+xkb_mod_mask_t
+xkb_state_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t key,
+ xkb_mod_mask_t mask);
+
+/**
+ * Test whether a layout is active in a given keyboard state by name.
+ *
+ * @returns 1 if the layout is active, 0 if it is not. If no layout with
+ * this name exists in the keymap, return -1.
+ *
+ * If multiple layouts in the keymap have this name, the one with the lowest
+ * index is tested.
+ *
+ * @sa xkb_layout_index_t
+ * @memberof xkb_state
+ */
+int
+xkb_state_layout_name_is_active(struct xkb_state *state, const char *name,
+ enum xkb_state_component type);
+
+/**
+ * Test whether a layout is active in a given keyboard state by index.
+ *
+ * @returns 1 if the layout is active, 0 if it is not. If the layout index
+ * is not valid in the keymap, returns -1.
+ *
+ * @sa xkb_layout_index_t
+ * @memberof xkb_state
+ */
+int
+xkb_state_layout_index_is_active(struct xkb_state *state,
+ xkb_layout_index_t idx,
+ enum xkb_state_component type);
+
+/**
+ * Test whether a LED is active in a given keyboard state by name.
+ *
+ * @returns 1 if the LED is active, 0 if it not. If no LED with this name
+ * exists in the keymap, returns -1.
+ *
+ * @sa xkb_led_index_t
+ * @memberof xkb_state
+ */
+int
+xkb_state_led_name_is_active(struct xkb_state *state, const char *name);
+
+/**
+ * Test whether a LED is active in a given keyboard state by index.
+ *
+ * @returns 1 if the LED is active, 0 if it not. If the LED index is not
+ * valid in the keymap, returns -1.
+ *
+ * @sa xkb_led_index_t
+ * @memberof xkb_state
+ */
+int
+xkb_state_led_index_is_active(struct xkb_state *state, xkb_led_index_t idx);
+
+/** @} */
+
+/* Leave this include last, so it can pick up our types, etc. */
+#include <xkbcommon/xkbcommon-compat.h>
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _XKBCOMMON_H_ */
diff --git a/src/plugins/platforminputcontexts/compose/xkbcommon_workaround.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon_workaround.h
index 58ce143978..58ce143978 100644
--- a/src/plugins/platforminputcontexts/compose/xkbcommon_workaround.h
+++ b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon_workaround.h
diff --git a/src/android/java/res/values/libs.xml b/src/android/java/res/values/libs.xml
index 09fa409458..17cf0fa37a 100644
--- a/src/android/java/res/values/libs.xml
+++ b/src/android/java/res/values/libs.xml
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<array name="qt_sources">
- <item>https://files.kde.org/necessitas/ministro/android/necessitas/qt5/latest</item>
+ <item>https://download.qt-project.org/ministro/android/qt5/latest</item>
</array>
<string name="repository">default</string>
<array name="qt_libs">
diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java
index 22b34fdbef..fd0c6b14e3 100644
--- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java
+++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java
@@ -132,7 +132,7 @@ public class QtActivity extends Activity
private ActivityInfo m_activityInfo = null; // activity info object, used to access the libs and the strings
private DexClassLoader m_classLoader = null; // loader object
- private String[] m_sources = {"https://files.kde.org/necessitas/ministro/android/necessitas/qt5/latest"}; // Make sure you are using ONLY secure locations
+ private String[] m_sources = {"https://download.qt-project.org/ministro/android/qt5/latest"}; // Make sure you are using ONLY secure locations
private String m_repository = "default"; // Overwrites the default Ministro repository
// Possible values:
// * default - Ministro default repository set with "Ministro configuration tool".
@@ -478,7 +478,6 @@ public class QtActivity extends Activity
}
loaderParams.putStringArrayList(NATIVE_LIBRARIES_KEY, libraryList);
loaderParams.putString(ENVIRONMENT_VARIABLES_KEY, ENVIRONMENT_VARIABLES
- + "QT_QPA_EGLFS_HIDECURSOR=1"
+ "\tQML2_IMPORT_PATH=" + localPrefix + "/qml"
+ "\tQML_IMPORT_PATH=" + localPrefix + "/imports"
+ "\tQT_PLUGIN_PATH=" + localPrefix + "/plugins");
diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt5Config.cmake.in
index a7e9a042e8..a872d0e917 100644
--- a/src/corelib/Qt5Config.cmake.in
+++ b/src/corelib/Qt5Config.cmake.in
@@ -41,3 +41,5 @@ if (_Qt5_NOTFOUND_MESSAGE)
set(Qt5_NOT_FOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}\")
set(Qt5_FOUND False)
endif()
+
+_qt5_Core_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/Qt5ConfigVersion.cmake\")
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 3932c9e2c7..a80427893d 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -2,24 +2,30 @@
if (NOT TARGET Qt5::qmake)
add_executable(Qt5::qmake IMPORTED)
- set_target_properties(Qt5::qmake PROPERTIES
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
- IMPORTED_LOCATION \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
!!ELSE
- IMPORTED_LOCATION \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
!!ENDIF
+ _qt5_Core_check_file_exists(${imported_location})
+
+ set_target_properties(Qt5::qmake PROPERTIES
+ IMPORTED_LOCATION ${imported_location}
)
endif()
if (NOT TARGET Qt5::moc)
add_executable(Qt5::moc IMPORTED)
- set_target_properties(Qt5::moc PROPERTIES
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
- IMPORTED_LOCATION \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
!!ELSE
- IMPORTED_LOCATION \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
!!ENDIF
+ _qt5_Core_check_file_exists(${imported_location})
+
+ set_target_properties(Qt5::moc PROPERTIES
+ IMPORTED_LOCATION ${imported_location}
)
# For CMake automoc feature
get_target_property(QT_MOC_EXECUTABLE Qt5::moc LOCATION)
@@ -28,12 +34,15 @@ endif()
if (NOT TARGET Qt5::rcc)
add_executable(Qt5::rcc IMPORTED)
- set_target_properties(Qt5::rcc PROPERTIES
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
- IMPORTED_LOCATION \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
!!ELSE
- IMPORTED_LOCATION \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
!!ENDIF
+ _qt5_Core_check_file_exists(${imported_location})
+
+ set_target_properties(Qt5::rcc PROPERTIES
+ IMPORTED_LOCATION ${imported_location}
)
endif()
@@ -51,6 +60,9 @@ set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_HOST_DATA_
!!ELSE
set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
!!ENDIF
+foreach(_dir ${_qt5_corelib_extra_includes})
+ _qt5_Core_check_file_exists(${_dir})
+endforeach()
list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes})
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes})
@@ -87,23 +99,28 @@ if (NOT TARGET Qt5::WinMain)
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
- set_target_properties(Qt5::WinMain PROPERTIES
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- IMPORTED_LOCATION_RELEASE \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\"
+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
!!ELSE
- IMPORTED_LOCATION_RELEASE \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\"
+ set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
!!ENDIF
+
+ set_target_properties(Qt5::WinMain PROPERTIES
+ IMPORTED_LOCATION_RELEASE ${imported_location}
)
!!ENDIF
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
- set_target_properties(Qt5::WinMain PROPERTIES
+
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- IMPORTED_LOCATION_DEBUG \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\"
+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
!!ELSE
- IMPORTED_LOCATION_DEBUG \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\"
+ set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
!!ENDIF
+
+ set_target_properties(Qt5::WinMain PROPERTIES
+ IMPORTED_LOCATION_DEBUG ${imported_location}
)
!!ENDIF
@@ -131,3 +148,5 @@ endif()
get_filename_component(_Qt5CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH)
set(_Qt5CTestMacros \"${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake\")
+
+_qt5_Core_check_file_exists(${_Qt5CTestMacros})
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 1a5c9f6766..1cedd3a28d 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -1065,8 +1065,10 @@ QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba, QTextCodec *defaultCo
}
}
}
+ if (!c)
+ c = defaultCodec;
- return defaultCodec;
+ return c;
}
/*!
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index ada69d081d..fb96ad2732 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -618,7 +618,6 @@
# endif
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404
/* C++11 features supported in GCC 4.4: */
-# define Q_COMPILER_ATOMICS
# define Q_COMPILER_AUTO_FUNCTION
# define Q_COMPILER_AUTO_TYPE
# define Q_COMPILER_CLASS_ENUM
@@ -642,6 +641,11 @@
# define Q_COMPILER_RANGE_FOR
# endif
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407
+ /* GCC 4.4 implemented <atomic> and std::atomic using its old intrinsics.
+ * However, the implementation is incomplete for most platforms until GCC 4.7:
+ * instead, std::atomic would use an external lock. Since we need an std::atomic
+ * that is behavior-compatible with QBasicAtomic, we only enable it here */
+# define Q_COMPILER_ATOMICS
/* GCC 4.6.x has problems dealing with noexcept expressions,
* so turn the feature on for 4.7 and above, only */
# define Q_COMPILER_NOEXCEPT
diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h
index 6332e2d761..5b7edbafa6 100644
--- a/src/corelib/global/qflags.h
+++ b/src/corelib/global/qflags.h
@@ -97,31 +97,32 @@ public:
inline QFlags(const QFlags &other);
inline QFlags &operator=(const QFlags &other);
#endif
- Q_DECL_CONSTEXPR inline QFlags(Enum f) : i(f) {}
+ Q_DECL_CONSTEXPR inline QFlags(Enum f) : i(Int(f)) {}
Q_DECL_CONSTEXPR inline QFlags(Zero = 0) : i(0) {}
Q_DECL_CONSTEXPR inline QFlags(QFlag f) : i(f) {}
inline QFlags &operator&=(int mask) { i &= mask; return *this; }
inline QFlags &operator&=(uint mask) { i &= mask; return *this; }
+ inline QFlags &operator&=(Enum mask) { i &= Int(mask); return *this; }
inline QFlags &operator|=(QFlags f) { i |= f.i; return *this; }
- inline QFlags &operator|=(Enum f) { i |= f; return *this; }
+ inline QFlags &operator|=(Enum f) { i |= Int(f); return *this; }
inline QFlags &operator^=(QFlags f) { i ^= f.i; return *this; }
- inline QFlags &operator^=(Enum f) { i ^= f; return *this; }
+ inline QFlags &operator^=(Enum f) { i ^= Int(f); return *this; }
Q_DECL_CONSTEXPR inline operator Int() const { return i; }
Q_DECL_CONSTEXPR inline QFlags operator|(QFlags f) const { return QFlags(Enum(i | f.i)); }
- Q_DECL_CONSTEXPR inline QFlags operator|(Enum f) const { return QFlags(Enum(i | f)); }
+ Q_DECL_CONSTEXPR inline QFlags operator|(Enum f) const { return QFlags(Enum(i | Int(f))); }
Q_DECL_CONSTEXPR inline QFlags operator^(QFlags f) const { return QFlags(Enum(i ^ f.i)); }
- Q_DECL_CONSTEXPR inline QFlags operator^(Enum f) const { return QFlags(Enum(i ^ f)); }
+ Q_DECL_CONSTEXPR inline QFlags operator^(Enum f) const { return QFlags(Enum(i ^ Int(f))); }
Q_DECL_CONSTEXPR inline QFlags operator&(int mask) const { return QFlags(Enum(i & mask)); }
Q_DECL_CONSTEXPR inline QFlags operator&(uint mask) const { return QFlags(Enum(i & mask)); }
- Q_DECL_CONSTEXPR inline QFlags operator&(Enum f) const { return QFlags(Enum(i & f)); }
+ Q_DECL_CONSTEXPR inline QFlags operator&(Enum f) const { return QFlags(Enum(i & Int(f))); }
Q_DECL_CONSTEXPR inline QFlags operator~() const { return QFlags(Enum(~i)); }
Q_DECL_CONSTEXPR inline bool operator!() const { return !i; }
- Q_DECL_CONSTEXPR inline bool testFlag(Enum f) const { return (i & f) == f && (f != 0 || i == Int(f) ); }
+ Q_DECL_CONSTEXPR inline bool testFlag(Enum f) const { return (i & Int(f)) == Int(f) && (Int(f) != 0 || i == Int(f) ); }
private:
Int i;
};
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 9995daf1e9..4598f60d5e 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -72,7 +72,7 @@
# include <envLib.h>
#endif
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
#include <CoreServices/CoreServices.h>
#endif
@@ -240,6 +240,12 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n);
*/
/*!
+ \fn QFlags &QFlags::operator&=(Enum mask)
+
+ \overload
+*/
+
+/*!
\fn QFlags &QFlags::operator|=(QFlags other)
Performs a bitwise OR operation with \a other and stores the
@@ -928,8 +934,8 @@ bool qSharedBuild() Q_DECL_NOTHROW
\endlist
Some constants are defined only on certain platforms. You can use
- the preprocessor symbols Q_OS_WIN and Q_OS_MAC to test that
- the application is compiled under Windows or Mac.
+ the preprocessor symbols Q_OS_WIN and Q_OS_MACX to test that
+ the application is compiled under Windows or OS X.
\sa QLibraryInfo
*/
@@ -1073,6 +1079,27 @@ bool qSharedBuild() Q_DECL_NOTHROW
*/
/*!
+ \macro Q_OS_MAC
+ \relates <QtGlobal>
+
+ Defined on OS X and iOS (synonym for Q_OS_DARWIN).
+ */
+
+/*!
+ \macro Q_OS_MACX
+ \relates <QtGlobal>
+
+ Defined on OS X.
+ */
+
+/*!
+ \macro Q_OS_IOS
+ \relates <QtGlobal>
+
+ Defined on iOS.
+ */
+
+/*!
\macro Q_OS_WIN
\relates <QtGlobal>
@@ -1395,13 +1422,6 @@ bool qSharedBuild() Q_DECL_NOTHROW
*/
/*!
- \macro Q_OS_MAC
- \relates <QtGlobal>
-
- Defined on MAC OS (synonym for Darwin).
- */
-
-/*!
\macro Q_PROCESSOR_ALPHA
\relates <QtGlobal>
@@ -1646,7 +1666,7 @@ static const unsigned int qt_one = 1;
const int QSysInfo::ByteOrder = ((*((unsigned char *) &qt_one) == 0) ? BigEndian : LittleEndian);
#endif
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
QT_BEGIN_INCLUDE_NAMESPACE
#include "private/qcore_mac_p.h"
@@ -1668,7 +1688,7 @@ Q_CORE_EXPORT void qt_mac_to_pascal_string(QString s, Str255 str, TextEncoding e
Q_CORE_EXPORT QString qt_mac_from_pascal_string(const Str255 pstr) {
return QCFString(CFStringCreateWithPascalString(0, pstr, CFStringGetSystemEncoding()));
}
-#endif // defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#endif // defined(Q_OS_MACX)
#if defined(Q_OS_MAC)
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 0d8a5b1428..2132e555cd 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -203,7 +203,11 @@ typedef quint64 qulonglong;
QT_BEGIN_INCLUDE_NAMESPACE
typedef unsigned char uchar;
typedef unsigned short ushort;
+#if defined(Q_QDOC) || !defined(Q_OS_ANDROID)
typedef unsigned int uint;
+#else
+# include <sys/types.h>
+#endif
typedef unsigned long ulong;
QT_END_INCLUDE_NAMESPACE
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 5fb9640b19..1eaebe5f90 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -291,6 +291,7 @@ static const struct {
{ "Sysroot", "" },
{ "HostPrefix", "" },
{ "HostBinaries", "bin" },
+ { "HostLibraries", "lib" },
{ "HostData", "." },
{ "TargetSpec", "" },
{ "HostSpec", "" },
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 1a00a14caf..b275e018a0 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -82,6 +82,7 @@ public:
SysrootPath,
HostPrefixPath,
HostBinariesPath,
+ HostLibrariesPath,
HostDataPath,
TargetSpecPath,
HostSpecPath,
diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h
index a6f244698d..2b798f9ea0 100644
--- a/src/corelib/global/qlogging.h
+++ b/src/corelib/global/qlogging.h
@@ -94,22 +94,38 @@ public:
void debug(const char *msg, ...) const
#if defined(Q_CC_GNU) && !defined(__INSURE__)
+# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG)
+ __attribute__ ((format (gnu_printf, 2, 3)))
+# else
__attribute__ ((format (printf, 2, 3)))
+# endif
#endif
;
void noDebug(const char *, ...) const
#if defined(Q_CC_GNU) && !defined(__INSURE__)
+# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG)
+ __attribute__ ((format (gnu_printf, 2, 3)))
+# else
__attribute__ ((format (printf, 2, 3)))
+# endif
#endif
{}
void warning(const char *msg, ...) const
#if defined(Q_CC_GNU) && !defined(__INSURE__)
+# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG)
+ __attribute__ ((format (gnu_printf, 2, 3)))
+# else
__attribute__ ((format (printf, 2, 3)))
+# endif
#endif
;
void critical(const char *msg, ...) const
#if defined(Q_CC_GNU) && !defined(__INSURE__)
+# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG)
+ __attribute__ ((format (gnu_printf, 2, 3)))
+# else
__attribute__ ((format (printf, 2, 3)))
+# endif
#endif
;
@@ -118,7 +134,11 @@ public:
#endif
void fatal(const char *msg, ...) const Q_DECL_NOTHROW
#if defined(Q_CC_GNU) && !defined(__INSURE__)
+# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG)
+ __attribute__ ((format (gnu_printf, 2, 3)))
+# else
__attribute__ ((format (printf, 2, 3)))
+# endif
#endif
;
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 95d9baafd5..74949b86f0 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -293,7 +293,8 @@ public:
WindowType_Mask = 0x000000ff,
MSWindowsFixedSizeDialogHint = 0x00000100,
MSWindowsOwnDC = 0x00000200,
- X11BypassWindowManagerHint = 0x00000400,
+ BypassWindowManagerHint = 0x00000400,
+ X11BypassWindowManagerHint = BypassWindowManagerHint,
FramelessWindowHint = 0x00000800,
WindowTitleHint = 0x00001000,
WindowSystemMenuHint = 0x00002000,
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index b6ce9e03fd..9eb0c6b8f2 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1999,6 +1999,12 @@
\value MSWindowsOwnDC Gives the window its own display
context on Windows.
+ \value BypassWindowManagerHint This flag can be used to indicate to the platform plugin
+ that "all" window manager protocols should be disabled. This flag will behave
+ different depending on what operating system the application is running on and
+ what window manager is running. The flag can be used to get a native window
+ with no configuration set.
+
\value X11BypassWindowManagerHint Bypass the window
manager completely. This results in a borderless window
that is not managed at all (i.e., no keyboard input unless
diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h
index edeef3c461..58939cc013 100644
--- a/src/corelib/global/qsysinfo.h
+++ b/src/corelib/global/qsysinfo.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h
index 0caac3d797..690442d066 100644
--- a/src/corelib/global/qsystemdetection.h
+++ b/src/corelib/global/qsystemdetection.h
@@ -50,8 +50,9 @@
The operating system, must be one of: (Q_OS_x)
DARWIN - Darwin OS (synonym for Q_OS_MAC)
- MAC - Mac OS X or iOS (iPhoneOS)
- IOS - iOS (treated as a variant of Mac OS)
+ MAC - OS X or iOS (synonym for Q_OS_DARWIN)
+ MACX - OS X
+ IOS - iOS
MSDOS - MS-DOS and Windows
OS2 - OS/2
OS2EMX - XFree86 on OS/2 (not PM)
@@ -166,7 +167,6 @@
#if defined(Q_OS_DARWIN)
# define Q_OS_MAC
-# define Q_OS_MACX /* Q_OS_MACX is only for compatibility.*/
# if defined(Q_OS_DARWIN64)
# define Q_OS_MAC64
# elif defined(Q_OS_DARWIN32)
@@ -175,6 +175,8 @@
# include <TargetConditionals.h>
# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
# define Q_OS_IOS
+# else
+# define Q_OS_MACX
# endif
#endif
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp
index da38f8ae21..52b80badb8 100644
--- a/src/corelib/io/qdatastream.cpp
+++ b/src/corelib/io/qdatastream.cpp
@@ -538,9 +538,9 @@ void QDataStream::setByteOrder(ByteOrder bo)
\value Qt_4_7 Same as Qt_4_6.
\value Qt_4_8 Same as Qt_4_6.
\value Qt_4_9 Same as Qt_4_6.
- \value Qt_5_0 Version 13 (Qt 5.0, Qt 5.1, Qt 5.2)
- \value Qt_5_1 Same as Qt_5_0.
- \value Qt_5_2 Same as Qt_5_0.
+ \value Qt_5_0 Version 13 (Qt 5.0)
+ \value Qt_5_1 Version 14 (Qt 5.1, Qt 5.2)
+ \value Qt_5_2 Same as Qt_5_1.
\sa setVersion(), version()
*/
@@ -572,6 +572,7 @@ void QDataStream::setByteOrder(ByteOrder bo)
\table
\header \li Qt Version \li QDataStream Version
+ \row \li Qt 5.1 \li 14
\row \li Qt 5.0 \li 13
\row \li Qt 4.6 \li 12
\row \li Qt 4.5 \li 11
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h
index f893e6a503..eb064b3fe2 100644
--- a/src/corelib/io/qdatastream.h
+++ b/src/corelib/io/qdatastream.h
@@ -86,7 +86,7 @@ public:
Qt_4_8 = Qt_4_7,
Qt_4_9 = Qt_4_8,
Qt_5_0 = 13,
- Qt_5_1 = Qt_5_0,
+ Qt_5_1 = 14,
Qt_5_2 = Qt_5_1
#if QT_VERSION >= 0x050300
#error Add the datastream version for this Qt version
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index ce72fcd26d..9ed5f6e951 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -280,7 +280,7 @@ inline QDebug operator<<(QDebug debug, const QFlags<T> &flags)
debug.nospace() << '|';
else
needSeparator = true;
- debug.nospace() << "0x" << QByteArray::number(T(1 << i), 16).constData();
+ debug.nospace() << "0x" << QByteArray::number(typename QFlags<T>::Int(1) << i, 16).constData();
}
}
debug << ')';
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index afa62a075f..e46ba28f47 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -559,14 +559,43 @@ QFile::rename(const QString &newName)
}
// If the file exists and it is a case-changing rename ("foo" -> "Foo"),
// compare Ids to make sure it really is a different file.
- if (QFile::exists(newName)
- && (d->fileName.compare(newName, Qt::CaseInsensitive)
- || QFileSystemEngine::id(QFileSystemEntry(d->fileName)) != QFileSystemEngine::id(QFileSystemEntry(newName)))) {
- // ### Race condition. If a file is moved in after this, it /will/ be
- // overwritten. On Unix, the proper solution is to use hardlinks:
- // return ::link(old, new) && ::remove(old);
- d->setError(QFile::RenameError, tr("Destination file exists"));
+ if (QFile::exists(newName)) {
+ if (d->fileName.compare(newName, Qt::CaseInsensitive)
+ || QFileSystemEngine::id(QFileSystemEntry(d->fileName)) != QFileSystemEngine::id(QFileSystemEntry(newName))) {
+ // ### Race condition. If a file is moved in after this, it /will/ be
+ // overwritten. On Unix, the proper solution is to use hardlinks:
+ // return ::link(old, new) && ::remove(old);
+ d->setError(QFile::RenameError, tr("Destination file exists"));
+ return false;
+ }
+#ifdef Q_OS_LINUX
+ // rename() on Linux simply does nothing when renaming "foo" to "Foo" on a case-insensitive
+ // FS, such as FAT32. Move the file away and rename in 2 steps to work around.
+ QTemporaryFile tempFile(d->fileName + QStringLiteral(".XXXXXX"));
+ tempFile.setAutoRemove(false);
+ if (!tempFile.open(QIODevice::ReadWrite)) {
+ d->setError(QFile::RenameError, tempFile.errorString());
+ return false;
+ }
+ tempFile.close();
+ if (!d->engine()->rename(tempFile.fileName())) {
+ d->setError(QFile::RenameError, tr("Error while renaming."));
+ return false;
+ }
+ if (tempFile.rename(newName)) {
+ d->fileEngine->setFileName(newName);
+ d->fileName = newName;
+ return true;
+ }
+ d->setError(QFile::RenameError, tempFile.errorString());
+ // We need to restore the original file.
+ if (!tempFile.rename(d->fileName)) {
+ d->setError(QFile::RenameError, errorString() + QLatin1Char('\n')
+ + tr("Unable to restore from %1: %2").
+ arg(QDir::toNativeSeparators(tempFile.fileName()), tempFile.errorString()));
+ }
return false;
+#endif
}
unsetError();
close();
diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp
index 71ecc4a0a0..53cf6158ad 100644
--- a/src/corelib/io/qfilesystemengine.cpp
+++ b/src/corelib/io/qfilesystemengine.cpp
@@ -272,7 +272,7 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer)
// Attributes
entryFlags |= QFileSystemMetaData::ExistsAttribute;
size_ = statBuffer.st_size;
-#if defined (Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (statBuffer.st_flags & UF_HIDDEN) {
entryFlags |= QFileSystemMetaData::HiddenAttribute;
knownFlagsMask |= QFileSystemMetaData::HiddenAttribute;
diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h
index f3d3018da6..5719629958 100644
--- a/src/corelib/io/qfilesystemengine_p.h
+++ b/src/corelib/io/qfilesystemengine_p.h
@@ -84,7 +84,7 @@ public:
static QString resolveGroupName(uint groupId);
#endif
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
static QString bundleName(const QFileSystemEntry &entry);
#else
static QString bundleName(const QFileSystemEntry &entry) { Q_UNUSED(entry) return QString(); }
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 4bfb03a41e..b18e32b29a 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -59,7 +59,7 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
static inline bool _q_isMacHidden(const char *nativePath)
{
OSErr err;
@@ -143,7 +143,7 @@ QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link,
ret.chop(1);
return QFileSystemEntry(ret);
}
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
{
FSRef fref;
if (FSPathMakeRef((const UInt8 *)QFile::encodeName(QDir::cleanPath(link.filePath())).data(), &fref, 0) == noErr) {
@@ -175,7 +175,7 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry,
return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));
#else
char *ret = 0;
-# if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+# if defined(Q_OS_MACX)
// When using -mmacosx-version-min=10.4, we get the legacy realpath implementation,
// which does not work properly with the realpath(X,0) form. See QTBUG-28282.
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) {
@@ -335,7 +335,7 @@ QString QFileSystemEngine::resolveGroupName(uint groupId)
return QString();
}
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
//static
QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)
{
@@ -355,7 +355,7 @@ QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)
bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data,
QFileSystemMetaData::MetaDataFlags what)
{
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (what & QFileSystemMetaData::BundleType) {
if (!data.hasFlags(QFileSystemMetaData::DirectoryType))
what |= QFileSystemMetaData::DirectoryType;
@@ -364,7 +364,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
// Mac OS >= 10.5: st_flags & UF_HIDDEN
what |= QFileSystemMetaData::PosixStatFlags;
}
-#endif // defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#endif // defined(Q_OS_MACX)
if (what & QFileSystemMetaData::PosixStatFlags)
what |= QFileSystemMetaData::PosixStatFlags;
@@ -425,7 +425,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
| QFileSystemMetaData::ExistsAttribute;
}
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (what & QFileSystemMetaData::AliasType)
{
if (entryExists) {
@@ -471,7 +471,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
data.knownFlagsMask |= QFileSystemMetaData::HiddenAttribute;
}
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (what & QFileSystemMetaData::BundleType) {
if (entryExists && data.isDirectory()) {
QCFType<CFStringRef> path = CFStringCreateWithBytes(0,
diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h
index 2444a5fd63..1abc9b7ec4 100644
--- a/src/corelib/io/qfilesystemmetadata_p.h
+++ b/src/corelib/io/qfilesystemmetadata_p.h
@@ -100,7 +100,7 @@ public:
LinkType = 0x00010000,
FileType = 0x00020000,
DirectoryType = 0x00040000,
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
BundleType = 0x00080000,
AliasType = 0x08000000,
#else
@@ -248,7 +248,7 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QFileSystemMetaData::MetaDataFlags)
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
inline bool QFileSystemMetaData::isBundle() const { return (entryFlags & BundleType); }
inline bool QFileSystemMetaData::isAlias() const { return (entryFlags & AliasType); }
#else
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 59b6db7c79..b1861d8038 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -265,7 +265,13 @@ QProcessEnvironment &QProcessEnvironment::operator=(const QProcessEnvironment &o
*/
bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
{
- return d == other.d || (d && other.d && d->hash == other.d->hash);
+ if (d == other.d)
+ return true;
+ if (d && other.d) {
+ QProcessEnvironmentPrivate::OrderedMutexLocker locker(d, other.d);
+ return d->hash == other.d->hash;
+ }
+ return false;
}
/*!
@@ -276,6 +282,7 @@ bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
*/
bool QProcessEnvironment::isEmpty() const
{
+ // Needs no locking, as no hash nodes are accessed
return d ? d->hash.isEmpty() : true;
}
@@ -302,7 +309,10 @@ void QProcessEnvironment::clear()
*/
bool QProcessEnvironment::contains(const QString &name) const
{
- return d ? d->hash.contains(d->prepareName(name)) : false;
+ if (!d)
+ return false;
+ QProcessEnvironmentPrivate::MutexLocker locker(d);
+ return d->hash.contains(d->prepareName(name));
}
/*!
@@ -319,7 +329,8 @@ bool QProcessEnvironment::contains(const QString &name) const
*/
void QProcessEnvironment::insert(const QString &name, const QString &value)
{
- // d detaches from null
+ // our re-impl of detach() detaches from null
+ d.detach(); // detach before prepareName()
d->hash.insert(d->prepareName(name), d->prepareValue(value));
}
@@ -333,8 +344,10 @@ void QProcessEnvironment::insert(const QString &name, const QString &value)
*/
void QProcessEnvironment::remove(const QString &name)
{
- if (d)
+ if (d) {
+ d.detach(); // detach before prepareName()
d->hash.remove(d->prepareName(name));
+ }
}
/*!
@@ -349,6 +362,7 @@ QString QProcessEnvironment::value(const QString &name, const QString &defaultVa
if (!d)
return defaultValue;
+ QProcessEnvironmentPrivate::MutexLocker locker(d);
QProcessEnvironmentPrivate::Hash::ConstIterator it = d->hash.constFind(d->prepareName(name));
if (it == d->hash.constEnd())
return defaultValue;
@@ -371,7 +385,10 @@ QString QProcessEnvironment::value(const QString &name, const QString &defaultVa
*/
QStringList QProcessEnvironment::toStringList() const
{
- return d ? d->toList() : QStringList();
+ if (!d)
+ return QStringList();
+ QProcessEnvironmentPrivate::MutexLocker locker(d);
+ return d->toList();
}
/*!
@@ -382,7 +399,10 @@ QStringList QProcessEnvironment::toStringList() const
*/
QStringList QProcessEnvironment::keys() const
{
- return d ? d->keys() : QStringList();
+ if (!d)
+ return QStringList();
+ QProcessEnvironmentPrivate::MutexLocker locker(d);
+ return d->keys();
}
/*!
@@ -397,7 +417,8 @@ void QProcessEnvironment::insert(const QProcessEnvironment &e)
if (!e.d)
return;
- // d detaches from null
+ // our re-impl of detach() detaches from null
+ QProcessEnvironmentPrivate::MutexLocker locker(e.d);
d->insert(*e.d);
}
@@ -1006,6 +1027,7 @@ bool QProcessPrivate::_q_processDied()
return false;
#endif
#ifdef Q_OS_WIN
+ drainOutputPipes();
if (processFinishedNotifier)
processFinishedNotifier->setEnabled(false);
#endif
@@ -2339,7 +2361,7 @@ bool QProcess::startDetached(const QString &program)
}
QT_BEGIN_INCLUDE_NAMESPACE
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
#elif defined(Q_OS_WINCE) || defined(Q_OS_IOS)
diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h
index 29adf37f74..9da3e63f38 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -219,7 +219,7 @@ Q_SIGNALS:
QPrivateSignal
#endif
);
- void finished(int exitCode);
+ void finished(int exitCode); // ### Qt 6: merge the two signals with a default value
void finished(int exitCode, QProcess::ExitStatus exitStatus);
void error(QProcess::ProcessError error);
void stateChanged(QProcess::ProcessState state
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h
index f658e54d4b..2a2cc9fb84 100644
--- a/src/corelib/io/qprocess_p.h
+++ b/src/corelib/io/qprocess_p.h
@@ -59,6 +59,9 @@
#include "QtCore/qshareddata.h"
#include "private/qringbuffer_p.h"
#include "private/qiodevice_p.h"
+#ifdef Q_OS_UNIX
+#include <QtCore/private/qorderedmutexlocker_p.h>
+#endif
#ifdef Q_OS_WIN
#include "QtCore/qt_windows.h"
@@ -148,6 +151,13 @@ public:
inline QString nameToString(const Key &name) const { return name; }
inline Value prepareValue(const QString &value) const { return value; }
inline QString valueToString(const Value &value) const { return value; }
+ struct MutexLocker {
+ MutexLocker(const QProcessEnvironmentPrivate *) {}
+ };
+ struct OrderedMutexLocker {
+ OrderedMutexLocker(const QProcessEnvironmentPrivate *,
+ const QProcessEnvironmentPrivate *) {}
+ };
#else
inline Key prepareName(const QString &name) const
{
@@ -164,6 +174,37 @@ public:
}
inline Value prepareValue(const QString &value) const { return Value(value); }
inline QString valueToString(const Value &value) const { return value.string(); }
+
+ struct MutexLocker : public QMutexLocker
+ {
+ MutexLocker(const QProcessEnvironmentPrivate *d) : QMutexLocker(&d->mutex) {}
+ };
+ struct OrderedMutexLocker : public QOrderedMutexLocker
+ {
+ OrderedMutexLocker(const QProcessEnvironmentPrivate *d1,
+ const QProcessEnvironmentPrivate *d2) :
+ QOrderedMutexLocker(&d1->mutex, &d2->mutex)
+ {}
+ };
+
+ QProcessEnvironmentPrivate() : QSharedData() {}
+ QProcessEnvironmentPrivate(const QProcessEnvironmentPrivate &other) :
+ QSharedData()
+ {
+ // This being locked ensures that the functions that only assign
+ // d pointers don't need explicit locking.
+ // We don't need to lock our own mutex, as this object is new and
+ // consequently not shared. For the same reason, non-const methods
+ // do not need a lock, as they detach objects (however, we need to
+ // ensure that they really detach before using prepareName()).
+ MutexLocker locker(&other);
+ hash = other.hash;
+ nameMap = other.nameMap;
+ // We need to detach our members, so that our mutex can protect them.
+ // As we are being detached, they likely would be detached a moment later anyway.
+ hash.detach();
+ nameMap.detach();
+ }
#endif
typedef QHash<Key, Value> Hash;
@@ -172,6 +213,8 @@ public:
#ifdef Q_OS_UNIX
typedef QHash<QString, Key> NameHash;
mutable NameHash nameMap;
+
+ mutable QMutex mutex;
#endif
static QProcessEnvironment fromList(const QStringList &list);
@@ -317,6 +360,7 @@ public:
bool waitForDeadChild();
#endif
#ifdef Q_OS_WIN
+ bool drainOutputPipes();
void flushPipeWriter();
qint64 pipeWriterBytesToWrite() const;
#endif
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 7f7066271b..e9957d2384 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -472,7 +472,7 @@ bool QProcessPrivate::createChannel(Channel &channel)
}
QT_BEGIN_INCLUDE_NAMESPACE
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
#else
@@ -617,8 +617,10 @@ void QProcessPrivate::startProcess()
// Duplicate the environment.
int envc = 0;
char **envp = 0;
- if (environment.d.constData())
+ if (environment.d.constData()) {
+ QProcessEnvironmentPrivate::MutexLocker locker(environment.d);
envp = _q_dupEnvironment(environment.d.constData()->hash, &envc);
+ }
// Encode the working directory if it's non-empty, otherwise just pass 0.
const char *workingDirPtr = 0;
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 0f36c3adbf..7776852277 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -625,21 +625,21 @@ bool QProcessPrivate::waitForStarted(int)
return false;
}
-static bool drainOutputPipes(QProcessPrivate *d)
+bool QProcessPrivate::drainOutputPipes()
{
- if (!d->stdoutReader && !d->stderrReader)
+ if (!stdoutReader && !stderrReader)
return false;
bool readyReadEmitted = false;
forever {
bool readOperationActive = false;
- if (d->stdoutReader) {
- readyReadEmitted |= d->stdoutReader->waitForReadyRead(0);
- readOperationActive = d->stdoutReader->isReadOperationActive();
+ if (stdoutReader) {
+ readyReadEmitted |= stdoutReader->waitForReadyRead(0);
+ readOperationActive = stdoutReader->isReadOperationActive();
}
- if (d->stderrReader) {
- readyReadEmitted |= d->stderrReader->waitForReadyRead(0);
- readOperationActive |= d->stderrReader->isReadOperationActive();
+ if (stderrReader) {
+ readyReadEmitted |= stderrReader->waitForReadyRead(0);
+ readOperationActive |= stderrReader->isReadOperationActive();
}
if (!readOperationActive)
break;
@@ -669,7 +669,7 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
if (!pid)
return false;
if (WaitForSingleObject(pid->hProcess, 0) == WAIT_OBJECT_0) {
- bool readyReadEmitted = drainOutputPipes(this);
+ bool readyReadEmitted = drainOutputPipes();
_q_processDied();
return readyReadEmitted;
}
@@ -772,12 +772,12 @@ bool QProcessPrivate::waitForFinished(int msecs)
timer.resetIncrements();
if (!pid) {
- drainOutputPipes(this);
+ drainOutputPipes();
return true;
}
if (WaitForSingleObject(pid->hProcess, timer.nextSleepTime()) == WAIT_OBJECT_0) {
- drainOutputPipes(this);
+ drainOutputPipes();
_q_processDied();
return true;
}
diff --git a/src/corelib/io/qprocess_wince.cpp b/src/corelib/io/qprocess_wince.cpp
index 712748aa59..ad9a328133 100644
--- a/src/corelib/io/qprocess_wince.cpp
+++ b/src/corelib/io/qprocess_wince.cpp
@@ -233,6 +233,11 @@ bool QProcessPrivate::waitForStarted(int)
return false;
}
+bool QProcessPrivate::drainOutputPipes()
+{
+ return true;
+}
+
bool QProcessPrivate::waitForReadyRead(int msecs)
{
return false;
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 7dfc9b977c..04ec81e159 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -665,7 +665,7 @@ int QResourceRoot::findNode(const QString &_path, const QLocale &locale) const
qDebug() << " " << child+j << " :: " << name(child+j);
}
#endif
- const uint h = qt_hash(segment.toString());
+ const uint h = qt_hash(segment);
//do the binary search for the hash
int l = 0, r = child_count-1;
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index c71bb3afac..02e7b967ea 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3731,7 +3731,7 @@ QString QUrl::errorString() const
return QString();
QString errorSource;
- int errorPosition;
+ int errorPosition = 0;
QUrlPrivate::ErrorCode errorCode = d->validityError(&errorSource, &errorPosition);
if (errorCode == QUrlPrivate::NoError)
return QString();
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index 16f30fffd6..0284ab4830 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -159,7 +159,7 @@ template <class Key, class T> class QMap;
class Q_CORE_EXPORT QAbstractItemModel : public QObject
{
Q_OBJECT
- Q_ENUMS(LayoutChangeHints)
+ Q_ENUMS(LayoutChangeHint)
friend class QPersistentModelIndexData;
friend class QAbstractItemViewPrivate;
diff --git a/src/corelib/json/qjson.cpp b/src/corelib/json/qjson.cpp
index ed6ef74e3c..8215aeefc0 100644
--- a/src/corelib/json/qjson.cpp
+++ b/src/corelib/json/qjson.cpp
@@ -149,6 +149,10 @@ bool Data::valid() const
int Base::reserveSpace(uint dataSize, int posInTable, uint numItems, bool replace)
{
Q_ASSERT(posInTable >= 0 && posInTable <= (int)length);
+ if (size + dataSize >= Value::MaxSize) {
+ qWarning("QJson: Document too large to store in data structure %d %d %d", (uint)size, dataSize, Value::MaxSize);
+ return 0;
+ }
offset off = tableOffset;
// move table to new position
@@ -334,7 +338,7 @@ bool Value::isValid(const Base *b) const
/*!
\internal
*/
-int Value::requiredStorage(const QJsonValue &v, bool *compressed)
+int Value::requiredStorage(QJsonValue &v, bool *compressed)
{
*compressed = false;
switch (v.t) {
@@ -351,6 +355,11 @@ int Value::requiredStorage(const QJsonValue &v, bool *compressed)
}
case QJsonValue::Array:
case QJsonValue::Object:
+ if (v.d && v.d->compactionCounter) {
+ v.detach();
+ v.d->compact();
+ v.base = static_cast<QJsonPrivate::Base *>(v.d->header->root());
+ }
return v.base ? v.base->size : sizeof(QJsonPrivate::Base);
case QJsonValue::Undefined:
case QJsonValue::Null:
diff --git a/src/corelib/json/qjson_p.h b/src/corelib/json/qjson_p.h
index 96a11cd40e..7d0162938d 100644
--- a/src/corelib/json/qjson_p.h
+++ b/src/corelib/json/qjson_p.h
@@ -545,6 +545,9 @@ public:
class Value
{
public:
+ enum {
+ MaxSize = (1<<27) - 1
+ };
union {
uint _dummy;
qle_bitfield<0, 3> type;
@@ -566,7 +569,7 @@ public:
bool isValid(const Base *b) const;
- static int requiredStorage(const QJsonValue &v, bool *compressed);
+ static int requiredStorage(QJsonValue &v, bool *compressed);
static uint valueToStore(const QJsonValue &v, uint offset);
static void copyData(const QJsonValue &v, char *dest, bool compressed);
};
diff --git a/src/corelib/json/qjsonarray.cpp b/src/corelib/json/qjsonarray.cpp
index 5f1c38a752..fb8d2e83ff 100644
--- a/src/corelib/json/qjsonarray.cpp
+++ b/src/corelib/json/qjsonarray.cpp
@@ -391,9 +391,10 @@ QJsonValue QJsonArray::takeAt(int i)
void QJsonArray::insert(int i, const QJsonValue &value)
{
Q_ASSERT (i >= 0 && i <= (a ? (int)a->length : 0));
+ QJsonValue val = value;
bool compressed;
- int valueSize = QJsonPrivate::Value::requiredStorage(value, &compressed);
+ int valueSize = QJsonPrivate::Value::requiredStorage(val, &compressed);
detach(valueSize + sizeof(QJsonPrivate::Value));
@@ -401,13 +402,16 @@ void QJsonArray::insert(int i, const QJsonValue &value)
a->tableOffset = sizeof(QJsonPrivate::Array);
int valueOffset = a->reserveSpace(valueSize, i, 1, false);
+ if (!valueOffset)
+ return;
+
QJsonPrivate::Value &v = (*a)[i];
- v.type = (value.t == QJsonValue::Undefined ? QJsonValue::Null : value.t);
+ v.type = (val.t == QJsonValue::Undefined ? QJsonValue::Null : val.t);
v.latinOrIntValue = compressed;
v.latinKey = false;
- v.value = QJsonPrivate::Value::valueToStore(value, valueOffset);
+ v.value = QJsonPrivate::Value::valueToStore(val, valueOffset);
if (valueSize)
- QJsonPrivate::Value::copyData(value, (char *)a + valueOffset, compressed);
+ QJsonPrivate::Value::copyData(val, (char *)a + valueOffset, compressed);
}
/*!
@@ -437,9 +441,10 @@ void QJsonArray::insert(int i, const QJsonValue &value)
void QJsonArray::replace(int i, const QJsonValue &value)
{
Q_ASSERT (a && i >= 0 && i < (int)(a->length));
+ QJsonValue val = value;
bool compressed;
- int valueSize = QJsonPrivate::Value::requiredStorage(value, &compressed);
+ int valueSize = QJsonPrivate::Value::requiredStorage(val, &compressed);
detach(valueSize);
@@ -447,13 +452,16 @@ void QJsonArray::replace(int i, const QJsonValue &value)
a->tableOffset = sizeof(QJsonPrivate::Array);
int valueOffset = a->reserveSpace(valueSize, i, 1, true);
+ if (!valueOffset)
+ return;
+
QJsonPrivate::Value &v = (*a)[i];
- v.type = (value.t == QJsonValue::Undefined ? QJsonValue::Null : value.t);
+ v.type = (val.t == QJsonValue::Undefined ? QJsonValue::Null : val.t);
v.latinOrIntValue = compressed;
v.latinKey = false;
- v.value = QJsonPrivate::Value::valueToStore(value, valueOffset);
+ v.value = QJsonPrivate::Value::valueToStore(val, valueOffset);
if (valueSize)
- QJsonPrivate::Value::copyData(value, (char *)a + valueOffset, compressed);
+ QJsonPrivate::Value::copyData(val, (char *)a + valueOffset, compressed);
++d->compactionCounter;
if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(a->length) / 2u)
diff --git a/src/corelib/json/qjsondocument.h b/src/corelib/json/qjsondocument.h
index 4d4f3885dc..0354262e2c 100644
--- a/src/corelib/json/qjsondocument.h
+++ b/src/corelib/json/qjsondocument.h
@@ -67,7 +67,8 @@ struct Q_CORE_EXPORT QJsonParseError
IllegalUTF8String,
UnterminatedString,
MissingObject,
- DeepNesting
+ DeepNesting,
+ DocumentTooLarge
};
QString errorString() const;
diff --git a/src/corelib/json/qjsonobject.cpp b/src/corelib/json/qjsonobject.cpp
index 55c736afce..2be9d8891d 100644
--- a/src/corelib/json/qjsonobject.cpp
+++ b/src/corelib/json/qjsonobject.cpp
@@ -317,9 +317,10 @@ QJsonObject::iterator QJsonObject::insert(const QString &key, const QJsonValue &
remove(key);
return end();
}
+ QJsonValue val = value;
bool latinOrIntValue;
- int valueSize = QJsonPrivate::Value::requiredStorage(value, &latinOrIntValue);
+ int valueSize = QJsonPrivate::Value::requiredStorage(val, &latinOrIntValue);
bool latinKey = QJsonPrivate::useCompressed(key);
int valueOffset = sizeof(QJsonPrivate::Entry) + QJsonPrivate::qStringSize(key, latinKey);
@@ -335,16 +336,21 @@ QJsonObject::iterator QJsonObject::insert(const QString &key, const QJsonValue &
if (keyExists)
++d->compactionCounter;
- o->reserveSpace(requiredSize, pos, 1, keyExists);
+ uint off = o->reserveSpace(requiredSize, pos, 1, keyExists);
+ if (!off)
+ return end();
QJsonPrivate::Entry *e = o->entryAt(pos);
- e->value.type = value.t;
+ e->value.type = val.t;
e->value.latinKey = latinKey;
e->value.latinOrIntValue = latinOrIntValue;
- e->value.value = QJsonPrivate::Value::valueToStore(value, (char *)e - (char *)o + valueOffset);
+ e->value.value = QJsonPrivate::Value::valueToStore(val, (char *)e - (char *)o + valueOffset);
QJsonPrivate::copyString((char *)(e + 1), key, latinKey);
if (valueSize)
- QJsonPrivate::Value::copyData(value, (char *)e + valueOffset, latinOrIntValue);
+ QJsonPrivate::Value::copyData(val, (char *)e + valueOffset, latinOrIntValue);
+
+ if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(o->length) / 2u)
+ compact();
return iterator(this, pos);
}
diff --git a/src/corelib/json/qjsonparser.cpp b/src/corelib/json/qjsonparser.cpp
index e569cbf435..7989d18901 100644
--- a/src/corelib/json/qjsonparser.cpp
+++ b/src/corelib/json/qjsonparser.cpp
@@ -76,6 +76,7 @@ QT_BEGIN_NAMESPACE
#define JSONERR_UTERM_STR QT_TRANSLATE_NOOP("QJsonParseError", "unterminated string")
#define JSONERR_MISS_OBJ QT_TRANSLATE_NOOP("QJsonParseError", "object is missing after a comma")
#define JSONERR_DEEP_NEST QT_TRANSLATE_NOOP("QJsonParseError", "too deeply nested document")
+#define JSONERR_DOC_LARGE QT_TRANSLATE_NOOP("QJsonParseError", "too large document")
/*!
\class QJsonParseError
@@ -105,6 +106,7 @@ QT_BEGIN_NAMESPACE
\value UnterminatedString A string wasn't terminated with a quote
\value MissingObject An object was expected but couldn't be found
\value DeepNesting The JSON document is too deeply nested for the parser to parse it
+ \value DocumentTooLarge The JSON document is too large for the parser to parse it
*/
/*!
@@ -173,6 +175,9 @@ QString QJsonParseError::errorString() const
case DeepNesting:
sz = JSONERR_DEEP_NEST;
break;
+ case DocumentTooLarge:
+ sz = JSONERR_DOC_LARGE;
+ break;
}
#ifndef QT_BOOTSTRAPPED
return QCoreApplication::translate("QJsonParseError", sz);
@@ -579,6 +584,10 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
return false;
case Quote: {
val->type = QJsonValue::String;
+ if (current - baseOffset >= Value::MaxSize) {
+ lastError = QJsonParseError::DocumentTooLarge;
+ return false;
+ }
val->value = current - baseOffset;
bool latin1;
if (!parseString(&latin1))
@@ -590,6 +599,10 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
}
case BeginArray:
val->type = QJsonValue::Array;
+ if (current - baseOffset >= Value::MaxSize) {
+ lastError = QJsonParseError::DocumentTooLarge;
+ return false;
+ }
val->value = current - baseOffset;
if (!parseArray())
return false;
@@ -598,6 +611,10 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
return true;
case BeginObject:
val->type = QJsonValue::Object;
+ if (current - baseOffset >= Value::MaxSize) {
+ lastError = QJsonParseError::DocumentTooLarge;
+ return false;
+ }
val->value = current - baseOffset;
if (!parseObject())
return false;
@@ -707,6 +724,10 @@ bool Parser::parseNumber(QJsonPrivate::Value *val, int baseOffset)
int pos = reserveSpace(sizeof(double));
*(quint64 *)(data + pos) = qToLittleEndian(ui);
+ if (current - baseOffset >= Value::MaxSize) {
+ lastError = QJsonParseError::DocumentTooLarge;
+ return false;
+ }
val->value = pos - baseOffset;
val->latinOrIntValue = false;
diff --git a/src/corelib/kernel/qcorecmdlineargs_p.h b/src/corelib/kernel/qcorecmdlineargs_p.h
index 8292b21822..17a03a5b2d 100644
--- a/src/corelib/kernel/qcorecmdlineargs_p.h
+++ b/src/corelib/kernel/qcorecmdlineargs_p.h
@@ -101,11 +101,8 @@ static QVector<Char*> qWinCmdLine(Char *cmdParam, int length, int &argc)
}
}
if (*p == '\\') { // escape char?
- p++;
- if (*p == Char('\"') || *p == Char('\''))
- ; // yes
- else
- p--; // treat \ literally
+ if (*(p+1) == quote)
+ p++;
} else {
if (!quote && (*p == Char('\"') || *p == Char('\''))) { // " or ' quote
quote = *p++;
diff --git a/src/corelib/kernel/qeventdispatcher_blackberry.cpp b/src/corelib/kernel/qeventdispatcher_blackberry.cpp
index 5807683cc8..4cf1db18b4 100644
--- a/src/corelib/kernel/qeventdispatcher_blackberry.cpp
+++ b/src/corelib/kernel/qeventdispatcher_blackberry.cpp
@@ -50,6 +50,7 @@
//#define QEVENTDISPATCHERBLACKBERRY_DEBUG
#ifdef QEVENTDISPATCHERBLACKBERRY_DEBUG
+#include <QThread>
#define qEventDispatcherDebug qDebug() << QThread::currentThread()
#else
#define qEventDispatcherDebug QT_NO_QDEBUG_MACRO()
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 527a842d17..d4d2d527d4 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4288,9 +4288,13 @@ QMetaObject::Connection QObject::connectImpl(const QObject *sender, void **signa
}
int signal_index = -1;
void *args[] = { &signal_index, signal };
- senderMetaObject->static_metacall(QMetaObject::IndexOfMethod, 0, args);
- if (signal_index < 0 || signal_index >= QMetaObjectPrivate::get(senderMetaObject)->signalCount) {
- qWarning("QObject::connect: signal not found in %s", senderMetaObject->className());
+ for (; senderMetaObject && signal_index < 0; senderMetaObject = senderMetaObject->superClass()) {
+ senderMetaObject->static_metacall(QMetaObject::IndexOfMethod, 0, args);
+ if (signal_index >= 0 && signal_index < QMetaObjectPrivate::get(senderMetaObject)->signalCount)
+ break;
+ }
+ if (!senderMetaObject) {
+ qWarning("QObject::connect: signal not found in %s", sender->metaObject()->className());
slotObj->destroyIfLastRef();
return QMetaObject::Connection(0);
}
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
index 1616fb9fab..a7d52f9652 100644
--- a/src/corelib/thread/qthreadpool.cpp
+++ b/src/corelib/thread/qthreadpool.cpp
@@ -215,7 +215,7 @@ void QThreadPoolPrivate::enqueueTask(QRunnable *runnable, int priority)
// put it on the queue
QList<QPair<QRunnable *, int> >::const_iterator begin = queue.constBegin();
QList<QPair<QRunnable *, int> >::const_iterator it = queue.constEnd();
- if (it != begin && priority < (*(it - 1)).second)
+ if (it != begin && priority > (*(it - 1)).second)
it = std::upper_bound(begin, --it, priority);
queue.insert(it - begin, qMakePair(runnable, priority));
runnableReady.wakeOne();
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 07b617ee2e..d8e3a78cdf 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -3691,8 +3691,11 @@ QDataStream &operator>>(QDataStream &in, QTime &time)
*/
QDataStream &operator<<(QDataStream &out, const QDateTime &dateTime)
{
- if (out.version() >= 13) {
+ if (out.version() == 13) {
if (dateTime.isValid()) {
+ // This approach is wrong and should not be used again; it breaks
+ // the guarantee that a deserialised local datetime is the same time
+ // of day, regardless of which timezone it was serialised in.
QDateTime asUTC = dateTime.toUTC();
out << asUTC.d->date << asUTC.d->time;
} else {
@@ -3721,7 +3724,7 @@ QDataStream &operator>>(QDataStream &in, QDateTime &dateTime)
in >> dateTime.d->date >> dateTime.d->time;
- if (in.version() >= 13) {
+ if (in.version() == 13) {
qint8 ts = 0;
in >> ts;
if (dateTime.isValid()) {
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index ed756cbeb6..59e7a979dc 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -235,17 +235,16 @@ static void qt_initialize_qhash_seed()
\internal
Private copy of the implementation of the Qt 4 qHash algorithm for strings,
+ (that is, QChar-based arrays, so all QString-like classes),
to be used wherever the result is somehow stored or reused across multiple
Qt versions. The public qHash implementation can change at any time,
therefore one must not rely on the fact that it will always give the same
results.
- This function must *never* change its results.
+ The qt_hash functions must *never* change their results.
*/
-uint qt_hash(const QString &key) Q_DECL_NOTHROW
+static uint qt_hash(const QChar *p, int n) Q_DECL_NOTHROW
{
- const QChar *p = key.unicode();
- int n = key.size();
uint h = 0;
while (n--) {
@@ -256,6 +255,24 @@ uint qt_hash(const QString &key) Q_DECL_NOTHROW
return h;
}
+/*!
+ \internal
+ \overload
+*/
+uint qt_hash(const QString &key) Q_DECL_NOTHROW
+{
+ return qt_hash(key.unicode(), key.size());
+}
+
+/*!
+ \internal
+ \overload
+*/
+uint qt_hash(const QStringRef &key) Q_DECL_NOTHROW
+{
+ return qt_hash(key.unicode(), key.size());
+}
+
/*
The prime_deltas array is a table of selected prime values, even
though it doesn't look like one. The primes we are using are 1,
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 5d9238f453..e99a67d1e3 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -92,6 +92,7 @@ Q_CORE_EXPORT uint qHash(const QStringRef &key, uint seed = 0) Q_DECL_NOTHROW;
Q_CORE_EXPORT uint qHash(const QBitArray &key, uint seed = 0) Q_DECL_NOTHROW;
Q_CORE_EXPORT uint qHash(QLatin1String key, uint seed = 0) Q_DECL_NOTHROW;
Q_CORE_EXPORT uint qt_hash(const QString &key) Q_DECL_NOTHROW;
+Q_CORE_EXPORT uint qt_hash(const QStringRef &key) Q_DECL_NOTHROW;
#if defined(Q_CC_MSVC)
#pragma warning( push )
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 991cc9e170..ede783bf9e 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -695,19 +695,6 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l)
static const int locale_data_size = sizeof(locale_data)/sizeof(QLocaleData) - 1;
-const QLocaleData *QLocalePrivate::dataPointerForIndex(quint16 index)
-{
-#ifndef QT_NO_SYSTEMLOCALE
- Q_ASSERT(index <= locale_data_size);
- if (index == locale_data_size)
- return system_data;
-#else
- Q_ASSERT(index < locale_data_size);
-#endif
-
- return &locale_data[index];
-}
-
Q_GLOBAL_STATIC_WITH_ARGS(QSharedDataPointer<QLocalePrivate>, defaultLocalePrivate,
(QLocalePrivate::create(defaultData(), default_number_options)))
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index a62ee9304b..56ed6c7534 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -215,7 +215,7 @@ public:
{
QLocalePrivate *retval = new QLocalePrivate;
retval->m_data = data;
- retval->ref.store(1);
+ retval->ref.store(0);
retval->m_numberOptions = numberOptions;
return retval;
}
@@ -247,7 +247,6 @@ public:
static QLocale::Country codeToCountry(const QString &code);
static void getLangAndCountry(const QString &name, QLocale::Language &lang,
QLocale::Script &script, QLocale::Country &cntry);
- static const QLocaleData *dataPointerForIndex(quint16 index);
QLocale::MeasurementSystem measurementSystem() const;
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index bced1f4ece..ef62621386 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -1279,7 +1279,7 @@ QT_END_NAMESPACE
# ifdef QT_SHARED_POINTER_BACKTRACE_SUPPORT
# if defined(__GLIBC__) && (__GLIBC__ >= 2) && !defined(__UCLIBC__) && !defined(QT_LINUXBASE)
# define BACKTRACE_SUPPORTED
-# elif defined(Q_OS_MACX)
+# elif defined(Q_OS_MAC)
# define BACKTRACE_SUPPORTED
# endif
# endif
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index ac49bdcdf6..d8aaa929dc 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -298,12 +298,20 @@ public:
QString &vsprintf(const char *format, va_list ap)
#if defined(Q_CC_GNU) && !defined(__INSURE__)
+# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG)
+ __attribute__ ((format (gnu_printf, 2, 0)))
+# else
__attribute__ ((format (printf, 2, 0)))
+# endif
#endif
;
QString &sprintf(const char *format, ...)
#if defined(Q_CC_GNU) && !defined(__INSURE__)
+# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG)
+ __attribute__ ((format (gnu_printf, 2, 3)))
+# else
__attribute__ ((format (printf, 2, 3)))
+# endif
#endif
;
diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in
index 8ecf7ceb5c..1d947159e2 100644
--- a/src/dbus/Qt5DBusConfigExtras.cmake.in
+++ b/src/dbus/Qt5DBusConfigExtras.cmake.in
@@ -2,24 +2,30 @@
if (NOT TARGET Qt5::qdbuscpp2xml)
add_executable(Qt5::qdbuscpp2xml IMPORTED)
- set_target_properties(Qt5::qdbuscpp2xml PROPERTIES
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
- IMPORTED_LOCATION \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
!!ELSE
- IMPORTED_LOCATION \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
!!ENDIF
+ _qt5_DBus_check_file_exists(${imported_location})
+
+ set_target_properties(Qt5::qdbuscpp2xml PROPERTIES
+ IMPORTED_LOCATION ${imported_location}
)
endif()
if (NOT TARGET Qt5::qdbusxml2cpp)
add_executable(Qt5::qdbusxml2cpp IMPORTED)
- set_target_properties(Qt5::qdbusxml2cpp PROPERTIES
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
- IMPORTED_LOCATION \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
!!ELSE
- IMPORTED_LOCATION \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
!!ENDIF
+ _qt5_DBus_check_file_exists(${imported_location})
+
+ set_target_properties(Qt5::qdbusxml2cpp PROPERTIES
+ IMPORTED_LOCATION ${imported_location}
)
endif()
diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro
index 2e4119ba93..c5afe8c4d2 100644
--- a/src/dbus/dbus.pro
+++ b/src/dbus/dbus.pro
@@ -3,9 +3,7 @@ QT = core-private
CONFIG += link_pkgconfig
MODULE_CONFIG = dbusadaptors dbusinterfaces
-!isEmpty(DBUS_PATH) {
- INCLUDEPATH += $$DBUS_PATH/include
- QMAKE_LIBDIR += $$DBUS_PATH/lib
+!contains(QT_LIBS_DBUS, .*dbus-1.*) {
win32:CONFIG(debug, debug|release):QT_LIBS_DBUS += -ldbus-1d
else:QT_LIBS_DBUS += -ldbus-1
}
diff --git a/src/dbus/qdbusunixfiledescriptor.cpp b/src/dbus/qdbusunixfiledescriptor.cpp
index 53fb439887..db893337ae 100644
--- a/src/dbus/qdbusunixfiledescriptor.cpp
+++ b/src/dbus/qdbusunixfiledescriptor.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the QtDBus module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/dbus/qdbusunixfiledescriptor.h b/src/dbus/qdbusunixfiledescriptor.h
index 5e8f60817f..e8746fef41 100644
--- a/src/dbus/qdbusunixfiledescriptor.h
+++ b/src/dbus/qdbusunixfiledescriptor.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the QtDBus module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index f385fa0f6e..f1bc441009 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -7,22 +7,27 @@ set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAK
set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\")
!!ENDIF
+_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS})
+
set(Qt5Gui_OPENGL_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS})
macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
- set_target_properties(Qt5::${TargetName} PROPERTIES
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- \"IMPORTED_LOCATION_${Configuration}\" \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${LIB_LOCATION}\"
+ set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${LIB_LOCATION}\")
!!ELSE
- \"IMPORTED_LOCATION_${Configuration}\" \"$${CMAKE_LIB_DIR}${LIB_LOCATION}\"
+ set(imported_location \"$${CMAKE_LIB_DIR}${LIB_LOCATION}\")
!!ENDIF
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- \"IMPORTED_IMPLIB_${Configuration}\" \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\"
+ set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ELSE
- \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\"
+ set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF
+
+ set_target_properties(Qt5::${TargetName} PROPERTIES
+ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+ \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
)
endmacro()
@@ -53,6 +58,8 @@ if (NOT _qt5gui_OPENGL_INCLUDE_DIR)
message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"$$CMAKE_GL_INCDIRS\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\")
endif()
+_qt5_Gui_check_file_exists(${_qt5gui_OPENGL_INCLUDE_DIR})
+
list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR})
set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR})
@@ -62,7 +69,7 @@ unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)
macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
set(Qt5Gui_${Name}_LIBRARIES)
- set(Qt5Gui_EGL_INCLUDE_DIRS ${IncDirs})
+ set(Qt5Gui_${Name}_INCLUDE_DIRS ${IncDirs})
foreach(_lib ${Libs})
string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _cmake_lib_name ${_lib})
if (NOT TARGET Qt5::Gui_${_cmake_lib_name})
@@ -75,13 +82,19 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}")
!!ENDIF
if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY)
- message(FATAL_ERROR \"Failed to find \\\"${_lib}\\\" in \\\"${LibDir}\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\")
+ if (\"${ARGN}\" STREQUAL \"OPTIONAL\")
+ break()
+ else()
+ message(FATAL_ERROR \"Failed to find \\\"${_lib}\\\" in \\\"${LibDir}\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\")
+ endif()
endif()
add_library(Qt5::Gui_${_cmake_lib_name} SHARED IMPORTED)
set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${IncDirs})
set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+ _qt5_Gui_check_file_exists(\"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\")
set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_LOCATION_RELEASE \"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\")
+
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_IMPLIB_RELEASE \"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\")
!!ENDIF
@@ -91,6 +104,7 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
PATHS \"${LibDir}\" NO_DEFAULT_PATH)
if (Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG)
set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
+ _qt5_Gui_check_file_exists(\"${Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG}\")
set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_LOCATION_DEBUG \"${Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG}\")
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_IMPLIB_DEBUG \"${Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG}\")
@@ -100,11 +114,14 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
endif()
list(APPEND Qt5Gui_${Name}_LIBRARIES Qt5::Gui_${_cmake_lib_name})
endforeach()
+ foreach(_dir ${IncDirs})
+ _qt5_Gui_check_file_exists(${_dir})
+ endforeach()
endmacro()
!!IF !isEmpty(CMAKE_EGL_LIBS)
-_qt5gui_find_extra_libs(EGL \"$$CMAKE_EGL_LIBS\" \"$$CMAKE_EGL_LIBDIR\" \"$$CMAKE_EGL_INCDIRS\")
+_qt5gui_find_extra_libs(EGL \"$$CMAKE_EGL_LIBS\" \"$$CMAKE_EGL_LIBDIR\" \"$$CMAKE_EGL_INCDIRS\" OPTIONAL)
!!ENDIF
!!IF !isEmpty(CMAKE_OPENGL_LIBS)
diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf
index 74596d8a50..5073dd7f0f 100644
--- a/src/gui/doc/qtgui.qdocconf
+++ b/src/gui/doc/qtgui.qdocconf
@@ -46,4 +46,5 @@ exampledirs += ../../../examples/gui \
snippets
imagedirs += images \
- ../../../examples/gui/doc/images
+ ../../../examples/gui/doc/images \
+ ../../../doc/src/images \
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index b44f563b3e..e2dd5efcde 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -56,8 +56,10 @@ contains(QT_CONFIG, angle) {
CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2
} else {
- CMAKE_EGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_EGL)
- !isEmpty(QMAKE_LIBDIR_EGL): CMAKE_EGL_LIBDIR += $$cmakeTargetPath($$QMAKE_LIBDIR_EGL)
+ contains(QT_CONFIG, egl) {
+ CMAKE_EGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_EGL)
+ !isEmpty(QMAKE_LIBDIR_EGL): CMAKE_EGL_LIBDIR += $$cmakeTargetPath($$QMAKE_LIBDIR_EGL)
+ }
contains(QT_CONFIG, opengles1) {
!isEmpty(QMAKE_INCDIR_OPENGL_ES1): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL_ES1)
@@ -84,6 +86,6 @@ contains(QT_CONFIG, angle) {
}
}
-CMAKE_EGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_EGL)
+contains(QT_CONFIG, egl): CMAKE_EGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_EGL)
QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 85f0dc2d92..04f0da1a83 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1310,9 +1310,7 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
file, optionally manipulating the image data, before the QImage
object is converted into a QPixmap to be shown on
screen. Alternatively, if no manipulation is desired, the image
- file can be loaded directly into a QPixmap. On Windows, the
- QPixmap class also supports conversion between \c HBITMAP and
- QPixmap.
+ file can be loaded directly into a QPixmap.
QPixmap provides a collection of functions that can be used to
obtain a variety of information about the pixmap. In addition,
@@ -1410,14 +1408,9 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
QPixmap using the fromImage(). If this is too expensive an
operation, you can use QBitmap::fromImage() instead.
- In addition, on Windows, the QPixmap class supports conversion to
- and from HBITMAP: the toWinHBITMAP() function creates a HBITMAP
- equivalent to the QPixmap, based on the given HBitmapFormat, and
- returns the HBITMAP handle. The fromWinHBITMAP() function returns
- a QPixmap that is equivalent to the given bitmap which has the
- specified format. The QPixmap class also supports conversion to
- and from HICON: the toWinHICON() function creates a HICON equivalent
- to the QPixmap, and returns the HICON handle. The fromWinHICON()
+ The QPixmap class also supports conversion to and from HICON:
+ the toWinHICON() function creates a HICON equivalent to the
+ QPixmap, and returns the HICON handle. The fromWinHICON()
function returns a QPixmap that is equivalent to the given icon.
\section1 Pixmap Transformations
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 3c79e62e75..2a1d7e3bcc 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1285,6 +1285,9 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv
case QWindowSystemInterfacePrivate::WindowStateChanged:
QGuiApplicationPrivate::processWindowStateChangedEvent(static_cast<QWindowSystemInterfacePrivate::WindowStateChangedEvent *>(e));
break;
+ case QWindowSystemInterfacePrivate::WindowScreenChanged:
+ QGuiApplicationPrivate::processWindowScreenChangedEvent(static_cast<QWindowSystemInterfacePrivate::WindowScreenChangedEvent *>(e));
+ break;
case QWindowSystemInterfacePrivate::ApplicationStateChanged:
QGuiApplicationPrivate::processApplicationStateChangedEvent(static_cast<QWindowSystemInterfacePrivate::ApplicationStateChangedEvent *>(e));
break;
@@ -1655,6 +1658,16 @@ void QGuiApplicationPrivate::processWindowStateChangedEvent(QWindowSystemInterfa
}
}
+void QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent *wse)
+{
+ if (QWindow *window = wse->window.data()) {
+ if (QScreen *screen = wse->screen.data())
+ window->d_func()->setScreen(screen, false /* recreate */);
+ else // Fall back to default behavior, and try to find some appropriate screen
+ window->setScreen(0);
+ }
+}
+
void QGuiApplicationPrivate::processApplicationStateChangedEvent(QWindowSystemInterfacePrivate::ApplicationStateChangedEvent *e)
{
if (e->newState == applicationState)
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 376890ef47..cd8dfff103 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -126,6 +126,7 @@ public:
static void processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e);
static void processWindowStateChangedEvent(QWindowSystemInterfacePrivate::WindowStateChangedEvent *e);
+ static void processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent *e);
static void processApplicationStateChangedEvent(QWindowSystemInterfacePrivate::ApplicationStateChangedEvent *e);
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index a0255f610a..af3a46c675 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -55,14 +55,14 @@
#endif
#include "qvariant.h"
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
#include <QtCore/private/qcore_mac_p.h>
#include <Carbon/Carbon.h>
#endif
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
static bool qt_sequence_no_mnemonics = true;
struct MacSpecialKey {
int key;
@@ -975,7 +975,7 @@ QKeySequence::QKeySequence(const QKeySequence& keysequence)
d->ref.ref();
}
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
static inline int maybeSwapShortcut(int shortcut)
{
if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
@@ -1007,7 +1007,7 @@ QList<QKeySequence> QKeySequence::keyBindings(StandardKey key)
QKeyBinding keyBinding = QKeySequencePrivate::keyBindings[i];
if (keyBinding.standardKey == key && (keyBinding.platform & platform)) {
uint shortcut =
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
maybeSwapShortcut(QKeySequencePrivate::keyBindings[i].shortcut);
#else
QKeySequencePrivate::keyBindings[i].shortcut;
@@ -1209,7 +1209,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
if (nativeText) {
gmodifs = globalModifs();
if (gmodifs->isEmpty()) {
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
const bool dontSwap = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
if (dontSwap)
*gmodifs << QModifKeyName(Qt::META, QChar(kCommandUnicode));
@@ -1226,7 +1226,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
<< QModifKeyName(Qt::SHIFT, QLatin1String("shift+"))
<< QModifKeyName(Qt::ALT, QLatin1String("alt+"))
<< QModifKeyName(Qt::META, QLatin1String("meta+"))
- << QModifKeyName(Qt::KeypadModifier, QLatin1String("numpad+"));
+ << QModifKeyName(Qt::KeypadModifier, QLatin1String("num+"));
}
} else {
gmodifs = globalPortableModifs();
@@ -1235,7 +1235,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
<< QModifKeyName(Qt::SHIFT, QLatin1String("shift+"))
<< QModifKeyName(Qt::ALT, QLatin1String("alt+"))
<< QModifKeyName(Qt::META, QLatin1String("meta+"))
- << QModifKeyName(Qt::KeypadModifier, QLatin1String("numpad+"));
+ << QModifKeyName(Qt::KeypadModifier, QLatin1String("num+"));
}
}
if (!gmodifs) return ret;
@@ -1247,12 +1247,12 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
<< QModifKeyName(Qt::SHIFT, QCoreApplication::translate("QShortcut", "Shift").toLower().append(QLatin1Char('+')))
<< QModifKeyName(Qt::ALT, QCoreApplication::translate("QShortcut", "Alt").toLower().append(QLatin1Char('+')))
<< QModifKeyName(Qt::META, QCoreApplication::translate("QShortcut", "Meta").toLower().append(QLatin1Char('+')))
- << QModifKeyName(Qt::KeypadModifier, QCoreApplication::translate("QShortcut", "Numpad").toLower().append(QLatin1Char('+')));
+ << QModifKeyName(Qt::KeypadModifier, QCoreApplication::translate("QShortcut", "Num").toLower().append(QLatin1Char('+')));
}
modifs += *gmodifs; // Test non-translated ones last
QString sl = accel;
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
for (int i = 0; i < modifs.size(); ++i) {
const QModifKeyName &mkf = modifs.at(i);
if (sl.contains(mkf.name)) {
@@ -1304,7 +1304,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
int fnum = 0;
if (accel.length() == 1) {
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
int qtKey = qtkeyForMacSymbol(accel[0]);
if (qtKey != -1) {
ret |= qtKey;
@@ -1383,7 +1383,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
if (key == -1 || key == Qt::Key_unknown)
return s;
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (nativeText) {
// On Mac OS X the order (by default) is Meta, Alt, Shift, Control.
// If the AA_MacDontSwapCtrlAndMeta is enabled, then the order
@@ -1421,9 +1421,9 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
addKey(s, nativeText ? QCoreApplication::translate("QShortcut", "Alt") : QString::fromLatin1("Alt"), format);
if ((key & Qt::SHIFT) == Qt::SHIFT)
addKey(s, nativeText ? QCoreApplication::translate("QShortcut", "Shift") : QString::fromLatin1("Shift"), format);
- if ((key & Qt::KeypadModifier) == Qt::KeypadModifier)
- addKey(s, nativeText ? QCoreApplication::translate("QShortcut", "Numpad") : QString::fromLatin1("Numpad"), format);
}
+ if ((key & Qt::KeypadModifier) == Qt::KeypadModifier)
+ addKey(s, nativeText ? QCoreApplication::translate("QShortcut", "Num") : QString::fromLatin1("Num"), format);
key &= ~(Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier | Qt::KeypadModifier);
@@ -1441,7 +1441,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
: QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
} else if (key) {
int i=0;
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (nativeText) {
QChar ch = qt_macSymbolForQtKey(key);
if (!ch.isNull())
@@ -1451,7 +1451,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
} else
#endif
{
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
NonSymbol:
#endif
while (keyname[i].name) {
@@ -1477,7 +1477,7 @@ NonSymbol:
}
}
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (nativeText)
s += p;
else
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index df3d4dfef0..b266d31c5c 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -1120,12 +1120,14 @@ Q_GUI_EXPORT QPalette qt_fusionPalette()
fusionPalette.setBrush(QPalette::HighlightedText, hightlightedText);
fusionPalette.setBrush(QPalette::Disabled, QPalette::Text, disabledText);
+ fusionPalette.setBrush(QPalette::Disabled, QPalette::WindowText, disabledText);
+ fusionPalette.setBrush(QPalette::Disabled, QPalette::ButtonText, disabledText);
fusionPalette.setBrush(QPalette::Disabled, QPalette::Base, disabledBase);
fusionPalette.setBrush(QPalette::Disabled, QPalette::Dark, darkDisabled);
fusionPalette.setBrush(QPalette::Disabled, QPalette::Shadow, disabledShadow);
fusionPalette.setBrush(QPalette::Active, QPalette::Highlight, QColor(48, 140, 198));
- fusionPalette.setBrush(QPalette::Inactive, QPalette::Highlight, QColor(145, 141, 126));
+ fusionPalette.setBrush(QPalette::Inactive, QPalette::Highlight, QColor(48, 140, 198));
fusionPalette.setBrush(QPalette::Disabled, QPalette::Highlight, QColor(145, 141, 126));
return fusionPalette;
}
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 1e8ac60cca..d23cfde172 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -425,8 +425,7 @@ bool QPlatformWindow::startSystemResize(const QPoint &pos, Qt::Corner corner)
void QPlatformWindow::setFrameStrutEventsEnabled(bool enabled)
{
- if (enabled)
- qWarning("This plugin does not support frame strut events.");
+ Q_UNUSED(enabled) // Do not warn as widgets enable it by default causing warnings with XCB.
}
/*!
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 0dd85f2d56..eff057c4cb 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -345,6 +345,25 @@ void QWindowPrivate::updateVisibility()
emit q->visibilityChanged(visibility);
}
+void QWindowPrivate::setScreen(QScreen *newScreen, bool recreate)
+{
+ Q_Q(QWindow);
+ if (newScreen != q->screen()) {
+ const bool shouldRecreate = recreate && platformWindow != 0;
+ if (shouldRecreate)
+ q->destroy();
+ if (screen)
+ q->disconnect(screen, SIGNAL(destroyed(QObject*)), q, SLOT(screenDestroyed(QObject*)));
+ screen = newScreen;
+ if (newScreen) {
+ q->connect(screen, SIGNAL(destroyed(QObject*)), q, SLOT(screenDestroyed(QObject*)));
+ if (shouldRecreate)
+ q->create();
+ }
+ emit q->screenChanged(newScreen);
+ }
+}
+
/*!
Sets the \a surfaceType of the window.
@@ -1384,6 +1403,7 @@ void QWindow::setFramePosition(const QPoint &point)
if (d->platformWindow) {
d->platformWindow->setGeometry(QRect(point, size()));
} else {
+ d->positionAutomatic = false;
d->geometry.moveTopLeft(point);
}
}
@@ -1568,20 +1588,7 @@ void QWindow::setScreen(QScreen *newScreen)
Q_D(QWindow);
if (!newScreen)
newScreen = QGuiApplication::primaryScreen();
- if (newScreen != screen()) {
- const bool wasCreated = d->platformWindow != 0;
- if (wasCreated)
- destroy();
- if (d->screen)
- disconnect(d->screen, SIGNAL(destroyed(QObject*)), this, SLOT(screenDestroyed(QObject*)));
- d->screen = newScreen;
- if (newScreen) {
- connect(d->screen, SIGNAL(destroyed(QObject*)), this, SLOT(screenDestroyed(QObject*)));
- if (wasCreated)
- create();
- }
- emit screenChanged(newScreen);
- }
+ d->setScreen(newScreen, true /* recreate */);
}
void QWindow::screenDestroyed(QObject *object)
@@ -1896,9 +1903,11 @@ bool QWindow::event(QEvent *ev)
case QEvent::Close: {
Q_D(QWindow);
bool wasVisible = isVisible();
- destroy();
- if (wasVisible)
- d->maybeQuitOnLastWindowClosed();
+ if (ev->isAccepted()) {
+ destroy();
+ if (wasVisible)
+ d->maybeQuitOnLastWindowClosed();
+ }
break; }
case QEvent::Expose:
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 79f90f2c62..efdfd497a6 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -330,6 +330,7 @@ protected:
virtual void showEvent(QShowEvent *);
virtual void hideEvent(QHideEvent *);
+ // TODO Qt 6 - add closeEvent virtual handler
virtual bool event(QEvent *);
virtual void keyPressEvent(QKeyEvent *);
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index ea2cb722ab..f43c1ea8ec 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -127,6 +127,8 @@ public:
void updateVisibility();
void _q_clearAlert();
+ void setScreen(QScreen *newScreen, bool recreate);
+
QWindow::SurfaceType surfaceType;
Qt::WindowFlags windowFlags;
QWindow *parentWindow;
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 7dc1e7f7e5..6fc63fe96c 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -126,6 +126,13 @@ void QWindowSystemInterface::handleWindowStateChanged(QWindow *tlw, Qt::WindowSt
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
}
+void QWindowSystemInterface::handleWindowScreenChanged(QWindow *tlw, QScreen *screen)
+{
+ QWindowSystemInterfacePrivate::WindowScreenChangedEvent *e =
+ new QWindowSystemInterfacePrivate::WindowScreenChangedEvent(tlw, screen);
+ QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
+}
+
void QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState newState)
{
Q_ASSERT(QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ApplicationState));
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index 521c2a4941..b0327701bb 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -138,6 +138,7 @@ public:
static void handleWindowActivated(QWindow *w, Qt::FocusReason r = Qt::OtherFocusReason);
static void handleWindowStateChanged(QWindow *w, Qt::WindowState newState);
+ static void handleWindowScreenChanged(QWindow *w, QScreen *newScreen);
static void handleApplicationStateChanged(Qt::ApplicationState newState);
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index a6ea15c5f2..c4968f8ca6 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -91,7 +91,8 @@ public:
PlatformPanel = UserInputEvent | 0x17,
ContextMenu = UserInputEvent | 0x18,
ApplicationStateChanged = 0x19,
- FlushEvents = 0x20
+ FlushEvents = 0x20,
+ WindowScreenChanged = 0x21
};
class WindowSystemEvent {
@@ -158,6 +159,16 @@ public:
Qt::WindowState newState;
};
+ class WindowScreenChangedEvent : public WindowSystemEvent {
+ public:
+ WindowScreenChangedEvent(QWindow *w, QScreen *s)
+ : WindowSystemEvent(WindowScreenChanged), window(w), screen(s)
+ { }
+
+ QPointer<QWindow> window;
+ QPointer<QScreen> screen;
+ };
+
class ApplicationStateChangedEvent : public WindowSystemEvent {
public:
ApplicationStateChangedEvent(Qt::ApplicationState newState)
diff --git a/src/gui/opengl/qopenglfunctions_1_0.cpp b/src/gui/opengl/qopenglfunctions_1_0.cpp
index 84db0f2d65..b618dcb5cf 100644
--- a/src/gui/opengl/qopenglfunctions_1_0.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_0.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_1_0
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_1_0 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_1_1.cpp b/src/gui/opengl/qopenglfunctions_1_1.cpp
index b4860bcec7..bf032b5cf9 100644
--- a/src/gui/opengl/qopenglfunctions_1_1.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_1.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_1_1
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_1_1 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_1_2.cpp b/src/gui/opengl/qopenglfunctions_1_2.cpp
index 064980bebe..2b14900680 100644
--- a/src/gui/opengl/qopenglfunctions_1_2.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_2.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_1_2
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_1_2 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_1_3.cpp b/src/gui/opengl/qopenglfunctions_1_3.cpp
index ace7507e35..94605f8638 100644
--- a/src/gui/opengl/qopenglfunctions_1_3.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_3.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_1_3
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_1_3 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_1_4.cpp b/src/gui/opengl/qopenglfunctions_1_4.cpp
index a27b81d6d8..e3035eeb55 100644
--- a/src/gui/opengl/qopenglfunctions_1_4.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_4.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_1_4
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_1_4 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_1_5.cpp b/src/gui/opengl/qopenglfunctions_1_5.cpp
index ceb004b02c..581ed14aac 100644
--- a/src/gui/opengl/qopenglfunctions_1_5.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_5.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_1_5
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_1_5 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_2_0.cpp b/src/gui/opengl/qopenglfunctions_2_0.cpp
index 15c042177d..2736d4a030 100644
--- a/src/gui/opengl/qopenglfunctions_2_0.cpp
+++ b/src/gui/opengl/qopenglfunctions_2_0.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_2_0
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_2_0 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_2_1.cpp b/src/gui/opengl/qopenglfunctions_2_1.cpp
index 143ac206ed..ed94131e33 100644
--- a/src/gui/opengl/qopenglfunctions_2_1.cpp
+++ b/src/gui/opengl/qopenglfunctions_2_1.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_2_1
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_2_1 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_3_0.cpp b/src/gui/opengl/qopenglfunctions_3_0.cpp
index e13122e683..e80235b957 100644
--- a/src/gui/opengl/qopenglfunctions_3_0.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_0.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_3_0
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_3_0 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_3_1.cpp b/src/gui/opengl/qopenglfunctions_3_1.cpp
index 104029177c..ab48658bfc 100644
--- a/src/gui/opengl/qopenglfunctions_3_1.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_1.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_3_1
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_3_1 class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp
index f808f2e6dd..171b7454f4 100644
--- a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_3_2_Compatibility
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_3_2_Compatibility class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_3_2_core.cpp b/src/gui/opengl/qopenglfunctions_3_2_core.cpp
index 0e1af4c28b..48dec29962 100644
--- a/src/gui/opengl/qopenglfunctions_3_2_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_2_core.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_3_2_Core
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_3_2_Core class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp
index aa53b7d03b..8bebc7d0bc 100644
--- a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_3_3_Compatibility
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_3_3_Compatibility class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_3_3_core.cpp b/src/gui/opengl/qopenglfunctions_3_3_core.cpp
index d355a466c1..941f9c38b6 100644
--- a/src/gui/opengl/qopenglfunctions_3_3_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_3_core.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_3_3_Core
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_3_3_Core class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp
index af5d3eccc1..7ab0688084 100644
--- a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_4_0_Compatibility
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_4_0_Compatibility class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_4_0_core.cpp b/src/gui/opengl/qopenglfunctions_4_0_core.cpp
index b018531b37..a4bf66a44b 100644
--- a/src/gui/opengl/qopenglfunctions_4_0_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_0_core.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_4_0_Core
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_4_0_Core class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp
index 27c90adc5a..a0ea4a052a 100644
--- a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_4_1_Compatibility
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_4_1_Compatibility class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp
index a415b24f33..6d19fff92b 100644
--- a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_4_2_Compatibility
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_4_2_Compatibility class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_4_2_core.cpp b/src/gui/opengl/qopenglfunctions_4_2_core.cpp
index 3600c20a41..51ba3e8097 100644
--- a/src/gui/opengl/qopenglfunctions_4_2_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_2_core.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_4_2_Core
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_4_2_Core class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
index 75bcef1562..de6cc185c6 100644
--- a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_4_3_Compatibility
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_4_3_Compatibility class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_4_3_core.cpp b/src/gui/opengl/qopenglfunctions_4_3_core.cpp
index bfe1bcc9c4..29fc8368aa 100644
--- a/src/gui/opengl/qopenglfunctions_4_3_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_3_core.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_4_3_Core
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_4_3_Core class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglfunctions_es2.cpp b/src/gui/opengl/qopenglfunctions_es2.cpp
index afac017d53..20a4b50994 100644
--- a/src/gui/opengl/qopenglfunctions_es2.cpp
+++ b/src/gui/opengl/qopenglfunctions_es2.cpp
@@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_ES2
\inmodule QtGui
\since 5.1
+ \wrapper
\brief The QOpenGLFunctions_ES2 class provides all functions for OpenGL ES 2
\sa QAbstractOpenGLFunctions
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 555c47f265..0782e42531 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -226,9 +226,17 @@ void QOpenGL2PaintEngineExPrivate::updateBrushTexture()
if (currentBrushPixmap.width() > max_texture_size || currentBrushPixmap.height() > max_texture_size)
currentBrushPixmap = currentBrushPixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
+#if defined(QT_OPENGL_ES_2)
+ // OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead,
+ // we emulate GL_REPEAT by only taking the fractional part of the texture coords
+ // in the qopenglslTextureBrushSrcFragmentShader program.
+ GLuint wrapMode = GL_CLAMP_TO_EDGE;
+#else
+ GLuint wrapMode = GL_REPEAT;
+#endif
funcs.glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
QOpenGLTextureCache::cacheForContext(ctx)->bindTexture(ctx, currentBrushPixmap);
- updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
+ updateTextureFilter(GL_TEXTURE_2D, wrapMode, q->state()->renderHints & QPainter::SmoothPixmapTransform);
textureInvertedY = false;
}
brushTextureDirty = false;
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 651949192b..3084c8c4c9 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -6034,6 +6034,7 @@ void qInitDrawhelperAsm()
const uint features = qCpuFeatures();
if (false) {
+ Q_UNUSED(features);
#ifdef QT_COMPILER_SUPPORTS_AVX
} else if (features & AVX) {
qt_memfill32 = qt_memfill32_avx;
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index ac4589df40..aa175c2d65 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -374,7 +374,7 @@ void QPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDraw
\value CoreGraphics Mac OS X's Quartz2D (CoreGraphics)
\value QuickDraw Mac OS X's QuickDraw
\value QWindowSystem Qt for Embedded Linux
- \value PostScript
+ \value PostScript (No longer supported)
\value OpenGL
\value Picture QPicture format
\value SVG Scalable Vector Graphics XML format
diff --git a/src/gui/painting/qpaintengine.h b/src/gui/painting/qpaintengine.h
index b3e3762cc8..b4dec2929d 100644
--- a/src/gui/painting/qpaintengine.h
+++ b/src/gui/painting/qpaintengine.h
@@ -196,7 +196,7 @@ public:
Windows,
QuickDraw, CoreGraphics, MacPrinter,
QWindowSystem,
- PostScript,
+ PostScript, // ### Qt 6: Remove, update documentation
OpenGL,
Picture,
SVG,
@@ -253,7 +253,6 @@ private:
#ifndef QT_NO_QWS_QPF2
friend class QFontEngineQPF;
#endif
- friend class QPSPrintEngine;
friend class QMacPrintEngine;
friend class QMacPrintEnginePrivate;
friend class QFontEngineQPA;
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index a123c147a2..66a4a43cba 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3078,7 +3078,8 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
drawCachedGlyphs(glyphs.size(), glyphs.constData(), positions.constData(), ti.fontEngine);
- } else if (matrix.type() < QTransform::TxProject) {
+ } else if (matrix.type() < QTransform::TxProject
+ && ti.fontEngine->supportsTransformation(matrix)) {
bool invertible;
QTransform invMat = matrix.inverted(&invertible);
if (!invertible)
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index e42b70427c..d950c4e45f 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -5727,17 +5727,20 @@ void QPainter::drawStaticText(const QPointF &topLeftPosition, const QStaticText
staticText_d->needsRelayout = true;
}
- // If we don't have an extended paint engine, or if the painter is projected,
- // we go through standard code path
- if (d->extended == 0 || !d->state->matrix.isAffine()) {
- staticText_d->paintText(topLeftPosition, this);
- return;
- }
-
QFontEngine *fe = staticText_d->font.d->engineForScript(QChar::Script_Common);
if (fe->type() == QFontEngine::Multi)
fe = static_cast<QFontEngineMulti *>(fe)->engine(0);
+ // If we don't have an extended paint engine, if the painter is projected,
+ // or if the font engine does not support the matrix, we go through standard
+ // code path
+ if (d->extended == 0
+ || !d->state->matrix.isAffine()
+ || !fe->supportsTransformation(d->state->matrix)) {
+ staticText_d->paintText(topLeftPosition, this);
+ return;
+ }
+
bool engineRequiresPretransform = d->extended->requiresPretransformedGlyphPositions(fe, d->state->matrix);
if (staticText_d->untransformedCoordinates && engineRequiresPretransform) {
// The coordinates are untransformed, and the engine can't deal with that
diff --git a/src/gui/painting/qrgb.h b/src/gui/painting/qrgb.h
index d7a01840e8..3c2bc5b97a 100644
--- a/src/gui/painting/qrgb.h
+++ b/src/gui/painting/qrgb.h
@@ -52,31 +52,31 @@ typedef unsigned int QRgb; // RGB triplet
// non-namespaced Qt global variable
const Q_DECL_UNUSED QRgb RGB_MASK = 0x00ffffff; // masks RGB values
-inline int qRed(QRgb rgb) // get red part of RGB
+inline Q_DECL_CONSTEXPR int qRed(QRgb rgb) // get red part of RGB
{ return ((rgb >> 16) & 0xff); }
-inline int qGreen(QRgb rgb) // get green part of RGB
+inline Q_DECL_CONSTEXPR int qGreen(QRgb rgb) // get green part of RGB
{ return ((rgb >> 8) & 0xff); }
-inline int qBlue(QRgb rgb) // get blue part of RGB
+inline Q_DECL_CONSTEXPR int qBlue(QRgb rgb) // get blue part of RGB
{ return (rgb & 0xff); }
-inline int qAlpha(QRgb rgb) // get alpha part of RGBA
+inline Q_DECL_CONSTEXPR int qAlpha(QRgb rgb) // get alpha part of RGBA
{ return rgb >> 24; }
-inline QRgb qRgb(int r, int g, int b)// set RGB value
+inline Q_DECL_CONSTEXPR QRgb qRgb(int r, int g, int b)// set RGB value
{ return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
-inline QRgb qRgba(int r, int g, int b, int a)// set RGBA value
+inline Q_DECL_CONSTEXPR QRgb qRgba(int r, int g, int b, int a)// set RGBA value
{ return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
-inline int qGray(int r, int g, int b)// convert R,G,B to gray 0..255
+inline Q_DECL_CONSTEXPR int qGray(int r, int g, int b)// convert R,G,B to gray 0..255
{ return (r*11+g*16+b*5)/32; }
-inline int qGray(QRgb rgb) // convert RGB to gray 0..255
+inline Q_DECL_CONSTEXPR int qGray(QRgb rgb) // convert RGB to gray 0..255
{ return qGray(qRed(rgb), qGreen(rgb), qBlue(rgb)); }
-inline bool qIsGray(QRgb rgb)
+inline Q_DECL_CONSTEXPR bool qIsGray(QRgb rgb)
{ return qRed(rgb) == qGreen(rgb) && qRed(rgb) == qBlue(rgb); }
QT_END_NAMESPACE
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index 24a1c4c7c3..6d36f7839b 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -285,7 +285,6 @@ private:
friend class QFontInfo;
friend class QPainter;
friend class QPainterPrivate;
- friend class QPSPrintEngineFont;
friend class QApplication;
friend class QWidget;
friend class QWidgetPrivate;
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index f0f8713f74..855f0099ff 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -411,8 +411,6 @@ public:
virtual void setFallbackFamiliesList(const QStringList &) {}
protected:
- friend class QPSPrintEnginePrivate;
- friend class QPSPrintEngineFontMulti;
friend class QRawFont;
virtual void loadEngine(int at) = 0;
virtual void ensureFallbackFamiliesQueried() {}
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index ad3d2bb813..160d66c96c 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -858,11 +858,11 @@ QRect QFontMetrics::tightBoundingRect(const QString &text) const
The \a flags argument is optional and currently only supports
Qt::TextShowMnemonic as value.
- The elide mark will follow the \l{Qt::LayoutDirection}{layout
- direction}; it will be on the right side of the text for
- right-to-left layouts, and on the left side for right-to-left
- layouts. Note that this behavior is independent of the text
- language.
+ The elide mark follows the \l{Qt::LayoutDirection}{layoutdirection}.
+ For example, it will be on the right side of the text for right-to-left
+ layouts if the \a mode is \c{Qt::ElideLeft}, and on the left side of the
+ text if the \a mode is \c{Qt::ElideRight}.
+
*/
QString QFontMetrics::elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags) const
{
@@ -1643,13 +1643,18 @@ QRectF QFontMetricsF::tightBoundingRect(const QString &text) const
Otherwise, returns the original string.
The \a mode parameter specifies whether the text is elided on the
- left (e.g., "...tech"), in the middle (e.g., "Tr...ch"), or on
- the right (e.g., "Trol...").
+ left (for example, "...tech"), in the middle (for example, "Tr...ch"), or
+ on the right (for example, "Trol...").
The \a width is specified in pixels, not characters.
The \a flags argument is optional and currently only supports
Qt::TextShowMnemonic as value.
+
+ The elide mark follows the \l{Qt::LayoutDirection}{layoutdirection}.
+ For example, it will be on the right side of the text for right-to-left
+ layouts if the \a mode is \c{Qt::ElideLeft}, and on the left side of the
+ text if the \a mode is \c{Qt::ElideRight}.
*/
QString QFontMetricsF::elidedText(const QString &text, Qt::TextElideMode mode, qreal width, int flags) const
{
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 4902a42cd7..6156f56ae1 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -1425,7 +1425,20 @@ void QTextDocumentLayoutPrivate::drawListItem(const QPointF &offset, QPainter *p
qreal xoff = fontMetrics.width(QLatin1Char(' '));
if (dir == Qt::LeftToRight)
xoff = -xoff - size.width();
- r.translate( xoff, (fontMetrics.height() / 2 - size.height() / 2));
+ r.translate( xoff, (fontMetrics.height() / 2) - (size.height() / 2));
+
+ // Prevent clipping the left side of the list decorator (on left to
+ // right layouts) and clipping the right side of the list
+ // decorator (on right to left layouts).
+ if ((r.left() < 0) && (dir == Qt::LeftToRight)) {
+ int horizontalOffset = -r.left();
+ r.translate(horizontalOffset, 0);
+ layout->setPosition(layout->position() + QPointF(horizontalOffset, 0));
+ } else if ((r.right() > document->pageSize().width()) && (dir == Qt::RightToLeft)) {
+ int horizontalOffset = r.right() - document->pageSize().width();
+ r.translate(-horizontalOffset, 0);
+ layout->setPosition(layout->position() - QPointF(horizontalOffset, 0));
+ }
painter->save();
diff --git a/src/gui/text/qtextlayout.h b/src/gui/text/qtextlayout.h
index 8a26fed924..cbe42c3844 100644
--- a/src/gui/text/qtextlayout.h
+++ b/src/gui/text/qtextlayout.h
@@ -188,7 +188,6 @@ private:
Q_DISABLE_COPY(QTextLayout)
friend class QPainter;
- friend class QPSPrinter;
friend class QGraphicsSimpleTextItemPrivate;
friend class QGraphicsSimpleTextItem;
friend void qt_format_text(const QFont &font, const QRectF &_r, int tf, const QTextOption *, const QString& str,
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 402bdeba24..13fd167f80 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -82,7 +82,7 @@ Q_GLOBAL_STATIC(QNetworkAccessFtpBackendFactory, ftpBackend)
Q_GLOBAL_STATIC(QNetworkAccessDebugPipeBackendFactory, debugpipeBackend)
#endif
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
#include <CoreServices/CoreServices.h>
#include <SystemConfiguration/SystemConfiguration.h>
@@ -1326,7 +1326,7 @@ void QNetworkAccessManagerPrivate::authenticationRequired(QAuthenticator *authen
}
#ifndef QT_NO_NETWORKPROXY
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
//now we try to get the username and password from keychain
//if not successful signal will be emitted
QString username;
diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp
index 40df5835b1..f47638db86 100644
--- a/src/network/kernel/qnetworkinterface.cpp
+++ b/src/network/kernel/qnetworkinterface.cpp
@@ -555,7 +555,7 @@ QNetworkInterface QNetworkInterface::interfaceFromIndex(int index)
/*!
Returns a listing of all the network interfaces found on the host
- machine.
+ machine. In case of failure it returns a list with zero elements.
*/
QList<QNetworkInterface> QNetworkInterface::allInterfaces()
{
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 6415c69936..4b839749d5 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -78,7 +78,7 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
#define kSecTrustSettingsDomainSystem 2 // so we do not need to include the header file
PtrSecCertificateGetData QSslSocketPrivate::ptrSecCertificateGetData = 0;
PtrSecTrustSettingsCopyCertificates QSslSocketPrivate::ptrSecTrustSettingsCopyCertificates = 0;
@@ -489,7 +489,7 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
#ifndef QT_NO_LIBRARY
//load symbols needed to receive certificates from system store
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
QLibrary securityLib("/System/Library/Frameworks/Security.framework/Versions/Current/Security");
if (securityLib.load()) {
ptrSecCertificateGetData = (PtrSecCertificateGetData) securityLib.resolve("SecCertificateGetData");
@@ -623,7 +623,7 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
timer.start();
#endif
QList<QSslCertificate> systemCerts;
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
CFArrayRef cfCerts;
OSStatus status = 1;
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index d1d79ae09c..9369dab8e7 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -78,7 +78,7 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
typedef OSStatus (*PtrSecCertificateGetData)(SecCertificateRef, CSSM_DATA_PTR);
typedef OSStatus (*PtrSecTrustSettingsCopyCertificates)(int, CFArrayRef*);
typedef OSStatus (*PtrSecTrustCopyAnchorCertificates)(CFArrayRef*);
@@ -145,7 +145,7 @@ public:
static void addDefaultCaCertificate(const QSslCertificate &cert);
static void addDefaultCaCertificates(const QList<QSslCertificate> &certs);
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
static PtrSecCertificateGetData ptrSecCertificateGetData;
static PtrSecTrustSettingsCopyCertificates ptrSecTrustSettingsCopyCertificates;
static PtrSecTrustCopyAnchorCertificates ptrSecTrustCopyAnchorCertificates;
diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri
index f5afb43759..1d8c8e1ab7 100644
--- a/src/network/ssl/ssl.pri
+++ b/src/network/ssl/ssl.pri
@@ -41,11 +41,7 @@ contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
LIBS_PRIVATE += $$OPENSSL_LIBS_RELEASE
}
+ QMAKE_CXXFLAGS += $$OPENSSL_CFLAGS
LIBS_PRIVATE += $$OPENSSL_LIBS
windows:LIBS += -lcrypt32
-
- !isEmpty(OPENSSL_PATH) {
- INCLUDEPATH += $$OPENSSL_PATH/include
- QMAKE_LIBDIR += $$OPENSSL_PATH/lib
- }
}
diff --git a/src/opengl/doc/qtopengl.qdocconf b/src/opengl/doc/qtopengl.qdocconf
index eea618d8ea..e76a23844b 100644
--- a/src/opengl/doc/qtopengl.qdocconf
+++ b/src/opengl/doc/qtopengl.qdocconf
@@ -9,8 +9,6 @@ project = QtOpenGL
# Images should be placed in <rootdir>/dic/images and examples in
# <rootdir>/examples.
# Paths are relative to the location of this file.
-exampledirs += ../../../examples/dbus \
- snippets
headerdirs += ..
sourcedirs += .. \
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index def0470622..72c6e035d9 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -4090,11 +4090,12 @@ QImage QGLWidget::grabFrameBuffer(bool withAlpha)
{
makeCurrent();
QImage res;
- int w = width();
- int h = height();
+ qreal pixelRatio = devicePixelRatio();
+ int w = pixelRatio * width();
+ int h = pixelRatio * height();
if (format().rgba())
res = qt_gl_read_frame_buffer(QSize(w, h), format().alpha(), withAlpha);
-
+ res.setDevicePixelRatio(pixelRatio);
return res;
}
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 9a58beb3d7..ff9baf8971 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -132,6 +132,7 @@ class Q_OPENGL_EXPORT QGLWidgetPrivate : public QWidgetPrivate
public:
QGLWidgetPrivate() : QWidgetPrivate()
, disable_clear_on_painter_begin(false)
+ , parent_changing(false)
{
}
@@ -142,7 +143,7 @@ public:
bool renderCxPm(QPixmap *pixmap);
void cleanupColormaps();
void aboutToDestroy() {
- if (glcx)
+ if (glcx && !parent_changing)
glcx->reset();
}
@@ -153,6 +154,7 @@ public:
QGLColormap cmap;
bool disable_clear_on_painter_begin;
+ bool parent_changing;
};
// QGLContextPrivate has the responsibility of creating context groups.
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp
index f3388ee5ef..6e698bf939 100644
--- a/src/opengl/qgl_qpa.cpp
+++ b/src/opengl/qgl_qpa.cpp
@@ -362,6 +362,15 @@ void QGLWidgetPrivate::cleanupColormaps()
bool QGLWidget::event(QEvent *e)
{
+ Q_D(QGLWidget);
+
+ // A re-parent will destroy the window and re-create it. We should not reset the context while it happens.
+ if (e->type() == QEvent::ParentAboutToChange)
+ d->parent_changing = true;
+
+ if (e->type() == QEvent::ParentChange)
+ d->parent_changing = false;
+
return QWidget::event(e);
}
diff --git a/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp b/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp
index 5dcd6a4ffd..c33b684d50 100644
--- a/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp
+++ b/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp
@@ -101,6 +101,7 @@ void qt_mac_remove_socket_from_runloop(const CFSocketRef socket, CFRunLoopSource
QCFSocketNotifier::QCFSocketNotifier()
:eventDispatcher(0)
+, maybeCancelWaitForMoreEvents(0)
{
}
diff --git a/src/platformsupport/cglconvenience/cglconvenience.pri b/src/platformsupport/cglconvenience/cglconvenience.pri
index f5e3d543ec..0e86ddb208 100644
--- a/src/platformsupport/cglconvenience/cglconvenience.pri
+++ b/src/platformsupport/cglconvenience/cglconvenience.pri
@@ -7,5 +7,5 @@ mac:!ios {
OBJECTIVE_SOURCES += \
$$PWD/cglconvenience.mm
- LIBS += -framework Cocoa -framework OpenGL
+ LIBS_PRIVATE += -framework Cocoa -framework OpenGL
}
diff --git a/src/platformsupport/devicediscovery/devicediscovery.pri b/src/platformsupport/devicediscovery/devicediscovery.pri
index 9faf6f24dd..9a58eeedfe 100644
--- a/src/platformsupport/devicediscovery/devicediscovery.pri
+++ b/src/platformsupport/devicediscovery/devicediscovery.pri
@@ -5,7 +5,7 @@ linux:contains(QT_CONFIG, evdev) {
SOURCES += $$PWD/qdevicediscovery_udev.cpp
INCLUDEPATH += $$QMAKE_INCDIR_LIBUDEV
- LIBS += $$QMAKE_LIBS_LIBUDEV
+ LIBS_PRIVATE += $$QMAKE_LIBS_LIBUDEV
} else {
SOURCES += $$PWD/qdevicediscovery_static.cpp
}
diff --git a/src/platformsupport/dnd/qsimpledrag.cpp b/src/platformsupport/dnd/qsimpledrag.cpp
index 587e70b0f3..f2ff177055 100644
--- a/src/platformsupport/dnd/qsimpledrag.cpp
+++ b/src/platformsupport/dnd/qsimpledrag.cpp
@@ -140,7 +140,6 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
QKeyEvent *ke = static_cast<QKeyEvent *>(e);
if (ke->key() == Qt::Key_Escape && e->type() == QEvent::KeyPress) {
cancel();
- resetDndState(true);
disableEventFilter();
exitDndEventLoop();
@@ -154,13 +153,10 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
case QEvent::MouseButtonRelease:
disableEventFilter();
-
if (canDrop()) {
drop(static_cast<QMouseEvent *>(e));
- resetDndState(false);
} else {
cancel();
- resetDndState(true);
}
exitDndEventLoop();
return true; // Eat all mouse events
@@ -195,7 +191,7 @@ Qt::DropAction QBasicDrag::drag(QDrag *o)
return m_executed_drop_action;
}
-void QBasicDrag::resetDndState(bool /* deleteSource */)
+void QBasicDrag::restoreCursor()
{
if (m_restoreCursor) {
#ifndef QT_NO_CURSOR
@@ -227,6 +223,7 @@ void QBasicDrag::endDrag()
void QBasicDrag::cancel()
{
disableEventFilter();
+ restoreCursor();
m_drag_icon_window->setVisible(false);
}
@@ -239,6 +236,7 @@ void QBasicDrag::move(const QMouseEvent *)
void QBasicDrag::drop(const QMouseEvent *)
{
disableEventFilter();
+ restoreCursor();
m_drag_icon_window->setVisible(false);
}
diff --git a/src/platformsupport/dnd/qsimpledrag_p.h b/src/platformsupport/dnd/qsimpledrag_p.h
index b2d4191b89..10237b36d7 100644
--- a/src/platformsupport/dnd/qsimpledrag_p.h
+++ b/src/platformsupport/dnd/qsimpledrag_p.h
@@ -88,7 +88,7 @@ protected:
private:
void enableEventFilter();
void disableEventFilter();
- void resetDndState(bool deleteSource);
+ void restoreCursor();
void exitDndEventLoop();
bool m_restoreCursor;
diff --git a/src/platformsupport/fbconvenience/qfbbackingstore.cpp b/src/platformsupport/fbconvenience/qfbbackingstore.cpp
index 2a481835e2..b378434ef2 100644
--- a/src/platformsupport/fbconvenience/qfbbackingstore.cpp
+++ b/src/platformsupport/fbconvenience/qfbbackingstore.cpp
@@ -51,7 +51,10 @@ QT_BEGIN_NAMESPACE
QFbBackingStore::QFbBackingStore(QWindow *window)
: QPlatformBackingStore(window)
{
- (static_cast<QFbWindow *>(window->handle()))->setBackingStore(this);
+ if (window->handle())
+ (static_cast<QFbWindow *>(window->handle()))->setBackingStore(this);
+ else
+ (static_cast<QFbScreen *>(window->screen()->handle()))->addBackingStore(this);
}
QFbBackingStore::~QFbBackingStore()
diff --git a/src/platformsupport/fbconvenience/qfbscreen.cpp b/src/platformsupport/fbconvenience/qfbscreen.cpp
index 6427b62972..e5b9f09c14 100644
--- a/src/platformsupport/fbconvenience/qfbscreen.cpp
+++ b/src/platformsupport/fbconvenience/qfbscreen.cpp
@@ -71,6 +71,19 @@ void QFbScreen::initializeCompositor()
void QFbScreen::addWindow(QFbWindow *window)
{
mWindowStack.prepend(window);
+ if (!mBackingStores.isEmpty()) {
+ //check if we have a backing store for this window
+ for (int i = 0; i < mBackingStores.size(); ++i) {
+ QFbBackingStore *bs = mBackingStores.at(i);
+ // this gets called during QWindow::create() at a point where the
+ // invariant (window->handle()->window() == window) is broken
+ if (bs->window() == window->window()) {
+ window->setBackingStore(bs);
+ mBackingStores.removeAt(i);
+ break;
+ }
+ }
+ }
invalidateRectCache();
setDirty(window->geometry());
QWindow *w = topWindow();
diff --git a/src/platformsupport/fbconvenience/qfbscreen_p.h b/src/platformsupport/fbconvenience/qfbscreen_p.h
index c7106358d9..01a352e96a 100644
--- a/src/platformsupport/fbconvenience/qfbscreen_p.h
+++ b/src/platformsupport/fbconvenience/qfbscreen_p.h
@@ -51,6 +51,7 @@ QT_BEGIN_NAMESPACE
class QFbWindow;
class QFbCursor;
class QPainter;
+class QFbBackingStore;
class QFbScreen : public QObject, public QPlatformScreen
{
@@ -74,6 +75,8 @@ public:
virtual void lower(QFbWindow *window);
virtual void topWindowChanged(QWindow *) {}
+ void addBackingStore(QFbBackingStore *bs) {mBackingStores << bs;}
+
public slots:
virtual void setDirty(const QRect &rect);
void setPhysicalSize(const QSize &size);
@@ -102,6 +105,7 @@ private:
QPainter *mCompositePainter;
QList<QPair<QRect, int> > mCachedRects;
+ QList <QFbBackingStore*> mBackingStores;
friend class QFbWindow;
bool mIsUpToDate;
diff --git a/src/platformsupport/fontdatabases/basic/basic.pri b/src/platformsupport/fontdatabases/basic/basic.pri
index 6b5f6d0cb8..88be809cd8 100644
--- a/src/platformsupport/fontdatabases/basic/basic.pri
+++ b/src/platformsupport/fontdatabases/basic/basic.pri
@@ -1,5 +1,4 @@
DEFINES += QT_NO_FONTCONFIG
-QT += gui-private core-private
HEADERS += \
$$PWD/qbasicfontdatabase_p.h \
diff --git a/src/platformsupport/fontdatabases/mac/coretext.pri b/src/platformsupport/fontdatabases/mac/coretext.pri
index d1abf123aa..f67f00672a 100644
--- a/src/platformsupport/fontdatabases/mac/coretext.pri
+++ b/src/platformsupport/fontdatabases/mac/coretext.pri
@@ -3,8 +3,8 @@ OBJECTIVE_SOURCES += $$PWD/qfontengine_coretext.mm $$PWD/qcoretextfontdatabase.m
ios: \
# On iOS CoreText and CoreGraphics are stand-alone frameworks
- LIBS += -framework CoreText -framework CoreGraphics
+ LIBS_PRIVATE += -framework CoreText -framework CoreGraphics
else: \
# On Mac OS they are part of the ApplicationServices umbrella framework,
# even in 10.8 where they were also made available stand-alone.
- LIBS += -framework ApplicationServices
+ LIBS_PRIVATE += -framework ApplicationServices
diff --git a/src/platformsupport/glxconvenience/glxconvenience.pri b/src/platformsupport/glxconvenience/glxconvenience.pri
index 3632f45b54..d325f5adf9 100644
--- a/src/platformsupport/glxconvenience/glxconvenience.pri
+++ b/src/platformsupport/glxconvenience/glxconvenience.pri
@@ -1,6 +1,6 @@
contains(QT_CONFIG,xlib):contains(QT_CONFIG,xrender) {
contains(QT_CONFIG,opengl):!contains(QT_CONFIG,opengles2) {
- LIBS += $$QMAKE_LIBS_X11 -lXrender
+ LIBS_PRIVATE += $$QMAKE_LIBS_X11 -lXrender
HEADERS += $$PWD/qglxconvenience_p.h
SOURCES += $$PWD/qglxconvenience.cpp
}
diff --git a/src/platformsupport/input/evdevkeyboard/evdevkeyboard.pri b/src/platformsupport/input/evdevkeyboard/evdevkeyboard.pri
index 1797f48d04..c058498ba0 100644
--- a/src/platformsupport/input/evdevkeyboard/evdevkeyboard.pri
+++ b/src/platformsupport/input/evdevkeyboard/evdevkeyboard.pri
@@ -8,5 +8,5 @@ SOURCES += \
$$PWD/qevdevkeyboardmanager.cpp
contains(QT_CONFIG, libudev) {
- LIBS += $$QMAKE_LIBS_LIBUDEV
+ LIBS_PRIVATE += $$QMAKE_LIBS_LIBUDEV
}
diff --git a/src/platformsupport/input/evdevmouse/evdevmouse.pri b/src/platformsupport/input/evdevmouse/evdevmouse.pri
index 16b456683d..7e7a9e1629 100644
--- a/src/platformsupport/input/evdevmouse/evdevmouse.pri
+++ b/src/platformsupport/input/evdevmouse/evdevmouse.pri
@@ -7,6 +7,6 @@ SOURCES += \
$$PWD/qevdevmousemanager.cpp
contains(QT_CONFIG, libudev) {
- LIBS += $$QMAKE_LIBS_LIBUDEV
+ LIBS_PRIVATE += $$QMAKE_LIBS_LIBUDEV
}
diff --git a/src/platformsupport/input/evdevtablet/evdevtablet.pri b/src/platformsupport/input/evdevtablet/evdevtablet.pri
index 02b04d2e05..5ace0df61d 100644
--- a/src/platformsupport/input/evdevtablet/evdevtablet.pri
+++ b/src/platformsupport/input/evdevtablet/evdevtablet.pri
@@ -5,5 +5,5 @@ SOURCES += \
$$PWD/qevdevtablet.cpp
contains(QT_CONFIG, libudev) {
- LIBS += $$QMAKE_LIBS_LIBUDEV
+ LIBS_PRIVATE += $$QMAKE_LIBS_LIBUDEV
}
diff --git a/src/platformsupport/input/evdevtouch/evdevtouch.pri b/src/platformsupport/input/evdevtouch/evdevtouch.pri
index 64c4b9afd9..a6b90937f2 100644
--- a/src/platformsupport/input/evdevtouch/evdevtouch.pri
+++ b/src/platformsupport/input/evdevtouch/evdevtouch.pri
@@ -5,7 +5,7 @@ SOURCES += \
$$PWD/qevdevtouch.cpp
contains(QT_CONFIG, libudev) {
- LIBS += $$QMAKE_LIBS_LIBUDEV
+ LIBS_PRIVATE += $$QMAKE_LIBS_LIBUDEV
}
# DEFINES += USE_MTDEV
diff --git a/src/platformsupport/jniconvenience/jniconvenience.pri b/src/platformsupport/jniconvenience/jniconvenience.pri
index ca7c5b1e96..30c672e6ba 100644
--- a/src/platformsupport/jniconvenience/jniconvenience.pri
+++ b/src/platformsupport/jniconvenience/jniconvenience.pri
@@ -1,6 +1,4 @@
android:!android-no-sdk {
- QT += gui-private
-
HEADERS += $$PWD/qjnihelpers_p.h \
$$PWD/qjniobject_p.h
diff --git a/src/platformsupport/linuxaccessibility/linuxaccessibility.pri b/src/platformsupport/linuxaccessibility/linuxaccessibility.pri
index 2721002ea5..1b65fb1cad 100644
--- a/src/platformsupport/linuxaccessibility/linuxaccessibility.pri
+++ b/src/platformsupport/linuxaccessibility/linuxaccessibility.pri
@@ -1,6 +1,6 @@
contains(QT_CONFIG, accessibility-atspi-bridge) {
- QT += dbus
+ QT_FOR_PRIVATE += dbus
include(../../3rdparty/atspi2/atspi2.pri)
INCLUDEPATH += $$PWD
diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro
index 0566e9d3ec..4cb1f2c1bf 100644
--- a/src/platformsupport/platformsupport.pro
+++ b/src/platformsupport/platformsupport.pro
@@ -2,9 +2,7 @@ TARGET = QtPlatformSupport
QT = core-private gui-private
CONFIG += static internal_module
-mac:LIBS += -lz
-
-load(qt_module)
+mac:LIBS_PRIVATE += -lz
DEFINES += QT_NO_CAST_FROM_ASCII
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
@@ -23,3 +21,5 @@ include(services/services.pri)
include(themes/themes.pri)
include(linuxaccessibility/linuxaccessibility.pri)
include(jniconvenience/jniconvenience.pri)
+
+load(qt_module)
diff --git a/src/plugins/platforminputcontexts/compose/compose.pro b/src/plugins/platforminputcontexts/compose/compose.pro
index 6387a47a4c..2490a4ffbe 100644
--- a/src/plugins/platforminputcontexts/compose/compose.pro
+++ b/src/plugins/platforminputcontexts/compose/compose.pro
@@ -15,6 +15,17 @@ SOURCES += $$PWD/main.cpp \
HEADERS += $$PWD/qcomposeplatforminputcontext.h \
$$PWD/generator/qtablegenerator.h \
- $$PWD/xkbcommon_workaround.h \
+
+# libxkbcommon
+contains(QT_CONFIG, xkbcommon-qt): {
+ include(../../../3rdparty/xkbcommon.pri)
+} else {
+ LIBS += $$QMAKE_LIBS_XKBCOMMON
+ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XKBCOMMON
+ equals(QMAKE_VERSION_XKBCOMMON, "0.2.0") {
+ DEFINES += XKBCOMMON_0_2_0
+ INCLUDEPATH += ../../../3rdparty/xkbcommon/xkbcommon/
+ }
+}
OTHER_FILES += $$PWD/compose.json
diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
index 400f7aece8..f746207cc0 100644
--- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
+++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
@@ -49,7 +49,10 @@
#include <QtCore/QString>
#include <xkbcommon/xkbcommon.h>
+
+#ifdef XKBCOMMON_0_2_0
#include <xkbcommon_workaround.h>
+#endif
//#define DEBUG_GENERATOR
@@ -258,6 +261,7 @@ ushort TableGenerator::keysymToUtf8(quint32 sym)
int bytes;
chars.resize(8);
+#ifdef XKBCOMMON_0_2_0
if (needWorkaround(sym)) {
quint32 codepoint;
if (sym == XKB_KEY_KP_Space)
@@ -269,6 +273,9 @@ ushort TableGenerator::keysymToUtf8(quint32 sym)
} else {
bytes = xkb_keysym_to_utf8(sym, chars.data(), chars.size());
}
+#else
+ bytes = xkb_keysym_to_utf8(sym, chars.data(), chars.size());
+#endif
if (bytes == -1)
qWarning("TableGenerator::keysymToUtf8 - buffer too small");
diff --git a/src/plugins/platforminputcontexts/platforminputcontexts.pro b/src/plugins/platforminputcontexts/platforminputcontexts.pro
index fb58de5edc..733b70be58 100644
--- a/src/plugins/platforminputcontexts/platforminputcontexts.pro
+++ b/src/plugins/platforminputcontexts/platforminputcontexts.pro
@@ -4,7 +4,7 @@ qtHaveModule(dbus) {
!mac:!win32:SUBDIRS += ibus maliit
}
-unix:!macx:contains(QT_CONFIG, xkbcommon): {
+unix:!macx:!contains(DEFINES, QT_NO_XKBCOMMON): {
SUBDIRS += compose
}
diff --git a/src/plugins/platforms/android/src/opengl/qeglfshooks_android.cpp b/src/plugins/platforms/android/src/opengl/qeglfshooks_android.cpp
index 005758d83d..5a35310111 100644
--- a/src/plugins/platforms/android/src/opengl/qeglfshooks_android.cpp
+++ b/src/plugins/platforms/android/src/opengl/qeglfshooks_android.cpp
@@ -62,6 +62,7 @@ public:
EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
void destroyNativeWindow(EGLNativeWindowType window);
bool hasCapability(QPlatformIntegration::Capability cap) const;
+ QEglFSCursor *createCursor(QEglFSScreen *screen) const;
};
void QEglFSAndroidHooks::platformInit()
@@ -134,6 +135,12 @@ QSurfaceFormat QEglFSAndroidHooks::surfaceFormatFor(const QSurfaceFormat &inputF
return ret;
}
+QEglFSCursor *QEglFSAndroidHooks::createCursor(QEglFSScreen *screen) const
+{
+ Q_UNUSED(screen);
+ return 0;
+}
+
static QEglFSAndroidHooks eglFSAndroidHooks;
QEglFSHooks *platformHooks = &eglFSAndroidHooks;
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 7320fc11e6..95fe9129d3 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -100,11 +100,23 @@ static void cleanupCocoaApplicationDelegate()
- (id)init
{
self = [super init];
- if (self)
+ if (self) {
inLaunch = true;
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(updateScreens:)
+ name:NSApplicationDidChangeScreenParametersNotification
+ object:NSApp];
+ }
return self;
}
+- (void)updateScreens:(NSNotification *)notification
+{
+ if (QCocoaIntegration *ci = dynamic_cast<QCocoaIntegration *>(QGuiApplicationPrivate::platformIntegration()))
+ ci->updateScreens();
+}
+
- (void)dealloc
{
sharedCocoaApplicationDelegate = nil;
@@ -114,6 +126,8 @@ static void cleanupCocoaApplicationDelegate()
[NSApp setDelegate:reflectionDelegate];
[reflectionDelegate release];
}
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+
[super dealloc];
}
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
index d4673baaef..3dee137038 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
@@ -133,18 +133,6 @@ void QCocoaGLContext::setActiveWindow(QWindow *window)
cocoaWindow->setCurrentContext(this);
[(QNSView *) cocoaWindow->contentView() setQCocoaGLContext:this];
-
- // Enable high-dpi OpenGL for retina displays. Enabling has the side
- // effect that Cooca will start calling glViewport(0, 0, width, height),
- // overriding any glViewport calls in application code. This is usually not a
- // problem, except if the applcation wants to have a "custom" viewport.
- // (like the hellogl example)
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
- if (cocoaWindow->devicePixelRatio() > 1)
- [cocoaWindow->contentView() setWantsBestResolutionOpenGLSurface:YES];
- }
-#endif
}
void QCocoaGLContext::doneCurrent()
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h
index 6e690dd51e..7831888da1 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.h
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.h
@@ -125,6 +125,7 @@ public:
QList<int> possibleKeys(const QKeyEvent *event) const;
void updateScreens();
+ QCocoaScreen *screenAtIndex(int index) const { return mScreens.at(index); }
private:
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 50d68f8311..987520f307 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -352,6 +352,7 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
case BufferQueueingOpenGL:
case WindowMasks:
case MultipleWindows:
+ case ForeignWindows:
return true;
default:
return QPlatformIntegration::hasCapability(cap);
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm
index 0a98819d16..df0ef390c9 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenu.mm
@@ -98,6 +98,16 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaMenuDelegate);
return self;
}
+
+- (void)menu:(NSMenu*)menu willHighlightItem:(NSMenuItem*)item
+{
+ Q_UNUSED(menu);
+ if (item && [item tag]) {
+ QCocoaMenuItem *cocoaItem = reinterpret_cast<QCocoaMenuItem *>([item tag]);
+ cocoaItem->hovered();
+ }
+}
+
- (void) menuWillOpen:(NSMenu*)m
{
Q_UNUSED(m);
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 5d1600dba6..47341e2262 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -118,7 +118,7 @@ static bool isMouseEvent(NSEvent *ev)
// Windows with a transient parent (such as combobox popup windows)
// cannot become the main window:
- if (m_cocoaPlatformWindow && m_cocoaPlatformWindow->window()->transientParent())
+ if (!m_cocoaPlatformWindow || m_cocoaPlatformWindow->window()->transientParent())
canBecomeMain = NO;
return canBecomeMain;
@@ -159,7 +159,8 @@ static bool isMouseEvent(NSEvent *ev)
return NO;
// Only tool or dialog windows should become key:
- if (m_cocoaPlatformWindow->window()->type() == Qt::Tool || m_cocoaPlatformWindow->window()->type() == Qt::Dialog)
+ if (m_cocoaPlatformWindow
+ && (m_cocoaPlatformWindow->window()->type() == Qt::Tool || m_cocoaPlatformWindow->window()->type() == Qt::Dialog))
return YES;
return NO;
}
@@ -195,6 +196,8 @@ const int QCocoaWindow::NoAlertRequest = -1;
QCocoaWindow::QCocoaWindow(QWindow *tlw)
: QPlatformWindow(tlw)
+ , m_contentView(nil)
+ , m_qtView(nil)
, m_nsWindow(0)
, m_contentViewIsEmbedded(false)
, m_contentViewIsToBeEmbedded(false)
@@ -215,8 +218,23 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
#endif
QCocoaAutoReleasePool pool;
- m_qtView = [[QNSView alloc] initWithQWindow:tlw platformWindow:this];
- m_contentView = m_qtView;
+ if (tlw->type() == Qt::ForeignWindow) {
+ NSView *foreignView = (NSView *)WId(tlw->property("_q_foreignWinId").value<WId>());
+ setContentView(foreignView);
+ } else {
+ m_qtView = [[QNSView alloc] initWithQWindow:tlw platformWindow:this];
+ m_contentView = m_qtView;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+ // Enable high-dpi OpenGL for retina displays. Enabling has the side
+ // effect that Cocoa will start calling glViewport(0, 0, width, height),
+ // overriding any glViewport calls in application code. This is usually not a
+ // problem, except if the appilcation wants to have a "custom" viewport.
+ // (like the hellogl example)
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7
+ && tlw->surfaceType() == QSurface::OpenGLSurface)
+ [m_contentView setWantsBestResolutionOpenGLSurface:YES];
+#endif
+ }
setGeometry(tlw->geometry());
recreateWindow(parent());
tlw->setGeometry(geometry());
@@ -258,8 +276,7 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect)
if (m_nsWindow) {
NSRect bounds = qt_mac_flipRect(rect, window());
- [m_nsWindow setContentSize : bounds.size];
- [m_nsWindow setFrameOrigin : bounds.origin];
+ [m_nsWindow setFrame:[m_nsWindow frameRectForContentRect:bounds] display:YES animate:NO];
} else {
[m_contentView setFrame : NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height())];
}
@@ -308,6 +325,8 @@ void QCocoaWindow::setVisible(bool visible)
exposeWindow();
if (m_nsWindow) {
+ QWindowSystemInterface::flushWindowSystemEvents();
+
// setWindowState might have been called while the window was hidden and
// will not change the NSWindow state in that case. Sync up here:
syncWindowState(window()->windowState());
@@ -349,11 +368,22 @@ void QCocoaWindow::setVisible(bool visible)
QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher));
cocoaEventDispatcherPrivate->endModalSession(window());
m_hasModalSession = false;
+
+ [m_nsWindow orderOut:m_nsWindow];
+ if (m_nsWindow == [NSApp keyWindow] && !cocoaEventDispatcherPrivate->currentModalSession()) {
+ // Probably because we call runModalSession: outside [NSApp run] in QCocoaEventDispatcher
+ // (e.g., when show()-ing a modal QDialog instead of exec()-ing it), it can happen that
+ // the current NSWindow is still key after being ordered out. Then, after checking we
+ // don't have any other modal session left, it's safe to make the main window key again.
+ NSWindow *mainWindow = [NSApp mainWindow];
+ if (mainWindow && [mainWindow canBecomeKeyWindow])
+ [mainWindow makeKeyWindow];
+ }
} else {
if ([m_nsWindow isSheet])
[NSApp endSheet:m_nsWindow];
+ [m_nsWindow orderOut:m_nsWindow];
}
- [m_nsWindow orderOut:m_nsWindow];
} else {
[m_contentView setHidden:YES];
}
@@ -446,8 +476,6 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
NSInteger level = this->windowLevel(flags);
[m_nsWindow setStyleMask:styleMask];
[m_nsWindow setLevel:level];
- [m_nsWindow setIgnoresMouseEvents:((flags & Qt::ToolTip) == Qt::ToolTip) ? YES : NO];
- // TODO deal with WindowTransparentForInput; setIgnoresMouseEvents is too extreme, you can't click the titlebar
setWindowShadow(flags);
}
@@ -784,8 +812,10 @@ NSWindow * QCocoaWindow::createNSWindow()
// before the window is shown and needs a proper window.).
if ((type & Qt::Popup) == Qt::Popup)
[window setHasShadow:YES];
- else
+ else {
setWindowShadow(flags);
+ [window setHidesOnDeactivate: NO];
+ }
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
@@ -987,7 +1017,8 @@ QWindow *QCocoaWindow::childWindowAt(QPoint windowPoint)
if (QWindow *childWindow = qobject_cast<QWindow *>(child)) {
if (childWindow->geometry().contains(windowPoint)) {
QCocoaWindow* platformWindow = static_cast<QCocoaWindow*>(childWindow->handle());
- targetWindow = platformWindow->childWindowAt(windowPoint - childWindow->position());
+ if (platformWindow->isExposed())
+ targetWindow = platformWindow->childWindowAt(windowPoint - childWindow->position());
}
}
}
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h
index 67b16b4b32..85f72a4dbb 100644
--- a/src/plugins/platforms/cocoa/qnsview.h
+++ b/src/plugins/platforms/cocoa/qnsview.h
@@ -69,6 +69,8 @@ QT_END_NAMESPACE
bool m_sendUpAsRightButton;
Qt::KeyboardModifiers currentWheelModifiers;
bool m_subscribesForGlobalFrameNotifications;
+ QCocoaGLContext *m_glContext;
+ bool m_shouldSetGLContextinDrawRect;
}
- (id)init;
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index c114ab20d0..42117a64a1 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -58,6 +58,7 @@
#include <private/qguiapplication_p.h>
#include "qcocoabackingstore.h"
#include "qcocoaglcontext.h"
+#include "qcocoaintegration.h"
#ifdef QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
#include <accessibilityinspector.h>
@@ -85,6 +86,8 @@ static QTouchDevice *touchDevice = 0;
m_buttons = Qt::NoButton;
m_sendKeyEvent = false;
m_subscribesForGlobalFrameNotifications = false;
+ m_glContext = 0;
+ m_shouldSetGLContextinDrawRect = false;
currentCustomDragTypes = 0;
m_sendUpAsRightButton = false;
@@ -150,7 +153,13 @@ static QTouchDevice *touchDevice = 0;
- (void) setQCocoaGLContext:(QCocoaGLContext *)context
{
- [context->nsOpenGLContext() setView:self];
+ m_glContext = context;
+ [m_glContext->nsOpenGLContext() setView:self];
+ if (![m_glContext->nsOpenGLContext() view]) {
+ //was unable to set view
+ m_shouldSetGLContextinDrawRect = true;
+ }
+
if (!m_subscribesForGlobalFrameNotifications) {
// NSOpenGLContext expects us to repaint (or update) the view when
// it changes position on screen. Since this happens unnoticed for
@@ -268,6 +277,15 @@ static QTouchDevice *touchDevice = 0;
m_platformWindow->obscureWindow();
} else if ([notificationName isEqualToString: @"NSWindowDidOrderOnScreenAndFinishAnimatingNotification"]) {
m_platformWindow->exposeWindow();
+ } else if (notificationName == NSWindowDidChangeScreenNotification) {
+ if (m_window) {
+ QCocoaIntegration *ci = static_cast<QCocoaIntegration *>(QGuiApplicationPrivate::platformIntegration());
+ NSUInteger screenIndex = [[NSScreen screens] indexOfObject:self.window.screen];
+ if (screenIndex != NSNotFound) {
+ QCocoaScreen *cocoaScreen = ci->screenAtIndex(screenIndex);
+ QWindowSystemInterface::handleWindowScreenChanged(m_window, cocoaScreen->screen());
+ }
+ }
} else {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
@@ -344,6 +362,11 @@ static QTouchDevice *touchDevice = 0;
- (void) drawRect:(NSRect)dirtyRect
{
+ if (m_glContext && m_shouldSetGLContextinDrawRect) {
+ [m_glContext->nsOpenGLContext() setView:self];
+ m_shouldSetGLContextinDrawRect = false;
+ }
+
if (!m_backingStore)
return;
@@ -1304,14 +1327,17 @@ static QTouchDevice *touchDevice = 0;
QCocoaDropData mimeData([sender draggingPasteboard]);
response = QWindowSystemInterface::handleDrop(m_window, &mimeData, qt_windowPoint, qtAllowed);
}
+ if (response.isAccepted()) {
+ QCocoaDrag* nativeDrag = static_cast<QCocoaDrag *>(QGuiApplicationPrivate::platformIntegration()->drag());
+ nativeDrag->setAcceptedAction(response.acceptedAction());
+ }
return response.isAccepted();
}
- (void)draggedImage:(NSImage*) img endedAt:(NSPoint) point operation:(NSDragOperation) operation
{
Q_UNUSED(img);
- QCocoaDrag* nativeDrag = static_cast<QCocoaDrag *>(QGuiApplicationPrivate::platformIntegration()->drag());
- nativeDrag->setAcceptedAction(qt_mac_mapNSDragOperation(operation));
+ Q_UNUSED(operation);
// keep our state, and QGuiApplication state (buttons member) in-sync,
// or future mouse events will be processed incorrectly
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.h b/src/plugins/platforms/cocoa/qnswindowdelegate.h
index a5b46a971f..9a616ba8e8 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.h
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.h
@@ -55,7 +55,7 @@
- (void)windowDidResize:(NSNotification *)notification;
- (void)windowDidMove:(NSNotification *)notification;
-- (void)windowWillClose:(NSNotification *)notification;
+- (void)windowWillMove:(NSNotification *)notification;
- (BOOL)windowShouldClose:(NSNotification *)notification;
@end
diff --git a/src/plugins/platforms/eglfs/eglfs.pri b/src/plugins/platforms/eglfs/eglfs.pri
index eb66e17479..44455ed3d8 100644
--- a/src/plugins/platforms/eglfs/eglfs.pri
+++ b/src/plugins/platforms/eglfs/eglfs.pri
@@ -7,7 +7,7 @@ DEFINES += MESA_EGL_NO_X11_HEADERS
#To test the hooks on x11 (xlib), comment the above define too
#EGLFS_PLATFORM_HOOKS_SOURCES += qeglfshooks_x11.cpp
-#LIBS += -lX11
+#LIBS += -lX11 -lX11-xcb -lxcb
SOURCES += $$PWD/qeglfsintegration.cpp \
$$PWD/qeglfswindow.cpp \
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
index 5c264834b3..91a97ff977 100644
--- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
+++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include "qeglfshooks.h"
+#include "qeglfscursor.h"
#include <fcntl.h>
#include <unistd.h>
@@ -249,8 +250,7 @@ bool QEglFSHooks::hasCapability(QPlatformIntegration::Capability cap) const
QEglFSCursor *QEglFSHooks::createCursor(QEglFSScreen *screen) const
{
- Q_UNUSED(screen);
- return 0;
+ return new QEglFSCursor(screen);
}
void QEglFSHooks::waitForVSync() const
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp b/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp
index f44107e830..0d8be66438 100644
--- a/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp
+++ b/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp
@@ -41,13 +41,36 @@
#include "qeglfshooks.h"
+#include <qpa/qwindowsysteminterface.h>
+#include <QThread>
+
#include <X11/Xlib.h>
+#include <X11/Xlib-xcb.h>
+#include <xcb/xcb.h>
QT_BEGIN_NAMESPACE
+class EventReader : public QThread
+{
+public:
+ EventReader(xcb_connection_t *connection)
+ : m_connection(connection)
+ {
+ }
+
+ void run();
+
+ xcb_connection_t *connection() { return m_connection; }
+
+private:
+ xcb_connection_t *m_connection;
+};
+
class QEglFSX11Hooks : public QEglFSHooks
{
public:
+ QEglFSX11Hooks() : m_eventReader(0) {}
+
virtual void platformInit();
virtual void platformDestroy();
virtual EGLNativeDisplayType platformDisplay() const;
@@ -55,20 +78,151 @@ public:
virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
virtual void destroyNativeWindow(EGLNativeWindowType window);
virtual bool hasCapability(QPlatformIntegration::Capability cap) const;
+
+private:
+ void sendConnectionEvent(xcb_atom_t a);
+
+ EventReader *m_eventReader;
+ xcb_connection_t *m_connection;
+ xcb_window_t m_connectionEventListener;
};
static Display *display = 0;
+QAtomicInt running;
+
+static Qt::MouseButtons translateMouseButtons(int s)
+{
+ Qt::MouseButtons ret = 0;
+ if (s & XCB_BUTTON_MASK_1)
+ ret |= Qt::LeftButton;
+ if (s & XCB_BUTTON_MASK_2)
+ ret |= Qt::MidButton;
+ if (s & XCB_BUTTON_MASK_3)
+ ret |= Qt::RightButton;
+ return ret;
+}
+
+static Qt::MouseButton translateMouseButton(xcb_button_t s)
+{
+ switch (s) {
+ case 1: return Qt::LeftButton;
+ case 2: return Qt::MidButton;
+ case 3: return Qt::RightButton;
+ // Button values 4-7 were already handled as Wheel events, and won't occur here.
+ case 8: return Qt::BackButton; // Also known as Qt::ExtraButton1
+ case 9: return Qt::ForwardButton; // Also known as Qt::ExtraButton2
+ case 10: return Qt::ExtraButton3;
+ case 11: return Qt::ExtraButton4;
+ case 12: return Qt::ExtraButton5;
+ case 13: return Qt::ExtraButton6;
+ case 14: return Qt::ExtraButton7;
+ case 15: return Qt::ExtraButton8;
+ case 16: return Qt::ExtraButton9;
+ case 17: return Qt::ExtraButton10;
+ case 18: return Qt::ExtraButton11;
+ case 19: return Qt::ExtraButton12;
+ case 20: return Qt::ExtraButton13;
+ case 21: return Qt::ExtraButton14;
+ case 22: return Qt::ExtraButton15;
+ case 23: return Qt::ExtraButton16;
+ case 24: return Qt::ExtraButton17;
+ case 25: return Qt::ExtraButton18;
+ case 26: return Qt::ExtraButton19;
+ case 27: return Qt::ExtraButton20;
+ case 28: return Qt::ExtraButton21;
+ case 29: return Qt::ExtraButton22;
+ case 30: return Qt::ExtraButton23;
+ case 31: return Qt::ExtraButton24;
+ default: return Qt::NoButton;
+ }
+}
+
+void EventReader::run()
+{
+ Qt::MouseButtons buttons;
+
+ xcb_generic_event_t *event;
+ while (running.load() && (event = xcb_wait_for_event(m_connection))) {
+ uint response_type = event->response_type & ~0x80;
+ switch (response_type) {
+ case XCB_BUTTON_PRESS: {
+ xcb_button_press_event_t *press = (xcb_button_press_event_t *)event;
+ QPoint p(press->event_x, press->event_y);
+ buttons = (buttons & ~0x7) | translateMouseButtons(press->state);
+ buttons |= translateMouseButton(press->detail);
+ QWindowSystemInterface::handleMouseEvent(0, press->time, p, p, buttons);
+ break;
+ }
+ case XCB_BUTTON_RELEASE: {
+ xcb_button_release_event_t *release = (xcb_button_release_event_t *)event;
+ QPoint p(release->event_x, release->event_y);
+ buttons = (buttons & ~0x7) | translateMouseButtons(release->state);
+ buttons &= ~translateMouseButton(release->detail);
+ QWindowSystemInterface::handleMouseEvent(0, release->time, p, p, buttons);
+ break;
+ }
+ case XCB_MOTION_NOTIFY: {
+ xcb_motion_notify_event_t *motion = (xcb_motion_notify_event_t *)event;
+ QPoint p(motion->event_x, motion->event_y);
+ QWindowSystemInterface::handleMouseEvent(0, motion->time, p, p, buttons);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+}
+
+void QEglFSX11Hooks::sendConnectionEvent(xcb_atom_t a)
+{
+ xcb_client_message_event_t event;
+ memset(&event, 0, sizeof(event));
+
+ event.response_type = XCB_CLIENT_MESSAGE;
+ event.format = 32;
+ event.sequence = 0;
+ event.window = m_connectionEventListener;
+ event.type = a;
+
+ xcb_send_event(m_connection, false, m_connectionEventListener, XCB_EVENT_MASK_NO_EVENT, (const char *)&event);
+ xcb_flush(m_connection);
+}
+
void QEglFSX11Hooks::platformInit()
{
display = XOpenDisplay(NULL);
if (!display)
qFatal("Could not open display");
+ XSetEventQueueOwner(display, XCBOwnsEventQueue);
+
+ running.ref();
+
+ m_connection = XGetXCBConnection(display);
+
+ xcb_screen_iterator_t it = xcb_setup_roots_iterator(xcb_get_setup(m_connection));
+
+ m_connectionEventListener = xcb_generate_id(m_connection);
+ xcb_create_window(m_connection, XCB_COPY_FROM_PARENT,
+ m_connectionEventListener, it.data->root,
+ 0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_ONLY,
+ it.data->root_visual, 0, 0);
+
+ m_eventReader = new EventReader(m_connection);
+ m_eventReader->start();
}
void QEglFSX11Hooks::platformDestroy()
{
+ running.deref();
+
+ sendConnectionEvent(XCB_ATOM_NONE);
+
XCloseDisplay(display);
+
+ m_eventReader->wait();
+ delete m_eventReader;
+ m_eventReader = 0;
}
EGLNativeDisplayType QEglFSX11Hooks::platformDisplay() const
@@ -91,10 +245,12 @@ EGLNativeWindowType QEglFSX11Hooks::createNativeWindow(const QSize &size, const
Window root = DefaultRootWindow(display);
XSetWindowAttributes swa;
memset(&swa, 0, sizeof(swa));
- Window win = XCreateWindow(display, root, 0, 0, size.width(), size.height(), 0, CopyFromParent,
- InputOutput, CopyFromParent, CWEventMask, &swa);
+ swa.event_mask = ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ButtonMotionMask;
+ Window win = XCreateWindow(display, root, 0, 0, size.width(), size.height(), 0, CopyFromParent,
+ InputOutput, CopyFromParent, CWEventMask, &swa);
XMapWindow(display, win);
XStoreName(display, win, "EGLFS");
+
return win;
}
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
index 615b69f7d9..cf1503b7f9 100644
--- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
@@ -53,7 +53,7 @@
#include <QtPlatformSupport/private/qeglplatformcontext_p.h>
#include <QtPlatformSupport/private/qeglpbuffer_p.h>
-#if !defined(QT_NO_EVDEV) && !defined(Q_OS_ANDROID)
+#if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
#include <QtPlatformSupport/private/qevdevmousemanager_p.h>
#include <QtPlatformSupport/private/qevdevkeyboardmanager_p.h>
#include <QtPlatformSupport/private/qevdevtouch_p.h>
@@ -79,7 +79,7 @@ QEglFSIntegration::QEglFSIntegration()
{
QGuiApplicationPrivate::instance()->setEventDispatcher(mEventDispatcher);
-#if !defined(QT_NO_EVDEV) && !defined(Q_OS_ANDROID)
+#if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString() /* spec */, this);
new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString() /* spec */, this);
new QEvdevTouchScreenHandlerThread(QString() /* spec */, this);
diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/qeglfsscreen.cpp
index e104bd7f2b..6cb1f88c66 100644
--- a/src/plugins/platforms/eglfs/qeglfsscreen.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsscreen.cpp
@@ -55,12 +55,8 @@ QEglFSScreen::QEglFSScreen(EGLDisplay dpy)
#endif
static int hideCursor = qgetenv("QT_QPA_EGLFS_HIDECURSOR").toInt();
- if (!hideCursor) {
- if (QEglFSCursor *customCursor = QEglFSHooks::hooks()->createCursor(this))
- m_cursor = customCursor;
- else
- m_cursor = new QEglFSCursor(this);
- }
+ if (!hideCursor)
+ m_cursor = QEglFSHooks::hooks()->createCursor(this);
}
QEglFSScreen::~QEglFSScreen()
diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm
index 807c75df54..735dd26b6d 100644
--- a/src/plugins/platforms/ios/qioscontext.mm
+++ b/src/plugins/platforms/ios/qioscontext.mm
@@ -156,6 +156,9 @@ GLuint QIOSContext::defaultFramebufferObject(QPlatformSurface *surface) const
if (framebufferObject.renderbufferWidth != platformWindow->effectiveWidth() ||
framebufferObject.renderbufferHeight != platformWindow->effectiveHeight()) {
+ [EAGLContext setCurrentContext:m_eaglContext];
+ glBindFramebuffer(GL_FRAMEBUFFER, framebufferObject.handle);
+
glBindRenderbuffer(GL_RENDERBUFFER, framebufferObject.colorRenderbuffer);
UIView *view = reinterpret_cast<UIView *>(platformWindow->winId());
CAEAGLLayer *layer = static_cast<CAEAGLLayer *>(view.layer);
diff --git a/src/plugins/platforms/ios/qioswindow.h b/src/plugins/platforms/ios/qioswindow.h
index b86dbf7d46..20f0aa59b6 100644
--- a/src/plugins/platforms/ios/qioswindow.h
+++ b/src/plugins/platforms/ios/qioswindow.h
@@ -82,15 +82,8 @@ public:
WId winId() const { return WId(m_view); };
- QList<QWindowSystemInterface::TouchPoint> &touchPoints() { return m_touchPoints; }
- QHash<UITouch *, int> &activeTouches() { return m_activeTouches; }
- int &touchId() { return m_touchId; }
-
private:
UIView *m_view;
- QList<QWindowSystemInterface::TouchPoint> m_touchPoints;
- QHash<UITouch *, int> m_activeTouches;
- int m_touchId;
QRect m_requestedGeometry;
int m_windowLevel;
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index b173fb786f..02ac413b3b 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -68,6 +68,8 @@
UIReturnKeyType returnKeyType;
BOOL secureTextEntry;
QIOSWindow *m_qioswindow;
+ QHash<UITouch *, QWindowSystemInterface::TouchPoint> m_activeTouches;
+ int m_nextTouchId;
}
@property(nonatomic) UITextAutocapitalizationType autocapitalizationType;
@@ -113,6 +115,7 @@
keyboardType = UIKeyboardTypeDefault;
returnKeyType = UIReturnKeyDone;
secureTextEntry = NO;
+ m_nextTouchId = 0;
if (isQtApplication())
self.hidden = YES;
@@ -145,45 +148,25 @@
[super layoutSubviews];
}
-/*
- Touch handling:
-
- UIKit generates [Began -> Moved -> Ended] event sequences for
- each touch point. The iOS plugin tracks each individual
- touch and assigns it an id for use by Qt. The id counter is
- incremented on each began and decrement as follows:
- 1) by one when the most recent touch ends.
- 2) to zero when all touches ends.
-
- The TouchPoint list is reused between events.
-*/
- (void)updateTouchList:(NSSet *)touches withState:(Qt::TouchPointState)state
{
- QList<QWindowSystemInterface::TouchPoint> &touchPoints = m_qioswindow->touchPoints();
- QHash<UITouch *, int> &activeTouches = m_qioswindow->activeTouches();
-
- // Mark all touch points as stationary
- for (QList<QWindowSystemInterface::TouchPoint>::iterator it = touchPoints.begin(); it != touchPoints.end(); ++it)
- it->state = Qt::TouchPointStationary;
-
- // Update changed touch points with the new state
- for (UITouch *touch in touches) {
- const int touchId = activeTouches.value(touch);
- QWindowSystemInterface::TouchPoint &touchPoint = touchPoints[touchId];
- touchPoint.state = state;
- if (state == Qt::TouchPointPressed)
- touchPoint.pressure = 1.0;
- else if (state == Qt::TouchPointReleased)
- touchPoint.pressure = 0.0;
-
- // Set position
- QRect viewGeometry = fromCGRect(self.frame);
- QPoint touchViewLocation = fromCGPoint([touch locationInView:self]);
- QPoint touchScreenLocation = touchViewLocation + viewGeometry.topLeft();
- touchPoint.area = QRectF(touchScreenLocation , QSize(0, 0));
-
- CGSize fullscreenSize = self.window.rootViewController.view.bounds.size;
- touchPoint.normalPosition = QPointF(touchScreenLocation.x() / fullscreenSize.width, touchScreenLocation.y() / fullscreenSize.height);
+ QRect applicationRect = fromCGRect(self.window.screen.applicationFrame);
+
+ foreach (UITouch *uiTouch, m_activeTouches.keys()) {
+ QWindowSystemInterface::TouchPoint &touchPoint = m_activeTouches[uiTouch];
+ if (![touches containsObject:uiTouch]) {
+ touchPoint.state = Qt::TouchPointStationary;
+ } else {
+ touchPoint.state = state;
+ touchPoint.pressure = (state == Qt::TouchPointReleased) ? 0.0 : 1.0;
+
+ // Find the touch position relative to the window. Then calculate the screen
+ // position by subtracting the position of the applicationRect (since UIWindow
+ // does not take that into account when reporting its own frame):
+ QPoint touchPos = fromCGPoint([uiTouch locationInView:nil]);
+ touchPoint.area = QRectF(touchPos - applicationRect.topLeft(), QSize(0, 0));
+ touchPoint.normalPosition = QPointF(touchPos.x() / applicationRect.width(), touchPos.y() / applicationRect.height());
+ }
}
}
@@ -191,8 +174,7 @@
{
// Send touch event synchronously
QIOSIntegration *iosIntegration = static_cast<QIOSIntegration *>(QGuiApplicationPrivate::platformIntegration());
- QWindowSystemInterface::handleTouchEvent(m_qioswindow->window(), timeStamp,
- iosIntegration->touchDevice(), m_qioswindow->touchPoints());
+ QWindowSystemInterface::handleTouchEvent(m_qioswindow->window(), timeStamp, iosIntegration->touchDevice(), m_activeTouches.values());
QWindowSystemInterface::flushWindowSystemEvents();
}
@@ -204,19 +186,13 @@
if (window != QGuiApplication::focusWindow())
m_qioswindow->requestActivateWindow();
- // Track Cocoa touch id to Qt touch id. The UITouch pointer is constant
- // for the touch duration.
- QHash<UITouch *, int> &activeTouches = m_qioswindow->activeTouches();
- QList<QWindowSystemInterface::TouchPoint> &touchPoints = m_qioswindow->touchPoints();
- for (UITouch *touch in touches)
- activeTouches.insert(touch, m_qioswindow->touchId()++);
-
- // Create new touch points if needed.
- int newTouchPointsNeeded = m_qioswindow->touchId() - touchPoints.count();
- for (int i = 0; i < newTouchPointsNeeded; ++i) {
- QWindowSystemInterface::TouchPoint touchPoint;
- touchPoint.id = touchPoints.count(); // id is the index in the touchPoints list.
- touchPoints.append(touchPoint);
+ // UIKit generates [Began -> Moved -> Ended] event sequences for
+ // each touch point. Internally we keep a hashmap of active UITouch
+ // points to QWindowSystemInterface::TouchPoints, and assigns each TouchPoint
+ // an id for use by Qt.
+ for (UITouch *touch in touches) {
+ Q_ASSERT(!m_activeTouches.contains(touch));
+ m_activeTouches[touch].id = m_nextTouchId++;
}
[self updateTouchList:touches withState:Qt::TouchPointPressed];
@@ -234,19 +210,11 @@
[self updateTouchList:touches withState:Qt::TouchPointReleased];
[self sendTouchEventWithTimestamp:ulong(event.timestamp * 1000)];
- // Remove ended touch points from the active set (event processing has completed at this point)
- QHash<UITouch *, int> &activeTouches = m_qioswindow->activeTouches();
- for (UITouch *touch in touches) {
- int id = activeTouches.take(touch);
-
- // If this touch is the most recent touch we can reuse its id
- if (id == m_qioswindow->touchId() - 1)
- --m_qioswindow->touchId();
- }
-
- // Reset the touch id when there are no more active touches
- if (activeTouches.isEmpty())
- m_qioswindow->touchId() = 0;
+ // Remove ended touch points from the active set:
+ for (UITouch *touch in touches)
+ m_activeTouches.remove(touch);
+ if (m_activeTouches.isEmpty())
+ m_nextTouchId = 0;
}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
@@ -254,8 +222,8 @@
Q_UNUSED(touches) // ### can a subset of the active touches be cancelled?
// Clear current touch points
- m_qioswindow->activeTouches().clear();
- m_qioswindow->touchId() = 0;
+ m_activeTouches.clear();
+ m_nextTouchId = 0;
// Send cancel touch event synchronously
QIOSIntegration *iosIntegration = static_cast<QIOSIntegration *>(QGuiApplicationPrivate::platformIntegration());
@@ -322,7 +290,6 @@ QT_BEGIN_NAMESPACE
QIOSWindow::QIOSWindow(QWindow *window)
: QPlatformWindow(window)
, m_view([[EAGLView alloc] initWithQIOSWindow:this])
- , m_touchId(0)
, m_requestedGeometry(QPlatformWindow::geometry())
, m_windowLevel(0)
, m_devicePixelRatio(1.0)
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
index cd987d8d02..ad5206ba41 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
@@ -369,9 +369,10 @@ bool QLinuxFbScreen::initialize(const QStringList &args)
mDepth = determineDepth(vinfo);
mBytesPerLine = finfo.line_length;
- mGeometry = determineGeometry(vinfo, userGeometry);
+ QRect geometry = determineGeometry(vinfo, userGeometry);
+ mGeometry = QRect(QPoint(0, 0), geometry.size());
mFormat = determineFormat(vinfo, mDepth);
- mPhysicalSize = determinePhysicalSize(vinfo, userMmSize, mGeometry.size());
+ mPhysicalSize = determinePhysicalSize(vinfo, userMmSize, geometry.size());
// mmap the framebuffer
mMmap.size = finfo.smem_len;
@@ -381,11 +382,11 @@ bool QLinuxFbScreen::initialize(const QStringList &args)
return false;
}
- mMmap.offset = mGeometry.y() * mBytesPerLine + mGeometry.x() * mDepth / 8;
+ mMmap.offset = geometry.y() * mBytesPerLine + geometry.x() * mDepth / 8;
mMmap.data = data + mMmap.offset;
QFbScreen::initializeCompositor();
- mFbScreenImage = QImage(data, mGeometry.width(), mGeometry.height(), mBytesPerLine, mFormat);
+ mFbScreenImage = QImage(mMmap.data, geometry.width(), geometry.height(), mBytesPerLine, mFormat);
mCursor = new QFbCursor(this);
mTtyFd = openTtyDevice(ttyDevice);
diff --git a/src/plugins/platforms/qnx/qnx.pro b/src/plugins/platforms/qnx/qnx.pro
index 50884ace66..7c497b4434 100644
--- a/src/plugins/platforms/qnx/qnx.pro
+++ b/src/plugins/platforms/qnx/qnx.pro
@@ -1,6 +1,6 @@
TARGET = qqnx
-QT += platformsupport platformsupport-private
+QT += platformsupport-private core-private gui-private
# Uncomment this to build with support for IMF once it becomes available in the BBNDK
#CONFIG += qqnx_imf
diff --git a/src/plugins/platforms/qnx/qqnxbuffer.cpp b/src/plugins/platforms/qnx/qqnxbuffer.cpp
index c5e99a2001..abb8a07026 100644
--- a/src/plugins/platforms/qnx/qqnxbuffer.cpp
+++ b/src/plugins/platforms/qnx/qqnxbuffer.cpp
@@ -69,36 +69,31 @@ QQnxBuffer::QQnxBuffer(screen_buffer_t buffer)
errno = 0;
int size[2];
int result = screen_get_buffer_property_iv(buffer, SCREEN_PROPERTY_BUFFER_SIZE, size);
- if (result != 0) {
+ if (result != 0)
qFatal("QQNX: failed to query buffer size, errno=%d", errno);
- }
// Get stride of buffer
errno = 0;
int stride;
result = screen_get_buffer_property_iv(buffer, SCREEN_PROPERTY_STRIDE, &stride);
- if (result != 0) {
+ if (result != 0)
qFatal("QQNX: failed to query buffer stride, errno=%d", errno);
- }
// Get access to buffer's data
errno = 0;
uchar *dataPtr = 0;
result = screen_get_buffer_property_pv(buffer, SCREEN_PROPERTY_POINTER, (void **)&dataPtr);
- if (result != 0) {
+ if (result != 0)
qFatal("QQNX: failed to query buffer pointer, errno=%d", errno);
- }
- if (dataPtr == 0) {
+ if (dataPtr == 0)
qFatal("QQNX: buffer pointer is NULL, errno=%d", errno);
- }
// Get format of buffer
errno = 0;
int screenFormat;
result = screen_get_buffer_property_iv(buffer, SCREEN_PROPERTY_FORMAT, &screenFormat);
- if (result != 0) {
+ if (result != 0)
qFatal("QQNX: failed to query buffer format, errno=%d", errno);
- }
// Convert screen format to QImage format
QImage::Format imageFormat = QImage::Format_Invalid;
@@ -146,16 +141,14 @@ void QQnxBuffer::invalidateInCache()
qBufferDebug() << Q_FUNC_INFO;
// Verify native buffer exists
- if (m_buffer == 0) {
+ if (m_buffer == 0)
qFatal("QQNX: can't invalidate cache for null buffer");
- }
// Evict buffer's data from cache
errno = 0;
int result = msync(m_image.bits(), m_image.height() * m_image.bytesPerLine(), MS_INVALIDATE | MS_CACHE_ONLY);
- if (result != 0) {
+ if (result != 0)
qFatal("QQNX: failed to invalidate cache, errno=%d", errno);
- }
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp
index f77bb73614..005b6d272a 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.cpp
+++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp
@@ -96,9 +96,8 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext)
// Set current rendering API
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
- if (eglResult != EGL_TRUE) {
+ if (eglResult != EGL_TRUE)
qFatal("QQNX: failed to set EGL API, err=%d", eglGetError());
- }
// Get colour channel sizes from window format
int alphaSize = format.alphaBufferSize();
@@ -149,9 +148,8 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext)
// Select EGL config based on requested window format
m_eglConfig = q_configFromGLFormat(ms_eglDisplay, format);
- if (m_eglConfig == 0) {
+ if (m_eglConfig == 0)
qFatal("QQnxGLContext: failed to find EGL config");
- }
m_eglContext = eglCreateContext(ms_eglDisplay, m_eglConfig, EGL_NO_CONTEXT, contextAttrs());
if (m_eglContext == EGL_NO_CONTEXT) {
@@ -168,9 +166,8 @@ QQnxGLContext::~QQnxGLContext()
qGLContextDebug() << Q_FUNC_INFO;
// Cleanup EGL context if it exists
- if (m_eglContext != EGL_NO_CONTEXT) {
+ if (m_eglContext != EGL_NO_CONTEXT)
eglDestroyContext(ms_eglDisplay, m_eglContext);
- }
// Cleanup EGL surface if it exists
destroySurface();
@@ -216,9 +213,8 @@ bool QQnxGLContext::makeCurrent(QPlatformSurface *surface)
// Set current rendering API
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
- if (eglResult != EGL_TRUE) {
+ if (eglResult != EGL_TRUE)
qFatal("QQnxGLContext: failed to set EGL API, err=%d", eglGetError());
- }
if (m_newSurfaceRequested.testAndSetOrdered(true, false)) {
qGLContextDebug() << "New EGL surface requested";
@@ -241,15 +237,13 @@ void QQnxGLContext::doneCurrent()
// set current rendering API
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
- if (eglResult != EGL_TRUE) {
+ if (eglResult != EGL_TRUE)
qFatal("QQNX: failed to set EGL API, err=%d", eglGetError());
- }
// clear curent EGL context and unbind EGL surface
eglResult = eglMakeCurrent(ms_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
- if (eglResult != EGL_TRUE) {
+ if (eglResult != EGL_TRUE)
qFatal("QQNX: failed to clear current EGL context, err=%d", eglGetError());
- }
}
void QQnxGLContext::swapBuffers(QPlatformSurface *surface)
@@ -259,15 +253,13 @@ void QQnxGLContext::swapBuffers(QPlatformSurface *surface)
// Set current rendering API
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
- if (eglResult != EGL_TRUE) {
+ if (eglResult != EGL_TRUE)
qFatal("QQNX: failed to set EGL API, err=%d", eglGetError());
- }
// Post EGL surface to window
eglResult = eglSwapBuffers(ms_eglDisplay, m_eglSurface);
- if (eglResult != EGL_TRUE) {
+ if (eglResult != EGL_TRUE)
qFatal("QQNX: failed to swap EGL buffers, err=%d", eglGetError());
- }
}
QFunctionPointer QQnxGLContext::getProcAddress(const QByteArray &procName)
@@ -276,9 +268,8 @@ QFunctionPointer QQnxGLContext::getProcAddress(const QByteArray &procName)
// Set current rendering API
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
- if (eglResult != EGL_TRUE) {
+ if (eglResult != EGL_TRUE)
qFatal("QQNX: failed to set EGL API, err=%d", eglGetError());
- }
// Lookup EGL extension function pointer
return static_cast<QFunctionPointer>(eglGetProcAddress(procName.constData()));
@@ -309,9 +300,8 @@ void QQnxGLContext::createSurface(QPlatformSurface *surface)
// Get a pointer to the corresponding platform window
QQnxWindow *platformWindow = dynamic_cast<QQnxWindow*>(surface);
- if (!platformWindow) {
+ if (!platformWindow)
qFatal("QQNX: unable to create EGLSurface without a QQnxWindow");
- }
// Link the window and context
platformWindow->setPlatformOpenGLContext(this);
diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp
index 97a361158e..580553f6e2 100644
--- a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp
+++ b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp
@@ -606,12 +606,10 @@ static bool imfAvailable()
static bool s_imfDisabled = getenv("DISABLE_IMF") != 0;
static bool s_imfReady = false;
- if ( s_imfInitFailed || s_imfDisabled) {
+ if ( s_imfInitFailed || s_imfDisabled)
return false;
- }
- else if ( s_imfReady ) {
+ else if ( s_imfReady )
return true;
- }
if ( p_imf_client_init == 0 ) {
void *handle = dlopen("libinput_client.so.1", 0);
@@ -623,17 +621,15 @@ static bool imfAvailable()
p_ictrl_dispatch_event = (int32_t (*)(event_t *))dlsym(handle, "ictrl_dispatch_event");
p_vkb_init_selection_service = (int32_t (*)())dlsym(handle, "vkb_init_selection_service");
p_ictrl_get_num_active_sessions = (int32_t (*)())dlsym(handle, "ictrl_get_num_active_sessions");
- }
- else
- {
+ } else {
qCritical() << Q_FUNC_INFO << "libinput_client.so.1 is not present - IMF services are disabled.";
s_imfDisabled = true;
return false;
}
+
if ( p_imf_client_init && p_ictrl_open_session && p_ictrl_dispatch_event ) {
s_imfReady = true;
- }
- else {
+ } else {
p_ictrl_open_session = 0;
p_ictrl_dispatch_event = 0;
s_imfDisabled = true;
@@ -1400,11 +1396,10 @@ spannable_string_t *QQnxInputContext::onGetTextBeforeCursor(input_session_t *ic,
QString text = query.value(Qt::ImSurroundingText).toString();
m_lastCaretPos = query.value(Qt::ImCursorPosition).toInt();
- if (n < m_lastCaretPos) {
+ if (n < m_lastCaretPos)
return toSpannableString(text.mid(m_lastCaretPos - n, n));
- } else {
+ else
return toSpannableString(text.mid(0, m_lastCaretPos));
- }
}
int32_t QQnxInputContext::onPerformEditorAction(input_session_t *ic, int32_t editor_action)
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index 00706f715d..a933f7d571 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -155,9 +155,8 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
// Open connection to QNX composition manager
errno = 0;
int result = screen_create_context(&m_screenContext, SCREEN_APPLICATION_CONTEXT);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnx: failed to connect to composition manager, errno=%d", errno);
- }
// Not on BlackBerry, it has specialized event dispatcher which also handles navigator events
#if !defined(Q_OS_BLACKBERRY) && defined(QQNX_PPS)
@@ -388,9 +387,8 @@ QPlatformClipboard *QQnxIntegration::clipboard() const
qIntegrationDebug() << Q_FUNC_INFO;
#if defined(QQNX_PPS)
- if (!m_clipboard) {
+ if (!m_clipboard)
m_clipboard = new QQnxClipboard;
- }
#endif
return m_clipboard;
}
@@ -463,9 +461,8 @@ void QQnxIntegration::createDisplays()
errno = 0;
int displayCount;
int result = screen_get_context_property_iv(m_screenContext, SCREEN_PROPERTY_DISPLAY_COUNT, &displayCount);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxIntegration: failed to query display count, errno=%d", errno);
- }
if (displayCount < 1) {
// Never happens, even if there's no display, libscreen returns 1
@@ -476,9 +473,8 @@ void QQnxIntegration::createDisplays()
errno = 0;
screen_display_t *displays = (screen_display_t *)alloca(sizeof(screen_display_t) * displayCount);
result = screen_get_context_property_pv(m_screenContext, SCREEN_PROPERTY_DISPLAYS, (void **)displays);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxIntegration: failed to query displays, errno=%d", errno);
- }
// If it's primary, we create a QScreen for it even if it's not attached
// since Qt will dereference QGuiApplication::primaryScreen()
diff --git a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp
index 1656ab029b..c5c40f5a23 100644
--- a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp
+++ b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp
@@ -150,9 +150,8 @@ void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash<QByteArray, QBy
QList<QByteArray> lines = ppsData.split('\n');
// validate pps object
- if (lines.size() == 0 || lines.at(0) != "@control") {
+ if (lines.size() == 0 || lines.at(0) != "@control")
qFatal("QQNX: unrecognized pps object, data=%s", ppsData.constData());
- }
// parse pps object attributes and extract values
for (int i = 1; i < lines.size(); i++) {
diff --git a/src/plugins/platforms/qnx/qqnxrootwindow.cpp b/src/plugins/platforms/qnx/qqnxrootwindow.cpp
index 198801a832..dddadb5ca8 100644
--- a/src/plugins/platforms/qnx/qqnxrootwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxrootwindow.cpp
@@ -68,17 +68,15 @@ QQnxRootWindow::QQnxRootWindow(const QQnxScreen *screen)
errno = 0;
int result = screen_create_window(&m_window, m_screen->nativeContext());
int val[2];
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to create window, errno=%d", errno);
- }
// Move window to proper display
errno = 0;
screen_display_t display = m_screen->nativeDisplay();
result = screen_set_window_property_pv(m_window, SCREEN_PROPERTY_DISPLAY, (void **)&display);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window display, errno=%d", errno);
- }
// Make sure window is above navigator but below keyboard if running as root
// since navigator won't automatically set our z-order in this case
@@ -86,39 +84,34 @@ QQnxRootWindow::QQnxRootWindow(const QQnxScreen *screen)
errno = 0;
val[0] = MAGIC_ZORDER_FOR_NO_NAV;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_ZORDER, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window z-order, errno=%d", errno);
- }
}
// Window won't be visible unless it has some buffers so make one dummy buffer that is 1x1
errno = 0;
val[0] = SCREEN_USAGE_NATIVE;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_USAGE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window buffer usage, errno=%d", errno);
- }
errno = 0;
val[0] = m_screen->nativeFormat();
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_FORMAT, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window pixel format, errno=%d", errno);
- }
errno = 0;
val[0] = 1;
val[1] = 1;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_BUFFER_SIZE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window buffer size, errno=%d", errno);
- }
errno = 0;
result = screen_create_window_buffers(m_window, 1);
- if (result != 0) {
+ if (result != 0)
qFatal("QQNX: failed to create window buffer, errno=%d", errno);
- }
// Window is always the size of the display
errno = 0;
@@ -126,50 +119,44 @@ QQnxRootWindow::QQnxRootWindow(const QQnxScreen *screen)
val[0] = geometry.width();
val[1] = geometry.height();
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SIZE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window size, errno=%d", errno);
- }
// Fill the window with solid black
errno = 0;
val[0] = 0;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_COLOR, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window colour, errno=%d", errno);
- }
// Make the window opaque
errno = 0;
val[0] = SCREEN_TRANSPARENCY_NONE;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_TRANSPARENCY, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window transparency, errno=%d", errno);
- }
// Set the swap interval to 1
errno = 0;
val[0] = 1;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SWAP_INTERVAL, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window swap interval, errno=%d", errno);
- }
// Set viewport size equal to window size but move outside buffer so the fill colour is used exclusively
errno = 0;
val[0] = geometry.width();
val[1] = geometry.height();
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SOURCE_SIZE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window source size, errno=%d", errno);
- }
errno = 0;
val[0] = 1;
val[1] = 0;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SOURCE_POSITION, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window source position, errno=%d", errno);
- }
createWindowGroup();
post();
@@ -187,16 +174,14 @@ void QQnxRootWindow::post() const
errno = 0;
screen_buffer_t buffer;
int result = screen_get_window_property_pv(m_window, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)&buffer);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to query window buffer, errno=%d", errno);
- }
errno = 0;
int dirtyRect[] = {0, 0, 1, 1};
result = screen_post_window(m_window, buffer, 1, dirtyRect, 0);
- if (result != 0) {
+ if (result != 0)
qFatal("QQNX: failed to post window buffer, errno=%d", errno);
- }
}
void QQnxRootWindow::flush() const
@@ -205,9 +190,8 @@ void QQnxRootWindow::flush() const
// Force immediate display update
errno = 0;
int result = screen_flush_context(m_screen->nativeContext(), 0);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to flush context, errno=%d", errno);
- }
}
void QQnxRootWindow::setRotation(int rotation)
@@ -215,9 +199,8 @@ void QQnxRootWindow::setRotation(int rotation)
qRootWindowDebug() << Q_FUNC_INFO << "angle =" << rotation;
errno = 0;
int result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_ROTATION, &rotation);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window rotation, errno=%d", errno);
- }
}
void QQnxRootWindow::resize(const QSize &size)
@@ -225,15 +208,13 @@ void QQnxRootWindow::resize(const QSize &size)
errno = 0;
int val[] = {size.width(), size.height()};
int result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SIZE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window size, errno=%d", errno);
- }
errno = 0;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SOURCE_SIZE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to set window source size, errno=%d", errno);
- }
// NOTE: display will update when child windows relayout and repaint
}
@@ -246,7 +227,6 @@ void QQnxRootWindow::createWindowGroup()
// Create window group so child windows can be parented by container window
errno = 0;
int result = screen_create_window_group(m_window, m_windowGroupName.constData());
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxRootWindow: failed to create app window group, errno=%d", errno);
- }
}
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 2b81559ab6..f8203b2329 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -118,18 +118,17 @@ QQnxScreen::QQnxScreen(screen_context_t screenContext, screen_display_t display,
// Cache initial orientation of this display
errno = 0;
int result = screen_get_display_property_iv(m_display, SCREEN_PROPERTY_ROTATION, &m_initialRotation);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxScreen: failed to query display rotation, errno=%d", errno);
- }
+
m_currentRotation = m_initialRotation;
// Cache size of this display in pixels
errno = 0;
int val[2];
result = screen_get_display_property_iv(m_display, SCREEN_PROPERTY_SIZE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxScreen: failed to query display size, errno=%d", errno);
- }
m_currentGeometry = m_initialGeometry = QRect(0, 0, val[0], val[1]);
@@ -165,9 +164,8 @@ static int defaultDepth()
// check if display depth was specified in environment variable;
// use default value if no valid value found
defaultDepth = qgetenv("QQNX_DISPLAY_DEPTH").toInt();
- if (defaultDepth != 16 && defaultDepth != 32) {
+ if (defaultDepth != 16 && defaultDepth != 32)
defaultDepth = 32;
- }
}
return defaultDepth;
}
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
index 57cfdc5eb6..c2d0e3e41c 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
@@ -90,9 +90,8 @@ bool QQnxScreenEventHandler::handleEvent(screen_event_t event)
errno = 0;
int qnxType;
int result = screen_get_event_property_iv(event, SCREEN_PROPERTY_TYPE, &qnxType);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event type, errno=%d", errno);
- }
return handleEvent(event, qnxType);
}
@@ -161,9 +160,8 @@ void QQnxScreenEventHandler::injectKeyboardEvent(int flags, int sym, int modifie
if ( qtMod & Qt::ControlModifier ) {
keyStr = QChar((int)(key & 0x3f));
} else {
- if (flags & KEY_SYM_VALID) {
+ if (flags & KEY_SYM_VALID)
keyStr = QChar(sym);
- }
}
} else if ((cap > 0x0ff && cap < UNICODE_PRIVATE_USE_AREA_FIRST) || cap > UNICODE_PRIVATE_USE_AREA_LAST) {
key = (Qt::Key)cap;
@@ -186,35 +184,30 @@ void QQnxScreenEventHandler::handleKeyboardEvent(screen_event_t event)
errno = 0;
int flags;
int result = screen_get_event_property_iv(event, SCREEN_PROPERTY_KEY_FLAGS, &flags);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event flags, errno=%d", errno);
- }
// get key code
errno = 0;
int sym;
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_KEY_SYM, &sym);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event sym, errno=%d", errno);
- }
int modifiers;
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_KEY_MODIFIERS, &modifiers);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event modifiers, errno=%d", errno);
- }
int scan;
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_KEY_SCAN, &scan);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event modifiers, errno=%d", errno);
- }
int cap;
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_KEY_CAP, &cap);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event cap, errno=%d", errno);
- }
injectKeyboardEvent(flags, sym, modifiers, scan, cap);
}
@@ -227,38 +220,34 @@ void QQnxScreenEventHandler::handlePointerEvent(screen_event_t event)
screen_window_t qnxWindow;
void *handle;
int result = screen_get_event_property_pv(event, SCREEN_PROPERTY_WINDOW, &handle);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event window, errno=%d", errno);
- }
+
qnxWindow = static_cast<screen_window_t>(handle);
// Query the button states
int buttonState = 0;
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_BUTTONS, &buttonState);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event button state, errno=%d", errno);
- }
// Query the window position
int windowPos[2];
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_SOURCE_POSITION, windowPos);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event window position, errno=%d", errno);
- }
// Query the screen position
int pos[2];
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_POSITION, pos);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event position, errno=%d", errno);
- }
// Query the wheel delta
int wheelDelta = 0;
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_MOUSE_WHEEL, &wheelDelta);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event wheel delta, errno=%d", errno);
- }
// Map window handle to top-level QWindow
QWindow *w = QQnxIntegration::window(qnxWindow);
@@ -343,9 +332,8 @@ void QQnxScreenEventHandler::handleTouchEvent(screen_event_t event, int qnxType)
errno = 0;
int pos[2];
int result = screen_get_event_property_iv(event, SCREEN_PROPERTY_POSITION, pos);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event position, errno=%d", errno);
- }
QCursor::setPos(pos[0], pos[1]);
@@ -353,25 +341,23 @@ void QQnxScreenEventHandler::handleTouchEvent(screen_event_t event, int qnxType)
errno = 0;
int windowPos[2];
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_SOURCE_POSITION, windowPos);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event window position, errno=%d", errno);
- }
// determine which finger touched
errno = 0;
int touchId;
result = screen_get_event_property_iv(event, SCREEN_PROPERTY_TOUCH_ID, &touchId);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event touch id, errno=%d", errno);
- }
// determine which window was touched
errno = 0;
void *handle;
result = screen_get_event_property_pv(event, SCREEN_PROPERTY_WINDOW, &handle);
- if (result) {
+ if (result)
qFatal("QQNX: failed to query event window, errno=%d", errno);
- }
+
screen_window_t qnxWindow = static_cast<screen_window_t>(handle);
// check if finger is valid
@@ -454,9 +440,8 @@ void QQnxScreenEventHandler::handleCloseEvent(screen_event_t event)
// Map window handle to top-level QWindow
QWindow *w = QQnxIntegration::window(window);
- if (w != 0) {
+ if (w != 0)
QWindowSystemInterface::handleCloseEvent(w);
- }
}
void QQnxScreenEventHandler::handleCreateEvent(screen_event_t event)
diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
index e810b47c22..20fce3da70 100644
--- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
+++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
@@ -209,13 +209,14 @@ void QQnxVirtualKeyboardPps::ppsDataReady()
}
if (pps_decoder_get_string(m_decoder, "msg", &value) == PPS_DECODER_OK) {
- if (strcmp(value, "show") == 0) {
+ if (strcmp(value, "show") == 0)
setVisible(true);
- } else if (strcmp(value, "hide") == 0) {
+ else if (strcmp(value, "hide") == 0)
setVisible(false);
- } else if (strcmp(value, "info") == 0)
+ else if (strcmp(value, "info") == 0)
handleKeyboardInfoMessage();
- else if (strcmp(value, "connect") == 0) { }
+ else if (strcmp(value, "connect") == 0)
+ qVirtualKeyboardDebug() << Q_FUNC_INFO << "Unhandled command 'connect'";
else
qCritical("QQnxVirtualKeyboard: Unexpected keyboard PPS msg value: %s", value ? value : "[null]");
} else if (pps_decoder_get_string(m_decoder, "res", &value) == PPS_DECODER_OK) {
@@ -223,8 +224,9 @@ void QQnxVirtualKeyboardPps::ppsDataReady()
handleKeyboardInfoMessage();
else
qCritical("QQnxVirtualKeyboard: Unexpected keyboard PPS res value: %s", value ? value : "[null]");
- } else
+ } else {
qCritical("QQnxVirtualKeyboard: Unexpected keyboard PPS message type");
+ }
}
void QQnxVirtualKeyboardPps::handleKeyboardInfoMessage()
@@ -368,9 +370,8 @@ void QQnxVirtualKeyboardPps::applyKeyboardModeOptions(KeyboardMode mode)
pps_encoder_end_object(m_encoder);
- if (::write(m_fd, pps_encoder_buffer(m_encoder), pps_encoder_length(m_encoder)) == -1) {
+ if (::write(m_fd, pps_encoder_buffer(m_encoder), pps_encoder_length(m_encoder)) == -1)
close();
- }
pps_encoder_reset(m_encoder);
}
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 2bcc11f0b0..6992d70fb1 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -87,9 +87,8 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context)
// Create child QNX window
errno = 0;
result = screen_create_window_type(&m_window, m_screenContext, SCREEN_CHILD_WINDOW);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to create window, errno=%d", errno);
- }
// Set window buffer usage based on rendering API
int val;
@@ -108,32 +107,36 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context)
errno = 0;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_USAGE, &val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window buffer usage, errno=%d", errno);
- }
// Alpha channel is always pre-multiplied if present
errno = 0;
val = SCREEN_PRE_MULTIPLIED_ALPHA;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_ALPHA_MODE, &val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window alpha mode, errno=%d", errno);
- }
// Make the window opaque
errno = 0;
val = SCREEN_TRANSPARENCY_NONE;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_TRANSPARENCY, &val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window transparency, errno=%d", errno);
- }
// Set the window swap interval
errno = 0;
val = 1;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SWAP_INTERVAL, &val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window swap interval, errno=%d", errno);
+
+ if (window->flags() && Qt::WindowDoesNotAcceptFocus) {
+ errno = 0;
+ val = SCREEN_SENSITIVITY_NO_FOCUS;
+ result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SENSITIVITY, &val);
+ if (result != 0)
+ qFatal("QQnxWindow: failed to set window sensitivity, errno=%d", errno);
}
setScreen(static_cast<QQnxScreen *>(window->screen()->handle()));
@@ -219,24 +222,21 @@ QRect QQnxWindow::setGeometryHelper(const QRect &rect)
val[0] = rect.x();
val[1] = rect.y();
int result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_POSITION, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window position, errno=%d", errno);
- }
errno = 0;
val[0] = rect.width();
val[1] = rect.height();
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SIZE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window size, errno=%d", errno);
- }
// Set viewport size equal to window size
errno = 0;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SOURCE_SIZE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window source size, errno=%d", errno);
- }
return oldGeometry;
}
@@ -257,9 +257,8 @@ void QQnxWindow::setOffset(const QPoint &offset)
val[0] = newGeometry.x();
val[1] = newGeometry.y();
int result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_POSITION, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window position, errno=%d", errno);
- }
Q_FOREACH (QQnxWindow *childWindow, m_childWindows)
childWindow->setOffset(offset);
@@ -296,9 +295,8 @@ void QQnxWindow::updateVisibility(bool parentVisible)
errno = 0;
int val = (m_visible && parentVisible) ? 1 : 0;
int result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_VISIBLE, &val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window visibility, errno=%d", errno);
- }
Q_FOREACH (QQnxWindow *childWindow, m_childWindows)
childWindow->updateVisibility(m_visible && parentVisible);
@@ -311,9 +309,8 @@ void QQnxWindow::setOpacity(qreal level)
errno = 0;
int val = (int)(level * 255);
int result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_GLOBAL_ALPHA, &val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window global alpha, errno=%d", errno);
- }
// TODO: How to handle children of this window? If we change all the visibilities, then
// the transparency will look wrong...
@@ -352,9 +349,8 @@ void QQnxWindow::setBufferSize(const QSize &size)
int val[2] = { nonEmptySize.width(), nonEmptySize.height() };
int result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_BUFFER_SIZE, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window buffer size, errno=%d", errno);
- }
// Create window buffers if they do not exist
if (m_bufferSize.isEmpty()) {
@@ -362,31 +358,27 @@ void QQnxWindow::setBufferSize(const QSize &size)
#if !defined(QT_NO_OPENGL)
// Get pixel format from EGL config if using OpenGL;
// otherwise inherit pixel format of window's screen
- if (m_platformOpenGLContext != 0) {
+ if (m_platformOpenGLContext != 0)
val[0] = platformWindowFormatToNativeFormat(m_platformOpenGLContext->format());
- }
#endif
errno = 0;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_FORMAT, val);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window pixel format, errno=%d", errno);
- }
errno = 0;
result = screen_create_window_buffers(m_window, MAX_BUFFER_COUNT);
- if (result != 0) {
+ if (result != 0)
qWarning() << "QQnxWindow: Buffer size was" << size;
qFatal("QQnxWindow: failed to create window buffers, errno=%d", errno);
- }
// check if there are any buffers available
int bufferCount = 0;
result = screen_get_window_property_iv(m_window, SCREEN_PROPERTY_RENDER_BUFFER_COUNT, &bufferCount);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to query window buffer count, errno=%d", errno);
- }
if (bufferCount != MAX_BUFFER_COUNT) {
qFatal("QQnxWindow: invalid buffer count. Expected = %d, got = %d. You might experience problems.",
@@ -416,9 +408,8 @@ QQnxBuffer &QQnxWindow::renderBuffer()
errno = 0;
screen_buffer_t buffers[MAX_BUFFER_COUNT];
const int result = screen_get_window_property_pv(m_window, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)buffers);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to query window buffers, errno=%d", errno);
- }
// Wrap each buffer
for (int i = 0; i < MAX_BUFFER_COUNT; ++i) {
@@ -482,24 +473,21 @@ void QQnxWindow::post(const QRegion &dirty)
// Update the display with contents of render buffer
errno = 0;
int result = screen_post_window(m_window, currentBuffer.nativeBuffer(), 1, dirtyRect, 0);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to post window buffer, errno=%d", errno);
- }
// Advance to next nender buffer
m_previousBufferIndex = m_currentBufferIndex++;
- if (m_currentBufferIndex >= MAX_BUFFER_COUNT) {
+ if (m_currentBufferIndex >= MAX_BUFFER_COUNT)
m_currentBufferIndex = 0;
- }
// Save modified region and clear scrolled region
m_previousDirty = dirty;
m_scrolled = QRegion();
// Notify screen that window posted
- if (m_screen != 0) {
+ if (m_screen != 0)
m_screen->onWindowPost(this);
- }
}
}
@@ -524,16 +512,14 @@ void QQnxWindow::setScreen(QQnxScreen *platformScreen)
errno = 0;
screen_display_t display = platformScreen->nativeDisplay();
int result = screen_set_window_property_pv(m_window, SCREEN_PROPERTY_DISPLAY, (void **)&display);
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to set window display, errno=%d", errno);
- }
// Add window to display's window group
errno = 0;
result = screen_join_window_group(m_window, platformScreen->windowGroupName());
- if (result != 0) {
+ if (result != 0)
qFatal("QQnxWindow: failed to join window group, errno=%d", errno);
- }
Q_FOREACH (QQnxWindow *childWindow, m_childWindows) {
// Only subwindows and tooltips need necessarily be moved to another display with the window.
@@ -813,19 +799,16 @@ int QQnxWindow::platformWindowFormatToNativeFormat(const QSurfaceFormat &format)
qWindowDebug() << Q_FUNC_INFO;
// Extract size of colour channels from window format
int redSize = format.redBufferSize();
- if (redSize == -1) {
+ if (redSize == -1)
qFatal("QQnxWindow: red size not defined");
- }
int greenSize = format.greenBufferSize();
- if (greenSize == -1) {
+ if (greenSize == -1)
qFatal("QQnxWindow: green size not defined");
- }
int blueSize = format.blueBufferSize();
- if (blueSize == -1) {
+ if (blueSize == -1)
qFatal("QQnxWindow: blue size not defined");
- }
// select matching native format
if (redSize == 5 && greenSize == 6 && blueSize == 5) {
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index 5757bcad4e..792e79df19 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -1095,7 +1095,7 @@ QWindowsNativeImage *QWindowsFontEngine::drawGDIGlyph(HFONT font, glyph_t glyph,
xform.eDx = margin;
xform.eDy = margin;
- HDC hdc = CreateCompatibleDC(QWindowsContext::instance()->displayContext());
+ const HDC hdc = m_fontEngineData->hdc;
SetGraphicsMode(hdc, GM_ADVANCED);
SetWorldTransform(hdc, &xform);
@@ -1107,8 +1107,16 @@ QWindowsNativeImage *QWindowsFontEngine::drawGDIGlyph(HFONT font, glyph_t glyph,
memset(&mat, 0, sizeof(mat));
mat.eM11.value = mat.eM22.value = 1;
- if (GetGlyphOutline(hdc, glyph, ggo_options, &tgm, 0, 0, &mat) == GDI_ERROR) {
- qWarning("QWinFontEngine: unable to query transformed glyph metrics...");
+ const DWORD result = GetGlyphOutline(hdc, glyph, ggo_options, &tgm, 0, 0, &mat);
+
+ XFORM identity = {1, 0, 0, 1, 0, 0};
+ SetWorldTransform(hdc, &identity);
+ SetGraphicsMode(hdc, GM_COMPATIBLE);
+ SelectObject(hdc, old_font);
+
+ if (result == GDI_ERROR) {
+ const int errorCode = GetLastError();
+ qErrnoWarning(errorCode, "QWinFontEngine: unable to query transformed glyph metrics (GetGlyphOutline() failed, error %d)...", errorCode);
return 0;
}
@@ -1117,10 +1125,6 @@ QWindowsNativeImage *QWindowsFontEngine::drawGDIGlyph(HFONT font, glyph_t glyph,
xform.eDx -= tgm.gmptGlyphOrigin.x;
xform.eDy += tgm.gmptGlyphOrigin.y;
-
- SetGraphicsMode(hdc, GM_COMPATIBLE);
- SelectObject(hdc, old_font);
- DeleteDC(hdc);
}
#else // else wince
unsigned int options = 0;
@@ -1412,5 +1416,11 @@ void QWindowsMultiFontEngine::loadEngine(int at)
// TODO: increase cost in QFontCache for the font engine loaded here
}
+bool QWindowsFontEngine::supportsTransformation(const QTransform &transform) const
+{
+ // Support all transformations for ttf files, and translations for raster fonts
+ return ttf || transform.type() <= QTransform::TxTranslate;
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.h b/src/plugins/platforms/windows/qwindowsfontengine.h
index 2bf6ead503..9e92a8fbff 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.h
+++ b/src/plugins/platforms/windows/qwindowsfontengine.h
@@ -123,6 +123,7 @@ public:
virtual QImage alphaRGBMapForGlyph(glyph_t t, QFixed subPixelPosition, const QTransform &xform);
virtual QFontEngine *cloneWithSize(qreal pixelSize) const;
+ virtual bool supportsTransformation(const QTransform &transform) const;
#ifndef Q_CC_MINGW
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index ae66ef8a3d..f6dda04c13 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -613,8 +613,12 @@ static HGLRC createContext(const QOpenGLStaticContext &staticContext,
const HGLRC result =
staticContext.wglCreateContextAttribsARB(hdc, shared, attributes);
- if (!result)
- qErrnoWarning("%s: wglCreateContextAttribsARB() failed.", __FUNCTION__);
+ if (!result) {
+ QString message;
+ QDebug(&message).nospace() << __FUNCTION__ << ": wglCreateContextAttribsARB() failed (GL error code: 0x"
+ << hex << glGetError() << dec << ") for format: " << format << ", shared context: " << shared;
+ qErrnoWarning("%s", qPrintable(message));
+ }
return result;
}
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index dd16ea1c6f..fd00a07d6c 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -237,8 +237,8 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
platformWindow->setFlag(QWindowsWindow::AutoMouseCapture);
if (QWindowsContext::verboseEvents)
qDebug() << "Automatic mouse capture " << window;
- // Implement "Click to focus" for native child windows.
- if (!window->isTopLevel() && QGuiApplication::focusWindow() != window)
+ // Implement "Click to focus" for native child windows (unless it is a native widget window).
+ if (!window->isTopLevel() && !window->inherits("QWidgetWindow") && QGuiApplication::focusWindow() != window)
window->requestActivate();
} else if (platformWindow->hasMouseCapture()
&& platformWindow->testFlag(QWindowsWindow::AutoMouseCapture)
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 010197d6d8..73c78f0090 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -203,10 +203,9 @@ static inline QSize clientSize(HWND hwnd)
return qSizeOfRect(rect);
}
-// from qwidget_win.cpp
-static bool shouldShowMaximizeButton(const QWindow *w)
+// from qwidget_win.cpp, pass flags separately in case they have been "autofixed".
+static bool shouldShowMaximizeButton(const QWindow *w, Qt::WindowFlags flags)
{
- const Qt::WindowFlags flags = w->flags();
if ((flags & Qt::MSWindowsFixedSizeDialogHint) || !(flags & Qt::WindowMaximizeButtonHint))
return false;
// if the user explicitly asked for the maximize button, we try to add
@@ -333,6 +332,25 @@ QDebug operator<<(QDebug debug, const WindowCreationData &d)
return debug;
}
+// Fix top level window flags in case only the type flags are passed.
+static inline void fixTopLevelWindowFlags(Qt::WindowFlags &flags)
+{
+ switch (flags) {
+ case Qt::Window:
+ flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint
+ |Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint;
+ break;
+ case Qt::Dialog:
+ flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint;
+ break;
+ case Qt::Tool:
+ flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint;
+ break;
+ default:
+ break;
+ }
+}
+
void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flagsIn,
unsigned creationFlags)
{
@@ -359,10 +377,8 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
topLevel = (creationFlags & ForceTopLevel) ? true : w->isTopLevel();
}
- if (topLevel && flags == 1) {
- flags |= Qt::WindowTitleHint|Qt::WindowSystemMenuHint|Qt::WindowMinimizeButtonHint
- |Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint;
- }
+ if (topLevel)
+ fixTopLevelWindowFlags(flags);
type = static_cast<Qt::WindowType>(int(flags) & Qt::WindowType_Mask);
switch (type) {
@@ -433,7 +449,7 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
style |= WS_SYSMENU;
if (flags & Qt::WindowMinimizeButtonHint)
style |= WS_MINIMIZEBOX;
- if (shouldShowMaximizeButton(w))
+ if (shouldShowMaximizeButton(w, flags))
style |= WS_MAXIMIZEBOX;
if (tool)
exStyle |= WS_EX_TOOLWINDOW;
@@ -775,7 +791,7 @@ QWindowCreationContext::QWindowCreationContext(const QWindow *w,
QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
QPlatformWindow(aWindow),
m_data(data),
- m_flags(0),
+ m_flags(WithinCreate),
m_hdc(0),
m_windowState(Qt::WindowNoState),
m_opacity(1.0),
@@ -826,6 +842,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
const qreal opacity = qt_window_private(aWindow)->opacity;
if (!qFuzzyCompare(opacity, qreal(1.0)))
setOpacity(opacity);
+ clearFlag(WithinCreate);
}
QWindowsWindow::~QWindowsWindow()
@@ -1481,8 +1498,10 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState)
if (visible)
newStyle |= WS_VISIBLE;
setStyle(newStyle);
-
- const QRect r = effectiveScreen(window())->geometry();
+ // Use geometry of QWindow::screen() within creation or the virtual screen the
+ // window is in (QTBUG-31166, QTBUG-30724).
+ const QScreen *screen = testFlag(WithinCreate) ? window()->screen() : effectiveScreen(window());
+ const QRect r = screen->geometry();
const UINT swpf = SWP_FRAMECHANGED | SWP_NOACTIVATE;
const bool wasSync = testFlag(SynchronousGeometryChangeEvent);
setFlag(SynchronousGeometryChangeEvent);
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index 6c735ede7d..07f3976d87 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -134,7 +134,8 @@ public:
WithinDestroy = 0x1000,
TouchRegistered = 0x2000,
AlertState = 0x4000,
- Exposed = 0x08000
+ Exposed = 0x08000,
+ WithinCreate = 0x10000
};
struct WindowData
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 10a8f26614..209c7bb187 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -253,10 +253,13 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
#endif
, xfixes_first_event(0)
, xrandr_first_event(0)
+ , xkb_first_event(0)
, has_glx_extension(false)
, has_shape_extension(false)
, has_randr_extension(false)
, has_input_shape(false)
+ , has_touch_without_mouse_emulation(false)
+ , has_xkb(false)
, m_buttons(0)
, m_focusWindow(0)
{
@@ -297,6 +300,9 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
xcb_extension_t *extensions[] = {
&xcb_shm_id, &xcb_xfixes_id, &xcb_randr_id, &xcb_shape_id, &xcb_sync_id,
+#ifndef QT_NO_XKB
+ &xcb_xkb_id,
+#endif
#ifdef XCB_USE_RENDER
&xcb_render_id,
#endif
@@ -335,6 +341,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
initializeXInput2();
#endif
initializeXShape();
+ initializeXKB();
m_wmSupport.reset(new QXcbWMSupport(this));
m_keyboard = new QXcbKeyboard(this);
@@ -478,7 +485,6 @@ void printXcbEvent(const char *message, xcb_generic_event_t *event)
PRINT_XCB_EVENT(XCB_SELECTION_NOTIFY);
PRINT_XCB_EVENT(XCB_COLORMAP_NOTIFY);
PRINT_XCB_EVENT(XCB_CLIENT_MESSAGE);
- PRINT_XCB_EVENT(XCB_MAPPING_NOTIFY);
default:
qDebug("QXcbConnection: %s: unknown event - response_type: %d - sequence: %d", message, int(event->response_type & ~0x80), int(event->sequence));
}
@@ -744,6 +750,23 @@ void QXcbConnection::handleButtonRelease(xcb_generic_event_t *ev)
m_buttons &= ~translateMouseButton(event->detail);
}
+#ifndef QT_NO_XKB
+namespace {
+ typedef union {
+ /* All XKB events share these fields. */
+ struct {
+ uint8_t response_type;
+ uint8_t xkbType;
+ uint16_t sequence;
+ xcb_timestamp_t time;
+ uint8_t deviceID;
+ } any;
+ xcb_xkb_map_notify_event_t map_notify;
+ xcb_xkb_state_notify_event_t state_notify;
+ } _xkb_event;
+}
+#endif
+
void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
{
#ifdef Q_XCB_DEBUG
@@ -768,12 +791,21 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
case XCB_EXPOSE:
HANDLE_PLATFORM_WINDOW_EVENT(xcb_expose_event_t, window, handleExposeEvent);
case XCB_BUTTON_PRESS:
+#ifdef QT_NO_XKB
+ m_keyboard->updateXKBStateFromCore(((xcb_button_press_event_t *)event)->state);
+#endif
handleButtonPress(event);
HANDLE_PLATFORM_WINDOW_EVENT(xcb_button_press_event_t, event, handleButtonPressEvent);
case XCB_BUTTON_RELEASE:
+#ifdef QT_NO_XKB
+ m_keyboard->updateXKBStateFromCore(((xcb_button_release_event_t *)event)->state);
+#endif
handleButtonRelease(event);
HANDLE_PLATFORM_WINDOW_EVENT(xcb_button_release_event_t, event, handleButtonReleaseEvent);
case XCB_MOTION_NOTIFY:
+#ifdef QT_NO_XKB
+ m_keyboard->updateXKBStateFromCore(((xcb_motion_notify_event_t *)event)->state);
+#endif
HANDLE_PLATFORM_WINDOW_EVENT(xcb_motion_notify_event_t, event, handleMotionNotifyEvent);
case XCB_CONFIGURE_NOTIFY:
HANDLE_PLATFORM_WINDOW_EVENT(xcb_configure_notify_event_t, event, handleConfigureNotifyEvent);
@@ -787,18 +819,29 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
case XCB_ENTER_NOTIFY:
HANDLE_PLATFORM_WINDOW_EVENT(xcb_enter_notify_event_t, event, handleEnterNotifyEvent);
case XCB_LEAVE_NOTIFY:
+#ifdef QT_NO_XKB
+ m_keyboard->updateXKBStateFromCore(((xcb_leave_notify_event_t *)event)->state);
+#endif
HANDLE_PLATFORM_WINDOW_EVENT(xcb_leave_notify_event_t, event, handleLeaveNotifyEvent);
case XCB_FOCUS_IN:
HANDLE_PLATFORM_WINDOW_EVENT(xcb_focus_in_event_t, event, handleFocusInEvent);
case XCB_FOCUS_OUT:
HANDLE_PLATFORM_WINDOW_EVENT(xcb_focus_out_event_t, event, handleFocusOutEvent);
case XCB_KEY_PRESS:
+#ifdef QT_NO_XKB
+ m_keyboard->updateXKBStateFromCore(((xcb_key_press_event_t *)event)->state);
+#endif
HANDLE_KEYBOARD_EVENT(xcb_key_press_event_t, handleKeyPressEvent);
case XCB_KEY_RELEASE:
+#ifdef QT_NO_XKB
+ m_keyboard->updateXKBStateFromCore(((xcb_key_release_event_t *)event)->state);
+#endif
HANDLE_KEYBOARD_EVENT(xcb_key_release_event_t, handleKeyReleaseEvent);
+#ifdef QT_NO_XKB
case XCB_MAPPING_NOTIFY:
m_keyboard->handleMappingNotifyEvent((xcb_mapping_notify_event_t *)event);
break;
+#endif
case XCB_SELECTION_REQUEST:
{
xcb_selection_request_event_t *sr = (xcb_selection_request_event_t *)event;
@@ -861,6 +904,24 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
}
}
handled = true;
+#ifndef QT_NO_XKB
+ } else if (response_type == xkb_first_event) { // https://bugs.freedesktop.org/show_bug.cgi?id=51295
+ _xkb_event *xkb_event = reinterpret_cast<_xkb_event *>(event);
+ if (xkb_event->any.deviceID == m_keyboard->coreDeviceId()) {
+ switch (xkb_event->any.xkbType) {
+ case XCB_XKB_STATE_NOTIFY:
+ m_keyboard->updateXKBState(&xkb_event->state_notify);
+ handled = true;
+ break;
+ case XCB_XKB_MAP_NOTIFY:
+ m_keyboard->handleMappingNotifyEvent(&xkb_event->map_notify);
+ handled = true;
+ break;
+ default:
+ break;
+ }
+ }
+#endif
}
}
@@ -868,7 +929,6 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
if (!handled) {
// Check if a custom XEvent constructor was registered in xlib for this event type, and call it discarding the constructed XEvent if any.
// XESetWireToEvent might be used by libraries to intercept messages from the X server e.g. the OpenGL lib waiting for DRI2 events.
-
Display *xdisplay = (Display *)m_xlib_display;
XLockDisplay(xdisplay);
Bool (*proc)(Display*, XEvent*, xEvent*) = XESetWireToEvent(xdisplay, response_type, 0);
@@ -1016,32 +1076,36 @@ namespace
xcb_timestamp_t QXcbConnection::getTimestamp()
{
// send a dummy event to myself to get the timestamp from X server.
- xcb_window_t rootWindow = screens().at(primaryScreen())->root();
- xcb_change_property(xcb_connection(), XCB_PROP_MODE_APPEND, rootWindow, atom(QXcbAtom::CLIP_TEMPORARY),
+ xcb_window_t root_win = rootWindow();
+ xcb_change_property(xcb_connection(), XCB_PROP_MODE_APPEND, root_win, atom(QXcbAtom::CLIP_TEMPORARY),
XCB_ATOM_INTEGER, 32, 0, NULL);
connection()->flush();
- PropertyNotifyEvent checker(rootWindow, atom(QXcbAtom::CLIP_TEMPORARY));
+ PropertyNotifyEvent checker(root_win, atom(QXcbAtom::CLIP_TEMPORARY));
xcb_generic_event_t *event = 0;
// lets keep this inside a loop to avoid a possible race condition, where
// reader thread has not yet had the time to acquire the mutex in order
// to add the new set of events to its event queue
- while (true) {
+ while (!event) {
connection()->sync();
- if ((event = checkEvent(checker)))
- break;
+ event = checkEvent(checker);
}
xcb_property_notify_event_t *pn = (xcb_property_notify_event_t *)event;
xcb_timestamp_t timestamp = pn->time;
free(event);
- xcb_delete_property(xcb_connection(), rootWindow, atom(QXcbAtom::CLIP_TEMPORARY));
+ xcb_delete_property(xcb_connection(), root_win, atom(QXcbAtom::CLIP_TEMPORARY));
return timestamp;
}
+xcb_window_t QXcbConnection::rootWindow()
+{
+ return screens().at(primaryScreen())->root();
+}
+
void QXcbConnection::processXcbEvents()
{
int connection_error = xcb_connection_has_error(xcb_connection());
@@ -1333,6 +1397,7 @@ static const char * xcb_atomnames = {
#if XCB_USE_MAEMO_WINDOW_PROPERTIES
"_MEEGOTOUCH_ORIENTATION_ANGLE\0"
#endif
+ "_XSETTINGS_SETTINGS"
};
xcb_atom_t QXcbConnection::atom(QXcbAtom::Atom atom)
@@ -1538,6 +1603,67 @@ void QXcbConnection::initializeXShape()
free(shape_query);
}
+void QXcbConnection::initializeXKB()
+{
+#ifndef QT_NO_XKB
+ const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection, &xcb_xkb_id);
+ if (!reply || !reply->present) {
+ xkb_first_event = 0;
+ return;
+ }
+ xkb_first_event = reply->first_event;
+
+ xcb_connection_t *c = connection()->xcb_connection();
+ xcb_xkb_use_extension_cookie_t xkb_query_cookie;
+ xcb_xkb_use_extension_reply_t *xkb_query;
+
+ xkb_query_cookie = xcb_xkb_use_extension(c, XCB_XKB_MAJOR_VERSION, XCB_XKB_MINOR_VERSION);
+ xkb_query = xcb_xkb_use_extension_reply(c, xkb_query_cookie, 0);
+
+ if (!xkb_query) {
+ qWarning("Qt: Failed to initialize XKB extension");
+ return;
+ } else if (!xkb_query->supported) {
+ qWarning("Qt: Unsupported XKB version (want %d %d, has %d %d)",
+ XCB_XKB_MAJOR_VERSION, XCB_XKB_MINOR_VERSION,
+ xkb_query->serverMajor, xkb_query->serverMinor);
+ free(xkb_query);
+ return;
+ }
+
+ has_xkb = true;
+ free(xkb_query);
+
+ uint affectMap, map;
+ affectMap = map = XCB_XKB_MAP_PART_KEY_TYPES |
+ XCB_XKB_MAP_PART_KEY_SYMS |
+ XCB_XKB_MAP_PART_MODIFIER_MAP |
+ XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS |
+ XCB_XKB_MAP_PART_KEY_ACTIONS |
+ XCB_XKB_MAP_PART_KEY_BEHAVIORS |
+ XCB_XKB_MAP_PART_VIRTUAL_MODS |
+ XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP;
+
+ // Xkb events are reported to all interested clients without regard
+ // to the current keyboard input focus or grab state
+ xcb_void_cookie_t select = xcb_xkb_select_events_checked(c,
+ XCB_XKB_ID_USE_CORE_KBD,
+ XCB_XKB_EVENT_TYPE_STATE_NOTIFY | XCB_XKB_EVENT_TYPE_MAP_NOTIFY,
+ 0,
+ XCB_XKB_EVENT_TYPE_STATE_NOTIFY | XCB_XKB_EVENT_TYPE_MAP_NOTIFY,
+ affectMap,
+ map,
+ 0);
+
+ xcb_generic_error_t *error = xcb_request_check(c, select);
+ if (error) {
+ free(error);
+ qWarning() << "Qt: failed to select notify events from xcb-xkb";
+ return;
+ }
+#endif
+}
+
#if defined(XCB_USE_EGL)
bool QXcbConnection::hasEgl() const
{
@@ -1594,4 +1720,24 @@ bool QXcbConnection::xi2PrepareXIGenericDeviceEvent(xcb_ge_event_t *event, int o
}
#endif // defined(XCB_USE_XINPUT2) || defined(XCB_USE_XINPUT2_MAEMO)
+QXcbConnectionGrabber::QXcbConnectionGrabber(QXcbConnection *connection)
+ :m_connection(connection)
+{
+ connection->grabServer();
+}
+
+QXcbConnectionGrabber::~QXcbConnectionGrabber()
+{
+ if (m_connection)
+ m_connection->ungrabServer();
+}
+
+void QXcbConnectionGrabber::release()
+{
+ if (m_connection) {
+ m_connection->ungrabServer();
+ m_connection = 0;
+ }
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 44c0e28dd5..883ee95e22 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -53,6 +53,14 @@
#include <QVarLengthArray>
#include <qpa/qwindowsysteminterface.h>
+// This is needed to make Qt compile together with XKB. xkb.h is using a variable
+// which is called 'explicit', this is a reserved keyword in c++ */
+#ifndef QT_NO_XKB
+#define explicit dont_use_cxx_explicit
+#include <xcb/xkb.h>
+#undef explicit
+#endif
+
#ifndef QT_NO_TABLETEVENT
#include <QTabletEvent>
#endif
@@ -261,6 +269,7 @@ namespace QXcbAtom {
#if XCB_USE_MAEMO_WINDOW_PROPERTIES
MeegoTouchOrientationAngle,
#endif
+ _XSETTINGS_SETTINGS,
NPredefinedAtoms,
@@ -355,7 +364,7 @@ public:
#endif
QXcbWMSupport *wmSupport() const { return m_wmSupport.data(); }
-
+ xcb_window_t rootWindow();
#ifdef XCB_USE_XLIB
void *xlib_display() const { return m_xlib_display; }
#endif
@@ -401,6 +410,8 @@ public:
bool hasXShape() const { return has_shape_extension; }
bool hasXRandr() const { return has_randr_extension; }
bool hasInputShape() const { return has_input_shape; }
+ bool hasTouchWithoutMouseEmulation() const { return has_touch_without_mouse_emulation; }
+ bool hasXKB() const { return has_xkb; }
bool supportsThreadedRendering() const { return m_reader->isRunning(); }
@@ -429,6 +440,7 @@ private:
void initializeXRender();
void initializeXRandr();
void initializeXShape();
+ void initializeXKB();
#ifdef XCB_USE_XINPUT2_MAEMO
void initializeXInput2Maemo();
void finalizeXInput2Maemo();
@@ -538,11 +550,14 @@ private:
uint32_t xfixes_first_event;
uint32_t xrandr_first_event;
+ uint32_t xkb_first_event;
bool has_glx_extension;
bool has_shape_extension;
bool has_randr_extension;
bool has_input_shape;
+ bool has_touch_without_mouse_emulation;
+ bool has_xkb;
Qt::MouseButtons m_buttons;
@@ -570,6 +585,15 @@ xcb_generic_event_t *QXcbConnection::checkEvent(T &checker)
return 0;
}
+class QXcbConnectionGrabber
+{
+public:
+ QXcbConnectionGrabber(QXcbConnection *connection);
+ ~QXcbConnectionGrabber();
+ void release();
+private:
+ QXcbConnection *m_connection;
+};
#ifdef Q_XCB_DEBUG
template <typename cookie_t>
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index dfd4feb254..991c82eaaa 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -92,6 +92,9 @@ void QXcbConnection::initializeXInput2()
// Tablet support: Find the stylus-related devices.
xi2SetupTabletDevices();
#endif // QT_NO_TABLETEVENT
+#ifdef XI2_TOUCH_DEBUG
+ qDebug("XInput version %d.%d is supported", xiMajor, m_xi2Minor);
+#endif
}
}
}
@@ -118,7 +121,16 @@ void QXcbConnection::xi2Select(xcb_window_t window)
mask.deviceid = XIAllMasterDevices;
mask.mask_len = sizeof(bitMask);
mask.mask = xiBitMask;
- XISelectEvents(xDisplay, window, &mask, 1);
+ Status result = XISelectEvents(xDisplay, window, &mask, 1);
+ // If we have XInput 2.2 and successfully enable touch on the master
+ // devices, then evdev touchscreens will provide touch only. In most other
+ // cases, there will be emulated mouse events, because true X11 touch
+ // support is so new that for the older drivers, mouse emulation was the
+ // only way; and it's still the fallback even with the modern evdev driver.
+ // But if neither Qt nor X11 does mouse emulation, it will not be possible
+ // to interact with mouse-oriented QWidgets; so we have to let Qt do it.
+ if (m_xi2Minor >= 2 && result == Success)
+ has_touch_without_mouse_emulation = true;
#endif
#ifndef QT_NO_TABLETEVENT
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
index 3fd2ca70e3..756c3c22dd 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -43,6 +43,8 @@
#include "qxcbconnection.h"
#include "qxcbwindow.h"
#include "qxcbimage.h"
+#include "qxcbxsettings.h"
+
#include <QtCore/QLibrary>
#include <QtGui/QWindow>
#include <QtGui/QBitmap>
@@ -54,9 +56,17 @@
QT_BEGIN_NAMESPACE
typedef int (*PtrXcursorLibraryLoadCursor)(void *, const char *);
+typedef char *(*PtrXcursorLibraryGetTheme)(void *);
+typedef int (*PtrXcursorLibrarySetTheme)(void *, const char *);
+typedef int (*PtrXcursorLibraryGetDefaultSize)(void *);
+
#ifdef XCB_USE_XLIB
static PtrXcursorLibraryLoadCursor ptrXcursorLibraryLoadCursor = 0;
+static PtrXcursorLibraryGetTheme ptrXcursorLibraryGetTheme = 0;
+static PtrXcursorLibrarySetTheme ptrXcursorLibrarySetTheme = 0;
+static PtrXcursorLibraryGetDefaultSize ptrXcursorLibraryGetDefaultSize = 0;
#endif
+
static xcb_font_t cursorFont = 0;
static int cursorCount = 0;
@@ -263,7 +273,7 @@ static const char * const cursorNames[] = {
};
QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
- : QXcbObject(conn), m_screen(screen)
+ : QXcbObject(conn), m_screen(screen), m_gtkCursorThemeInitialized(false)
{
if (cursorCount++)
return;
@@ -273,21 +283,38 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
xcb_open_font(xcb_connection(), cursorFont, strlen(cursorStr), cursorStr);
#ifdef XCB_USE_XLIB
- QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
- bool xcursorFound = xcursorLib.load();
- if (!xcursorFound) { // try without the version number
- xcursorLib.setFileName(QLatin1String("Xcursor"));
- xcursorFound = xcursorLib.load();
+ static bool function_ptrs_not_initialized = true;
+ if (function_ptrs_not_initialized) {
+ QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
+ bool xcursorFound = xcursorLib.load();
+ if (!xcursorFound) { // try without the version number
+ xcursorLib.setFileName(QLatin1String("Xcursor"));
+ xcursorFound = xcursorLib.load();
+ }
+ if (xcursorFound) {
+ ptrXcursorLibraryLoadCursor =
+ (PtrXcursorLibraryLoadCursor) xcursorLib.resolve("XcursorLibraryLoadCursor");
+ ptrXcursorLibraryGetTheme =
+ (PtrXcursorLibraryGetTheme) xcursorLib.resolve("XcursorGetTheme");
+ ptrXcursorLibrarySetTheme =
+ (PtrXcursorLibrarySetTheme) xcursorLib.resolve("XcursorSetTheme");
+ ptrXcursorLibraryGetDefaultSize =
+ (PtrXcursorLibraryGetDefaultSize) xcursorLib.resolve("XcursorGetDefaultSize");
+ }
+ function_ptrs_not_initialized = false;
}
- if (xcursorFound)
- ptrXcursorLibraryLoadCursor =
- (PtrXcursorLibraryLoadCursor) xcursorLib.resolve("XcursorLibraryLoadCursor");
+
#endif
}
QXcbCursor::~QXcbCursor()
{
xcb_connection_t *conn = xcb_connection();
+
+ if (m_gtkCursorThemeInitialized) {
+ m_screen->xSettings()->removeCallbackForHandle(this);
+ }
+
if (!--cursorCount)
xcb_close_font(conn, cursorFont);
@@ -448,6 +475,52 @@ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
return cursor;
}
+#ifdef XCB_USE_XLIB
+bool updateCursorTheme(void *dpy, const QByteArray theme) {
+ if (!ptrXcursorLibraryGetTheme
+ || !ptrXcursorLibrarySetTheme)
+ return false;
+ QByteArray oldTheme = ptrXcursorLibraryGetTheme(dpy);
+ if (oldTheme == theme)
+ return false;
+
+ int setTheme = ptrXcursorLibrarySetTheme(dpy,theme.constData());
+ return setTheme;
+}
+
+ void QXcbCursor::cursorThemePropertyChanged(QXcbScreen *screen, const QByteArray &name, const QVariant &property, void *handle)
+{
+ Q_UNUSED(screen);
+ Q_UNUSED(name);
+ QXcbCursor *self = static_cast<QXcbCursor *>(handle);
+ updateCursorTheme(self->connection()->xlib_display(),property.toByteArray());
+}
+
+static xcb_cursor_t loadCursor(void *dpy, int cshape)
+{
+ xcb_cursor_t cursor = XCB_NONE;
+ if (!ptrXcursorLibraryLoadCursor || !dpy)
+ return cursor;
+ switch (cshape) {
+ case Qt::DragCopyCursor:
+ cursor = ptrXcursorLibraryLoadCursor(dpy, "dnd-copy");
+ break;
+ case Qt::DragMoveCursor:
+ cursor = ptrXcursorLibraryLoadCursor(dpy, "dnd-move");
+ break;
+ case Qt::DragLinkCursor:
+ cursor = ptrXcursorLibraryLoadCursor(dpy, "dnd-link");
+ break;
+ default:
+ break;
+ }
+ if (!cursor) {
+ cursor = ptrXcursorLibraryLoadCursor(dpy, cursorNames[cshape]);
+ }
+ return cursor;
+}
+#endif //XCB_USE_XLIB
+
xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
{
xcb_connection_t *conn = xcb_connection();
@@ -456,24 +529,18 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
// Try Xcursor first
#ifdef XCB_USE_XLIB
- if (ptrXcursorLibraryLoadCursor && cshape >= 0 && cshape < Qt::LastCursor) {
+ if (cshape >= 0 && cshape < Qt::LastCursor) {
void *dpy = connection()->xlib_display();
// special case for non-standard dnd-* cursors
- switch (cshape) {
- case Qt::DragCopyCursor:
- cursor = ptrXcursorLibraryLoadCursor(dpy, "dnd-copy");
- break;
- case Qt::DragMoveCursor:
- cursor = ptrXcursorLibraryLoadCursor(dpy, "dnd-move");
- break;
- case Qt::DragLinkCursor:
- cursor = ptrXcursorLibraryLoadCursor(dpy, "dnd-link");
- break;
- default:
- break;
+ cursor = loadCursor(dpy, cshape);
+ if (!cursor && !m_gtkCursorThemeInitialized) {
+ QByteArray gtkCursorTheme = m_screen->xSettings()->setting("Gtk/CursorThemeName").toByteArray();
+ m_screen->xSettings()->registerCallbackForProperty("Gtk/CursorThemeName",cursorThemePropertyChanged,this);
+ if (updateCursorTheme(dpy,gtkCursorTheme)) {
+ cursor = loadCursor(dpy, cshape);
+ }
+ m_gtkCursorThemeInitialized = true;
}
- if (!cursor)
- cursor = ptrXcursorLibraryLoadCursor(dpy, cursorNames[cshape]);
}
if (cursor)
return cursor;
diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h
index 4bbb99e802..081300868c 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.h
+++ b/src/plugins/platforms/xcb/qxcbcursor.h
@@ -72,6 +72,13 @@ private:
QMap<int, xcb_cursor_t> m_shapeCursorMap;
QMap<qint64, xcb_cursor_t> m_bitmapCursorMap;
#endif
+#ifdef XCB_USE_XLIB
+ static void cursorThemePropertyChanged(QXcbScreen *screen,
+ const QByteArray &name,
+ const QVariant &property,
+ void *handle);
+#endif
+ bool m_gtkCursorThemeInitialized;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index dceac09be5..db736cef4e 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -140,7 +140,6 @@ QXcbDrag::QXcbDrag(QXcbConnection *c) : QXcbObject(c)
dropData = new QXcbDropData(this);
init();
- heartbeat = -1;
cleanup_timer = -1;
}
@@ -179,9 +178,6 @@ void QXcbDrag::startDrag()
init();
- heartbeat = startTimer(200);
-
-
xcb_set_selection_owner(xcb_connection(), connection()->clipboard()->owner(),
atom(QXcbAtom::XdndSelection), connection()->time());
@@ -202,10 +198,6 @@ void QXcbDrag::startDrag()
void QXcbDrag::endDrag()
{
- if (heartbeat != -1) {
- killTimer(heartbeat);
- heartbeat = -1;
- }
QBasicDrag::endDrag();
}
@@ -485,11 +477,6 @@ void QXcbDrag::drop(const QMouseEvent *event)
{
QBasicDrag::drop(event);
- if (heartbeat != -1) {
- killTimer(heartbeat);
- heartbeat = -1;
- }
-
if (!current_target)
return;
@@ -536,7 +523,6 @@ void QXcbDrag::drop(const QMouseEvent *event)
current_proxy_target = 0;
source_time = 0;
// current_embedding_widget = 0;
- // #fixme resetDndState(false);
}
Qt::DropAction QXcbDrag::toDropAction(xcb_atom_t a) const
@@ -1041,12 +1027,7 @@ void QXcbDrag::handleFinished(const xcb_client_message_event_t *event)
void QXcbDrag::timerEvent(QTimerEvent* e)
{
- if (e->timerId() == heartbeat && source_sameanswer.isNull()) {
- QPointF pos = QCursor::pos();
- QMouseEvent me(QEvent::MouseMove, pos, pos, pos, Qt::LeftButton,
- QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());
- move(&me);
- } else if (e->timerId() == cleanup_timer) {
+ if (e->timerId() == cleanup_timer) {
bool stopTimer = true;
for (int i = 0; i < transactions.count(); ++i) {
const Transaction &t = transactions.at(i);
@@ -1160,7 +1141,7 @@ bool QXcbDrag::dndEnable(QXcbWindow *w, bool on)
if (desktop_proxy) // *WE* already have one.
return false;
- connection()->grabServer();
+ QXcbConnectionGrabber grabber(connection());
// As per Xdnd4, use XdndProxy
xcb_window_t proxy_id = xdndProxy(connection(), w->xcb_window());
@@ -1176,7 +1157,6 @@ bool QXcbDrag::dndEnable(QXcbWindow *w, bool on)
XCB_ATOM_WINDOW, 32, 1, &proxy_id);
}
- connection()->ungrabServer();
} else {
xdnd_widget = w;
}
diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h
index cc74d85b51..5678c2d303 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.h
+++ b/src/plugins/platforms/xcb/qxcbdrag.h
@@ -143,8 +143,6 @@ private:
xcb_window_t current_proxy_target;
QXcbScreen *current_screen;
- // timer used when target wants "continuous" move messages (eg. scroll)
- int heartbeat;
// 10 minute timer used to discard old XdndDrop transactions
enum { XdndDropTransactionTimeout = 600000 };
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index dd1466d23c..77c265fd09 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -327,6 +327,11 @@ Qt::KeyboardModifiers QXcbIntegration::queryKeyboardModifiers() const
return conn->keyboard()->translateModifiers(keybMask);
}
+QList<int> QXcbIntegration::possibleKeys(const QKeyEvent *e) const
+{
+ return m_connections.at(0)->keyboard()->possibleKeys(e);
+}
+
QStringList QXcbIntegration::themeNames() const
{
return QGenericUnixTheme::themeNames();
@@ -337,4 +342,31 @@ QPlatformTheme *QXcbIntegration::createPlatformTheme(const QString &name) const
return QGenericUnixTheme::createUnixTheme(name);
}
+QVariant QXcbIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
+{
+ switch (hint) {
+ case QPlatformIntegration::CursorFlashTime:
+ case QPlatformIntegration::KeyboardInputInterval:
+ case QPlatformIntegration::MouseDoubleClickInterval:
+ case QPlatformIntegration::StartDragDistance:
+ case QPlatformIntegration::StartDragTime:
+ case QPlatformIntegration::KeyboardAutoRepeatRate:
+ case QPlatformIntegration::PasswordMaskDelay:
+ case QPlatformIntegration::FontSmoothingGamma:
+ case QPlatformIntegration::StartDragVelocity:
+ case QPlatformIntegration::UseRtlExtensions:
+ case QPlatformIntegration::PasswordMaskCharacter:
+ // TODO using various xcb, gnome or KDE settings
+ break; // Not implemented, use defaults
+ case QPlatformIntegration::ShowIsFullScreen:
+ // X11 always has support for windows, but the
+ // window manager could prevent it (e.g. matchbox)
+ return false;
+ case QPlatformIntegration::SynthesizeMouseFromTouchEvents:
+ // We do not want Qt to synthesize mouse events if X11 already does it.
+ return m_connections.at(0)->hasTouchWithoutMouseEmulation();
+ }
+ return QPlatformIntegration::styleHint(hint);
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index 451dc43475..7042628203 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -91,9 +91,11 @@ public:
QPlatformServices *services() const;
Qt::KeyboardModifiers queryKeyboardModifiers() const;
+ QList<int> possibleKeys(const QKeyEvent *e) const;
QStringList themeNames() const;
QPlatformTheme *createPlatformTheme(const QString &name) const;
+ QVariant styleHint(StyleHint hint) const;
QXcbConnection *defaultConnection() const { return m_connections.first(); }
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index c66ed53152..155b327315 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -42,8 +42,6 @@
#include "qxcbkeyboard.h"
#include "qxcbwindow.h"
#include "qxcbscreen.h"
-#include "qxlibconvenience.h"
-#include <xcb/xcb_keysyms.h>
#include <X11/keysym.h>
#include <qpa/qwindowsysteminterface.h>
#include <QtCore/QTextCodec>
@@ -55,6 +53,10 @@
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformcursor.h>
+#ifdef XKBCOMMON_0_2_0
+#include <xkbcommon_workaround.h>
+#endif
+
#ifndef XK_ISO_Left_Tab
#define XK_ISO_Left_Tab 0xFE20
#endif
@@ -561,288 +563,333 @@ static const unsigned int KeyTbl[] = {
0, 0
};
-static const unsigned short katakanaKeysymsToUnicode[] = {
- 0x0000, 0x3002, 0x300C, 0x300D, 0x3001, 0x30FB, 0x30F2, 0x30A1,
- 0x30A3, 0x30A5, 0x30A7, 0x30A9, 0x30E3, 0x30E5, 0x30E7, 0x30C3,
- 0x30FC, 0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30AB, 0x30AD,
- 0x30AF, 0x30B1, 0x30B3, 0x30B5, 0x30B7, 0x30B9, 0x30BB, 0x30BD,
- 0x30BF, 0x30C1, 0x30C4, 0x30C6, 0x30C8, 0x30CA, 0x30CB, 0x30CC,
- 0x30CD, 0x30CE, 0x30CF, 0x30D2, 0x30D5, 0x30D8, 0x30DB, 0x30DE,
- 0x30DF, 0x30E0, 0x30E1, 0x30E2, 0x30E4, 0x30E6, 0x30E8, 0x30E9,
- 0x30EA, 0x30EB, 0x30EC, 0x30ED, 0x30EF, 0x30F3, 0x309B, 0x309C
-};
-
-static const unsigned short cyrillicKeysymsToUnicode[] = {
- 0x0000, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457,
- 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x0000, 0x045e, 0x045f,
- 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407,
- 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x0000, 0x040e, 0x040f,
- 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
- 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e,
- 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
- 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a,
- 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
- 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
- 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
- 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a
-};
-
-static const unsigned short greekKeysymsToUnicode[] = {
- 0x0000, 0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0x0000, 0x038c,
- 0x038e, 0x03ab, 0x0000, 0x038f, 0x0000, 0x0000, 0x0385, 0x2015,
- 0x0000, 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc,
- 0x03cd, 0x03cb, 0x03b0, 0x03ce, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
- 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
- 0x03a0, 0x03a1, 0x03a3, 0x0000, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
- 0x03a8, 0x03a9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
- 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
- 0x03c0, 0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
- 0x03c8, 0x03c9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-};
-
-static const unsigned short technicalKeysymsToUnicode[] = {
- 0x0000, 0x23B7, 0x250C, 0x2500, 0x2320, 0x2321, 0x2502, 0x23A1,
- 0x23A3, 0x23A4, 0x23A6, 0x239B, 0x239D, 0x239E, 0x23A0, 0x23A8,
- 0x23AC, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x2264, 0x2260, 0x2265, 0x222B,
- 0x2234, 0x221D, 0x221E, 0x0000, 0x0000, 0x2207, 0x0000, 0x0000,
- 0x223C, 0x2243, 0x0000, 0x0000, 0x0000, 0x21D4, 0x21D2, 0x2261,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x221A, 0x0000,
- 0x0000, 0x0000, 0x2282, 0x2283, 0x2229, 0x222A, 0x2227, 0x2228,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2202,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0192, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193, 0x0000
-};
-
-static const unsigned short specialKeysymsToUnicode[] = {
- 0x25C6, 0x2592, 0x2409, 0x240C, 0x240D, 0x240A, 0x0000, 0x0000,
- 0x2424, 0x240B, 0x2518, 0x2510, 0x250C, 0x2514, 0x253C, 0x23BA,
- 0x23BB, 0x2500, 0x23BC, 0x23BD, 0x251C, 0x2524, 0x2534, 0x252C,
- 0x2502, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+// Possible modifier states.
+static const Qt::KeyboardModifiers ModsTbl[] = {
+ Qt::NoModifier, // 0
+ Qt::ShiftModifier, // 1
+ Qt::ControlModifier, // 2
+ Qt::ControlModifier | Qt::ShiftModifier, // 3
+ Qt::AltModifier, // 4
+ Qt::AltModifier | Qt::ShiftModifier, // 5
+ Qt::AltModifier | Qt::ControlModifier, // 6
+ Qt::AltModifier | Qt::ShiftModifier | Qt::ControlModifier, // 7
+ Qt::NoModifier // Fall-back to raw Key_*
};
-static const unsigned short publishingKeysymsToUnicode[] = {
- 0x0000, 0x2003, 0x2002, 0x2004, 0x2005, 0x2007, 0x2008, 0x2009,
- 0x200a, 0x2014, 0x2013, 0x0000, 0x0000, 0x0000, 0x2026, 0x2025,
- 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a,
- 0x2105, 0x0000, 0x0000, 0x2012, 0x2329, 0x0000, 0x232a, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x215b, 0x215c, 0x215d, 0x215e, 0x0000,
- 0x0000, 0x2122, 0x2613, 0x0000, 0x25c1, 0x25b7, 0x25cb, 0x25af,
- 0x2018, 0x2019, 0x201c, 0x201d, 0x211e, 0x0000, 0x2032, 0x2033,
- 0x0000, 0x271d, 0x0000, 0x25ac, 0x25c0, 0x25b6, 0x25cf, 0x25ae,
- 0x25e6, 0x25ab, 0x25ad, 0x25b3, 0x25bd, 0x2606, 0x2022, 0x25aa,
- 0x25b2, 0x25bc, 0x261c, 0x261e, 0x2663, 0x2666, 0x2665, 0x0000,
- 0x2720, 0x2020, 0x2021, 0x2713, 0x2717, 0x266f, 0x266d, 0x2642,
- 0x2640, 0x260e, 0x2315, 0x2117, 0x2038, 0x201a, 0x201e, 0x0000
-};
-
-static const unsigned short aplKeysymsToUnicode[] = {
- 0x0000, 0x0000, 0x0000, 0x003c, 0x0000, 0x0000, 0x003e, 0x0000,
- 0x2228, 0x2227, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x00af, 0x0000, 0x22a5, 0x2229, 0x230a, 0x0000, 0x005f, 0x0000,
- 0x0000, 0x0000, 0x2218, 0x0000, 0x2395, 0x0000, 0x22a4, 0x25cb,
- 0x0000, 0x0000, 0x0000, 0x2308, 0x0000, 0x0000, 0x222a, 0x0000,
- 0x2283, 0x0000, 0x2282, 0x0000, 0x22a2, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x22a3, 0x0000, 0x0000, 0x0000
-};
-
-static const unsigned short koreanKeysymsToUnicode[] = {
- 0x0000, 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137,
- 0x3138, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f,
- 0x3140, 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147,
- 0x3148, 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f,
- 0x3150, 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157,
- 0x3158, 0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f,
- 0x3160, 0x3161, 0x3162, 0x3163, 0x11a8, 0x11a9, 0x11aa, 0x11ab,
- 0x11ac, 0x11ad, 0x11ae, 0x11af, 0x11b0, 0x11b1, 0x11b2, 0x11b3,
- 0x11b4, 0x11b5, 0x11b6, 0x11b7, 0x11b8, 0x11b9, 0x11ba, 0x11bb,
- 0x11bc, 0x11bd, 0x11be, 0x11bf, 0x11c0, 0x11c1, 0x11c2, 0x316d,
- 0x3171, 0x3178, 0x317f, 0x3181, 0x3184, 0x3186, 0x318d, 0x318e,
- 0x11eb, 0x11f0, 0x11f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x20a9
-};
-
-static QChar keysymToUnicode(unsigned char byte3, unsigned char byte4)
-{
- switch (byte3) {
- case 0x04:
- // katakana
- if (byte4 > 0xa0 && byte4 < 0xe0)
- return QChar(katakanaKeysymsToUnicode[byte4 - 0xa0]);
- else if (byte4 == 0x7e)
- return QChar(0x203e); // Overline
- break;
- case 0x06:
- // russian, use lookup table
- if (byte4 > 0xa0)
- return QChar(cyrillicKeysymsToUnicode[byte4 - 0xa0]);
- break;
- case 0x07:
- // greek
- if (byte4 > 0xa0)
- return QChar(greekKeysymsToUnicode[byte4 - 0xa0]);
- break;
- case 0x08:
- // technical
- if (byte4 > 0xa0)
- return QChar(technicalKeysymsToUnicode[byte4 - 0xa0]);
- break;
- case 0x09:
- // special
- if (byte4 >= 0xe0)
- return QChar(specialKeysymsToUnicode[byte4 - 0xe0]);
- break;
- case 0x0a:
- // publishing
- if (byte4 > 0xa0)
- return QChar(publishingKeysymsToUnicode[byte4 - 0xa0]);
- break;
- case 0x0b:
- // APL
- if (byte4 > 0xa0)
- return QChar(aplKeysymsToUnicode[byte4 - 0xa0]);
- break;
- case 0x0e:
- // Korean
- if (byte4 > 0xa0)
- return QChar(koreanKeysymsToUnicode[byte4 - 0xa0]);
- break;
- default:
- break;
- }
- return QChar(0x0);
-}
-
-Qt::KeyboardModifiers QXcbKeyboard::translateModifiers(int s)
+Qt::KeyboardModifiers QXcbKeyboard::translateModifiers(int s) const
{
Qt::KeyboardModifiers ret = 0;
if (s & XCB_MOD_MASK_SHIFT)
ret |= Qt::ShiftModifier;
if (s & XCB_MOD_MASK_CONTROL)
ret |= Qt::ControlModifier;
- if (s & m_alt_mask)
+ if (s & rmod_masks.alt)
ret |= Qt::AltModifier;
- if (s & m_meta_mask)
+ if (s & rmod_masks.meta)
ret |= Qt::MetaModifier;
+ if (s & rmod_masks.altgr)
+ ret |= Qt::GroupSwitchModifier;
return ret;
}
-int QXcbKeyboard::translateKeySym(uint key) const
+void QXcbKeyboard::readXKBConfig(struct xkb_rule_names *xkb_names)
{
- int code = Qt::Key_unknown;
- int i = 0; // any other keys
- while (KeyTbl[i]) {
- if (key == KeyTbl[i]) {
- code = (int)KeyTbl[i+1];
- break;
+ xcb_generic_error_t *error;
+ xcb_get_property_cookie_t cookie;
+ xcb_get_property_reply_t *config_reply;
+
+ xcb_connection_t *c = xcb_connection();
+ xcb_window_t rootWindow = connection()->rootWindow();
+
+ cookie = xcb_get_property(c, 0, rootWindow,
+ atom(QXcbAtom::_XKB_RULES_NAMES), XCB_ATOM_STRING, 0, 1024);
+
+ config_reply = xcb_get_property_reply(c, cookie, &error);
+ if (!config_reply) {
+ qWarning("Qt: Couldn't interpret the _XKB_RULES_NAMES property");
+ return;
+ }
+ char *xkb_config = (char *)xcb_get_property_value(config_reply);
+ int length = xcb_get_property_value_length(config_reply);
+
+ char *names[5] = { 0, 0, 0, 0, 0 };
+ char *p = xkb_config, *end = p + length;
+ int i = 0;
+ // The result from xcb_get_property_value() is not necessarily \0-terminated,
+ // we need to make sure that too many or missing '\0' symbols are handled safely.
+ do {
+ uint len = qstrnlen(p, length);
+ names[i++] = p;
+ p += len + 1;
+ length -= len + 1;
+ } while (p < end || i < 5);
+
+ xkb_names->rules = qstrdup(names[0]);
+ xkb_names->model = qstrdup(names[1]);
+ xkb_names->layout = qstrdup(names[2]);
+ xkb_names->variant = qstrdup(names[3]);
+ xkb_names->options = qstrdup(names[4]);
+
+ free(config_reply);
+}
+
+void QXcbKeyboard::updateKeymap()
+{
+ m_config = true;
+ if (!xkb_context) {
+ xkb_context = xkb_context_new((xkb_context_flags)0);
+ if (!xkb_context) {
+ qWarning("Qt: Failed to create XKB context");
+ m_config = false;
+ return;
}
- i += 2;
}
- if (m_meta_mask) {
- // translate Super/Hyper keys to Meta if we're using them as the MetaModifier
- if (m_meta_mask == m_super_mask && (code == Qt::Key_Super_L || code == Qt::Key_Super_R)) {
- code = Qt::Key_Meta;
- } else if (m_meta_mask == m_hyper_mask && (code == Qt::Key_Hyper_L || code == Qt::Key_Hyper_R)) {
- code = Qt::Key_Meta;
+
+ struct xkb_rule_names xkb_names = {0, 0, 0, 0, 0};
+
+ readXKBConfig(&xkb_names);
+ // Compile a keymap from RMLVO (rules, models, layouts, variants and options) names
+ if (xkb_keymap)
+ xkb_keymap_unref(xkb_keymap);
+
+ xkb_keymap = xkb_keymap_new_from_names(xkb_context, &xkb_names, (xkb_keymap_compile_flags)0);
+
+ delete[] xkb_names.rules;
+ delete[] xkb_names.model;
+ delete[] xkb_names.layout;
+ delete[] xkb_names.variant;
+ delete[] xkb_names.options;
+
+ if (!xkb_keymap) {
+ qWarning("Qt: Failed to compile a keymap");
+ m_config = false;
+ return;
+ }
+ // Create a new keyboard state object for a keymap
+ struct xkb_state *new_state = xkb_state_new(xkb_keymap);
+ if (!new_state) {
+ qWarning("Qt: Failed to create a new keyboard state");
+ m_config = false;
+ return;
+ }
+
+ if (xkb_state) {
+ xkb_state_unref(xkb_state);
+ xkb_state = new_state;
+ } else {
+ xkb_state = new_state;
+#ifndef QT_NO_XKB
+ // get initial state from the X server (and keep it up-to-date at all times)
+ xcb_xkb_get_state_cookie_t state;
+ xcb_xkb_get_state_reply_t *init_state;
+
+ xcb_connection_t *c = xcb_connection();
+ state = xcb_xkb_get_state(c, XCB_XKB_ID_USE_CORE_KBD);
+ init_state = xcb_xkb_get_state_reply(c, state, 0);
+ if (!init_state) {
+ qWarning("Qt: couldn't retrieve an initial keyboard state");
+ return;
}
+ /* The xkb keyboard state is comprised of the state of all keyboard modifiers,
+ the keyboard group, and the state of the pointer buttons */
+ xkb_state_update_mask(xkb_state,
+ init_state->baseMods,
+ init_state->latchedMods,
+ init_state->lockedMods,
+ init_state->baseGroup,
+ init_state->latchedGroup,
+ init_state->lockedGroup);
+ free(init_state);
+#else
+ updateXKBMods();
+#endif
}
- return code;
}
-QString QXcbKeyboard::translateKeySym(xcb_keysym_t keysym, uint xmodifiers,
- int &code, Qt::KeyboardModifiers &modifiers,
- QByteArray &chars, int &count)
+#ifndef QT_NO_XKB
+void QXcbKeyboard::updateXKBState(xcb_xkb_state_notify_event_t *state)
{
- // all keysyms smaller than 0xff00 are actally keys that can be mapped to unicode chars
-
- QTextCodec *mapper = QTextCodec::codecForLocale();
- QChar converted;
-
- if (/*count == 0 &&*/ keysym < 0xff00) {
- unsigned char byte3 = (unsigned char)(keysym >> 8);
- int mib = -1;
- switch(byte3) {
- case 0: // Latin 1
- case 1: // Latin 2
- case 2: //latin 3
- case 3: // latin4
- mib = byte3 + 4; break;
- case 5: // arabic
- mib = 82; break;
- case 12: // Hebrew
- mib = 85; break;
- case 13: // Thai
- mib = 2259; break;
- case 4: // kana
- case 6: // cyrillic
- case 7: // greek
- case 8: // technical, no mapping here at the moment
- case 9: // Special
- case 10: // Publishing
- case 11: // APL
- case 14: // Korean, no mapping
- mib = -1; // manual conversion
- mapper= 0;
-#if !defined(QT_NO_XIM)
- converted = keysymToUnicode(byte3, keysym & 0xff);
-#endif
- case 0x20:
- // currency symbols
- if (keysym >= 0x20a0 && keysym <= 0x20ac) {
- mib = -1; // manual conversion
- mapper = 0;
- converted = (uint)keysym;
- }
- break;
- default:
- break;
+ if (!m_config)
+ return;
+
+ if (connection()->hasXKB()) {
+
+ xkb_state_component newState;
+ newState = xkb_state_update_mask(xkb_state,
+ state->baseMods,
+ state->latchedMods,
+ state->lockedMods,
+ state->baseGroup,
+ state->latchedGroup,
+ state->lockedGroup);
+
+ if ((newState & XKB_STATE_LAYOUT_EFFECTIVE) == XKB_STATE_LAYOUT_EFFECTIVE) {
+ //qWarning("TODO: Support KeyboardLayoutChange on QPA (QTBUG-27681)");
}
- if (mib != -1) {
- mapper = QTextCodec::codecForMib(mib);
- if (chars.isEmpty())
- chars.resize(1);
- chars[0] = (unsigned char) (keysym & 0xff); // get only the fourth bit for conversion later
- count = 1;
+ }
+}
+
+#else
+void QXcbKeyboard::updateXKBStateFromCore(quint16 state)
+{
+ if (!m_config)
+ return;
+
+ quint32 modsDepressed, modsLatched, modsLocked;
+ modsDepressed = xkb_state_serialize_mods(xkb_state, XKB_STATE_MODS_DEPRESSED);
+ modsLatched = xkb_state_serialize_mods(xkb_state, XKB_STATE_MODS_LATCHED);
+ modsLocked = xkb_state_serialize_mods(xkb_state, XKB_STATE_MODS_LOCKED);
+
+ quint32 xkbMask = xkbModMask(state);
+ xkb_state_component newState;
+ newState = xkb_state_update_mask(xkb_state,
+ modsDepressed & xkbMask,
+ modsLatched & xkbMask,
+ modsLocked & xkbMask,
+ 0,
+ 0,
+ (state >> 13) & 3); // bits 13 and 14 report the state keyboard group
+
+ if ((newState & XKB_STATE_LAYOUT_EFFECTIVE) == XKB_STATE_LAYOUT_EFFECTIVE) {
+ //qWarning("TODO: Support KeyboardLayoutChange on QPA (QTBUG-27681)");
+ }
+}
+
+quint32 QXcbKeyboard::xkbModMask(quint16 state)
+{
+ quint32 xkb_mask = 0;
+
+ if ((state & XCB_MOD_MASK_SHIFT) && xkb_mods.shift != XKB_MOD_INVALID)
+ xkb_mask |= (1 << xkb_mods.shift);
+ if ((state & XCB_MOD_MASK_LOCK) && xkb_mods.lock != XKB_MOD_INVALID)
+ xkb_mask |= (1 << xkb_mods.lock);
+ if ((state & XCB_MOD_MASK_CONTROL) && xkb_mods.control != XKB_MOD_INVALID)
+ xkb_mask |= (1 << xkb_mods.control);
+ if ((state & XCB_MOD_MASK_1) && xkb_mods.mod1 != XKB_MOD_INVALID)
+ xkb_mask |= (1 << xkb_mods.mod1);
+ if ((state & XCB_MOD_MASK_2) && xkb_mods.mod2 != XKB_MOD_INVALID)
+ xkb_mask |= (1 << xkb_mods.mod2);
+ if ((state & XCB_MOD_MASK_3) && xkb_mods.mod3 != XKB_MOD_INVALID)
+ xkb_mask |= (1 << xkb_mods.mod3);
+ if ((state & XCB_MOD_MASK_4) && xkb_mods.mod4 != XKB_MOD_INVALID)
+ xkb_mask |= (1 << xkb_mods.mod4);
+ if ((state & XCB_MOD_MASK_5) && xkb_mods.mod5 != XKB_MOD_INVALID)
+ xkb_mask |= (1 << xkb_mods.mod5);
+
+ return xkb_mask;
+}
+
+void QXcbKeyboard::updateXKBMods()
+{
+ xkb_mods.shift = xkb_map_mod_get_index(xkb_keymap, XKB_MOD_NAME_SHIFT);
+ xkb_mods.lock = xkb_map_mod_get_index(xkb_keymap, XKB_MOD_NAME_CAPS);
+ xkb_mods.control = xkb_map_mod_get_index(xkb_keymap, XKB_MOD_NAME_CTRL);
+ xkb_mods.mod1 = xkb_map_mod_get_index(xkb_keymap, "Mod1");
+ xkb_mods.mod2 = xkb_map_mod_get_index(xkb_keymap, "Mod2");
+ xkb_mods.mod3 = xkb_map_mod_get_index(xkb_keymap, "Mod3");
+ xkb_mods.mod4 = xkb_map_mod_get_index(xkb_keymap, "Mod4");
+ xkb_mods.mod5 = xkb_map_mod_get_index(xkb_keymap, "Mod5");
+}
+#endif
+
+QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const
+{
+ // turn off the modifier bits which doesn't participate in shortcuts
+ Qt::KeyboardModifiers notNeeded = Qt::MetaModifier | Qt::KeypadModifier | Qt::GroupSwitchModifier;
+ Qt::KeyboardModifiers modifiers = event->modifiers() &= ~notNeeded;
+ // create a fresh kb state and test against the relevant modifier combinations
+ // NOTE: it should be possible to query the keymap directly, once it gets
+ // supported by libxkbcommon
+ struct xkb_state * kb_state = xkb_state_new(xkb_keymap);
+ if (!kb_state) {
+ qWarning("QXcbKeyboard: failed to compile xkb keymap");
+ return QList<int>();
+ }
+ // get kb state from the master xkb_state and update the temporary kb_state
+ xkb_layout_index_t baseLayout = xkb_state_serialize_layout(xkb_state, XKB_STATE_LAYOUT_DEPRESSED);
+ xkb_layout_index_t latchedLayout = xkb_state_serialize_layout(xkb_state, XKB_STATE_LAYOUT_LATCHED);
+ xkb_layout_index_t lockedLayout = xkb_state_serialize_layout(xkb_state, XKB_STATE_LAYOUT_LOCKED);
+ xkb_mod_index_t latchedMods = xkb_state_serialize_mods(xkb_state, XKB_STATE_MODS_LATCHED);
+ xkb_mod_index_t lockedMods = xkb_state_serialize_mods(xkb_state, XKB_STATE_MODS_LOCKED);
+
+ xkb_state_update_mask(kb_state, 0, latchedMods, lockedMods,
+ baseLayout, latchedLayout, lockedLayout);
+
+ xkb_keysym_t sym = xkb_state_key_get_one_sym(kb_state, event->nativeScanCode());
+ if (sym == XKB_KEY_NoSymbol)
+ return QList<int>();
+
+ QList<int> result;
+ int baseQtKey = keysymToQtKey(sym, modifiers, keysymToUnicode(sym));
+ result += (baseQtKey + modifiers); // The base key is _always_ valid, of course
+
+ xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift");
+ xkb_mod_index_t altMod = xkb_keymap_mod_get_index(xkb_keymap, "Alt");
+ xkb_mod_index_t controlMod = xkb_keymap_mod_get_index(xkb_keymap, "Control");
+
+ xkb_mod_mask_t depressed;
+
+ int qtKey = 0;
+ //obtain a list of possible shortcuts for the given key event
+ for (uint i = 1; i < sizeof(ModsTbl) / sizeof(*ModsTbl) ; ++i) {
+ Qt::KeyboardModifiers neededMods = ModsTbl[i];
+ if ((modifiers & neededMods) == neededMods) {
+
+ depressed = 0;
+ if (neededMods & Qt::AltModifier)
+ depressed |= (1 << altMod);
+ if (neededMods & Qt::ShiftModifier)
+ depressed |= (1 << shiftMod);
+ if (neededMods & Qt::ControlModifier)
+ depressed |= (1 << controlMod);
+
+ // update a keyboard state from a set of explicit masks
+ xkb_state_update_mask(kb_state, depressed, latchedMods, lockedMods,
+ baseLayout, latchedLayout, lockedLayout);
+ sym = xkb_state_key_get_one_sym(kb_state, event->nativeScanCode());
+
+ if (sym == XKB_KEY_NoSymbol)
+ continue;
+
+ Qt::KeyboardModifiers mods = modifiers & ~neededMods;
+ qtKey = keysymToQtKey(sym, mods, keysymToUnicode(sym));
+
+ if (qtKey == baseQtKey)
+ continue;
+
+ result += (qtKey + mods);
}
- } else if (keysym >= 0x1000000 && keysym <= 0x100ffff) {
- converted = (ushort) (keysym - 0x1000000);
- mapper = 0;
}
- if (count < (int)chars.size()-1)
- chars[count] = '\0';
-
- QString text;
- if (!mapper && converted.unicode() != 0x0) {
- text = converted;
- } else if (!chars.isEmpty()) {
- // convert chars (8bit) to text (unicode).
- if (mapper)
- text = mapper->toUnicode(chars.data(), count, 0);
- if (text.isEmpty()) {
- // no mapper, or codec couldn't convert to unicode (this
- // can happen when running in the C locale or with no LANG
- // set). try converting from latin-1
- text = QString::fromLatin1(chars);
+
+ xkb_state_unref(kb_state);
+ return result;
+ }
+
+int QXcbKeyboard::keysymToQtKey(xcb_keysym_t key) const
+{
+ int code = 0;
+ int i = 0;
+ while (KeyTbl[i]) {
+ if (key == KeyTbl[i]) {
+ code = (int)KeyTbl[i+1];
+ break;
}
+ i += 2;
}
- modifiers = translateModifiers(xmodifiers);
+ return code;
+}
+int QXcbKeyboard::keysymToQtKey(xcb_keysym_t keysym, Qt::KeyboardModifiers &modifiers, QString text) const
+{
+ int code = 0;
+ QTextCodec *systemCodec = QTextCodec::codecForLocale();
// Commentary in X11/keysymdef says that X codes match ASCII, so it
// is safe to use the locale functions to process X codes in ISO8859-1.
- //
// This is mainly for compatibility - applications should not use the
- // Qt keycodes between 128 and 255, but should rather use the
- // QKeyEvent::text().
- //
- if (keysym < 128 || (keysym < 256 && (!mapper || mapper->mibEnum()==4))) {
+ // Qt keycodes between 128 and 255 (extended ACSII codes), but should
+ // rather use the QKeyEvent::text().
+ if (keysym < 128 || (keysym < 256 && systemCodec->mibEnum() == 4)) {
// upper-case key, if known
code = isprint((int)keysym) ? toupper((int)keysym) : 0;
} else if (keysym >= XK_F1 && keysym <= XK_F35) {
@@ -853,48 +900,207 @@ QString QXcbKeyboard::translateKeySym(xcb_keysym_t keysym, uint xmodifiers,
// numeric keypad keys
code = Qt::Key_0 + ((int)keysym - XK_KP_0);
} else {
- code = translateKeySym(keysym);
+ code = keysymToQtKey(keysym);
}
modifiers |= Qt::KeypadModifier;
- } else if (text.length() == 1 && text.unicode()->unicode() > 0x1f && text.unicode()->unicode() != 0x7f && !(keysym >= XK_dead_grave && keysym <= XK_dead_horn)) {
+ } else if (text.length() == 1 && text.unicode()->unicode() > 0x1f
+ && text.unicode()->unicode() != 0x7f
+ && !(keysym >= XK_dead_grave && keysym <= XK_dead_currency)) {
code = text.unicode()->toUpper().unicode();
} else {
// any other keys
- code = translateKeySym(keysym);
-
- if (code == Qt::Key_Tab && (modifiers & Qt::ShiftModifier)) {
- // map shift+tab to shift+backtab, QShortcutMap knows about it
- // and will handle it.
- code = Qt::Key_Backtab;
- text = QString();
- }
+ code = keysymToQtKey(keysym);
}
- return text;
+ return code;
}
QXcbKeyboard::QXcbKeyboard(QXcbConnection *connection)
: QXcbObject(connection)
, m_autorepeat_code(0)
+ , xkb_context(0)
+ , xkb_keymap(0)
+ , xkb_state(0)
+#ifndef QT_NO_XKB
+ , core_device_id(0)
+#endif
{
+ updateKeymap();
+#ifndef QT_NO_XKB
+ if (connection->hasXKB()) {
+
+ updateVModMapping();
+ updateVModToRModMapping();
+
+ // get the core keyboard id
+ xcb_xkb_get_device_info_cookie_t device_id_cookie;
+ xcb_xkb_get_device_info_reply_t *device_id;
+
+ device_id_cookie = xcb_xkb_get_device_info(xcb_connection(),
+ XCB_XKB_ID_USE_CORE_KBD,
+ 0, 0, 0, 0, 0, 0);
+
+ device_id = xcb_xkb_get_device_info_reply(xcb_connection(), device_id_cookie, 0);
+ if (!device_id) {
+ qWarning("Qt: couldn't get core keyboard device info");
+ return;
+ }
+
+ core_device_id = device_id->deviceID;
+ free(device_id);
+ }
+#else
m_key_symbols = xcb_key_symbols_alloc(xcb_connection());
- setupModifiers();
+ updateModifiers();
+#endif
}
QXcbKeyboard::~QXcbKeyboard()
{
+ if (xkb_state)
+ xkb_state_unref(xkb_state);
+ if (xkb_keymap)
+ xkb_keymap_unref(xkb_keymap);
+ if (xkb_context)
+ xkb_context_unref(xkb_context);
+#ifdef QT_NO_XKB
xcb_key_symbols_free(m_key_symbols);
+#endif
+}
+
+#ifndef QT_NO_XKB
+void QXcbKeyboard::updateVModMapping()
+{
+ xcb_xkb_get_names_cookie_t names_cookie;
+ xcb_xkb_get_names_reply_t *name_reply;
+ xcb_xkb_get_names_value_list_t names_list;
+
+ memset(&vmod_masks, 0, sizeof(vmod_masks));
+
+ names_cookie = xcb_xkb_get_names(xcb_connection(),
+ XCB_XKB_ID_USE_CORE_KBD,
+ XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES);
+
+ name_reply = xcb_xkb_get_names_reply(xcb_connection(), names_cookie, 0);
+ if (!name_reply) {
+ qWarning("Qt: failed to retrieve the virtual modifier names from XKB");
+ return;
+ }
+
+ const void *buffer = xcb_xkb_get_names_value_list(name_reply);
+ xcb_xkb_get_names_value_list_unpack(buffer,
+ name_reply->nTypes,
+ name_reply->indicators,
+ name_reply->virtualMods,
+ name_reply->groupNames,
+ name_reply->nKeys,
+ name_reply->nKeyAliases,
+ name_reply->nRadioGroups,
+ name_reply->which,
+ &names_list);
+
+ int count = 0;
+ uint vmod_mask, bit;
+ char *vmod_name;
+ vmod_mask = name_reply->virtualMods;
+ // find the virtual modifiers for which names are defined.
+ for (bit = 1; vmod_mask; bit <<= 1) {
+ vmod_name = 0;
+
+ if (!(vmod_mask & bit))
+ continue;
+
+ vmod_mask &= ~bit;
+ // virtualModNames - the list of virtual modifier atoms beginning with the lowest-numbered
+ // virtual modifier for which a name is defined and proceeding to the highest.
+ QByteArray atomName = connection()->atomName(names_list.virtualModNames[count]);
+ vmod_name = atomName.data();
+ count++;
+
+ if (!vmod_name)
+ continue;
+
+ // similarly we could retrieve NumLock, Super, Hyper modifiers if needed.
+ if (qstrcmp(vmod_name, "Alt") == 0)
+ vmod_masks.alt = bit;
+ else if (qstrcmp(vmod_name, "Meta") == 0)
+ vmod_masks.meta = bit;
+ else if (qstrcmp(vmod_name, "AltGr") == 0)
+ vmod_masks.altgr = bit;
+ }
+
+ free(name_reply);
}
-void QXcbKeyboard::setupModifiers()
+void QXcbKeyboard::updateVModToRModMapping()
+{
+ xcb_xkb_get_map_cookie_t map_cookie;
+ xcb_xkb_get_map_reply_t *map_reply;
+ xcb_xkb_get_map_map_t map;
+
+ memset(&rmod_masks, 0, sizeof(rmod_masks));
+
+ map_cookie = xcb_xkb_get_map(xcb_connection(),
+ XCB_XKB_ID_USE_CORE_KBD,
+ XCB_XKB_MAP_PART_VIRTUAL_MODS,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+
+ map_reply = xcb_xkb_get_map_reply(xcb_connection(), map_cookie, 0);
+ if (!map_reply) {
+ qWarning("Qt: failed to retrieve the virtual modifier map from XKB");
+ return;
+ }
+
+ const void *buffer = xcb_xkb_get_map_map(map_reply);
+ xcb_xkb_get_map_map_unpack(buffer,
+ map_reply->nTypes,
+ map_reply->nKeySyms,
+ map_reply->nKeyActions,
+ map_reply->totalActions,
+ map_reply->totalKeyBehaviors,
+ map_reply->nVModMapKeys,
+ map_reply->totalKeyExplicit,
+ map_reply->totalModMapKeys,
+ map_reply->totalVModMapKeys,
+ map_reply->present,
+ &map);
+
+ uint vmod_mask, bit;
+ // the virtual modifiers mask for which a set of corresponding
+ // real modifiers is to be returned
+ vmod_mask = map_reply->virtualMods;
+ int count = 0;
+
+ for (bit = 1; vmod_mask; bit <<= 1) {
+ uint modmap;
+
+ if (!(vmod_mask & bit))
+ continue;
+
+ vmod_mask &= ~bit;
+ // real modifier bindings for the specified virtual modifiers
+ modmap = map.vmods_rtrn[count];
+ count++;
+
+ if (vmod_masks.alt == bit)
+ rmod_masks.alt = modmap;
+ else if (vmod_masks.meta == bit)
+ rmod_masks.meta = modmap;
+ else if (vmod_masks.altgr == bit)
+ rmod_masks.altgr = modmap;
+ }
+
+ free(map_reply);
+}
+#else
+void QXcbKeyboard::updateModifiers()
{
- m_alt_mask = 0;
- m_super_mask = 0;
- m_hyper_mask = 0;
- m_meta_mask = 0;
- m_mode_switch_mask = 0;
- m_num_lock_mask = 0;
- m_caps_lock_mask = 0;
+ // The core protocol does not provide a convenient way to determine the mapping
+ // of modifier bits. Clients must retrieve and search the modifier map to determine
+ // the keycodes bound to each modifier, and then retrieve and search the keyboard
+ // mapping to determine the keysyms bound to the keycodes. They must repeat this
+ // process for all modifiers whenever any part of the modifier mapping is changed.
+ memset(&rmod_masks, 0, sizeof(rmod_masks));
xcb_generic_error_t *error = 0;
xcb_connection_t *conn = xcb_connection();
@@ -902,15 +1108,14 @@ void QXcbKeyboard::setupModifiers()
xcb_get_modifier_mapping_reply_t *modMapReply =
xcb_get_modifier_mapping_reply(conn, modMapCookie, &error);
if (error) {
- qWarning("QXcbKeyboard: failed to get modifier mapping");
+ qWarning("Qt: failed to get modifier mapping");
free(error);
return;
}
// for Alt and Meta L and R are the same
static const xcb_keysym_t symbols[] = {
- XK_Alt_L, XK_Meta_L, XK_Super_L, XK_Super_R,
- XK_Hyper_L, XK_Hyper_R, XK_Num_Lock, XK_Mode_switch, XK_Caps_Lock,
+ XK_Alt_L, XK_Meta_L, XK_Mode_switch
};
static const size_t numSymbols = sizeof symbols / sizeof *symbols;
@@ -928,8 +1133,15 @@ void QXcbKeyboard::setupModifiers()
xcb_keycode_t keyCode = modMap[x + bit * w];
xcb_keycode_t *itk = modKeyCodes[i];
while (itk && *itk != XCB_NO_SYMBOL)
- if (*itk++ == keyCode)
- setMask(symbols[i], mask);
+ if (*itk++ == keyCode) {
+ uint sym = symbols[i];
+ if ((sym == XK_Alt_L || sym == XK_Alt_R))
+ rmod_masks.alt = mask;
+ if ((sym == XK_Meta_L || sym == XK_Meta_R))
+ rmod_masks.meta = mask;
+ if (sym == XK_Mode_switch)
+ rmod_masks.altgr = mask;
+ }
}
}
}
@@ -938,53 +1150,7 @@ void QXcbKeyboard::setupModifiers()
free(modKeyCodes[i]);
free(modMapReply);
}
-
-void QXcbKeyboard::setMask(uint sym, uint mask)
-{
- if (m_alt_mask == 0
- && m_meta_mask != mask
- && m_super_mask != mask
- && m_hyper_mask != mask
- && (sym == XK_Alt_L || sym == XK_Alt_R))
- m_alt_mask = mask;
-
- if (m_meta_mask == 0
- && m_alt_mask != mask
- && m_super_mask != mask
- && m_hyper_mask != mask
- && (sym == XK_Meta_L || sym == XK_Meta_R))
- m_meta_mask = mask;
-
- if (m_super_mask == 0
- && m_alt_mask != mask
- && m_meta_mask != mask
- && m_hyper_mask != mask
- && (sym == XK_Super_L || sym == XK_Super_R))
- m_super_mask = mask;
-
- if (m_hyper_mask == 0
- && m_alt_mask != mask
- && m_meta_mask != mask
- && m_super_mask != mask
- && (sym == XK_Hyper_L || sym == XK_Hyper_R))
- m_hyper_mask = mask;
-
- if (m_mode_switch_mask == 0
- && m_alt_mask != mask
- && m_meta_mask != mask
- && m_super_mask != mask
- && m_hyper_mask != mask
- && sym == XK_Mode_switch)
- m_mode_switch_mask = mask;
-
- if (m_num_lock_mask == 0 && sym == XK_Num_Lock)
- m_num_lock_mask = mask;
-
- if (m_caps_lock_mask == 0 && sym == XK_Caps_Lock)
- m_caps_lock_mask = mask;
-}
-
-// #define XCB_KEYBOARD_DEBUG
+#endif
class KeyChecker
{
@@ -1046,16 +1212,21 @@ void QXcbKeyboard::handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycod
quint16 state, xcb_timestamp_t time)
{
Q_XCB_NOOP(connection());
-#ifdef XCB_KEYBOARD_DEBUG
- printf("key code: %d, state: %d, syms: ", code, state);
- for (int i = 0; i <= 5; ++i) {
- printf("%d ", xcb_key_symbols_get_keysym(m_key_symbols, code, i));
- }
- printf("\n");
+
+ if (!m_config)
+ return;
+ // It is crucial the order of xkb_state_key_get_one_sym &
+ // xkb_state_update_key operations is not reversed!
+ xcb_keysym_t sym = xkb_state_key_get_one_sym(xkb_state, code);
+#ifdef QT_NO_XKB
+ enum xkb_key_direction direction;
+ if (type == QEvent::KeyPress)
+ direction = XKB_KEY_DOWN;
+ else
+ direction = XKB_KEY_UP;
+ xkb_state_update_key(xkb_state, code, direction);
#endif
- QByteArray chars;
- xcb_keysym_t sym = lookupString(window, state, code, type, &chars);
QPlatformInputContext *inputContext = QGuiApplicationPrivate::platformIntegration()->inputContext();
QMetaMethod method;
@@ -1077,12 +1248,12 @@ void QXcbKeyboard::handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycod
return;
}
- Qt::KeyboardModifiers modifiers;
- int qtcode = 0;
- int count = chars.count();
- QString string = translateKeySym(sym, state, qtcode, modifiers, chars, count);
+ Qt::KeyboardModifiers modifiers = translateModifiers(state);
+ QString string = keysymToUnicode(sym);
+ int count = string.size();
string.truncate(count);
+ int qtcode = keysymToQtKey(sym, modifiers, string);
bool isAutoRepeat = false;
if (type == QEvent::KeyPress) {
@@ -1141,35 +1312,33 @@ void QXcbKeyboard::handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycod
}
}
-xcb_keysym_t QXcbKeyboard::lookupString(QWindow *window, uint state, xcb_keycode_t code,
- QEvent::Type type, QByteArray *chars)
+QString QXcbKeyboard::keysymToUnicode(xcb_keysym_t sym) const
{
-#ifdef XCB_USE_XLIB
- xcb_window_t xWindow = static_cast<QXcbWindow *>(window->handle())->xcb_window();
- xcb_window_t root = connection()->screens().at(0)->root();
- void *xDisplay = connection()->xlib_display();
- int xType = (type == QEvent::KeyRelease ? 3 : 2);
- return q_XLookupString(xDisplay, xWindow, root, state, code, xType, chars);
-#else
-
- // No XLookupString available. The following is really incomplete...
-
- int col = state & XCB_MOD_MASK_SHIFT ? 1 : 0;
- const int altGrOffset = 4;
- if (state & 128)
- col += altGrOffset;
- xcb_keysym_t sym = xcb_key_symbols_get_keysym(m_key_symbols, code, col);
- if (sym == XCB_NO_SYMBOL)
- sym = xcb_key_symbols_get_keysym(m_key_symbols, code, col ^ 0x1);
- if (state & XCB_MOD_MASK_LOCK && sym <= 0x7f && isprint(sym)) {
- if (isupper(sym))
- sym = tolower(sym);
+ QByteArray chars;
+ int bytes;
+ chars.resize(7);
+
+#ifdef XKBCOMMON_0_2_0
+ if (needWorkaround(sym)) {
+ quint32 codepoint;
+ if (sym == XKB_KEY_KP_Space)
+ codepoint = XKB_KEY_space & 0x7f;
else
- sym = toupper(sym);
- }
- return sym;
+ codepoint = sym & 0x7f;
+ bytes = utf32_to_utf8(codepoint, chars.data());
+ } else {
+ bytes = xkb_keysym_to_utf8(sym, chars.data(), chars.size());
+ }
+#else
+ bytes = xkb_keysym_to_utf8(sym, chars.data(), chars.size());
#endif
+
+ if (bytes == -1)
+ qWarning("QXcbKeyboard::handleKeyEvent - buffer too small");
+ chars.resize(bytes-1);
+
+ return QString::fromUtf8(chars);
}
void QXcbKeyboard::handleKeyPressEvent(QXcbWindowEventListener *eventListener, const xcb_key_press_event_t *event)
@@ -1189,10 +1358,20 @@ void QXcbKeyboard::handleKeyReleaseEvent(QXcbWindowEventListener *eventListener,
handleKeyEvent(window->window(), QEvent::KeyRelease, event->detail, event->state, event->time);
}
-void QXcbKeyboard::handleMappingNotifyEvent(const xcb_mapping_notify_event_t *event)
+void QXcbKeyboard::handleMappingNotifyEvent(const void *event)
{
- xcb_refresh_keyboard_mapping(m_key_symbols, const_cast<xcb_mapping_notify_event_t *>(event));
- setupModifiers();
+ updateKeymap();
+#ifdef QT_NO_XKB
+ void *ev = const_cast<void *>(event);
+ xcb_refresh_keyboard_mapping(m_key_symbols, static_cast<xcb_mapping_notify_event_t *>(ev));
+ updateModifiers();
+#else
+ Q_UNUSED(event)
+ if (connection()->hasXKB()) {
+ updateVModMapping();
+ updateVModToRModMapping();
+ }
+#endif
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h
index 3c71daa57f..af6677c20f 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.h
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.h
@@ -44,7 +44,11 @@
#include "qxcbobject.h"
-#include "xcb/xcb_keysyms.h"
+#ifdef QT_NO_XKB
+#include <xcb/xcb_keysyms.h>
+#endif
+
+#include <xkbcommon/xkbcommon.h>
#include <QEvent>
@@ -56,37 +60,80 @@ class QXcbKeyboard : public QXcbObject
{
public:
QXcbKeyboard(QXcbConnection *connection);
+
~QXcbKeyboard();
void handleKeyPressEvent(QXcbWindowEventListener *eventListener, const xcb_key_press_event_t *event);
void handleKeyReleaseEvent(QXcbWindowEventListener *eventListener, const xcb_key_release_event_t *event);
- void handleMappingNotifyEvent(const xcb_mapping_notify_event_t *event);
+ void handleMappingNotifyEvent(const void *event);
- Qt::KeyboardModifiers translateModifiers(int s);
+ Qt::KeyboardModifiers translateModifiers(int s) const;
-private:
+ void updateKeymap();
+ QList<int> possibleKeys(const QKeyEvent *e) const;
+
+#ifdef QT_NO_XKB
+ void updateXKBStateFromCore(quint16 state);
+ void updateXKBMods();
+ quint32 xkbModMask(quint16 state);
+#else
+ int coreDeviceId() { return core_device_id; }
+ void updateXKBState(xcb_xkb_state_notify_event_t *state);
+#endif
+
+protected:
void handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycode_t code, quint16 state, xcb_timestamp_t time);
- int translateKeySym(uint key) const;
- QString translateKeySym(xcb_keysym_t keysym, uint xmodifiers,
- int &code, Qt::KeyboardModifiers &modifiers,
- QByteArray &chars, int &count);
- void setupModifiers();
- void setMask(uint sym, uint mask);
- xcb_keysym_t lookupString(QWindow *window, uint state, xcb_keycode_t code,
- QEvent::Type type, QByteArray *chars);
-
- uint m_alt_mask;
- uint m_super_mask;
- uint m_hyper_mask;
- uint m_meta_mask;
- uint m_mode_switch_mask;
- uint m_num_lock_mask;
- uint m_caps_lock_mask;
+ QString keysymToUnicode(xcb_keysym_t sym) const;
- xcb_key_symbols_t *m_key_symbols;
+ int keysymToQtKey(xcb_keysym_t keysym) const;
+ int keysymToQtKey(xcb_keysym_t keysym, Qt::KeyboardModifiers &modifiers, QString text) const;
+
+ void readXKBConfig(struct xkb_rule_names *names);
+
+#ifdef QT_NO_XKB
+ void updateModifiers();
+#else
+ void updateVModMapping();
+ void updateVModToRModMapping();
+#endif
+
+private:
+ bool m_config;
xcb_keycode_t m_autorepeat_code;
+
+ struct xkb_context *xkb_context;
+ struct xkb_keymap *xkb_keymap;
+ struct xkb_state *xkb_state;
+
+ struct _mod_masks {
+ uint alt;
+ uint altgr;
+ uint meta;
+ };
+
+ _mod_masks rmod_masks;
+
+#ifdef QT_NO_XKB
+ xcb_key_symbols_t *m_key_symbols;
+
+ struct _xkb_mods {
+ xkb_mod_index_t shift;
+ xkb_mod_index_t lock;
+ xkb_mod_index_t control;
+ xkb_mod_index_t mod1;
+ xkb_mod_index_t mod2;
+ xkb_mod_index_t mod3;
+ xkb_mod_index_t mod4;
+ xkb_mod_index_t mod5;
+ };
+
+ _xkb_mods xkb_mods;
+#else
+ _mod_masks vmod_masks;
+ int core_device_id;
+#endif
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index da60cfd2bd..7d832a1c08 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -58,7 +58,9 @@
#include "qglxintegration.h"
#endif
-#ifndef XCB_USE_XLIB
+#ifdef XCB_USE_XLIB
+# include <X11/Xlib.h>
+#else
# include <stdio.h>
#endif
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index a6ead49a27..37c6c97bc4 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -44,6 +44,7 @@
#include "qxcbcursor.h"
#include "qxcbimage.h"
#include "qnamespace.h"
+#include "qxcbxsettings.h"
#include <stdio.h>
@@ -68,6 +69,7 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, xcb_screen_t *scr,
, m_refreshRate(60)
, m_forcedDpi(-1)
, m_hintStyle(QFontEngine::HintStyle(-1))
+ , m_xSettings(0)
{
if (connection->hasXRandr())
xcb_randr_select_input(xcb_connection(), screen()->root, true);
@@ -580,4 +582,12 @@ void QXcbScreen::readXResources()
}
}
+QXcbXSettings *QXcbScreen::xSettings() const
+{
+ if (!m_xSettings) {
+ QXcbScreen *self = const_cast<QXcbScreen *>(this);
+ self->m_xSettings = new QXcbXSettings(self);
+ }
+ return m_xSettings;
+}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index 0382be8a29..c36492db64 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE
class QXcbConnection;
class QXcbCursor;
+class QXcbXSettings;
class QXcbScreen : public QXcbObject, public QPlatformScreen
{
@@ -102,6 +103,9 @@ public:
void readXResources();
QFontEngine::HintStyle hintStyle() const { return m_hintStyle; }
+
+ QXcbXSettings *xSettings() const;
+
private:
static bool xResource(const QByteArray &identifier,
const QByteArray &expectedIdentifier,
@@ -127,6 +131,7 @@ private:
int m_refreshRate;
int m_forcedDpi;
QFontEngine::HintStyle m_hintStyle;
+ QXcbXSettings *m_xSettings;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbxsettings.cpp b/src/plugins/platforms/xcb/qxcbxsettings.cpp
new file mode 100644
index 0000000000..7ffd3e105f
--- /dev/null
+++ b/src/plugins/platforms/xcb/qxcbxsettings.cpp
@@ -0,0 +1,280 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxcbxsettings.h"
+
+#include <QtCore/QByteArray>
+
+#include <X11/extensions/XIproto.h>
+
+QT_BEGIN_NAMESPACE
+/* Implementation of http://standards.freedesktop.org/xsettings-spec/xsettings-0.5.html */
+
+enum XSettingsType {
+ XSettingsTypeInteger = 0,
+ XSettingsTypeString = 1,
+ XSettingsTypeColor = 2
+};
+
+class QXcbXSettingsCallback
+{
+public:
+ QXcbXSettings::PropertyChangeFunc func;
+ void *handle;
+};
+
+class QXcbXSettingsPropertyValue
+{
+public:
+ QXcbXSettingsPropertyValue()
+ : last_change_serial(-1)
+ {}
+
+ void updateValue(QXcbScreen *screen, const QByteArray &name, const QVariant &value, int last_change_serial)
+ {
+ if (last_change_serial <= this->last_change_serial)
+ return;
+ this->value = value;
+ this->last_change_serial = last_change_serial;
+ QLinkedList<QXcbXSettingsCallback>::const_iterator it = callback_links.begin();
+ for (;it != callback_links.end();++it) {
+ it->func(screen,name,value,it->handle);
+ }
+ }
+
+ void addCallback(QXcbXSettings::PropertyChangeFunc func, void *handle)
+ {
+ QXcbXSettingsCallback callback;
+ callback.func = func;
+ callback.handle = handle;
+ callback_links.append(callback);
+ }
+
+ QVariant value;
+ int last_change_serial;
+ QLinkedList<QXcbXSettingsCallback> callback_links;
+
+};
+
+class QXcbXSettingsPrivate
+{
+public:
+ QXcbXSettingsPrivate(QXcbScreen *screen)
+ : screen(screen)
+ {
+ }
+
+ QByteArray getSettings()
+ {
+ QXcbConnectionGrabber connectionGrabber(screen->connection());
+
+ int offset = 0;
+ QByteArray settings;
+ xcb_atom_t _xsettings_atom = screen->connection()->atom(QXcbAtom::_XSETTINGS_SETTINGS);
+ while (1) {
+ xcb_get_property_cookie_t get_prop_cookie =
+ xcb_get_property_unchecked(screen->xcb_connection(),
+ false,
+ x_settings_window,
+ _xsettings_atom,
+ _xsettings_atom,
+ offset/4,
+ 8192);
+ xcb_get_property_reply_t *reply = xcb_get_property_reply(screen->xcb_connection(), get_prop_cookie, NULL);
+ bool more = false;
+ if (!reply)
+ return settings;
+
+ settings += QByteArray((const char *)xcb_get_property_value(reply), xcb_get_property_value_length(reply));
+ offset += xcb_get_property_value_length(reply);
+ more = reply->bytes_after != 0;
+
+ free(reply);
+
+ if (!more)
+ break;
+ }
+
+ return settings;
+ }
+
+ static int round_to_nearest_multiple_of_4(int value)
+ {
+ int remainder = value % 4;
+ if (!remainder)
+ return value;
+ return value + 4 - remainder;
+ }
+
+ void populateSettings(const QByteArray &xSettings)
+ {
+ if (xSettings.length() < 12)
+ return;
+ // we ignore byteorder for now
+ char byteOrder = xSettings.at(1);
+ Q_UNUSED(byteOrder);
+ uint serial = *reinterpret_cast<const uint *>(xSettings.mid(4,4).constData());
+ serial = serial;
+ uint number_of_settings = *reinterpret_cast<const uint *>(xSettings.mid(8,4).constData());
+
+ const char *data = xSettings.constData() + 12;
+ size_t offset = 0;
+ for (uint i = 0; i < number_of_settings; i++) {
+ int local_offset = 0;
+ XSettingsType type = static_cast<XSettingsType>(*reinterpret_cast<const quint8 *>(data + offset));
+ local_offset += 2;
+
+ quint16 name_len = *reinterpret_cast<const quint16 *>(data + offset + local_offset);
+ local_offset += 2;
+
+ QByteArray name(data + offset + local_offset, name_len);
+ local_offset += round_to_nearest_multiple_of_4(name_len);
+
+ int last_change_serial = *reinterpret_cast<const int *>(data + offset + local_offset);
+ Q_UNUSED(last_change_serial);
+ local_offset += 4;
+
+ QVariant value;
+ if (type == XSettingsTypeString) {
+ int value_length = *reinterpret_cast<const int *>(data + offset + local_offset);
+ local_offset+=4;
+ QByteArray value_string(data + offset + local_offset, value_length);
+ value.setValue(value_string);
+ local_offset += round_to_nearest_multiple_of_4(value_length);
+ } else if (type == XSettingsTypeInteger) {
+ int value_length = *reinterpret_cast<const int *>(data + offset + local_offset);
+ local_offset += 4;
+ value.setValue(value_length);
+ } else if (type == XSettingsTypeColor) {
+ quint16 red = *reinterpret_cast<const quint16 *>(data + offset + local_offset);
+ local_offset += 2;
+ quint16 green = *reinterpret_cast<const quint16 *>(data + offset + local_offset);
+ local_offset += 2;
+ quint16 blue = *reinterpret_cast<const quint16 *>(data + offset + local_offset);
+ local_offset += 2;
+ quint16 alpha= *reinterpret_cast<const quint16 *>(data + offset + local_offset);
+ local_offset += 2;
+ QColor color_value(red,green,blue,alpha);
+ value.setValue(color_value);
+ }
+ offset += local_offset;
+ settings[name].updateValue(screen,name,value,last_change_serial);
+ }
+
+ }
+
+ QXcbScreen *screen;
+ xcb_window_t x_settings_window;
+ int serial;
+ QMap<QByteArray, QXcbXSettingsPropertyValue> settings;
+};
+
+
+QXcbXSettings::QXcbXSettings(QXcbScreen *screen)
+ : d_ptr(new QXcbXSettingsPrivate(screen))
+{
+ QByteArray settings_atom_for_screen("_XSETTINGS_S");
+ settings_atom_for_screen.append(QByteArray::number(screen->screenNumber()));
+ xcb_intern_atom_cookie_t atom_cookie = xcb_intern_atom(screen->xcb_connection(),
+ false,
+ settings_atom_for_screen.length(),
+ settings_atom_for_screen.constData());
+ xcb_intern_atom_reply_t *atom_reply = xcb_intern_atom_reply(screen->xcb_connection(),atom_cookie,NULL);
+ xcb_atom_t selection_owner_atom = atom_reply->atom;
+ free(atom_reply);
+
+ xcb_get_selection_owner_cookie_t selection_cookie =
+ xcb_get_selection_owner(screen->xcb_connection(), selection_owner_atom);
+ xcb_get_selection_owner_reply_t *selection_result =
+ xcb_get_selection_owner_reply(screen->xcb_connection(), selection_cookie, NULL);
+
+ d_ptr->x_settings_window = selection_result->owner;
+ free(selection_result);
+
+ const uint32_t event_mask[] = { XCB_EVENT_MASK_STRUCTURE_NOTIFY|XCB_EVENT_MASK_PROPERTY_CHANGE };
+ xcb_change_window_attributes(screen->xcb_connection(),d_ptr->x_settings_window,XCB_CW_EVENT_MASK,event_mask);
+
+ d_ptr->populateSettings(d_ptr->getSettings());
+}
+
+void QXcbXSettings::handlePropertyNotifyEvent(const xcb_property_notify_event_t *event)
+{
+ Q_D(QXcbXSettings);
+ if (event->window != d->x_settings_window)
+ return;
+ d->populateSettings(d->getSettings());
+}
+
+void QXcbXSettings::registerCallbackForProperty(const QByteArray &property, QXcbXSettings::PropertyChangeFunc func, void *handle)
+{
+ Q_D(QXcbXSettings);
+ d->settings[property].addCallback(func,handle);
+}
+
+void QXcbXSettings::removeCallbackForHandle(const QByteArray &property, void *handle)
+{
+ Q_D(QXcbXSettings);
+ QXcbXSettingsPropertyValue &value = d->settings[property];
+ QLinkedList<QXcbXSettingsCallback>::iterator it = value.callback_links.begin();
+ while (it != value.callback_links.end()) {
+ if (it->handle == handle)
+ it = value.callback_links.erase(it);
+ else
+ ++it;
+ }
+}
+
+void QXcbXSettings::removeCallbackForHandle(void *handle)
+{
+ Q_D(QXcbXSettings);
+ for (QMap<QByteArray, QXcbXSettingsPropertyValue>::const_iterator it = d->settings.cbegin();
+ it != d->settings.cend(); ++it) {
+ removeCallbackForHandle(it.key(),handle);
+ }
+}
+
+QVariant QXcbXSettings::setting(const QByteArray &property) const
+{
+ Q_D(const QXcbXSettings);
+ return d->settings.value(property).value;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbxsettings.h b/src/plugins/platforms/xcb/qxcbxsettings.h
new file mode 100644
index 0000000000..16fed862bc
--- /dev/null
+++ b/src/plugins/platforms/xcb/qxcbxsettings.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QXCBXSETTINGS_H
+#define QXCBXSETTINGS_H
+
+#include "qxcbscreen.h"
+
+QT_BEGIN_NAMESPACE
+
+class QXcbXSettingsPrivate;
+
+class QXcbXSettings : public QXcbWindowEventListener
+{
+ Q_DECLARE_PRIVATE(QXcbXSettings)
+public:
+ QXcbXSettings(QXcbScreen *screen);
+
+ QVariant setting(const QByteArray &property) const;
+
+ typedef void (*PropertyChangeFunc)(QXcbScreen *screen, const QByteArray &name, const QVariant &property, void *handle);
+ void registerCallbackForProperty(const QByteArray &property, PropertyChangeFunc func, void *handle);
+ void removeCallbackForHandle(const QByteArray &property, void *handle);
+ void removeCallbackForHandle(void *handle);
+
+ void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) Q_DECL_OVERRIDE;
+private:
+ QXcbXSettingsPrivate *d_ptr;
+};
+
+QT_END_NAMESPACE
+
+#endif // QXCBXSETTINGS_H
diff --git a/src/plugins/platforms/xcb/xcb-plugin.pro b/src/plugins/platforms/xcb/xcb-plugin.pro
index 5823e97f36..82995286c4 100644
--- a/src/plugins/platforms/xcb/xcb-plugin.pro
+++ b/src/plugins/platforms/xcb/xcb-plugin.pro
@@ -6,7 +6,6 @@ load(qt_plugin)
QT += core-private gui-private platformsupport-private
-
SOURCES = \
qxcbclipboard.cpp \
qxcbconnection.cpp \
@@ -22,7 +21,7 @@ SOURCES = \
qxcbnativeinterface.cpp \
qxcbcursor.cpp \
qxcbimage.cpp \
- qxlibconvenience.cpp
+ qxcbxsettings.cpp
HEADERS = \
qxcbclipboard.h \
@@ -39,11 +38,11 @@ HEADERS = \
qxcbnativeinterface.h \
qxcbcursor.h \
qxcbimage.h \
- qxlibconvenience.h
+ qxcbxsettings.h
LIBS += -ldl
-# needed by GLX, Xcursor, XLookupString, ...
+# needed by GLX, Xcursor ...
contains(QT_CONFIG, xcb-xlib) {
DEFINES += XCB_USE_XLIB
LIBS += -lX11 -lX11-xcb
@@ -112,7 +111,23 @@ contains(QT_CONFIG, xcb-qt) {
INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude
LIBS += -lxcb -L$$OUT_PWD/xcb-static -lxcb-static
} else {
- LIBS += -lxcb -lxcb-image -lxcb-keysyms -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr
+ LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr
!contains(DEFINES, QT_NO_SHAPE):LIBS += -lxcb-shape
+ contains(DEFINES, QT_NO_XKB) {
+ LIBS += -lxcb-keysyms
+ } else {
+ LIBS += -lxcb-xkb
+ }
}
+# libxkbcommon
+contains(QT_CONFIG, xkbcommon-qt): {
+ include(../../../3rdparty/xkbcommon.pri)
+} else {
+ LIBS += $$QMAKE_LIBS_XKBCOMMON
+ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XKBCOMMON
+ equals(QMAKE_VERSION_XKBCOMMON, "0.2.0") {
+ DEFINES += XKBCOMMON_0_2_0
+ INCLUDEPATH += ../../../3rdparty/xkbcommon/xkbcommon/
+ }
+}
diff --git a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
index 01667d41db..2fd5519053 100644
--- a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
+++ b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
@@ -24,7 +24,8 @@ SOURCES += \
$$LIBXCB_DIR/shm.c \
$$LIBXCB_DIR/sync.c \
$$LIBXCB_DIR/render.c \
- $$LIBXCB_DIR/shape.c
+ $$LIBXCB_DIR/shape.c \
+ $$LIBXCB_DIR/xkb.c
#
# xcb-util
diff --git a/src/printsupport/dialogs/qabstractprintdialog.cpp b/src/printsupport/dialogs/qabstractprintdialog.cpp
index ff446d4fad..6951d8c7bc 100644
--- a/src/printsupport/dialogs/qabstractprintdialog.cpp
+++ b/src/printsupport/dialogs/qabstractprintdialog.cpp
@@ -404,8 +404,7 @@ void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter)
Mac OS X. This is no longer supported in Qt 4.5. If you want this
functionality, use QPrintDialog::open().
- \sa QPageSetupDialog, QPrinter, {Pixelator Example}, {Order Form Example},
- {Image Viewer Example}, {Scribble Example}
+ \sa QPageSetupDialog, QPrinter
*/
/*!
diff --git a/src/printsupport/dialogs/qprintpreviewdialog.cpp b/src/printsupport/dialogs/qprintpreviewdialog.cpp
index 9fa430e17e..4692fb5c3c 100644
--- a/src/printsupport/dialogs/qprintpreviewdialog.cpp
+++ b/src/printsupport/dialogs/qprintpreviewdialog.cpp
@@ -562,15 +562,8 @@ void QPrintPreviewDialogPrivate::_q_print()
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
if (printer->outputFormat() != QPrinter::NativeFormat) {
- QString title;
- QString suffix;
- if (printer->outputFormat() == QPrinter::PdfFormat) {
- title = QCoreApplication::translate("QPrintPreviewDialog", "Export to PDF");
- suffix = QLatin1String(".pdf");
- } else {
- title = QCoreApplication::translate("QPrintPreviewDialog", "Export to PostScript");
- suffix = QLatin1String(".ps");
- }
+ QString title = QCoreApplication::translate("QPrintPreviewDialog", "Export to PDF");
+ QString suffix = QLatin1String(".pdf");
QString fileName = QFileDialog::getSaveFileName(q, title, printer->outputFileName(),
QLatin1Char('*') + suffix);
if (!fileName.isEmpty()) {
diff --git a/src/printsupport/doc/qtprintsupport.qdocconf b/src/printsupport/doc/qtprintsupport.qdocconf
index 76206a8c1f..c7b14e16c1 100644
--- a/src/printsupport/doc/qtprintsupport.qdocconf
+++ b/src/printsupport/doc/qtprintsupport.qdocconf
@@ -33,10 +33,10 @@ headerdirs += ..
sourcedirs += ..
-exampledirs += ../../../examples/widgets \
- ../ \
+exampledirs += ../ \
snippets
excludedirs += ../../../examples/widgets/doc
-imagedirs += images
+imagedirs += images \
+ ../../widgets/doc/images \
diff --git a/src/printsupport/doc/snippets/widgetprinting.cpp b/src/printsupport/doc/snippets/widgetprinting.cpp
index 3abef7a9a3..a9d7ba8efa 100644
--- a/src/printsupport/doc/snippets/widgetprinting.cpp
+++ b/src/printsupport/doc/snippets/widgetprinting.cpp
@@ -39,6 +39,11 @@
****************************************************************************/
#include <QtGui>
+#include <QtWidgets>
+#ifndef QT_NO_PRINTER
+#include <QPrinter>
+#include <QPrintDialog>
+#endif
class Window : public QWidget
{
@@ -48,14 +53,20 @@ public:
Window() {
myWidget = new QPushButton("Print Me");
connect(myWidget, SIGNAL(clicked()), this, SLOT(print()));
+ myWidget2 = new QPushButton("Print Document");
+ connect(myWidget2, SIGNAL(clicked()), this, SLOT(printFile()));
+ editor = new QTextEdit(this);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(myWidget);
+ layout->addWidget(myWidget2);
+ layout->addWidget(editor);
setLayout(layout);
}
private slots:
void print() {
+ #if !defined(QT_NO_PRINTER)
QPrinter printer(QPrinter::HighResolution);
printer.setOutputFileName("test.pdf");
@@ -73,12 +84,34 @@ private slots:
myWidget->render(&painter);
//! [0]
+ #endif
+ }
+
+ void printFile() {
+ #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
+//! [1]
+ QPrinter printer;
+
+ QPrintDialog dialog(&printer, this);
+ dialog.setWindowTitle(tr("Print Document"));
+ if (editor->textCursor().hasSelection())
+ dialog.addEnabledOption(QAbstractPrintDialog::PrintSelection);
+ if (dialog.exec() != QDialog::Accepted) {
+ return;
+ }
+//! [1]
+ editor->print(&printer);
+ #endif
}
private:
QPushButton *myWidget;
+ QPushButton *myWidget2;
+ QTextEdit *editor;
};
+#include "main.moc"
+
int main(int argv, char **args)
{
QApplication app(argv, args);
@@ -88,6 +121,3 @@ int main(int argv, char **args)
return app.exec();
}
-
-#include "main.moc"
-
diff --git a/src/printsupport/doc/src/qtprintsupport-index.qdoc b/src/printsupport/doc/src/qtprintsupport-index.qdoc
index dac915692e..243468e5fb 100644
--- a/src/printsupport/doc/src/qtprintsupport-index.qdoc
+++ b/src/printsupport/doc/src/qtprintsupport-index.qdoc
@@ -35,8 +35,8 @@
Qt provides extensive cross-platform support for printing. Using the printing
systems on each platform, Qt applications can print to attached printers and
- across networks to remote printers. Qt's printing system also enables PostScript
- and PDF files to be generated, providing the foundation for basic report
+ across networks to remote printers. Qt's printing system also supports
+ PDF file generation, providing the foundation for basic report
generation facilities.
\tableofcontents
@@ -65,7 +65,7 @@
a QPrintDialog, allowing the user to specify the printer to use, paper size, and
other printing properties.
- \snippet richtext/orderform/mainwindow.cpp 18
+ \snippet widgetprinting.cpp 1
It is also possible to set certain default properties by modifying the QPrinter
before it is supplied to the print dialog. For example, applications that
diff --git a/src/printsupport/widgets/qprintpreviewwidget.cpp b/src/printsupport/widgets/qprintpreviewwidget.cpp
index b2fa2ae533..f788663041 100644
--- a/src/printsupport/widgets/qprintpreviewwidget.cpp
+++ b/src/printsupport/widgets/qprintpreviewwidget.cpp
@@ -162,7 +162,9 @@ signals:
protected:
void resizeEvent(QResizeEvent* e)
{
+ const bool blocked = verticalScrollBar()->blockSignals(true); // Don't change page, QTBUG-14517
QGraphicsView::resizeEvent(e);
+ verticalScrollBar()->blockSignals(blocked);
emit resized();
}
diff --git a/src/sql/doc/src/qsqldatatype-table.qdoc b/src/sql/doc/src/qsqldatatype-table.qdoc
index 8480b5d412..fdd5437f9d 100644
--- a/src/sql/doc/src/qsqldatatype-table.qdoc
+++ b/src/sql/doc/src/qsqldatatype-table.qdoc
@@ -30,8 +30,6 @@
\title Data Types for Qt-supported Database Systems
\brief Recommended data types for database systems
- \ingroup qt-sql
-
\section1 Recommended Data Types for Qt-Supported Database Systems
This table shows the recommended data types for extracting data from
diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc
index 3de898c344..d8d10582f6 100644
--- a/src/sql/doc/src/sql-driver.qdoc
+++ b/src/sql/doc/src/sql-driver.qdoc
@@ -30,8 +30,6 @@
\title SQL Database Drivers
\brief How to configure and install Qt SQL drivers for supported databases.
- \ingroup qt-sql
-
The Qt SQL module uses driver \l{How to Create Qt
Plugins}{plugins} to communicate with the different database
APIs. Since Qt's SQL Module API is database-independent, all
diff --git a/src/sql/doc/src/sql-programming.qdoc b/src/sql/doc/src/sql-programming.qdoc
index 9b5e9318e0..9a4f0eec75 100644
--- a/src/sql/doc/src/sql-programming.qdoc
+++ b/src/sql/doc/src/sql-programming.qdoc
@@ -35,7 +35,6 @@
/*!
\page sql-programming.html
\title SQL Programming
- \ingroup qt-sql
\nextpage Connecting to Databases
\brief Database integration for Qt applications.
@@ -105,7 +104,6 @@
/*!
\page sql-connecting.html
\title Connecting to Databases
- \ingroup qt-sql
\contentspage SQL Programming
\previouspage SQL Programming
@@ -175,7 +173,6 @@
/*!
\page sql-sqlstatements.html
\title Executing SQL Statements
- \ingroup qt-sql
\previouspage Connecting to Databases
\contentspage SQL Programming
@@ -327,7 +324,6 @@
/*!
\page sql-model.html
\title Using the SQL Model Classes
- \ingroup qt-sql
\previouspage Executing SQL Statements
\contentspage SQL Programming
@@ -474,7 +470,6 @@
/*!
\page sql-presenting.html
\title Presenting Data in a Table View
- \ingroup qt-sql
\previouspage Using the SQL Model Classes
\contentspage SQL Programming
@@ -579,7 +574,6 @@
/*!
\page sql-forms.html
\title Creating Data-Aware Forms
- \ingroup qt-sql
\previouspage Presenting Data in a Table View
\contentspage SQL Programming
diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri
index 50f49ca548..3cfb6144a1 100644
--- a/src/sql/drivers/mysql/qsql_mysql.pri
+++ b/src/sql/drivers/mysql/qsql_mysql.pri
@@ -1,10 +1,8 @@
HEADERS += $$PWD/qsql_mysql_p.h
SOURCES += $$PWD/qsql_mysql.cpp
-!isEmpty(MYSQL_PATH) {
- INCLUDEPATH += $$MYSQL_PATH/include
- QMAKE_LIBDIR += $$MYSQL_PATH/lib
-}
+QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
+LIBS += $$QT_LFLAGS_MYSQL
unix {
isEmpty(QT_LFLAGS_MYSQL) {
@@ -12,9 +10,6 @@ unix {
use_libmysqlclient_r:LIBS += -lmysqlclient_r
else:LIBS += -lmysqlclient
}
- } else {
- LIBS += $$QT_LFLAGS_MYSQL
- QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
}
} else {
!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS += -llibmysql
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 27fcc64ceb..77a59d0cf0 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -84,7 +84,7 @@
#include <time.h>
#endif
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
#include <IOKit/pwr_mgt/IOPMLib.h>
#endif
@@ -2130,7 +2130,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
int callgrindChildExitCode = 0;
#endif
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
bool macNeedsActivate = qApp && (qstrcmp(qApp->metaObject()->className(), "QApplication") == 0);
IOPMAssertionID powerID;
#endif
@@ -2145,7 +2145,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX);
#endif
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (macNeedsActivate) {
CFStringRef reasonForActivity= CFSTR("No Display Sleep");
IOReturn ok = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &powerID);
@@ -2198,7 +2198,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
}
QTestLog::stopLogging();
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (macNeedsActivate) {
IOPMAssertionRelease(powerID);
}
@@ -2215,7 +2215,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
QSignalDumper::endDump();
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
if (macNeedsActivate) {
IOPMAssertionRelease(powerID);
}
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 7a4f369ed3..99c7ec749d 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -399,6 +399,12 @@ void QTestLog::addBenchmarkResult(const QBenchmarkResult &result)
QTest::TestLoggers::addBenchmarkResult(result);
}
+// don't warn about qInstallMsgHandler
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && !defined(Q_CC_INTEL)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
void QTestLog::startLogging()
{
QTest::TestLoggers::startLogging();
@@ -414,6 +420,10 @@ void QTestLog::stopLogging()
saveCoverageTool(QTestResult::currentAppname(), failCount() != 0, QTestLog::installedTestCoverage());
}
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && !defined(Q_CC_INTEL)
+# pragma GCC diagnostic pop
+#endif
+
void QTestLog::addLogger(LogMode mode, const char *filename)
{
if (filename && strcmp(filename, "-") == 0)
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index e6ffbe157a..44eb4f65e8 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -172,12 +172,12 @@ bool Generator::registerableMetaType(const QByteArray &propertyType)
#undef STREAM_1ARG_TEMPLATE
;
foreach (const QByteArray &oneArgTemplateType, oneArgTemplates)
- if (propertyType.startsWith(oneArgTemplateType + "<") && !propertyType.endsWith("&")) {
+ if (propertyType.startsWith(oneArgTemplateType + "<") && propertyType.endsWith(">")) {
const int argumentSize = propertyType.size() - oneArgTemplateType.size() - 1
// The closing '>'
- 1
// templates inside templates have an extra whitespace char to strip.
- - (propertyType.at(propertyType.size() - 2) == '>' ? 1 : 0 );
+ - (propertyType.at(propertyType.size() - 2) == ' ' ? 1 : 0 );
const QByteArray templateArg = propertyType.mid(oneArgTemplateType.size() + 1, argumentSize);
return isBuiltinType(templateArg) || registerableMetaType(templateArg);
}
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 1ebb82ffad..f3bfcc3144 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -1449,6 +1449,11 @@ bool Moc::until(Token target) {
--index;
break;
}
+
+ if (braceCount <= 0 && t == SEMIC) {
+ // Abort on semicolon. Allow recovering bad template parsing (QTBUG-31218)
+ break;
+ }
}
if(target == COMMA && angleCount != 0 && possible != -1) {
diff --git a/src/tools/moc/parser.cpp b/src/tools/moc/parser.cpp
index c0591b69c0..4c754786f7 100644
--- a/src/tools/moc/parser.cpp
+++ b/src/tools/moc/parser.cpp
@@ -64,10 +64,10 @@ void Parser::error(int rollback) {
}
void Parser::error(const char *msg) {
if (msg || error_msg)
- qWarning(ErrorFormatString "Error: %s",
+ fprintf(stderr, ErrorFormatString "Error: %s\n",
currentFilenames.top().constData(), symbol().lineNum, msg?msg:error_msg);
else
- qWarning(ErrorFormatString "Parse error at \"%s\"",
+ fprintf(stderr, ErrorFormatString "Parse error at \"%s\"\n",
currentFilenames.top().constData(), symbol().lineNum, symbol().lexem().data());
exit(EXIT_FAILURE);
}
diff --git a/src/tools/qdoc/codeparser.cpp b/src/tools/qdoc/codeparser.cpp
index 557a6f08fa..7b534a6c95 100644
--- a/src/tools/qdoc/codeparser.cpp
+++ b/src/tools/qdoc/codeparser.cpp
@@ -70,6 +70,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_SUBTITLE Doc::alias(QLatin1String("subtitle"))
#define COMMAND_THREADSAFE Doc::alias(QLatin1String("threadsafe"))
#define COMMAND_TITLE Doc::alias(QLatin1String("title"))
+#define COMMAND_WRAPPER Doc::alias(QLatin1String("wrapper"))
QString CodeParser::currentSubDir_;
QList<CodeParser *> CodeParser::parsers;
@@ -219,7 +220,8 @@ QSet<QString> CodeParser::commonMetaCommands()
<< COMMAND_SINCE
<< COMMAND_SUBTITLE
<< COMMAND_THREADSAFE
- << COMMAND_TITLE;
+ << COMMAND_TITLE
+ << COMMAND_WRAPPER;
}
/*!
@@ -286,6 +288,9 @@ void CodeParser::processCommonMetaCommand(const Location& location,
else if (command == COMMAND_SINCE) {
node->setSince(arg.first);
}
+ else if (command == COMMAND_WRAPPER) {
+ node->setWrapper();
+ }
else if (command == COMMAND_PAGEKEYWORDS) {
node->addPageKeywords(arg.first);
}
diff --git a/src/tools/qdoc/config.cpp b/src/tools/qdoc/config.cpp
index ce3b34841e..107af96607 100644
--- a/src/tools/qdoc/config.cpp
+++ b/src/tools/qdoc/config.cpp
@@ -310,7 +310,6 @@ QString Config::getString(const QString& var) const
{
QList<ConfigVar> configVars = configVars_.values(var);
QString value;
- int high = 0;
if (!configVars.empty()) {
int i = configVars.size() - 1;
while (i >= 0) {
@@ -324,7 +323,6 @@ QString Config::getString(const QString& var) const
if (!value.isEmpty() && !value.endsWith(QChar('\n')))
value.append(QChar(' '));
value.append(cv.values_[j]);
- high = j;
}
}
--i;
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp
index db7c637b53..dc086c853d 100644
--- a/src/tools/qdoc/cppcodeparser.cpp
+++ b/src/tools/qdoc/cppcodeparser.cpp
@@ -1598,7 +1598,11 @@ bool CppCodeParser::matchBaseList(ClassNode *classe, bool isClass)
}
/*!
- Parse a C++ class, union, or struct declarion.
+ Parse a C++ class, union, or struct declaration.
+
+ This function only handles one level of class nesting, but that is
+ sufficient for Qt because there are no cases of class nesting more
+ than one level deep.
*/
bool CppCodeParser::matchClassDecl(InnerNode *parent,
const QString &templateStuff)
@@ -1612,6 +1616,18 @@ bool CppCodeParser::matchClassDecl(InnerNode *parent,
return false;
while (tok == Tok_Ident)
readToken();
+ if (tok == Tok_Gulbrandsen) {
+ Node* n = parent->findChildNodeByNameAndType(previousLexeme(),Node::Class);
+ if (n) {
+ parent = static_cast<InnerNode*>(n);
+ if (parent) {
+ readToken();
+ if (tok != Tok_Ident)
+ return false;
+ readToken();
+ }
+ }
+ }
if (tok != Tok_Colon && tok != Tok_LeftBrace)
return false;
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp
index 314dda3a9d..eea1845e17 100644
--- a/src/tools/qdoc/ditaxmlgenerator.cpp
+++ b/src/tools/qdoc/ditaxmlgenerator.cpp
@@ -2763,11 +2763,22 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative,
writeEndTag(); // </p>
writeEndTag(); // <entry>
}
+ else if (!node->reconstitutedBrief().isEmpty()) {
+ writeStartTag(DT_entry);
+ writeStartTag(DT_p);
+ writeCharacters(node->reconstitutedBrief());
+ writeEndTag(); // </p>
+ writeEndTag(); // <entry>
+ }
}
else {
writeStartTag(DT_entry);
writeStartTag(DT_p);
- writeCharacters(protectEnc(node->doc().briefText().toString())); // zzz
+ if (!node->reconstitutedBrief().isEmpty()) {
+ writeCharacters(node->reconstitutedBrief());
+ }
+ else
+ writeCharacters(protectEnc(node->doc().briefText().toString()));
writeEndTag(); // </p>
writeEndTag(); // <entry>
}
diff --git a/src/tools/qdoc/doc/config/qdoc.qdocconf b/src/tools/qdoc/doc/config/qdoc.qdocconf
index 84e9689f50..a7fbb38463 100644
--- a/src/tools/qdoc/doc/config/qdoc.qdocconf
+++ b/src/tools/qdoc/doc/config/qdoc.qdocconf
@@ -13,7 +13,8 @@ exampledirs = .. \
config
imagedirs = ../../../doc/src/templates/images \
- images
+ ../images \
+ ../../../../widgets/doc/images \
tagfile = ../html/qdoc.tags
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index d9ee0e42ee..11521fc554 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -656,7 +656,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
}
}
if (node->doc().isEmpty()) {
- if (!quiet && !node->isReimp()) { // ### might be unnecessary
+ if (!node->isWrapper() && !quiet && !node->isReimp()) { // ### might be unnecessary
node->location().warning(tr("No documentation for '%1'").arg(node->plainFullName()));
}
}
diff --git a/src/tools/qdoc/helpprojectwriter.cpp b/src/tools/qdoc/helpprojectwriter.cpp
index fdba15700f..0cdb2de776 100644
--- a/src/tools/qdoc/helpprojectwriter.cpp
+++ b/src/tools/qdoc/helpprojectwriter.cpp
@@ -375,6 +375,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
case Node::Document: {
const DocNode *docNode = static_cast<const DocNode*>(node);
if (docNode->subType() != Node::ExternalPage &&
+ docNode->subType() != Node::Image &&
!docNode->fullTitle().isEmpty()) {
if (docNode->subType() != Node::File) {
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index d5e079d910..2dc4c1e6c6 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -2287,10 +2287,19 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
generateText(brief, node, marker);
out() << "</p></td>";
}
+ else if (!node->reconstitutedBrief().isEmpty()) {
+ out() << "<td class=\"tblDescr\"><p>";
+ out() << node->reconstitutedBrief();
+ out() << "</p></td>";
+ }
}
else {
out() << "<td class=\"tblDescr\"><p>";
- out() << protectEnc(node->doc().briefText().toString());
+ if (!node->reconstitutedBrief().isEmpty()) {
+ out() << node->reconstitutedBrief();
+ }
+ else
+ out() << protectEnc(node->doc().briefText().toString());
out() << "</p></td>";
}
out() << "</tr>\n";
@@ -4117,8 +4126,6 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
if (child->subType() == Node::File) {
QString file = child->name();
if (file.endsWith(".pro") || file.endsWith(".qmlproject")) {
- if (file.startsWith("demos/"))
- file = file.mid(6);
proFiles << file;
}
}
@@ -4233,8 +4240,6 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
if (baseName.compare(ename, Qt::CaseInsensitive) == 0) {
if (!usedNames.contains(fileName)) {
writer.writeStartElement("fileToOpen");
- if (file.startsWith("demos/"))
- file = file.mid(6);
writer.writeCharacters(examplesPath + file);
writer.writeEndElement(); // fileToOpen
usedNames.insert(fileName);
@@ -4244,8 +4249,6 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
fileName.toLower().endsWith("main.qml")) {
if (!usedNames.contains(fileName)) {
writer.writeStartElement("fileToOpen");
- if (file.startsWith("demos/"))
- file = file.mid(6);
writer.writeCharacters(examplesPath + file);
writer.writeEndElement(); // fileToOpen
usedNames.insert(fileName);
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp
index 028c0a0b2a..e627cf859e 100644
--- a/src/tools/qdoc/node.cpp
+++ b/src/tools/qdoc/node.cpp
@@ -1079,6 +1079,16 @@ void InnerNode::deleteChildren()
*/
/*!
+ Returns true if the node is a class node or a QML type node
+ that is marked as being a wrapper class or QML type, or if
+ it is a member of a wrapper class or type.
+ */
+bool Node::isWrapper() const
+{
+ return (parent_ ? parent_->isWrapper() : false);
+}
+
+/*!
*/
const Node *InnerNode::findChildNodeByName(const QString& name) const
{
@@ -1441,6 +1451,7 @@ ClassNode::ClassNode(InnerNode *parent, const QString& name)
: InnerNode(Class, parent, name)
{
abstract_ = false;
+ wrapper_ = false;
qmlelement = 0;
setPageType(ApiPage);
}
@@ -2105,6 +2116,7 @@ QmlClassNode::QmlClassNode(InnerNode *parent, const QString& name)
: DocNode(parent, name, QmlClass, Node::ApiPage),
abstract_(false),
cnodeRequired_(false),
+ wrapper_(false),
cnode_(0),
baseNode_(0)
{
diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h
index d1a95358f0..bc75df2992 100644
--- a/src/tools/qdoc/node.h
+++ b/src/tools/qdoc/node.h
@@ -179,6 +179,7 @@ public:
void setLink(LinkType linkType, const QString &link, const QString &desc);
void setUrl(const QString &url);
void setTemplateStuff(const QString &templateStuff) { templateStuff_ = templateStuff; }
+ void setReconstitutedBrief(const QString &t) { reconstitutedBrief_ = t; }
void setPageType(PageType t) { pageType_ = t; }
void setPageType(const QString& t);
void setParent(InnerNode* n) { parent_ = n; }
@@ -200,11 +201,13 @@ public:
virtual bool isCollisionNode() const { return false; }
virtual bool isAttached() const { return false; }
virtual bool isGroup() const { return false; }
+ virtual bool isWrapper() const;
virtual void addMember(Node* ) { }
virtual bool hasMembers() const { return false; }
virtual bool hasNamespaces() const { return false; }
virtual bool hasClasses() const { return false; }
virtual void setAbstract(bool ) { }
+ virtual void setWrapper() { }
virtual QString title() const { return QString(); }
virtual bool hasProperty(const QString& ) const { return false; }
virtual void getMemberNamespaces(NodeMap& ) { }
@@ -235,6 +238,7 @@ public:
ThreadSafeness inheritedThreadSafeness() const;
QString since() const { return since_; }
QString templateStuff() const { return templateStuff_; }
+ const QString& reconstitutedBrief() const { return reconstitutedBrief_; }
PageType pageType() const { return pageType_; }
QString pageTypeString() const;
QString nodeTypeString() const;
@@ -296,6 +300,7 @@ private:
QString url_;
QString since_;
QString templateStuff_;
+ QString reconstitutedBrief_;
mutable QString uuid_;
QString outSubDir_;
QString qmlModuleName_;
@@ -437,8 +442,10 @@ public:
ClassNode(InnerNode* parent, const QString& name);
virtual ~ClassNode() { }
virtual bool isClass() const { return true; }
+ virtual bool isWrapper() const { return wrapper_; }
virtual QString obsoleteLink() const { return obsoleteLink_; }
virtual void setObsoleteLink(const QString& t) { obsoleteLink_ = t; };
+ virtual void setWrapper() { wrapper_ = true; }
void addBaseClass(Access access,
ClassNode* node,
@@ -463,6 +470,7 @@ private:
QList<RelatedClass> derived;
QList<RelatedClass> ignoredBases;
bool abstract_;
+ bool wrapper_;
QString sname;
QString obsoleteLink_;
QmlClassNode* qmlelement;
@@ -568,7 +576,9 @@ public:
virtual void setCurrentChild();
virtual void clearCurrentChild();
virtual bool isAbstract() const { return abstract_; }
+ virtual bool isWrapper() const { return wrapper_; }
virtual void setAbstract(bool b) { abstract_ = b; }
+ virtual void setWrapper() { wrapper_ = true; }
virtual bool isInternal() const { return (status() == Internal); }
virtual QString qmlFullBaseName() const;
virtual QString obsoleteLink() const { return obsoleteLink_; }
@@ -592,6 +602,7 @@ public:
private:
bool abstract_;
bool cnodeRequired_;
+ bool wrapper_;
ClassNode* cnode_;
QString baseName_;
QString obsoleteLink_;
diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp
index 59adc63c9e..daba2cc78a 100644
--- a/src/tools/qdoc/qdocindexfiles.cpp
+++ b/src/tools/qdoc/qdocindexfiles.cpp
@@ -505,6 +505,10 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
node->setDoc(doc);
node->setIndexNodeFlag();
node->setOutputSubdirectory(project_.toLower());
+ QString briefAttr = element.attribute("brief");
+ if (!briefAttr.isEmpty()) {
+ node->setReconstitutedBrief(briefAttr);
+ }
if (node->isInnerNode()) {
InnerNode* inner = static_cast<InnerNode*>(node);
@@ -754,6 +758,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
writer.writeAttribute("since", node->since());
}
+ QString brief = node->doc().briefText().toString();
switch (node->type()) {
case Node::Class:
{
@@ -769,6 +774,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
if (!node->moduleName().isEmpty())
writer.writeAttribute("module", node->moduleName());
writeMembersAttribute(writer, classNode, Node::Document, Node::Group, "groups");
+ if (!brief.isEmpty())
+ writer.writeAttribute("brief", brief);
}
break;
case Node::Namespace:
@@ -777,6 +784,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
if (!namespaceNode->moduleName().isEmpty())
writer.writeAttribute("module", namespaceNode->moduleName());
writeMembersAttribute(writer, namespaceNode, Node::Document, Node::Group, "groups");
+ if (!brief.isEmpty())
+ writer.writeAttribute("brief", brief);
}
break;
case Node::Document:
@@ -843,6 +852,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
writer.writeAttribute("module", node->moduleName());
}
writeMembersAttribute(writer, docNode, Node::Document, Node::Group, "groups");
+ if (!brief.isEmpty())
+ writer.writeAttribute("brief", brief);
}
break;
case Node::Function:
@@ -902,6 +913,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
if (propertyNode)
writer.writeAttribute("associated-property", propertyNode->name());
writer.writeAttribute("type", functionNode->returnType());
+ if (!brief.isEmpty())
+ writer.writeAttribute("brief", brief);
}
break;
case Node::QmlProperty:
@@ -910,12 +923,16 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
writer.writeAttribute("type", qpn->dataType());
writer.writeAttribute("attached", qpn->isAttached() ? "true" : "false");
writer.writeAttribute("writable", qpn->isWritable(qdb_) ? "true" : "false");
+ if (!brief.isEmpty())
+ writer.writeAttribute("brief", brief);
}
break;
case Node::Property:
{
const PropertyNode* propertyNode = static_cast<const PropertyNode*>(node);
writer.writeAttribute("type", propertyNode->dataType());
+ if (!brief.isEmpty())
+ writer.writeAttribute("brief", brief);
foreach (const Node* fnNode, propertyNode->getters()) {
if (fnNode) {
const FunctionNode* functionNode = static_cast<const FunctionNode*>(fnNode);
@@ -955,6 +972,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
const VariableNode* variableNode = static_cast<const VariableNode*>(node);
writer.writeAttribute("type", variableNode->dataType());
writer.writeAttribute("static", variableNode->isStatic() ? "true" : "false");
+ if (!brief.isEmpty())
+ writer.writeAttribute("brief", brief);
}
break;
default:
diff --git a/src/tools/qdoc/qmlcodeparser.cpp b/src/tools/qdoc/qmlcodeparser.cpp
index c86982eb95..b9c0ad9218 100644
--- a/src/tools/qdoc/qmlcodeparser.cpp
+++ b/src/tools/qdoc/qmlcodeparser.cpp
@@ -63,6 +63,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_PAGEKEYWORDS Doc::alias("pagekeywords")
#define COMMAND_PRELIMINARY Doc::alias("preliminary")
#define COMMAND_SINCE Doc::alias("since")
+#define COMMAND_WRAPPER Doc::alias("wrapper")
#define COMMAND_QMLABSTRACT Doc::alias("qmlabstract")
#define COMMAND_QMLCLASS Doc::alias("qmlclass")
@@ -228,8 +229,8 @@ QSet<QString> QmlCodeParser::otherMetaCommands()
<< COMMAND_PRELIMINARY
<< COMMAND_SINCE
<< COMMAND_QMLABSTRACT
- << COMMAND_INQMLMODULE;
-
+ << COMMAND_INQMLMODULE
+ << COMMAND_WRAPPER;
}
/*!
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp
index ac659720b2..86b86c8f34 100644
--- a/src/tools/qdoc/qmlvisitor.cpp
+++ b/src/tools/qdoc/qmlvisitor.cpp
@@ -60,6 +60,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_PAGEKEYWORDS Doc::alias(QLatin1String("pagekeywords"))
#define COMMAND_PRELIMINARY Doc::alias(QLatin1String("preliminary"))
#define COMMAND_SINCE Doc::alias(QLatin1String("since"))
+#define COMMAND_WRAPPER Doc::alias(QLatin1String("wrapper"))
#define COMMAND_QMLABSTRACT Doc::alias(QLatin1String("qmlabstract"))
#define COMMAND_QMLCLASS Doc::alias(QLatin1String("qmlclass"))
@@ -367,6 +368,9 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
QString arg = args[0].first; //.join(' ');
node->setSince(arg);
}
+ else if (command == COMMAND_WRAPPER) {
+ node->setWrapper();
+ }
else {
doc.location().warning(tr("The \\%1 command is ignored in QML files").arg(command));
}
diff --git a/src/tools/qdoc/text.cpp b/src/tools/qdoc/text.cpp
index 2d218bd469..e2f682726d 100644
--- a/src/tools/qdoc/text.cpp
+++ b/src/tools/qdoc/text.cpp
@@ -149,6 +149,11 @@ void Text::stripLastAtom()
}
}
+/*!
+ This function traverses the atom list of the Text object,
+ extracting all the string parts. It concatenates them to
+ a result string and returns it.
+ */
QString Text::toString() const
{
QString str;
diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
index d9abb45843..e5650ff362 100644
--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
@@ -2,12 +2,15 @@
if (NOT TARGET Qt5::uic)
add_executable(Qt5::uic IMPORTED)
- set_target_properties(Qt5::uic PROPERTIES
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
- IMPORTED_LOCATION \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
!!ELSE
- IMPORTED_LOCATION \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\"
+ set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
!!ENDIF
+ _qt5_Widgets_check_file_exists(${imported_location})
+
+ set_target_properties(Qt5::uic PROPERTIES
+ IMPORTED_LOCATION ${imported_location}
)
endif()
diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp
index a0aefdef9d..45aa49d552 100644
--- a/src/widgets/dialogs/qinputdialog.cpp
+++ b/src/widgets/dialogs/qinputdialog.cpp
@@ -440,7 +440,7 @@ void QInputDialogPrivate::_q_currentRowChanged(const QModelIndex &newIndex,
\snippet dialogs/standarddialogs/dialog.cpp 3
- The \c ok variable is set to true if the user clicks \uicontrol OK; otherwise it
+ The \c ok variable is set to true if the user clicks \uicontrol OK; otherwise, it
is set to false.
\image inputdialogs.png Input Dialogs
@@ -492,7 +492,7 @@ QInputDialog::~QInputDialog()
\brief the mode used for input
- This property help determines which widget is used for entering input into
+ This property helps determine which widget is used for entering input into
the dialog.
*/
void QInputDialog::setInputMode(InputMode mode)
@@ -545,7 +545,7 @@ QInputDialog::InputMode QInputDialog::inputMode() const
\property QInputDialog::labelText
- \brief the text to for the label to describe what needs to be input
+ \brief the label's text which describes what needs to be input
*/
void QInputDialog::setLabelText(const QString &text)
{
@@ -572,7 +572,7 @@ QString QInputDialog::labelText() const
This enum specifies various options that affect the look and feel
of an input dialog.
- \value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons. (Useful for "live dialogs".)
+ \value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons (useful for "live dialogs").
\value UseListViewForComboBoxItems Use a QListView rather than a non-editable QComboBox for
displaying the items set with setComboBoxItems().
@@ -698,7 +698,7 @@ QLineEdit::EchoMode QInputDialog::textEchoMode() const
\property QInputDialog::comboBoxEditable
- \brief whether or not the combo box is used in the input dialog is editable
+ \brief whether or not the combo box used in the input dialog is editable
*/
void QInputDialog::setComboBoxEditable(bool editable)
{
@@ -724,7 +724,7 @@ bool QInputDialog::isComboBoxEditable() const
\property QInputDialog::comboBoxItems
- \brief the items used in the combobox for the input dialog
+ \brief the items used in the combo box for the input dialog
*/
void QInputDialog::setComboBoxItems(const QStringList &items)
{
@@ -956,7 +956,7 @@ void QInputDialog::setDoubleRange(double min, double max)
\property QInputDialog::doubleDecimals
- \brief sets the percision of the double spinbox in decimals
+ \brief sets the precision of the double spinbox in decimals
\sa QDoubleSpinBox::setDecimals()
*/
@@ -1308,12 +1308,12 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
\a title is the text which is displayed in the title bar of the dialog.
\a label is the text which is shown to the user (it should say what should
be entered).
- \a items is the string list which is inserted into the combobox.
+ \a items is the string list which is inserted into the combo box.
\a current is the number of the item which should be the current item.
\a inputMethodHints is the input method hints that will be used if the
- combobox is editable and an input method is active.
+ combo box is editable and an input method is active.
- If \a editable is true the user can enter their own text; otherwise the
+ If \a editable is true the user can enter their own text; otherwise, the
user may only select one of the existing items.
If \a ok is nonnull \e *\a ok will be set to true if the user pressed
@@ -1321,7 +1321,7 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
is \a parent. The dialog will be modal and uses the widget \a flags.
This function returns the text of the current item, or if \a editable is
- true, the current text of the combobox.
+ true, the current text of the combo box.
Use this static function like this:
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp
index 78612f3181..b5cc630bfe 100644
--- a/src/widgets/dialogs/qprogressdialog.cpp
+++ b/src/widgets/dialogs/qprogressdialog.cpp
@@ -662,6 +662,7 @@ void QProgressDialog::setValue(int progress)
int estimate;
int totalSteps = maximum() - minimum();
int myprogress = progress - minimum();
+ if (myprogress == 0) myprogress = 1;
if ((totalSteps - myprogress) >= INT_MAX / elapsed)
estimate = (totalSteps - myprogress) / myprogress * elapsed;
else
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 62eab6a7a2..668436c1a2 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -1658,8 +1658,8 @@ const QGraphicsObject *QGraphicsItem::toGraphicsObject() const
the parent. You should not \l{QGraphicsScene::addItem()}{add} the
item to the scene yourself.
- Calling this function on an item that is an ancestor of \a newParent
- have undefined behaviour.
+ The behavior when calling this function on an item that is an ancestor of
+ \a newParent is undefined.
\sa parentItem(), childItems()
*/
@@ -7186,7 +7186,7 @@ void QGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
*/
void QGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
- if (flags() & ItemIsSelectable) {
+ if (event->button() == Qt::LeftButton && (flags() & ItemIsSelectable)) {
bool multiSelect = (event->modifiers() & Qt::ControlModifier) != 0;
if (event->scenePos() == event->buttonDownScenePos(Qt::LeftButton)) {
// The item didn't move
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
index f84201cedf..1898ecba68 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
@@ -825,7 +825,9 @@ bool QGraphicsProxyWidget::event(QEvent *event)
}
case QEvent::InputMethod: {
inputMethodEvent(static_cast<QInputMethodEvent *>(event));
- break;
+ if (event->isAccepted())
+ return true;
+ return false;
}
case QEvent::ShortcutOverride: {
QWidget *focusWidget = d->widget->focusWidget();
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index 8a0b983c73..88cccb5118 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -637,6 +637,15 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
if (item == lastActivePanel)
lastActivePanel = 0;
+ // Change tabFocusFirst to the next widget in focus chain if removing the current one.
+ if (item == tabFocusFirst) {
+ QGraphicsWidgetPrivate *wd = tabFocusFirst->d_func();
+ if (wd->focusNext && wd->focusNext != tabFocusFirst && wd->focusNext->scene() == q)
+ tabFocusFirst = wd->focusNext;
+ else
+ tabFocusFirst = 0;
+ }
+
// Cancel active touches
{
QMap<int, QGraphicsItem *>::iterator it = itemForTouchPointId.begin();
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index 0424517346..d78e32205f 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -2938,6 +2938,8 @@ bool QGraphicsView::viewportEvent(QEvent *event)
touchEvent->setTarget(viewport());
QGraphicsViewPrivate::translateTouchEvent(d, touchEvent);
(void) QApplication::sendEvent(d->scene, touchEvent);
+ } else {
+ event->ignore();
}
return true;
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp
index ddd3ee2e68..3d902d9227 100644
--- a/src/widgets/graphicsview/qgraphicswidget.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget.cpp
@@ -1673,7 +1673,7 @@ void QGraphicsWidget::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
*/
void QGraphicsWidget::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
- Q_UNUSED(event);
+ QGraphicsObject::hoverLeaveEvent(event);
}
/*!
diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp
index 7d8512adc4..c040322ba1 100644
--- a/src/widgets/itemviews/qitemdelegate.cpp
+++ b/src/widgets/itemviews/qitemdelegate.cpp
@@ -113,6 +113,7 @@ public:
static QString valueToText(const QVariant &value, const QStyleOptionViewItem &option);
+ bool tryFixup(QWidget *editor);
void _q_commitDataAndCloseEditor(QWidget *editor);
QItemEditorFactory *f;
@@ -386,6 +387,24 @@ QString QItemDelegatePrivate::valueToText(const QVariant &value, const QStyleOpt
return text;
}
+bool QItemDelegatePrivate::tryFixup(QWidget *editor)
+{
+#ifndef QT_NO_LINEEDIT
+ if (QLineEdit *e = qobject_cast<QLineEdit*>(editor)) {
+ if (!e->hasAcceptableInput()) {
+ if (const QValidator *validator = e->validator()) {
+ QString text = e->text();
+ validator->fixup(text);
+ e->setText(text);
+ }
+ return e->hasAcceptableInput();
+ }
+ }
+#endif // QT_NO_LINEEDIT
+
+ return true;
+}
+
/*!
Renders the delegate using the given \a painter and style \a option for
the item specified by \a index.
@@ -1154,18 +1173,24 @@ QRect QItemDelegate::textRectangle(QPainter * /*painter*/, const QRect &rect,
bool QItemDelegate::eventFilter(QObject *object, QEvent *event)
{
+ Q_D(QItemDelegate);
+
QWidget *editor = qobject_cast<QWidget*>(object);
if (!editor)
return false;
if (event->type() == QEvent::KeyPress) {
switch (static_cast<QKeyEvent *>(event)->key()) {
case Qt::Key_Tab:
- emit commitData(editor);
- emit closeEditor(editor, QAbstractItemDelegate::EditNextItem);
+ if (d->tryFixup(editor)) {
+ emit commitData(editor);
+ emit closeEditor(editor, EditNextItem);
+ }
return true;
case Qt::Key_Backtab:
- emit commitData(editor);
- emit closeEditor(editor, QAbstractItemDelegate::EditPreviousItem);
+ if (d->tryFixup(editor)) {
+ emit commitData(editor);
+ emit closeEditor(editor, EditPreviousItem);
+ }
return true;
case Qt::Key_Enter:
case Qt::Key_Return:
@@ -1176,11 +1201,9 @@ bool QItemDelegate::eventFilter(QObject *object, QEvent *event)
// before committing the data (e.g. so it can do
// validation/fixup of the input).
#endif // QT_NO_TEXTEDIT
-#ifndef QT_NO_LINEEDIT
- if (QLineEdit *e = qobject_cast<QLineEdit*>(editor))
- if (!e->hasAcceptableInput())
- return false;
-#endif // QT_NO_LINEEDIT
+ if (!d->tryFixup(editor))
+ return true;
+
QMetaObject::invokeMethod(this, "_q_commitDataAndCloseEditor",
Qt::QueuedConnection, Q_ARG(QWidget*, editor));
return false;
@@ -1211,8 +1234,9 @@ bool QItemDelegate::eventFilter(QObject *object, QEvent *event)
return false;
}
#endif
+ if (d->tryFixup(editor))
+ emit commitData(editor);
- emit commitData(editor);
emit closeEditor(editor, NoHint);
}
} else if (event->type() == QEvent::ShortcutOverride) {
diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp
index b121800c31..7e1933ad1e 100644
--- a/src/widgets/itemviews/qstyleditemdelegate.cpp
+++ b/src/widgets/itemviews/qstyleditemdelegate.cpp
@@ -97,6 +97,7 @@ public:
return factory ? factory : QItemEditorFactory::defaultFactory();
}
+ bool tryFixup(QWidget *editor);
void _q_commitDataAndCloseEditor(QWidget *editor)
{
Q_Q(QStyledItemDelegate);
@@ -106,6 +107,24 @@ public:
QItemEditorFactory *factory;
};
+bool QStyledItemDelegatePrivate::tryFixup(QWidget *editor)
+{
+#ifndef QT_NO_LINEEDIT
+ if (QLineEdit *e = qobject_cast<QLineEdit*>(editor)) {
+ if (!e->hasAcceptableInput()) {
+ if (const QValidator *validator = e->validator()) {
+ QString text = e->text();
+ validator->fixup(text);
+ e->setText(text);
+ }
+ return e->hasAcceptableInput();
+ }
+ }
+#endif // QT_NO_LINEEDIT
+
+ return true;
+}
+
/*!
\class QStyledItemDelegate
@@ -622,18 +641,24 @@ void QStyledItemDelegate::setItemEditorFactory(QItemEditorFactory *factory)
*/
bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event)
{
+ Q_D(QStyledItemDelegate);
+
QWidget *editor = qobject_cast<QWidget*>(object);
if (!editor)
return false;
if (event->type() == QEvent::KeyPress) {
switch (static_cast<QKeyEvent *>(event)->key()) {
case Qt::Key_Tab:
- emit commitData(editor);
- emit closeEditor(editor, QAbstractItemDelegate::EditNextItem);
+ if (d->tryFixup(editor)) {
+ emit commitData(editor);
+ emit closeEditor(editor, EditNextItem);
+ }
return true;
case Qt::Key_Backtab:
- emit commitData(editor);
- emit closeEditor(editor, QAbstractItemDelegate::EditPreviousItem);
+ if (d->tryFixup(editor)) {
+ emit commitData(editor);
+ emit closeEditor(editor, EditPreviousItem);
+ }
return true;
case Qt::Key_Enter:
case Qt::Key_Return:
@@ -644,11 +669,9 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event)
// before committing the data (e.g. so it can do
// validation/fixup of the input).
#endif // QT_NO_TEXTEDIT
-#ifndef QT_NO_LINEEDIT
- if (QLineEdit *e = qobject_cast<QLineEdit*>(editor))
- if (!e->hasAcceptableInput())
- return false;
-#endif // QT_NO_LINEEDIT
+ if (!d->tryFixup(editor))
+ return true;
+
QMetaObject::invokeMethod(this, "_q_commitDataAndCloseEditor",
Qt::QueuedConnection, Q_ARG(QWidget*, editor));
return false;
@@ -679,8 +702,9 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event)
return false;
}
#endif
+ if (d->tryFixup(editor))
+ emit commitData(editor);
- emit commitData(editor);
emit closeEditor(editor, NoHint);
}
} else if (event->type() == QEvent::ShortcutOverride) {
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index b8d3117a41..edd7cafd83 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -3821,7 +3821,8 @@ bool QApplicationPrivate::translateTouchToMouse(QWidget *widget, QTouchEvent *ev
const QPoint pos = widget->mapFromGlobal(p.screenPos().toPoint());
QMouseEvent mouseEvent(eventType, pos, p.screenPos().toPoint(),
- Qt::LeftButton, Qt::LeftButton,
+ Qt::LeftButton,
+ (eventType == QEvent::MouseButtonRelease) ? Qt::NoButton : Qt::LeftButton,
event->modifiers());
mouseEvent.setAccepted(true);
mouseEvent.setTimestamp(event->timestamp());
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index 669faac4f6..fd6482d5af 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -1022,7 +1022,7 @@ QStyle* QFormLayoutPrivate::getStyle() const
\li \b{Adherence to the different platform's look and feel guidelines.}
For example, the
- \l{https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{Mac OS X Aqua} and KDE guidelines specify that the
+ \l{http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{Mac OS X Aqua} and KDE guidelines specify that the
labels should be right-aligned, whereas Windows and GNOME
applications normally use left-alignment.
@@ -1065,7 +1065,7 @@ QStyle* QFormLayoutPrivate::getStyle() const
corresponds to what we would get using a two-column
QGridLayout.)
\li Style based on the
- \l{https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{Mac OS X Aqua} guidelines. Labels are right-aligned,
+ \l{http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{Mac OS X Aqua} guidelines. Labels are right-aligned,
the fields don't grow beyond their size hint, and the
form is horizontally centered.
\li Recommended style for
diff --git a/src/widgets/kernel/qformlayout.h b/src/widgets/kernel/qformlayout.h
index d59f71eb32..a1356c734f 100644
--- a/src/widgets/kernel/qformlayout.h
+++ b/src/widgets/kernel/qformlayout.h
@@ -52,7 +52,7 @@ class QFormLayoutPrivate;
class Q_WIDGETS_EXPORT QFormLayout : public QLayout
{
Q_OBJECT
- Q_ENUMS(FormStyle FieldGrowthPolicy RowWrapPolicy ItemRole)
+ Q_ENUMS(FieldGrowthPolicy RowWrapPolicy ItemRole)
Q_DECLARE_PRIVATE(QFormLayout)
Q_PROPERTY(FieldGrowthPolicy fieldGrowthPolicy READ fieldGrowthPolicy WRITE setFieldGrowthPolicy RESET resetFieldGrowthPolicy)
Q_PROPERTY(RowWrapPolicy rowWrapPolicy READ rowWrapPolicy WRITE setRowWrapPolicy RESET resetRowWrapPolicy)
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index 0402f9939a..a65c34adf5 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -59,12 +59,10 @@ static int menuBarHeightForWidth(QWidget *menubar, int w)
{
if (menubar && !menubar->isHidden() && !menubar->isWindow()) {
int result = menubar->heightForWidth(qMax(w, menubar->minimumWidth()));
- if (result != -1)
- return result;
- result = menubar->sizeHint()
- .expandedTo(menubar->minimumSize())
- .expandedTo(menubar->minimumSizeHint())
- .boundedTo(menubar->maximumSize()).height();
+ if (result == -1)
+ result = menubar->sizeHint().height();
+ const int min = qSmartMinSize(menubar).height();
+ result = qBound(min, result, menubar->maximumSize().height());
if (result != -1)
return result;
}
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index f323c682d1..c5cdce3d60 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -246,9 +246,19 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
QWidget *w = widgets.at(i);
#ifndef QT_NO_MENU
if (QMenu *menu = qobject_cast<QMenu *>(w)) {
+#ifdef Q_OS_MAC
+ // On Mac, menu item shortcuts are processed before reaching any window.
+ // That means that if a menu action shortcut has not been already processed
+ // (and reaches this point), then the menu item itself has been disabled.
+ // This occurs at the QPA level on Mac, were we disable all the Cocoa menus
+ // when showing a modal window.
+ Q_UNUSED(menu);
+ continue;
+#else
QAction *a = menu->menuAction();
if (correctActionContext(context, a, active_window))
return true;
+#endif
} else
#endif
if (correctWidgetContext(context, w, active_window))
diff --git a/src/widgets/kernel/qstandardgestures.cpp b/src/widgets/kernel/qstandardgestures.cpp
index f4307e9737..e3fd6404db 100644
--- a/src/widgets/kernel/qstandardgestures.cpp
+++ b/src/widgets/kernel/qstandardgestures.cpp
@@ -59,7 +59,7 @@ QPanGestureRecognizer::QPanGestureRecognizer()
QGesture *QPanGestureRecognizer::create(QObject *target)
{
if (target && target->isWidgetType()) {
-#if ((defined(Q_OS_MAC) && !defined(Q_OS_IOS)) || defined(Q_OS_WIN)) && !defined(QT_NO_NATIVE_GESTURES)
+#if (defined(Q_OS_MACX) || defined(Q_OS_WIN)) && !defined(QT_NO_NATIVE_GESTURES)
// for scroll areas on Windows and Mac OS X we want to use native gestures instead
if (!qobject_cast<QAbstractScrollArea *>(target->parent()))
static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index cb7761add7..cfccce7c41 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -3040,7 +3040,8 @@ QList<QAction*> QWidget::actions() const
Disabling a widget implicitly disables all its children. Enabling
respectively enables all child widgets unless they have been
- explicitly disabled.
+ explicitly disabled. It it not possible to explicitly enable a child
+ widget which is not a window while its parent widget remains disabled.
By default, this property is true.
@@ -9909,11 +9910,16 @@ void QWidget::update(const QRect &rect)
*/
void QWidget::update(const QRegion &rgn)
{
- if (!isVisible() || !updatesEnabled() || rgn.isEmpty())
+ if (!isVisible() || !updatesEnabled())
+ return;
+
+ QRegion r = rgn & QWidget::rect();
+
+ if (r.isEmpty())
return;
if (testAttribute(Qt::WA_WState_InPaintEvent)) {
- QApplication::postEvent(this, new QUpdateLaterEvent(rgn));
+ QApplication::postEvent(this, new QUpdateLaterEvent(r));
return;
}
@@ -9926,9 +9932,9 @@ void QWidget::update(const QRegion &rgn)
#endif // Q_WS_MAC
QTLWExtra *tlwExtra = window()->d_func()->maybeTopData();
if (tlwExtra && !tlwExtra->inTopLevelResize && tlwExtra->backingStore)
- tlwExtra->backingStoreTracker->markDirty(rgn, this);
+ tlwExtra->backingStoreTracker->markDirty(r, this);
} else {
- d_func()->repaint_sys(rgn);
+ d_func()->repaint_sys(r);
}
}
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index a4da98815b..3b6c9ca448 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -137,6 +137,9 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
qt_window_private(win)->positionPolicy = topData()->posIncludesFrame ?
QWindowPrivate::WindowFrameInclusive : QWindowPrivate::WindowFrameExclusive;
win->create();
+ // Enable nonclient-area events for QDockWidget and other NonClientArea-mouse event processing.
+ if ((flags & Qt::Desktop) == Qt::Window)
+ win->handle()->setFrameStrutEventsEnabled(true);
data.window_flags = win->flags();
@@ -260,10 +263,8 @@ void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f)
bool explicitlyHidden = q->testAttribute(Qt::WA_WState_Hidden) && q->testAttribute(Qt::WA_WState_ExplicitShowHide);
// Reparenting toplevel to child
- if (!(f&Qt::Window) && (oldFlags&Qt::Window) && !q->testAttribute(Qt::WA_NativeWindow)) {
- //qDebug() << "setParent_sys() change from toplevel";
+ if (wasCreated && !(f & Qt::Window) && (oldFlags & Qt::Window) && !q->testAttribute(Qt::WA_NativeWindow))
q->destroy();
- }
adjustFlags(f, q);
data.window_flags = f;
@@ -543,6 +544,13 @@ void QWidgetPrivate::show_sys()
#endif
invalidateBuffer(q->rect());
window->setVisible(true);
+ // Was the window moved by the Window system or QPlatformWindow::initialGeometry() ?
+ if (window->isTopLevel()) {
+ const QPoint crectTopLeft = q->data->crect.topLeft();
+ const QPoint windowTopLeft = window->geometry().topLeft();
+ if (crectTopLeft == QPoint(0, 0) && windowTopLeft != crectTopLeft)
+ q->data->crect.moveTopLeft(windowTopLeft);
+ }
}
}
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index bedcfe78bf..c19b617091 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -476,6 +476,10 @@ void QWidgetWindow::handleTouchEvent(QTouchEvent *event)
if (event->type() == QEvent::TouchCancel) {
QApplicationPrivate::translateTouchCancel(event->device(), event->timestamp());
event->accept();
+ } else if (qApp->d_func()->inPopupMode()) {
+ // Ignore touch events for popups. This will cause QGuiApplication to synthesise mouse
+ // events instead, which QWidgetWindow::handleMouseEvent will forward correctly:
+ event->ignore();
} else {
event->setAccepted(QApplicationPrivate::translateRawTouchEvent(m_widget, event->device(), event->touchPoints(), event->timestamp()));
}
@@ -486,15 +490,13 @@ void QWidgetWindow::handleKeyEvent(QKeyEvent *event)
if (QApplicationPrivate::instance()->modalState() && !qt_try_modal(m_widget, event->type()))
return;
- QObject *receiver = 0;
- if (QApplicationPrivate::inPopupMode()) {
+ QObject *receiver = QWidget::keyboardGrabber();
+ if (!receiver && QApplicationPrivate::inPopupMode()) {
QWidget *popup = QApplication::activePopupWidget();
QWidget *popupFocusWidget = popup->focusWidget();
receiver = popupFocusWidget ? popupFocusWidget : popup;
}
if (!receiver)
- receiver = QWidget::keyboardGrabber();
- if (!receiver)
receiver = focusObject();
QGuiApplication::sendSpontaneousEvent(receiver, event);
}
diff --git a/src/widgets/styles/qfusionstyle_p_p.h b/src/widgets/styles/qfusionstyle_p_p.h
index acdf409dbf..a76ed24a4a 100644
--- a/src/widgets/styles/qfusionstyle_p_p.h
+++ b/src/widgets/styles/qfusionstyle_p_p.h
@@ -88,7 +88,7 @@ public:
// On mac we want a standard blue color used when the system palette is used
bool isMacSystemPalette(const QPalette &pal) const {
Q_UNUSED(pal);
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
const QPalette *themePalette = QGuiApplicationPrivate::platformTheme()->palette();
if (themePalette && themePalette->color(QPalette::Normal, QPalette::Highlight) ==
pal.color(QPalette::Normal, QPalette::Highlight) &&
@@ -102,13 +102,13 @@ public:
QColor highlight(const QPalette &pal) const {
if (isMacSystemPalette(pal))
return QColor(60, 140, 230);
- return pal.color(QPalette::Active, QPalette::Highlight);
+ return pal.color(QPalette::Highlight);
}
QColor highlightedText(const QPalette &pal) const {
if (isMacSystemPalette(pal))
return Qt::white;
- return pal.color(QPalette::Active, QPalette::HighlightedText);
+ return pal.color(QPalette::HighlightedText);
}
QColor outline(const QPalette &pal) const {
diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp
index a53a961a89..769d822108 100644
--- a/src/widgets/styles/qgtkstyle_p.cpp
+++ b/src/widgets/styles/qgtkstyle_p.cpp
@@ -641,7 +641,9 @@ QString QGtkStylePrivate::getGConfString(const QString &value, const QString &fa
{
QString retVal = fallback;
if (resolveGConf()) {
+#if !defined(GLIB_VERSION_2_36)
g_type_init();
+#endif
GConfClient* client = gconf_client_get_default();
GError *err = 0;
char *str = gconf_client_get_string(client, qPrintable(value), &err);
@@ -660,7 +662,9 @@ bool QGtkStylePrivate::getGConfBool(const QString &key, bool fallback)
{
bool retVal = fallback;
if (resolveGConf()) {
+#if !defined(GLIB_VERSION_2_36)
g_type_init();
+#endif
GConfClient* client = gconf_client_get_default();
GError *err = 0;
bool result = gconf_client_get_bool(client, qPrintable(key), &err);
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 8ff6419075..b7f39d45dd 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -840,7 +840,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
: kThemeGrowRight | kThemeGrowDown;
gbi.size = sz == QAquaSizeSmall ? kHIThemeGrowBoxSizeSmall : kHIThemeGrowBoxSizeNormal;
if (HIThemeGetGrowBoxBounds(&p, &gbi, &r) == noErr)
- ret = QSize(r.size.width, r.size.height);
+ ret = QSize(QSysInfo::MacintoshVersion <= QSysInfo::MV_10_6 ? r.size.width : 0, r.size.height);
}
break;
case QStyle::CT_ComboBox:
@@ -3643,8 +3643,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
tti.version = qt_mac_hitheme_version;
tti.state = tds;
QColor textColor = btn->palette.buttonText().color();
- CGFloat colorComp[] = { textColor.redF(), textColor.greenF(),
- textColor.blueF(), textColor.alphaF() };
+ CGFloat colorComp[] = { static_cast<CGFloat>(textColor.redF()), static_cast<CGFloat>(textColor.greenF()),
+ static_cast<CGFloat>(textColor.blueF()), static_cast<CGFloat>(textColor.alphaF()) };
CGContextSetFillColorSpace(cg, qt_mac_genericColorSpace());
CGContextSetFillColor(cg, colorComp);
tti.fontID = themeId;
@@ -3883,8 +3883,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
tti.version = qt_mac_hitheme_version;
tti.state = tds;
QColor textColor = myTab.palette.windowText().color();
- CGFloat colorComp[] = { textColor.redF(), textColor.greenF(),
- textColor.blueF(), textColor.alphaF() };
+ CGFloat colorComp[] = { static_cast<CGFloat>(textColor.redF()), static_cast<CGFloat>(textColor.greenF()),
+ static_cast<CGFloat>(textColor.blueF()), static_cast<CGFloat>(textColor.alphaF()) };
CGContextSetFillColorSpace(cg, qt_mac_genericColorSpace());
CGContextSetFillColor(cg, colorComp);
switch (d->aquaSizeConstrain(opt, w)) {
@@ -4063,8 +4063,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
CGContextSetShouldAntialias(cg, true);
CGContextSetShouldSmoothFonts(cg, true);
QColor textColor = p->pen().color();
- CGFloat colorComp[] = { textColor.redF(), textColor.greenF(),
- textColor.blueF(), textColor.alphaF() };
+ CGFloat colorComp[] = { static_cast<CGFloat>(textColor.redF()), static_cast<CGFloat>(textColor.greenF()),
+ static_cast<CGFloat>(textColor.blueF()), static_cast<CGFloat>(textColor.alphaF()) };
CGContextSetFillColorSpace(cg, qt_mac_genericColorSpace());
CGContextSetFillColor(cg, colorComp);
HIThemeTextInfo tti;
@@ -4316,6 +4316,10 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
case CE_ProgressBarGroove:
break;
case CE_SizeGrip: {
+ // We do not draw size grips on versions > 10.6
+ if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_6)
+ break;
+
if (w && w->testAttribute(Qt::WA_MacOpaqueSizeGrip)) {
HIThemeGrowBoxDrawInfo gdi;
gdi.version = qt_mac_hitheme_version;
@@ -4947,7 +4951,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (cc == CC_ScrollBar && proxy()->styleHint(SH_ScrollBar_Transient, opt, widget)) {
bool wasActive = false;
- CGFloat opacity = 1.0;
+ CGFloat opacity = 0.0;
CGFloat expandScale = 1.0;
CGFloat expandOffset = -1.0;
bool shouldExpand = false;
@@ -4973,6 +4977,10 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
oldState != slider->state ||
oldActiveControls != slider->activeSubControls) {
+ // if the scrollbar is transient or its attributes, geometry or
+ // state has changed, the opacity is reset back to 100% opaque
+ opacity = 1.0;
+
styleObject->setProperty("_q_stylepos", slider->sliderPosition);
styleObject->setProperty("_q_stylemin", slider->minimum);
styleObject->setProperty("_q_stylemax", slider->maximum);
@@ -5371,8 +5379,8 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
tti.version = qt_mac_hitheme_version;
tti.state = tds;
QColor textColor = groupBox.palette.windowText().color();
- CGFloat colorComp[] = { textColor.redF(), textColor.greenF(),
- textColor.blueF(), textColor.alphaF() };
+ CGFloat colorComp[] = { static_cast<CGFloat>(textColor.redF()), static_cast<CGFloat>(textColor.greenF()),
+ static_cast<CGFloat>(textColor.blueF()), static_cast<CGFloat>(textColor.alphaF()) };
CGContextSetFillColorSpace(cg, qt_mac_genericColorSpace());
CGContextSetFillColor(cg, colorComp);
tti.fontID = flat ? kThemeSystemFont : kThemeSmallSystemFont;
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index 4f4cd71070..5fe071087e 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -206,7 +206,7 @@ void QStyleOption::init(const QWidget *widget)
if (!(state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget))
state &= ~QStyle::State_Enabled;
#endif
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
switch (QMacStyle::widgetSizePolicy(widget)) {
case QMacStyle::SizeSmall:
state |= QStyle::State_Small;
diff --git a/src/widgets/util/qcolormap.h b/src/widgets/util/qcolormap.h
index b869bd9555..963be7e537 100644
--- a/src/widgets/util/qcolormap.h
+++ b/src/widgets/util/qcolormap.h
@@ -78,10 +78,6 @@ public:
const QVector<QColor> colormap() const;
-#ifdef Q_WS_WIN
- static HPALETTE hPal();
-#endif
-
private:
QColormap();
QColormapPrivate *d;
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp
index 7485644a08..a3c331aa2b 100644
--- a/src/widgets/widgets/qdockwidget.cpp
+++ b/src/widgets/widgets/qdockwidget.cpp
@@ -55,7 +55,6 @@
#include <qtoolbutton.h>
#include <qdebug.h>
-#include <qpa/qplatformwindow.h>
#include <private/qwidgetresizehandler_p.h>
#include "qdockwidget_p.h"
@@ -1000,14 +999,6 @@ void QDockWidgetPrivate::plug(const QRect &rect)
setWindowState(false, false, rect);
}
-static void setFrameStrutEventsEnabled(const QWidget *w, bool enabled)
-{
- if (const QWindow *window = w->windowHandle())
- if (QPlatformWindow *platformWindow = window->handle())
- if (platformWindow->frameStrutEventsEnabled() != enabled)
- platformWindow->setFrameStrutEventsEnabled(enabled);
-}
-
void QDockWidgetPrivate::setWindowState(bool floating, bool unplug, const QRect &rect)
{
Q_Q(QDockWidget);
@@ -1060,9 +1051,6 @@ void QDockWidgetPrivate::setWindowState(bool floating, bool unplug, const QRect
}
}
- if (floating && nativeDeco)
- setFrameStrutEventsEnabled(q, true);
-
resizer->setActive(QWidgetResizeHandler::Resize, !unplug && floating && !nativeDeco);
}
@@ -1397,8 +1385,6 @@ bool QDockWidget::event(QEvent *event)
emit visibilityChanged(false);
break;
case QEvent::Show:
- if (static_cast<QDockWidgetLayout *>(QDockWidget::layout())->nativeWindowDeco(isFloating()))
- setFrameStrutEventsEnabled(this, true);
d->toggleViewAction->setChecked(true);
emit visibilityChanged(geometry().right() >= 0 && geometry().bottom() >= 0);
break;
diff --git a/src/widgets/widgets/qfontcombobox.h b/src/widgets/widgets/qfontcombobox.h
index 66fc9b4581..8b3170eb5b 100644
--- a/src/widgets/widgets/qfontcombobox.h
+++ b/src/widgets/widgets/qfontcombobox.h
@@ -59,7 +59,6 @@ class Q_WIDGETS_EXPORT QFontComboBox : public QComboBox
Q_PROPERTY(QFontDatabase::WritingSystem writingSystem READ writingSystem WRITE setWritingSystem)
Q_PROPERTY(FontFilters fontFilters READ fontFilters WRITE setFontFilters)
Q_PROPERTY(QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY currentFontChanged)
- Q_ENUMS(FontSelection)
public:
explicit QFontComboBox(QWidget *parent = 0);
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index fde46c9729..33d2e01ed7 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -2998,6 +2998,7 @@ void QMenu::actionEvent(QActionEvent *e)
QGuiApplicationPrivate::platformTheme()->createPlatformMenuItem();
menuItem->setTag(reinterpret_cast<quintptr>(e->action()));
QObject::connect(menuItem, SIGNAL(activated()), e->action(), SLOT(trigger()));
+ QObject::connect(menuItem, SIGNAL(hovered()), e->action(), SIGNAL(hovered()));
copyActionToPlatformItem(e->action(), menuItem);
QPlatformMenuItem* beforeItem = d->platformMenu->menuItemForTag(reinterpret_cast<quintptr>(e->before()));
d->platformMenu->insertMenuItem(menuItem, beforeItem);
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index 99493704b5..de06d4454a 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -579,7 +579,7 @@ void QWidgetTextControlPrivate::selectionChanged(bool forceEmitSelectionChanged
if (forceEmitSelectionChanged) {
emit q->selectionChanged();
#ifndef QT_NO_ACCESSIBILITY
- if (q->parent()) {
+ if (q->parent() && q->parent()->isWidgetType()) {
QAccessibleTextSelectionEvent ev(q->parent(), cursor.anchor(), cursor.position());
QAccessible::updateAccessibility(&ev);
}
@@ -602,7 +602,7 @@ void QWidgetTextControlPrivate::selectionChanged(bool forceEmitSelectionChanged
|| cursor.anchor() != lastSelectionAnchor)))) {
emit q->selectionChanged();
#ifndef QT_NO_ACCESSIBILITY
- if (q->parent()) {
+ if (q->parent() && q->parent()->isWidgetType()) {
QAccessibleTextSelectionEvent ev(q->parent(), cursor.anchor(), cursor.position());
QAccessible::updateAccessibility(&ev);
}