summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Ahumada <sahumada@blackberry.com>2014-03-13 15:57:03 +0100
committerSergio Ahumada <sahumada@blackberry.com>2014-03-13 15:57:11 +0100
commit27016b89ae49da091527548af0ca9022ec4d7902 (patch)
treede408d49d52dd6a73e75a612ef51342d6ee44638 /src
parent3683bc97d2ebc0de3272fc09656b90a88f5eb326 (diff)
parentfbaa6d3ca6fc2693c5c8a1cd8e565803adc97730 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/xcb/README3
-rw-r--r--src/3rdparty/xcb/include/xcb/xkb.h4216
-rw-r--r--src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch273
-rw-r--r--src/3rdparty/xcb/libxcb/xkb.c8041
-rw-r--r--src/3rdparty/xcb/libxcb/xkb.patch172
-rw-r--r--src/3rdparty/xkbcommon.pri2
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java16
-rw-r--r--src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl10
-rw-r--r--src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl10
-rw-r--r--src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java24
-rw-r--r--src/android/java/src/org/qtproject/qt5/android/bindings/QtApplication.java10
-rw-r--r--src/corelib/corelib.pro2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp2
-rw-r--r--src/corelib/doc/snippets/qbytearraylist/qbytearraylist.pro2
-rw-r--r--src/corelib/doc/src/eventsandfilters.qdoc2
-rw-r--r--src/corelib/global/qcompilerdetection.h2
-rw-r--r--src/corelib/global/qglobal.cpp16
-rw-r--r--src/corelib/io/qdebug.h6
-rw-r--r--src/corelib/io/qfilesystementry.cpp2
-rw-r--r--src/corelib/io/qloggingcategory.cpp17
-rw-r--r--src/corelib/io/qloggingregistry.cpp145
-rw-r--r--src/corelib/io/qloggingregistry_p.h9
-rw-r--r--src/corelib/io/qprocess_unix.cpp8
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp1
-rw-r--r--src/corelib/json/qjsonvalue.cpp56
-rw-r--r--src/corelib/kernel/qcoreevent.cpp1
-rw-r--r--src/corelib/kernel/qcoreevent.h2
-rw-r--r--src/corelib/thread/qgenericatomic.h8
-rw-r--r--src/corelib/thread/qthread_win.cpp8
-rw-r--r--src/corelib/tools/qbytearray.cpp85
-rw-r--r--src/corelib/tools/qbytearray.h18
-rw-r--r--src/corelib/tools/qbytearray_mac.mm101
-rw-r--r--src/corelib/tools/qbytearraylist.cpp258
-rw-r--r--src/corelib/tools/qbytearraylist.h124
-rw-r--r--src/corelib/tools/qdatetimeparser_p.h2
-rw-r--r--src/corelib/tools/qeasingcurve.cpp16
-rw-r--r--src/corelib/tools/qstring.cpp134
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc8
-rw-r--r--src/corelib/tools/qvector.cpp5
-rw-r--r--src/corelib/tools/tools.pri5
-rw-r--r--src/dbus/qdbusargument.cpp18
-rw-r--r--src/dbus/qdbusvirtualobject.cpp3
-rw-r--r--src/gui/gui.pro6
-rw-r--r--src/gui/kernel/qevent.cpp9
-rw-r--r--src/gui/kernel/qguiapplication.cpp25
-rw-r--r--src/gui/kernel/qopenglcontext.cpp142
-rw-r--r--src/gui/kernel/qopenglcontext.h12
-rw-r--r--src/gui/kernel/qpalette.h3
-rw-r--r--src/gui/kernel/qplatformintegration.cpp34
-rw-r--r--src/gui/kernel/qplatformintegration.h9
-rw-r--r--src/gui/kernel/qplatformtheme.cpp2
-rw-r--r--src/gui/kernel/qplatformtheme.h3
-rw-r--r--src/gui/kernel/qsimpledrag.cpp10
-rw-r--r--src/gui/kernel/qtouchdevice.cpp2
-rw-r--r--src/gui/kernel/qwindow.cpp14
-rw-r--r--src/gui/math3d/qvector2d.h14
-rw-r--r--src/gui/math3d/qvector3d.h14
-rw-r--r--src/gui/math3d/qvector4d.h14
-rw-r--r--src/gui/opengl/opengl.pri4
-rw-r--r--src/gui/opengl/qopengl.cpp9
-rw-r--r--src/gui/opengl/qopengl.h30
-rw-r--r--src/gui/opengl/qopenglbuffer.cpp6
-rw-r--r--src/gui/opengl/qopengldebug.cpp22
-rw-r--r--src/gui/opengl/qopenglengineshadermanager.cpp2
-rw-r--r--src/gui/opengl/qopenglengineshadermanager_p.h2
-rw-r--r--src/gui/opengl/qopenglengineshadersource_p.h35
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp57
-rw-r--r--src/gui/opengl/qopenglframebufferobject_p.h7
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp992
-rw-r--r--src/gui/opengl/qopenglfunctions.h877
-rw-r--r--src/gui/opengl/qopenglgradientcache.cpp15
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp383
-rw-r--r--src/gui/opengl/qopenglproxy_win.cpp4597
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp13
-rw-r--r--src/gui/opengl/qopengltexture.cpp110
-rw-r--r--src/gui/opengl/qopengltextureblitter.cpp9
-rw-r--r--src/gui/opengl/qopengltexturecache.cpp15
-rw-r--r--src/gui/opengl/qopengltextureglyphcache.cpp110
-rw-r--r--src/gui/opengl/qopengltextureglyphcache_p.h4
-rw-r--r--src/gui/opengl/qopengltexturehelper.cpp9
-rw-r--r--src/gui/opengl/qopengltimerquery.cpp12
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject.cpp4
-rw-r--r--src/gui/painting/qdrawhelper.cpp14
-rw-r--r--src/gui/painting/qpaintengine_blitter.cpp2
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp47
-rw-r--r--src/gui/painting/qregion.cpp27
-rw-r--r--src/gui/text/qdistancefield.cpp17
-rw-r--r--src/gui/text/qfont.cpp8
-rw-r--r--src/gui/text/qfont_p.h22
-rw-r--r--src/gui/text/qfontdatabase.cpp424
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp472
-rw-r--r--src/gui/text/qfontengine.cpp221
-rw-r--r--src/gui/text/qfontengine_ft.cpp87
-rw-r--r--src/gui/text/qfontengine_ft_p.h8
-rw-r--r--src/gui/text/qfontengine_p.h53
-rw-r--r--src/gui/text/qfontengine_qpa.cpp115
-rw-r--r--src/gui/text/qfontengine_qpa_p.h8
-rw-r--r--src/gui/text/qfontmetrics.cpp104
-rw-r--r--src/gui/text/qfontsubset.cpp16
-rw-r--r--src/gui/text/qharfbuzzng.cpp44
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp10
-rw-r--r--src/gui/text/qplatformfontdatabase.h2
-rw-r--r--src/gui/text/qrawfont.cpp2
-rw-r--r--src/gui/text/qtextengine.cpp172
-rw-r--r--src/gui/text/qtextengine_p.h39
-rw-r--r--src/network/access/qhttpmultipart.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp13
-rw-r--r--src/network/access/qnetworkdiskcache.cpp2
-rw-r--r--src/network/access/qnetworkreply.cpp4
-rw-r--r--src/network/access/qnetworkrequest.cpp4
-rw-r--r--src/network/access/qspdyprotocolhandler.cpp111
-rw-r--r--src/network/access/qspdyprotocolhandler_p.h1
-rw-r--r--src/network/kernel/qhostinfo.cpp2
-rw-r--r--src/network/kernel/qnetworkproxy.cpp2
-rw-r--r--src/network/socket/qabstractsocket.cpp2
-rw-r--r--src/network/socket/qlocalserver.cpp3
-rw-r--r--src/network/socket/qlocalsocket.cpp2
-rw-r--r--src/network/socket/qtcpsocket.cpp2
-rw-r--r--src/network/ssl/qssl.cpp4
-rw-r--r--src/network/ssl/qsslconfiguration.cpp2
-rw-r--r--src/network/ssl/qsslcontext.cpp2
-rw-r--r--src/network/ssl/qsslsocket.cpp6
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp12
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp4
-rw-r--r--src/opengl/qgl.cpp78
-rw-r--r--src/opengl/qgl_qpa.cpp2
-rw-r--r--src/opengl/qglbuffer.cpp2
-rw-r--r--src/opengl/qglframebufferobject.cpp14
-rw-r--r--src/opengl/qglframebufferobject_p.h4
-rw-r--r--src/opengl/qglfunctions.cpp2372
-rw-r--r--src/opengl/qglfunctions.h818
-rw-r--r--src/opengl/qglpixelbuffer.cpp6
-rw-r--r--src/opengl/qglshaderprogram.cpp14
-rw-r--r--src/openglextensions/openglextensions.pro2
-rw-r--r--src/platformsupport/clipboard/clipboard.pri5
-rw-r--r--src/platformsupport/clipboard/qmacmime.mm (renamed from src/plugins/platforms/cocoa/qmacmime.mm)145
-rw-r--r--src/platformsupport/clipboard/qmacmime_p.h (renamed from src/plugins/platforms/cocoa/qmacmime.h)0
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience.cpp25
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp182
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h6
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcursor_p.h2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformintegration.cpp3
-rw-r--r--src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm2
-rw-r--r--src/platformsupport/fbconvenience/qfbwindow_p.h20
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm89
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h3
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm40
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h7
-rw-r--r--src/platformsupport/platformsupport.pro1
-rw-r--r--src/plugins/generic/tslib/qtslib.cpp13
-rw-r--r--src/plugins/platforminputcontexts/compose/compose.pro2
-rw-r--r--src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp20
-rw-r--r--src/plugins/platforms/android/qandroidplatformbackingstore.cpp5
-rw-r--r--src/plugins/platforms/android/qandroidplatformclipboard.cpp6
-rw-r--r--src/plugins/platforms/android/qandroidplatformclipboard.h4
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglcontext.cpp2
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.cpp26
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro6
-rw-r--r--src/plugins/platforms/cocoa/qcocoaclipboard.mm1
-rw-r--r--src/plugins/platforms/cocoa/qcocoadrag.mm1
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm3
-rw-r--r--src/plugins/platforms/cocoa/qcocoamimetypes.h (renamed from src/corelib/doc/snippets/qbytearraylist/main.cpp)24
-rw-r--r--src/plugins/platforms/cocoa/qcocoamimetypes.mm144
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.mm1
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h54
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm239
-rw-r--r--src/plugins/platforms/cocoa/qmacclipboard.h2
-rw-r--r--src/plugins/platforms/cocoa/qmacclipboard.mm1
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm1
-rw-r--r--src/plugins/platforms/directfb/qdirectfb_egl.cpp3
-rw-r--r--src/plugins/platforms/eglfs/qeglfscontext.cpp5
-rw-r--r--src/plugins/platforms/eglfs/qeglfscontext.h3
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.h4
-rw-r--r--src/plugins/platforms/ios/ios.pro6
-rw-r--r--src/plugins/platforms/ios/qiosclipboard.h68
-rw-r--r--src/plugins/platforms/ios/qiosclipboard.mm238
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.mm6
-rw-r--r--src/plugins/platforms/ios/qiosintegration.h4
-rw-r--r--src/plugins/platforms/ios/qiosintegration.mm13
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp2
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglscreen.cpp5
-rw-r--r--src/plugins/platforms/qnx/qblackberrytheme.cpp (renamed from src/plugins/platforms/qnx/qqnxtheme.cpp)38
-rw-r--r--src/plugins/platforms/qnx/qblackberrytheme.h (renamed from src/plugins/platforms/qnx/qqnxtheme.h)17
-rw-r--r--src/plugins/platforms/qnx/qnx.pro4
-rw-r--r--src/plugins/platforms/qnx/qqnxfilepicker.cpp46
-rw-r--r--src/plugins/platforms/qnx/qqnxfilepicker.h1
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp17
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.h2
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp10
-rw-r--r--src/plugins/platforms/qnx/qqnxnativeinterface.cpp4
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp103
-rw-r--r--src/plugins/platforms/windows/qwindows.qdocconf25
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.cpp13
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.h4
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowseglcontext.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp34
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp133
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.h12
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp67
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h6
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp11
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.cpp11
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp2
-rw-r--r--src/plugins/platforms/winrt/qwinrteglcontext.cpp2
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp39
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.h13
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbmain.cpp (renamed from src/plugins/platforms/xcb/main.cpp)2
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp15
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp8
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h3
-rw-r--r--src/plugins/platforms/xcb/xcb-plugin.pro5
-rw-r--r--src/plugins/platforms/xcb/xcb-static/xcb-static.pro3
-rw-r--r--src/sql/models/qsqltablemodel.cpp2
-rw-r--r--src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc2
-rw-r--r--src/tools/qdoc/generator.cpp2
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp26
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp2
-rw-r--r--src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp4
-rw-r--r--src/widgets/kernel/qapplication.cpp94
-rw-r--r--src/widgets/kernel/qapplication.h2
-rw-r--r--src/widgets/kernel/qapplication_p.h1
-rw-r--r--src/widgets/kernel/qformlayout.cpp2
-rw-r--r--src/widgets/kernel/qopenglwidget.cpp17
-rw-r--r--src/widgets/kernel/qwidget.cpp27
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp56
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp109
-rw-r--r--src/widgets/kernel/qwidgetbackingstore_p.h20
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp10
-rw-r--r--src/widgets/styles/qfusionstyle.cpp2
-rw-r--r--src/widgets/styles/qgtkstyle.cpp2
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm8
-rw-r--r--src/widgets/styles/qstyle.cpp30
-rw-r--r--src/widgets/styles/qwindowsvistastyle.cpp14
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp2
-rw-r--r--src/widgets/widgets/qmaccocoaviewcontainer_mac.mm2
-rw-r--r--src/xml/xml.pro2
245 files changed, 7711 insertions, 21731 deletions
diff --git a/src/3rdparty/xcb/README b/src/3rdparty/xcb/README
index 4d275ef5a8..4de7a17409 100644
--- a/src/3rdparty/xcb/README
+++ b/src/3rdparty/xcb/README
@@ -1,7 +1,8 @@
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)
+ # libxkbcommon-x11 requires libxcb-xkb >= 1.10
+ libxcb-1.10 together with xcb-proto-1.10 (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
index 0180ec8b58..66b4712194 100644
--- a/src/3rdparty/xcb/include/xcb/xkb.h
+++ b/src/3rdparty/xcb/include/xcb/xkb.h
@@ -118,41 +118,21 @@ typedef enum xcb_xkb_control_t {
XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648u
} 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; /**< */
+typedef enum xcb_xkb_ax_option_t {
+ XCB_XKB_AX_OPTION_SK_PRESS_FB = 1,
+ XCB_XKB_AX_OPTION_SK_ACCEPT_FB = 2,
+ XCB_XKB_AX_OPTION_FEATURE_FB = 4,
+ XCB_XKB_AX_OPTION_SLOW_WARN_FB = 8,
+ XCB_XKB_AX_OPTION_INDICATOR_FB = 16,
+ XCB_XKB_AX_OPTION_STICKY_KEYS_FB = 32,
+ XCB_XKB_AX_OPTION_TWO_KEYS = 64,
+ XCB_XKB_AX_OPTION_LATCH_TO_LOCK = 128,
+ XCB_XKB_AX_OPTION_SK_RELEASE_FB = 256,
+ XCB_XKB_AX_OPTION_SK_REJECT_FB = 512,
+ XCB_XKB_AX_OPTION_BK_REJECT_FB = 1024,
+ XCB_XKB_AX_OPTION_DUMB_BELL = 2048
} 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;
/**
@@ -170,6 +150,8 @@ typedef enum xcb_xkb_led_class_result_t {
} xcb_xkb_led_class_result_t;
typedef enum xcb_xkb_led_class_t {
+ XCB_XKB_LED_CLASS_KBD_FEEDBACK_CLASS = 0,
+ XCB_XKB_LED_CLASS_LED_FEEDBACK_CLASS = 4,
XCB_XKB_LED_CLASS_DFLT_XI_CLASS = 768,
XCB_XKB_LED_CLASS_ALL_XI_CLASSES = 1280
} xcb_xkb_led_class_t;
@@ -191,6 +173,8 @@ typedef enum xcb_xkb_bell_class_result_t {
} xcb_xkb_bell_class_result_t;
typedef enum xcb_xkb_bell_class_t {
+ XCB_XKB_BELL_CLASS_KBD_FEEDBACK_CLASS = 0,
+ XCB_XKB_BELL_CLASS_BELL_FEEDBACK_CLASS = 5,
XCB_XKB_BELL_CLASS_DFLT_XI_CLASS = 768
} xcb_xkb_bell_class_t;
@@ -307,13 +291,13 @@ typedef enum xcb_xkb_explicit_t {
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_interpret_match_t {
+ XCB_XKB_SYM_INTERPRET_MATCH_NONE_OF = 0,
+ XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF_OR_NONE = 1,
+ XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF = 2,
+ XCB_XKB_SYM_INTERPRET_MATCH_ALL_OF = 3,
+ XCB_XKB_SYM_INTERPRET_MATCH_EXACTLY = 4
+} xcb_xkb_sym_interpret_match_t;
typedef enum xcb_xkb_sym_interp_match_t {
XCB_XKB_SYM_INTERP_MATCH_LEVEL_ONE_ONLY = 128,
@@ -436,7 +420,7 @@ typedef struct xcb_xkb_mod_def_iterator_t {
* @brief xcb_xkb_key_name_t
**/
typedef struct xcb_xkb_key_name_t {
- uint8_t name[4]; /**< */
+ char name[4]; /**< */
} xcb_xkb_key_name_t;
/**
@@ -452,8 +436,8 @@ typedef struct 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]; /**< */
+ char real[4]; /**< */
+ char alias[4]; /**< */
} xcb_xkb_key_alias_t;
/**
@@ -466,27 +450,10 @@ typedef struct xcb_xkb_key_alias_iterator_t {
} 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;
/**
@@ -503,8 +470,8 @@ typedef struct xcb_xkb_counted_string_16_iterator_t {
**/
typedef struct xcb_xkb_kt_map_entry_t {
uint8_t active; /**< */
- uint8_t level; /**< */
uint8_t mods_mask; /**< */
+ uint8_t level; /**< */
uint8_t mods_mods; /**< */
uint16_t mods_vmods; /**< */
uint8_t pad0[2]; /**< */
@@ -629,38 +596,21 @@ typedef struct xcb_xkb_radio_group_behavior_iterator_t {
} xcb_xkb_radio_group_behavior_iterator_t;
/**
- * @brief xcb_xkb_overlay_1_behavior_t
+ * @brief xcb_xkb_overlay_behavior_t
**/
-typedef struct xcb_xkb_overlay_1_behavior_t {
+typedef struct xcb_xkb_overlay_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;
+} xcb_xkb_overlay_behavior_t;
/**
- * @brief xcb_xkb_overlay_2_behavior_iterator_t
+ * @brief xcb_xkb_overlay_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;
+typedef struct xcb_xkb_overlay_behavior_iterator_t {
+ xcb_xkb_overlay_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_overlay_behavior_iterator_t;
/**
* @brief xcb_xkb_permament_lock_behavior_t
@@ -697,38 +647,21 @@ typedef struct xcb_xkb_permament_radio_group_behavior_iterator_t {
} xcb_xkb_permament_radio_group_behavior_iterator_t;
/**
- * @brief xcb_xkb_permament_overlay_1_behavior_t
+ * @brief xcb_xkb_permament_overlay_behavior_t
**/
-typedef struct xcb_xkb_permament_overlay_1_behavior_t {
+typedef struct xcb_xkb_permament_overlay_behavior_t {
uint8_t type; /**< */
xcb_keycode_t key; /**< */
-} xcb_xkb_permament_overlay_1_behavior_t;
+} xcb_xkb_permament_overlay_behavior_t;
/**
- * @brief xcb_xkb_permament_overlay_1_behavior_iterator_t
+ * @brief xcb_xkb_permament_overlay_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;
+typedef struct xcb_xkb_permament_overlay_behavior_iterator_t {
+ xcb_xkb_permament_overlay_behavior_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_permament_overlay_behavior_iterator_t;
/**
* @brief xcb_xkb_behavior_t
@@ -738,12 +671,12 @@ typedef union xcb_xkb_behavior_t {
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_overlay_behavior_t overlay1; /**< */
+ xcb_xkb_overlay_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; /**< */
+ xcb_xkb_permament_overlay_behavior_t permamentOverlay1; /**< */
+ xcb_xkb_permament_overlay_behavior_t permamentOverlay2; /**< */
uint8_t type; /**< */
} xcb_xkb_behavior_t;
@@ -890,23 +823,6 @@ typedef struct xcb_xkb_string8_iterator_t {
} 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 {
@@ -1045,210 +961,6 @@ typedef enum xcb_xkb_doodad_type_t {
} 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 {
@@ -1548,7 +1260,7 @@ typedef struct xcb_xkb_sa_lock_ptr_btn_iterator_t {
} 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_DFLT_BTN_ABSOLUTE = 4,
XCB_XKB_SA_SET_PTR_DFLT_FLAG_AFFECT_DFLT_BUTTON = 1
} xcb_xkb_sa_set_ptr_dflt_flag_t;
@@ -1792,6 +1504,7 @@ typedef struct xcb_xkb_sa_lock_device_btn_t {
uint8_t pad0; /**< */
uint8_t button; /**< */
uint8_t device; /**< */
+ uint8_t pad1[3]; /**< */
} xcb_xkb_sa_lock_device_btn_t;
/**
@@ -1836,6 +1549,44 @@ typedef struct xcb_xkb_sa_device_valuator_iterator_t {
} xcb_xkb_sa_device_valuator_iterator_t;
/**
+ * @brief xcb_xkb_si_action_t
+ **/
+typedef struct xcb_xkb_si_action_t {
+ uint8_t type; /**< */
+ uint8_t data[7]; /**< */
+} xcb_xkb_si_action_t;
+
+/**
+ * @brief xcb_xkb_si_action_iterator_t
+ **/
+typedef struct xcb_xkb_si_action_iterator_t {
+ xcb_xkb_si_action_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_si_action_iterator_t;
+
+/**
+ * @brief xcb_xkb_sym_interpret_t
+ **/
+typedef struct xcb_xkb_sym_interpret_t {
+ xcb_keysym_t sym; /**< */
+ uint8_t mods; /**< */
+ uint8_t match; /**< */
+ uint8_t virtualMod; /**< */
+ uint8_t flags; /**< */
+ xcb_xkb_si_action_t action; /**< */
+} xcb_xkb_sym_interpret_t;
+
+/**
+ * @brief xcb_xkb_sym_interpret_iterator_t
+ **/
+typedef struct xcb_xkb_sym_interpret_iterator_t {
+ xcb_xkb_sym_interpret_t *data; /**< */
+ int rem; /**< */
+ int index; /**< */
+} xcb_xkb_sym_interpret_iterator_t;
+
+/**
* @brief xcb_xkb_action_t
**/
typedef union xcb_xkb_action_t {
@@ -2069,38 +1820,38 @@ typedef struct 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]; /**< */
+ 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; /**< */
+ uint16_t accessXOption; /**< */
+ uint16_t accessXTimeout; /**< */
+ uint16_t accessXTimeoutOptionsMask; /**< */
+ uint16_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. */
@@ -2124,7 +1875,7 @@ typedef struct xcb_xkb_set_controls_request_t {
uint16_t ignoreLockVirtualMods; /**< */
uint8_t mouseKeysDfltBtn; /**< */
uint8_t groupsWrap; /**< */
- xcb_xkb_ax_option_t accessXOptions; /**< */
+ uint16_t accessXOptions; /**< */
uint8_t pad0[2]; /**< */
uint32_t affectEnabledControls; /**< */
uint32_t enabledControls; /**< */
@@ -2141,8 +1892,8 @@ typedef struct xcb_xkb_set_controls_request_t {
uint16_t accessXTimeout; /**< */
uint32_t accessXTimeoutMask; /**< */
uint32_t accessXTimeoutValues; /**< */
- xcb_xkb_ax_option_t accessXTimeoutOptionsMask; /**< */
- xcb_xkb_ax_option_t accessXTimeoutOptionsValues; /**< */
+ uint16_t accessXTimeoutOptionsMask; /**< */
+ uint16_t accessXTimeoutOptionsValues; /**< */
uint8_t perKeyRepeat[32]; /**< */
} xcb_xkb_set_controls_request_t;
@@ -2191,11 +1942,15 @@ 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; /**< */
+ uint8_t *alignment_pad; /**< */
xcb_xkb_action_t *acts_rtrn_acts; /**< */
xcb_xkb_set_behavior_t *behaviors_rtrn; /**< */
uint8_t *vmods_rtrn; /**< */
+ uint8_t *alignment_pad2; /**< */
xcb_xkb_set_explicit_t *explicit_rtrn; /**< */
+ uint16_t *alignment_pad3; /**< */
xcb_xkb_key_mod_map_t *modmap_rtrn; /**< */
+ uint16_t *alignment_pad4; /**< */
xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; /**< */
} xcb_xkb_get_map_map_t;
@@ -2478,6 +2233,7 @@ typedef struct xcb_xkb_get_named_indicator_reply_t {
uint8_t map_realMods; /**< */
uint16_t map_vmod; /**< */
uint32_t map_ctrls; /**< */
+ uint8_t supported; /**< */
uint8_t pad0[3]; /**< */
} xcb_xkb_get_named_indicator_reply_t;
@@ -2544,6 +2300,7 @@ typedef struct xcb_xkb_get_names_value_list_t {
xcb_atom_t compatName; /**< */
xcb_atom_t *typeNames; /**< */
uint8_t *nLevelsPerType; /**< */
+ uint8_t *alignment_pad; /**< */
xcb_atom_t *ktLevelNames; /**< */
xcb_atom_t *indicatorNames; /**< */
xcb_atom_t *virtualModNames; /**< */
@@ -2625,76 +2382,6 @@ typedef struct xcb_xkb_set_names_request_t {
} 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 {
@@ -2754,12 +2441,6 @@ typedef struct xcb_xkb_list_components_request_t {
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;
/**
@@ -2802,12 +2483,6 @@ typedef struct xcb_xkb_get_kbd_by_name_request_t {
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;
/**
@@ -2826,36 +2501,6 @@ typedef struct xcb_xkb_get_kbd_by_name_replies_types_map_t {
} 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 {
@@ -2877,201 +2522,107 @@ typedef struct xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t {
} 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; /**< */
+ 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; /**< */
+ uint8_t compatmap_type; /**< */
+ uint8_t compatDeviceID; /**< */
+ uint16_t compatmap_sequence; /**< */
+ uint32_t compatmap_length; /**< */
+ uint8_t groupsRtrn; /**< */
+ uint8_t pad0; /**< */
+ uint16_t firstSIRtrn; /**< */
+ uint16_t nSIRtrn; /**< */
+ uint16_t nTotalSI; /**< */
+ uint8_t pad1[16]; /**< */
+ xcb_xkb_sym_interpret_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; /**< */
+ uint8_t indicatormap_type; /**< */
+ uint8_t indicatorDeviceID; /**< */
+ uint16_t indicatormap_sequence; /**< */
+ uint32_t indicatormap_length; /**< */
+ 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; /**< */
+ uint8_t keyname_type; /**< */
+ uint8_t keyDeviceID; /**< */
+ uint16_t keyname_sequence; /**< */
+ uint32_t keyname_length; /**< */
+ 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; /**< */
+ uint8_t geometry_type; /**< */
+ uint8_t geometryDeviceID; /**< */
+ uint16_t geometry_sequence; /**< */
+ uint32_t geometry_length; /**< */
+ 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; /**< */
} geometry;
} xcb_xkb_get_kbd_by_name_replies_t;
@@ -3490,7 +3041,7 @@ typedef struct xcb_xkb_extension_device_notify_event_t {
uint8_t pad0; /**< */
uint16_t reason; /**< */
uint16_t ledClass; /**< */
- uint8_t ledID; /**< */
+ uint16_t ledID; /**< */
uint32_t ledsDefined; /**< */
uint32_t ledState; /**< */
uint8_t firstButton; /**< */
@@ -3502,49 +3053,6 @@ typedef struct 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
@@ -3888,110 +3396,64 @@ 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 /**< */);
+xcb_xkb_counted_string_16_sizeof (const void *_buffer /**< */);
/*****************************************************************************
**
- ** uint8_t * xcb_xkb_counted_string_8_string
+ ** char * xcb_xkb_counted_string_16_string
**
- ** @param const xcb_xkb_counted_string_8_t *R
- ** @returns uint8_t *
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns char *
**
*****************************************************************************/
-uint8_t *
-xcb_xkb_counted_string_8_string (const xcb_xkb_counted_string_8_t *R /**< */);
+char *
+xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */);
/*****************************************************************************
**
- ** int xcb_xkb_counted_string_8_string_length
+ ** int xcb_xkb_counted_string_16_string_length
**
- ** @param const xcb_xkb_counted_string_8_t *R
+ ** @param const xcb_xkb_counted_string_16_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 /**< */);
+xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R /**< */);
-/**
- * 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
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end
**
- ** @param xcb_xkb_counted_string_8_iterator_t i
+ ** @param const xcb_xkb_counted_string_16_t *R
** @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 /**< */);
+xcb_xkb_counted_string_16_string_end (const xcb_xkb_counted_string_16_t *R /**< */);
/*****************************************************************************
**
- ** uint8_t * xcb_xkb_counted_string_16_string
+ ** void * xcb_xkb_counted_string_16_alignment_pad
**
** @param const xcb_xkb_counted_string_16_t *R
- ** @returns uint8_t *
+ ** @returns void *
**
*****************************************************************************/
-uint8_t *
-xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */);
+void *
+xcb_xkb_counted_string_16_alignment_pad (const xcb_xkb_counted_string_16_t *R /**< */);
/*****************************************************************************
**
- ** int xcb_xkb_counted_string_16_string_length
+ ** int xcb_xkb_counted_string_16_alignment_pad_length
**
** @param const xcb_xkb_counted_string_16_t *R
** @returns int
@@ -3999,12 +3461,12 @@ xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */)
*****************************************************************************/
int
-xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R /**< */);
+xcb_xkb_counted_string_16_alignment_pad_length (const xcb_xkb_counted_string_16_t *R /**< */);
/*****************************************************************************
**
- ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_16_alignment_pad_end
**
** @param const xcb_xkb_counted_string_16_t *R
** @returns xcb_generic_iterator_t
@@ -4012,20 +3474,7 @@ 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 (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 /**< */);
+xcb_xkb_counted_string_16_alignment_pad_end (const xcb_xkb_counted_string_16_t *R /**< */);
/**
* Get the next element of the iterator
@@ -4496,28 +3945,28 @@ 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
+ * @param i Pointer to a xcb_xkb_overlay_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)
+ * element. The member index is increased by sizeof(xcb_xkb_overlay_behavior_t)
*/
/*****************************************************************************
**
- ** void xcb_xkb_overlay_1_behavior_next
+ ** void xcb_xkb_overlay_behavior_next
**
- ** @param xcb_xkb_overlay_1_behavior_iterator_t *i
+ ** @param xcb_xkb_overlay_behavior_iterator_t *i
** @returns void
**
*****************************************************************************/
void
-xcb_xkb_overlay_1_behavior_next (xcb_xkb_overlay_1_behavior_iterator_t *i /**< */);
+xcb_xkb_overlay_behavior_next (xcb_xkb_overlay_behavior_iterator_t *i /**< */);
/**
* Return the iterator pointing to the last element
- * @param i An xcb_xkb_overlay_1_behavior_iterator_t
+ * @param i An xcb_xkb_overlay_behavior_iterator_t
* @return The iterator pointing to the last element
*
* Set the current element in the iterator to the last element.
@@ -4527,58 +3976,15 @@ xcb_xkb_overlay_1_behavior_next (xcb_xkb_overlay_1_behavior_iterator_t *i /**<
/*****************************************************************************
**
- ** xcb_generic_iterator_t xcb_xkb_overlay_1_behavior_end
+ ** xcb_generic_iterator_t xcb_xkb_overlay_behavior_end
**
- ** @param xcb_xkb_overlay_1_behavior_iterator_t i
+ ** @param xcb_xkb_overlay_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 /**< */);
+xcb_xkb_overlay_behavior_end (xcb_xkb_overlay_behavior_iterator_t i /**< */);
/**
* Get the next element of the iterator
@@ -4668,28 +4074,28 @@ xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavi
/**
* Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_permament_overlay_1_behavior_iterator_t
+ * @param i Pointer to a xcb_xkb_permament_overlay_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)
+ * element. The member index is increased by sizeof(xcb_xkb_permament_overlay_behavior_t)
*/
/*****************************************************************************
**
- ** void xcb_xkb_permament_overlay_1_behavior_next
+ ** void xcb_xkb_permament_overlay_behavior_next
**
- ** @param xcb_xkb_permament_overlay_1_behavior_iterator_t *i
+ ** @param xcb_xkb_permament_overlay_behavior_iterator_t *i
** @returns void
**
*****************************************************************************/
void
-xcb_xkb_permament_overlay_1_behavior_next (xcb_xkb_permament_overlay_1_behavior_iterator_t *i /**< */);
+xcb_xkb_permament_overlay_behavior_next (xcb_xkb_permament_overlay_behavior_iterator_t *i /**< */);
/**
* Return the iterator pointing to the last element
- * @param i An xcb_xkb_permament_overlay_1_behavior_iterator_t
+ * @param i An xcb_xkb_permament_overlay_behavior_iterator_t
* @return The iterator pointing to the last element
*
* Set the current element in the iterator to the last element.
@@ -4699,58 +4105,15 @@ xcb_xkb_permament_overlay_1_behavior_next (xcb_xkb_permament_overlay_1_behavior_
/*****************************************************************************
**
- ** xcb_generic_iterator_t xcb_xkb_permament_overlay_1_behavior_end
+ ** xcb_generic_iterator_t xcb_xkb_permament_overlay_behavior_end
**
- ** @param xcb_xkb_permament_overlay_1_behavior_iterator_t i
+ ** @param xcb_xkb_permament_overlay_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 /**< */);
+xcb_xkb_permament_overlay_behavior_end (xcb_xkb_permament_overlay_behavior_iterator_t i /**< */);
/**
* Get the next element of the iterator
@@ -5178,140 +4541,6 @@ 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 /**< */);
@@ -5796,397 +5025,6 @@ xcb_xkb_row_next (xcb_xkb_row_iterator_t *i /**< */);
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 /**< */);
@@ -7301,6 +6139,92 @@ 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_si_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_si_action_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_si_action_next
+ **
+ ** @param xcb_xkb_si_action_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_si_action_next (xcb_xkb_si_action_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_si_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_si_action_end
+ **
+ ** @param xcb_xkb_si_action_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_si_action_end (xcb_xkb_si_action_iterator_t i /**< */);
+
+/**
+ * Get the next element of the iterator
+ * @param i Pointer to a xcb_xkb_sym_interpret_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_sym_interpret_t)
+ */
+
+/*****************************************************************************
+ **
+ ** void xcb_xkb_sym_interpret_next
+ **
+ ** @param xcb_xkb_sym_interpret_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sym_interpret_next (xcb_xkb_sym_interpret_iterator_t *i /**< */);
+
+/**
+ * Return the iterator pointing to the last element
+ * @param i An xcb_xkb_sym_interpret_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_sym_interpret_end
+ **
+ ** @param xcb_xkb_sym_interpret_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sym_interpret_end (xcb_xkb_sym_interpret_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
@@ -7343,7 +6267,7 @@ 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
*
@@ -7368,7 +6292,7 @@ xcb_xkb_use_extension (xcb_connection_t *c /**< */,
uint16_t wantedMinor /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7447,7 +6371,7 @@ xcb_xkb_select_events_details_sizeof (const void *_buffer /**< */,
uint16_t selectAll /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7485,7 +6409,7 @@ xcb_xkb_select_events_checked (xcb_connection_t *c /**< */,
const void *details /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7520,7 +6444,7 @@ xcb_xkb_select_events (xcb_connection_t *c /**< */,
const void *details /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7558,7 +6482,7 @@ xcb_xkb_select_events_aux_checked (xcb_connection_t *c /**
const xcb_xkb_select_events_details_t *details /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7593,7 +6517,7 @@ xcb_xkb_select_events_aux (xcb_connection_t *c /**< */,
const xcb_xkb_select_events_details_t *details /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7637,7 +6561,7 @@ xcb_xkb_bell_checked (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7678,7 +6602,7 @@ xcb_xkb_bell (xcb_connection_t *c /**< */,
xcb_window_t window /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7701,7 +6625,7 @@ 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
*
@@ -7758,7 +6682,7 @@ xcb_xkb_get_state_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7798,7 +6722,7 @@ xcb_xkb_latch_lock_state_checked (xcb_connection_t *c /**< */,
uint16_t groupLatch /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7835,7 +6759,7 @@ xcb_xkb_latch_lock_state (xcb_connection_t *c /**< */,
uint16_t groupLatch /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7858,7 +6782,7 @@ 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
*
@@ -7915,7 +6839,7 @@ xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */,
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -7942,7 +6866,7 @@ xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */,
** @param uint16_t ignoreLockVirtualMods
** @param uint8_t mouseKeysDfltBtn
** @param uint8_t groupsWrap
- ** @param xcb_xkb_ax_option_t accessXOptions
+ ** @param uint16_t accessXOptions
** @param uint32_t affectEnabledControls
** @param uint32_t enabledControls
** @param uint32_t changeControls
@@ -7958,8 +6882,8 @@ xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */,
** @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 uint16_t accessXTimeoutOptionsMask
+ ** @param uint16_t accessXTimeoutOptionsValues
** @param const uint8_t *perKeyRepeat
** @returns xcb_void_cookie_t
**
@@ -7978,7 +6902,7 @@ xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
uint16_t ignoreLockVirtualMods /**< */,
uint8_t mouseKeysDfltBtn /**< */,
uint8_t groupsWrap /**< */,
- xcb_xkb_ax_option_t accessXOptions /**< */,
+ uint16_t accessXOptions /**< */,
uint32_t affectEnabledControls /**< */,
uint32_t enabledControls /**< */,
uint32_t changeControls /**< */,
@@ -7994,12 +6918,12 @@ xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
uint16_t accessXTimeout /**< */,
uint32_t accessXTimeoutMask /**< */,
uint32_t accessXTimeoutValues /**< */,
- xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */,
- xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */,
+ uint16_t accessXTimeoutOptionsMask /**< */,
+ uint16_t accessXTimeoutOptionsValues /**< */,
const uint8_t *perKeyRepeat /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -8023,7 +6947,7 @@ xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
** @param uint16_t ignoreLockVirtualMods
** @param uint8_t mouseKeysDfltBtn
** @param uint8_t groupsWrap
- ** @param xcb_xkb_ax_option_t accessXOptions
+ ** @param uint16_t accessXOptions
** @param uint32_t affectEnabledControls
** @param uint32_t enabledControls
** @param uint32_t changeControls
@@ -8039,8 +6963,8 @@ xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
** @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 uint16_t accessXTimeoutOptionsMask
+ ** @param uint16_t accessXTimeoutOptionsValues
** @param const uint8_t *perKeyRepeat
** @returns xcb_void_cookie_t
**
@@ -8059,7 +6983,7 @@ xcb_xkb_set_controls (xcb_connection_t *c /**< */,
uint16_t ignoreLockVirtualMods /**< */,
uint8_t mouseKeysDfltBtn /**< */,
uint8_t groupsWrap /**< */,
- xcb_xkb_ax_option_t accessXOptions /**< */,
+ uint16_t accessXOptions /**< */,
uint32_t affectEnabledControls /**< */,
uint32_t enabledControls /**< */,
uint32_t changeControls /**< */,
@@ -8075,8 +6999,8 @@ xcb_xkb_set_controls (xcb_connection_t *c /**< */,
uint16_t accessXTimeout /**< */,
uint32_t accessXTimeoutMask /**< */,
uint32_t accessXTimeoutValues /**< */,
- xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */,
- xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */,
+ uint16_t accessXTimeoutOptionsMask /**< */,
+ uint16_t accessXTimeoutOptionsValues /**< */,
const uint8_t *perKeyRepeat /**< */);
@@ -8179,6 +7103,47 @@ xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R /**<
/*****************************************************************************
**
+ ** uint8_t * xcb_xkb_get_map_map_alignment_pad
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_map_map_alignment_pad (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_alignment_pad_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_alignment_pad_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_alignment_pad_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_alignment_pad_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
@@ -8302,6 +7267,47 @@ xcb_xkb_get_map_map_vmods_rtrn_end (const xcb_xkb_get_map_reply_t *R /**< */,
/*****************************************************************************
**
+ ** uint8_t * xcb_xkb_get_map_map_alignment_pad_2
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_map_map_alignment_pad_2 (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_alignment_pad_2_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_alignment_pad_2_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_alignment_pad_2_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_alignment_pad_2_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
@@ -8343,6 +7349,47 @@ xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /*
/*****************************************************************************
**
+ ** uint16_t * xcb_xkb_get_map_map_alignment_pad_3
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint16_t *
+ **
+ *****************************************************************************/
+
+uint16_t *
+xcb_xkb_get_map_map_alignment_pad_3 (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_alignment_pad_3_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_alignment_pad_3_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_alignment_pad_3_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_alignment_pad_3_end (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
@@ -8384,6 +7431,47 @@ xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**<
/*****************************************************************************
**
+ ** uint16_t * xcb_xkb_get_map_map_alignment_pad_4
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint16_t *
+ **
+ *****************************************************************************/
+
+uint16_t *
+xcb_xkb_get_map_map_alignment_pad_4 (const xcb_xkb_get_map_map_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_alignment_pad_4_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_alignment_pad_4_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_alignment_pad_4_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_alignment_pad_4_end (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
@@ -8429,7 +7517,7 @@ xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -8443,7 +7531,7 @@ xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -8457,14 +7545,14 @@ xcb_xkb_get_map_map_sizeof (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
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
*
@@ -8521,7 +7609,7 @@ xcb_xkb_get_map (xcb_connection_t *c /**< */,
uint8_t nVModMapKeys /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -8974,7 +8062,7 @@ xcb_xkb_set_map_values_serialize (void **_buffer /**<
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -8988,7 +8076,7 @@ xcb_xkb_set_map_values_unpack (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -9002,14 +8090,14 @@ xcb_xkb_set_map_values_sizeof (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
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
*
@@ -9087,7 +8175,7 @@ xcb_xkb_set_map_checked (xcb_connection_t *c /**< */,
const void *values /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9162,7 +8250,7 @@ xcb_xkb_set_map (xcb_connection_t *c /**< */,
const void *values /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9240,7 +8328,7 @@ xcb_xkb_set_map_aux_checked (xcb_connection_t *c /**< */,
const xcb_xkb_set_map_values_t *values /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9318,7 +8406,7 @@ int
xcb_xkb_get_compat_map_sizeof (const void *_buffer /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9349,7 +8437,7 @@ xcb_xkb_get_compat_map (xcb_connection_t *c /**< */,
uint16_t nSI /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9385,14 +8473,14 @@ xcb_xkb_get_compat_map_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
- ** uint8_t * xcb_xkb_get_compat_map_si_rtrn
+ ** xcb_xkb_sym_interpret_t * xcb_xkb_get_compat_map_si_rtrn
**
** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns uint8_t *
+ ** @returns xcb_xkb_sym_interpret_t *
**
*****************************************************************************/
-uint8_t *
+xcb_xkb_sym_interpret_t *
xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */);
@@ -9411,15 +8499,15 @@ 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
+ ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_compat_map_si_rtrn_iterator
**
** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_generic_iterator_t
+ ** @returns xcb_xkb_sym_interpret_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_sym_interpret_iterator_t
+xcb_xkb_get_compat_map_si_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R /**< */);
/*****************************************************************************
@@ -9495,7 +8583,7 @@ int
xcb_xkb_set_compat_map_sizeof (const void *_buffer /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9510,32 +8598,32 @@ xcb_xkb_set_compat_map_sizeof (const void *_buffer /**< */);
**
** 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
+ ** @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 xcb_xkb_sym_interpret_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
+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 xcb_xkb_sym_interpret_t *si /**< */,
+ const xcb_xkb_mod_def_t *groupMaps /**< */);
+
+/**
+ *
* @param c The connection
* @return A cookie
*
@@ -9547,32 +8635,32 @@ xcb_xkb_set_compat_map_checked (xcb_connection_t *c /**< */,
**
** 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
+ ** @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 xcb_xkb_sym_interpret_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
+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 xcb_xkb_sym_interpret_t *si /**< */,
+ const xcb_xkb_mod_def_t *groupMaps /**< */);
+
+/**
+ *
* @param c The connection
* @return A cookie
*
@@ -9595,7 +8683,7 @@ 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
*
@@ -9655,7 +8743,7 @@ int
xcb_xkb_get_indicator_map_sizeof (const void *_buffer /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9680,7 +8768,7 @@ xcb_xkb_get_indicator_map (xcb_connection_t *c /**< */,
uint32_t which /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9781,7 +8869,7 @@ int
xcb_xkb_set_indicator_map_sizeof (const void *_buffer /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9811,7 +8899,7 @@ xcb_xkb_set_indicator_map_checked (xcb_connection_t *c /**< */,
const xcb_xkb_indicator_map_t *maps /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9838,7 +8926,7 @@ xcb_xkb_set_indicator_map (xcb_connection_t *c /**< */,
const xcb_xkb_indicator_map_t *maps /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9867,7 +8955,7 @@ xcb_xkb_get_named_indicator (xcb_connection_t *c /**< */,
xcb_atom_t indicator /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9930,7 +9018,7 @@ xcb_xkb_get_named_indicator_reply (xcb_connection_t *c /**
xcb_generic_error_t **e /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -9984,7 +9072,7 @@ xcb_xkb_set_named_indicator_checked (xcb_connection_t *c /**< */,
uint32_t map_ctrls /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -10119,6 +9207,47 @@ xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_repl
/*****************************************************************************
**
+ ** uint8_t * xcb_xkb_get_names_value_list_alignment_pad
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_names_value_list_alignment_pad (const xcb_xkb_get_names_value_list_t *S /**< */);
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_alignment_pad_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_alignment_pad_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_alignment_pad_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_alignment_pad_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
@@ -10439,7 +9568,7 @@ xcb_xkb_get_names_value_list_sizeof (const void *_buffer /**< */,
uint32_t which /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -10464,7 +9593,7 @@ xcb_xkb_get_names (xcb_connection_t *c /**< */,
uint32_t which /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -10943,7 +10072,7 @@ xcb_xkb_set_names_values_sizeof (const void *_buffer /**< */,
uint32_t which /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -10997,7 +10126,7 @@ xcb_xkb_set_names_checked (xcb_connection_t *c /**< */,
const void *values /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -11048,7 +10177,7 @@ xcb_xkb_set_names (xcb_connection_t *c /**< */,
const void *values /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -11102,7 +10231,7 @@ xcb_xkb_set_names_aux_checked (xcb_connection_t *c /**< */,
const xcb_xkb_set_names_values_t *values /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -11152,401 +10281,8 @@ xcb_xkb_set_names_aux (xcb_connection_t *c /**< */,
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
*
@@ -11579,7 +10315,7 @@ xcb_xkb_per_client_flags (xcb_connection_t *c /**< */,
uint32_t autoCtrlsValues /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -11646,24 +10382,10 @@ xcb_xkb_per_client_flags_reply (xcb_connection_t *c /**< */,
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
*
@@ -11675,44 +10397,20 @@ xcb_xkb_list_components_sizeof (const void *_buffer /**< */);
**
** 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
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t maxNames
** @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
+xcb_xkb_list_components (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t maxNames /**< */);
+
+/**
+ *
* @param c The connection
* @return A cookie
*
@@ -11727,41 +10425,17 @@ xcb_xkb_list_components (xcb_connection_t *c /**< */,
**
** 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
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t maxNames
** @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 /**< */);
+xcb_xkb_list_components_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t maxNames /**< */);
/*****************************************************************************
@@ -11950,23 +10624,6 @@ 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 /**< */);
-
/*****************************************************************************
**
@@ -12317,7 +10974,7 @@ xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -12331,7 +10988,7 @@ xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -12345,7 +11002,7 @@ xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -12354,774 +11011,6 @@ xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer /**< */,
/*****************************************************************************
**
- ** 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
@@ -13529,421 +11418,14 @@ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void *_buffe
/*****************************************************************************
**
- ** 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
+ ** xcb_xkb_sym_interpret_t * xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn
**
** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
+ ** @returns xcb_xkb_sym_interpret_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_sym_interpret_t *
xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
@@ -13963,16 +11445,16 @@ xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length (const xcb_xkb_get_kbd
/*****************************************************************************
**
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_end
+ ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator
**
** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_generic_iterator_t
+ ** @returns xcb_xkb_sym_interpret_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_sym_interpret_iterator_t
+xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
+ const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
/*****************************************************************************
@@ -14018,32 +11500,6 @@ xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_ge
/*****************************************************************************
**
- ** 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
@@ -14098,19 +11554,6 @@ xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_n
/*****************************************************************************
**
- ** 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
@@ -14121,187 +11564,6 @@ xcb_xkb_get_kbd_by_name_replies_other_names_value_list (const xcb_xkb_get_kbd_by
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 /**< */,
@@ -14317,7 +11579,7 @@ 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
*
@@ -14329,48 +11591,24 @@ xcb_xkb_get_kbd_by_name_replies_sizeof (const void *_buffer /**< */,
**
** 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
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t need
+ ** @param uint16_t want
+ ** @param uint8_t load
** @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
+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 /**< */);
+
+/**
+ *
* @param c The connection
* @return A cookie
*
@@ -14385,45 +11623,21 @@ xcb_xkb_get_kbd_by_name (xcb_connection_t *c /**< */,
**
** 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
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t need
+ ** @param uint16_t want
+ ** @param uint8_t load
** @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_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t need /**< */,
+ uint16_t want /**< */,
+ uint8_t load /**< */);
/*****************************************************************************
@@ -14473,7 +11687,7 @@ int
xcb_xkb_get_device_info_sizeof (const void *_buffer /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -14508,7 +11722,7 @@ xcb_xkb_get_device_info (xcb_connection_t *c /**< */,
xcb_xkb_id_spec_t ledID /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -14684,7 +11898,7 @@ int
xcb_xkb_set_device_info_sizeof (const void *_buffer /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -14722,7 +11936,7 @@ xcb_xkb_set_device_info_checked (xcb_connection_t *c /**< */,
const xcb_xkb_device_led_info_t *leds /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -14760,7 +11974,7 @@ int
xcb_xkb_set_debugging_flags_sizeof (const void *_buffer /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
@@ -14793,7 +12007,7 @@ xcb_xkb_set_debugging_flags (xcb_connection_t *c /**< */,
const xcb_xkb_string8_t *message /**< */);
/**
- * Delivers a request to the X server
+ *
* @param c The connection
* @return A cookie
*
diff --git a/src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch b/src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch
new file mode 100644
index 0000000000..a73e633e73
--- /dev/null
+++ b/src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch
@@ -0,0 +1,273 @@
+diff --git a/src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch b/src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch
+index f63719d..e69de29 100644
+--- a/src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch
++++ b/src/3rdparty/xcb/libxcb/support_libxcb_versions_where_xcb_sumof_not_available.patch
+@@ -1,134 +0,0 @@
+-diff --git a/src/3rdparty/xcb/libxcb/xkb.c b/src/3rdparty/xcb/libxcb/xkb.c
+-index d55bd76..2e3a24a 100644
+---- a/src/3rdparty/xcb/libxcb/xkb.c
+-+++ b/src/3rdparty/xcb/libxcb/xkb.c
+-@@ -18,6 +18,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;
+-+}
+-
+- /*****************************************************************************
+- **
+-@@ -9025,7 +9034,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 (/* valueList */ S->nLevelsPerType, R->nTypes);
+- }
+-
+-
+-@@ -9043,7 +9052,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;
+-@@ -9508,8 +9517,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);
+- }
+-@@ -9762,7 +9771,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);
+- }
+-@@ -10139,7 +10148,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);
+- }
+-
+-
+-@@ -10157,7 +10166,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;
+-@@ -10607,8 +10616,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);
+- }
+-@@ -10849,7 +10858,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);
+- }
+-@@ -12872,7 +12881,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);
+- }
+-
+-
+-@@ -12890,7 +12899,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;
+-@@ -13340,8 +13349,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);
+- }
+-@@ -13582,7 +13591,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);
+- }
+diff --git a/src/3rdparty/xcb/libxcb/xkb.c b/src/3rdparty/xcb/libxcb/xkb.c
+index d55bd76..ff025f6 100644
+--- a/src/3rdparty/xcb/libxcb/xkb.c
++++ b/src/3rdparty/xcb/libxcb/xkb.c
+@@ -18,6 +18,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;
++}
+
+ /*****************************************************************************
+ **
+@@ -9025,7 +9034,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);
+ }
+
+
+@@ -9043,7 +9052,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;
+@@ -9508,8 +9517,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);
+ }
+@@ -9762,7 +9771,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);
+ }
+@@ -10139,7 +10148,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);
+ }
+
+
+@@ -10157,7 +10166,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;
+@@ -10607,8 +10616,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);
+ }
+@@ -10849,7 +10858,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);
+ }
+@@ -12872,7 +12881,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);
+ }
+
+
+@@ -12890,7 +12899,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;
+@@ -13340,8 +13349,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);
+ }
+@@ -13582,7 +13591,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);
+ }
diff --git a/src/3rdparty/xcb/libxcb/xkb.c b/src/3rdparty/xcb/libxcb/xkb.c
index 3e07d6df84..ff025f6b60 100644
--- a/src/3rdparty/xcb/libxcb/xkb.c
+++ b/src/3rdparty/xcb/libxcb/xkb.c
@@ -3,6 +3,9 @@
* Edit at your peril.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -27,44 +30,6 @@ int qt_xcb_sumof(uint8_t *list, int len)
/*****************************************************************************
**
- ** 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
@@ -367,22 +332,36 @@ xcb_xkb_key_alias_end (xcb_xkb_key_alias_iterator_t i /**< */)
}
int
-xcb_xkb_counted_string_8_sizeof (const void *_buffer /**< */)
+xcb_xkb_counted_string_16_sizeof (const void *_buffer /**< */)
{
char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_counted_string_8_t *_aux = (xcb_xkb_counted_string_8_t *)_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;
+ unsigned int xcb_align_to = 0;
- xcb_block_len += sizeof(xcb_xkb_counted_string_8_t);
+ xcb_block_len += sizeof(xcb_xkb_counted_string_16_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* string */
- xcb_block_len += _aux->length * sizeof(uint8_t);
+ xcb_block_len += _aux->length * sizeof(char);
xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = ALIGNOF(char);
+ /* 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;
+ /* alignment_pad */
+ xcb_block_len += (((_aux->length + 5) & (~3)) - (_aux->length + 2)) * sizeof(char);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(char);
/* insert padding */
xcb_pad = -xcb_block_len & (xcb_align_to - 1);
xcb_buffer_len += xcb_block_len + xcb_pad;
@@ -398,31 +377,31 @@ xcb_xkb_counted_string_8_sizeof (const void *_buffer /**< */)
/*****************************************************************************
**
- ** uint8_t * xcb_xkb_counted_string_8_string
+ ** char * xcb_xkb_counted_string_16_string
**
- ** @param const xcb_xkb_counted_string_8_t *R
- ** @returns uint8_t *
+ ** @param const xcb_xkb_counted_string_16_t *R
+ ** @returns char *
**
*****************************************************************************/
-uint8_t *
-xcb_xkb_counted_string_8_string (const xcb_xkb_counted_string_8_t *R /**< */)
+char *
+xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */)
{
- return (uint8_t *) (R + 1);
+ return (char *) (R + 1);
}
/*****************************************************************************
**
- ** int xcb_xkb_counted_string_8_string_length
+ ** int xcb_xkb_counted_string_16_string_length
**
- ** @param const xcb_xkb_counted_string_8_t *R
+ ** @param const xcb_xkb_counted_string_16_t *R
** @returns int
**
*****************************************************************************/
int
-xcb_xkb_counted_string_8_string_length (const xcb_xkb_counted_string_8_t *R /**< */)
+xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R /**< */)
{
return R->length;
}
@@ -430,18 +409,18 @@ 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
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end
**
- ** @param const xcb_xkb_counted_string_8_t *R
+ ** @param const xcb_xkb_counted_string_16_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_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.data = ((char *) (R + 1)) + (R->length);
i.rem = 0;
i.index = (char *) i.data - (char *) R;
return i;
@@ -450,95 +429,24 @@ xcb_xkb_counted_string_8_string_end (const xcb_xkb_counted_string_8_t *R /**< *
/*****************************************************************************
**
- ** 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
+ ** void * xcb_xkb_counted_string_16_alignment_pad
**
** @param const xcb_xkb_counted_string_16_t *R
- ** @returns uint8_t *
+ ** @returns void *
**
*****************************************************************************/
-uint8_t *
-xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */)
+void *
+xcb_xkb_counted_string_16_alignment_pad (const xcb_xkb_counted_string_16_t *R /**< */)
{
- return (uint8_t *) (R + 1);
+ xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_string_end(R);
+ return (void *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0);
}
/*****************************************************************************
**
- ** int xcb_xkb_counted_string_16_string_length
+ ** int xcb_xkb_counted_string_16_alignment_pad_length
**
** @param const xcb_xkb_counted_string_16_t *R
** @returns int
@@ -546,15 +454,15 @@ xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */)
*****************************************************************************/
int
-xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R /**< */)
+xcb_xkb_counted_string_16_alignment_pad_length (const xcb_xkb_counted_string_16_t *R /**< */)
{
- return R->length;
+ return (((R->length + 5) & (~3)) - (R->length + 2));
}
/*****************************************************************************
**
- ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end
+ ** xcb_generic_iterator_t xcb_xkb_counted_string_16_alignment_pad_end
**
** @param const xcb_xkb_counted_string_16_t *R
** @returns xcb_generic_iterator_t
@@ -562,10 +470,11 @@ 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 (const xcb_xkb_counted_string_16_t *R /**< */)
+xcb_xkb_counted_string_16_alignment_pad_end (const xcb_xkb_counted_string_16_t *R /**< */)
{
xcb_generic_iterator_t i;
- i.data = ((uint8_t *) (R + 1)) + (R->length);
+ xcb_generic_iterator_t child = xcb_xkb_counted_string_16_string_end(R);
+ i.data = ((char *) child.data) + ((((R->length + 5) & (~3)) - (R->length + 2)));
i.rem = 0;
i.index = (char *) i.data - (char *) R;
return i;
@@ -574,23 +483,6 @@ 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 /**< */)
-{
- 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
@@ -677,11 +569,13 @@ xcb_xkb_key_type_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_key_type_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* map */
xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_map_entry_t);
xcb_tmp += xcb_block_len;
@@ -867,11 +761,13 @@ xcb_xkb_key_sym_map_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_key_sym_map_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* syms */
xcb_block_len += _aux->nSyms * sizeof(xcb_keysym_t);
xcb_tmp += xcb_block_len;
@@ -1138,71 +1034,33 @@ xcb_xkb_radio_group_behavior_end (xcb_xkb_radio_group_behavior_iterator_t i /**
/*****************************************************************************
**
- ** 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
+ ** void xcb_xkb_overlay_behavior_next
**
- ** @param xcb_xkb_overlay_2_behavior_iterator_t *i
+ ** @param xcb_xkb_overlay_behavior_iterator_t *i
** @returns void
**
*****************************************************************************/
void
-xcb_xkb_overlay_2_behavior_next (xcb_xkb_overlay_2_behavior_iterator_t *i /**< */)
+xcb_xkb_overlay_behavior_next (xcb_xkb_overlay_behavior_iterator_t *i /**< */)
{
--i->rem;
++i->data;
- i->index += sizeof(xcb_xkb_overlay_2_behavior_t);
+ i->index += sizeof(xcb_xkb_overlay_behavior_t);
}
/*****************************************************************************
**
- ** xcb_generic_iterator_t xcb_xkb_overlay_2_behavior_end
+ ** xcb_generic_iterator_t xcb_xkb_overlay_behavior_end
**
- ** @param xcb_xkb_overlay_2_behavior_iterator_t i
+ ** @param xcb_xkb_overlay_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_xkb_overlay_behavior_end (xcb_xkb_overlay_behavior_iterator_t i /**< */)
{
xcb_generic_iterator_t ret;
ret.data = i.data + i.rem;
@@ -1290,71 +1148,33 @@ xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavi
/*****************************************************************************
**
- ** 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
+ ** void xcb_xkb_permament_overlay_behavior_next
**
- ** @param xcb_xkb_permament_overlay_2_behavior_iterator_t *i
+ ** @param xcb_xkb_permament_overlay_behavior_iterator_t *i
** @returns void
**
*****************************************************************************/
void
-xcb_xkb_permament_overlay_2_behavior_next (xcb_xkb_permament_overlay_2_behavior_iterator_t *i /**< */)
+xcb_xkb_permament_overlay_behavior_next (xcb_xkb_permament_overlay_behavior_iterator_t *i /**< */)
{
--i->rem;
++i->data;
- i->index += sizeof(xcb_xkb_permament_overlay_2_behavior_t);
+ i->index += sizeof(xcb_xkb_permament_overlay_behavior_t);
}
/*****************************************************************************
**
- ** xcb_generic_iterator_t xcb_xkb_permament_overlay_2_behavior_end
+ ** xcb_generic_iterator_t xcb_xkb_permament_overlay_behavior_end
**
- ** @param xcb_xkb_permament_overlay_2_behavior_iterator_t i
+ ** @param xcb_xkb_permament_overlay_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_xkb_permament_overlay_behavior_end (xcb_xkb_permament_overlay_behavior_iterator_t i /**< */)
{
xcb_generic_iterator_t ret;
ret.data = i.data + i.rem;
@@ -1599,11 +1419,13 @@ xcb_xkb_set_key_type_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_set_key_type_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* entries */
xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_set_map_entry_t);
xcb_tmp += xcb_block_len;
@@ -1820,296 +1642,6 @@ 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 /**< */)
-{
- 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;
@@ -2117,11 +1649,13 @@ xcb_xkb_outline_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_outline_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* points */
xcb_block_len += _aux->nPoints * sizeof(xcb_point_t);
xcb_tmp += xcb_block_len;
@@ -2241,13 +1775,15 @@ xcb_xkb_shape_sizeof (const void *_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 xcb_align_to = 0;
unsigned int i;
unsigned int xcb_tmp_len;
xcb_block_len += sizeof(xcb_xkb_shape_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* outlines */
for(i=0; i<_aux->nOutlines; i++) {
xcb_tmp_len = xcb_xkb_outline_sizeof(xcb_tmp);
@@ -2430,11 +1966,13 @@ xcb_xkb_overlay_row_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_overlay_row_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* keys */
xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_overlay_key_t);
xcb_tmp += xcb_block_len;
@@ -2554,13 +2092,15 @@ xcb_xkb_overlay_sizeof (const void *_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 xcb_align_to = 0;
unsigned int i;
unsigned int xcb_tmp_len;
xcb_block_len += sizeof(xcb_xkb_overlay_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* rows */
for(i=0; i<_aux->nRows; i++) {
xcb_tmp_len = xcb_xkb_overlay_row_sizeof(xcb_tmp);
@@ -2667,11 +2207,13 @@ xcb_xkb_row_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_row_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* keys */
xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_key_t);
xcb_tmp += xcb_block_len;
@@ -2783,619 +2325,6 @@ xcb_xkb_row_end (xcb_xkb_row_iterator_t i /**< */)
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 /**< */)
{
@@ -3404,11 +2333,13 @@ xcb_xkb_listing_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_listing_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* string */
xcb_block_len += _aux->length * sizeof(xcb_xkb_string8_t);
xcb_tmp += xcb_block_len;
@@ -3528,11 +2459,13 @@ xcb_xkb_device_led_info_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_device_led_info_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* names */
xcb_block_len += xcb_popcount(_aux->namesPresent) * sizeof(uint32_t);
xcb_tmp += xcb_block_len;
@@ -4511,6 +3444,82 @@ xcb_xkb_sa_device_valuator_end (xcb_xkb_sa_device_valuator_iterator_t i /**< */
/*****************************************************************************
**
+ ** void xcb_xkb_si_action_next
+ **
+ ** @param xcb_xkb_si_action_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_si_action_next (xcb_xkb_si_action_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_si_action_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_si_action_end
+ **
+ ** @param xcb_xkb_si_action_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_si_action_end (xcb_xkb_si_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_sym_interpret_next
+ **
+ ** @param xcb_xkb_sym_interpret_iterator_t *i
+ ** @returns void
+ **
+ *****************************************************************************/
+
+void
+xcb_xkb_sym_interpret_next (xcb_xkb_sym_interpret_iterator_t *i /**< */)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_xkb_sym_interpret_t);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_sym_interpret_end
+ **
+ ** @param xcb_xkb_sym_interpret_iterator_t i
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_sym_interpret_end (xcb_xkb_sym_interpret_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
@@ -4655,7 +3664,7 @@ xcb_xkb_select_events_details_serialize (void *
{
char *xcb_out = *_buffer;
unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
unsigned int xcb_pad = 0;
char xcb_pad0[3] = {0, 0, 0};
@@ -4858,7 +3867,7 @@ xcb_xkb_select_events_details_unpack (const void *_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 xcb_align_to = 0;
if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY) {
@@ -5710,7 +4719,7 @@ xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */,
** @param uint16_t ignoreLockVirtualMods
** @param uint8_t mouseKeysDfltBtn
** @param uint8_t groupsWrap
- ** @param xcb_xkb_ax_option_t accessXOptions
+ ** @param uint16_t accessXOptions
** @param uint32_t affectEnabledControls
** @param uint32_t enabledControls
** @param uint32_t changeControls
@@ -5726,8 +4735,8 @@ xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */,
** @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 uint16_t accessXTimeoutOptionsMask
+ ** @param uint16_t accessXTimeoutOptionsValues
** @param const uint8_t *perKeyRepeat
** @returns xcb_void_cookie_t
**
@@ -5746,7 +4755,7 @@ xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
uint16_t ignoreLockVirtualMods /**< */,
uint8_t mouseKeysDfltBtn /**< */,
uint8_t groupsWrap /**< */,
- xcb_xkb_ax_option_t accessXOptions /**< */,
+ uint16_t accessXOptions /**< */,
uint32_t affectEnabledControls /**< */,
uint32_t enabledControls /**< */,
uint32_t changeControls /**< */,
@@ -5762,8 +4771,8 @@ xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
uint16_t accessXTimeout /**< */,
uint32_t accessXTimeoutMask /**< */,
uint32_t accessXTimeoutValues /**< */,
- xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */,
- xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */,
+ uint16_t accessXTimeoutOptionsMask /**< */,
+ uint16_t accessXTimeoutOptionsValues /**< */,
const uint8_t *perKeyRepeat /**< */)
{
static const xcb_protocol_request_t xcb_req = {
@@ -5835,7 +4844,7 @@ xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
** @param uint16_t ignoreLockVirtualMods
** @param uint8_t mouseKeysDfltBtn
** @param uint8_t groupsWrap
- ** @param xcb_xkb_ax_option_t accessXOptions
+ ** @param uint16_t accessXOptions
** @param uint32_t affectEnabledControls
** @param uint32_t enabledControls
** @param uint32_t changeControls
@@ -5851,8 +4860,8 @@ xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
** @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 uint16_t accessXTimeoutOptionsMask
+ ** @param uint16_t accessXTimeoutOptionsValues
** @param const uint8_t *perKeyRepeat
** @returns xcb_void_cookie_t
**
@@ -5871,7 +4880,7 @@ xcb_xkb_set_controls (xcb_connection_t *c /**< */,
uint16_t ignoreLockVirtualMods /**< */,
uint8_t mouseKeysDfltBtn /**< */,
uint8_t groupsWrap /**< */,
- xcb_xkb_ax_option_t accessXOptions /**< */,
+ uint16_t accessXOptions /**< */,
uint32_t affectEnabledControls /**< */,
uint32_t enabledControls /**< */,
uint32_t changeControls /**< */,
@@ -5887,8 +4896,8 @@ xcb_xkb_set_controls (xcb_connection_t *c /**< */,
uint16_t accessXTimeout /**< */,
uint32_t accessXTimeoutMask /**< */,
uint32_t accessXTimeoutValues /**< */,
- xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */,
- xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */,
+ uint16_t accessXTimeoutOptionsMask /**< */,
+ uint16_t accessXTimeoutOptionsValues /**< */,
const uint8_t *perKeyRepeat /**< */)
{
static const xcb_protocol_request_t xcb_req = {
@@ -6076,6 +5085,60 @@ xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R /**<
/*****************************************************************************
**
+ ** uint8_t * xcb_xkb_get_map_map_alignment_pad
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_map_map_alignment_pad (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->alignment_pad;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_alignment_pad_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_alignment_pad_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return (((R->nKeyActions + 3) & (~3)) - R->nKeyActions);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_alignment_pad_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->alignment_pad + (((R->nKeyActions + 3) & (~3)) - 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
@@ -6211,7 +5274,7 @@ 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;
+ return xcb_popcount(R->virtualMods);
}
@@ -6229,7 +5292,61 @@ 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.data = /* map */ S->vmods_rtrn + xcb_popcount(R->virtualMods);
+ i.rem = 0;
+ i.index = (char *) i.data - (char *) S;
+ return i;
+}
+
+
+/*****************************************************************************
+ **
+ ** uint8_t * xcb_xkb_get_map_map_alignment_pad_2
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_map_map_alignment_pad_2 (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->alignment_pad2;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_alignment_pad_2_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_alignment_pad_2_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return (((xcb_popcount(R->virtualMods) + 3) & (~3)) - xcb_popcount(R->virtualMods));
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_2_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_alignment_pad_2_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->alignment_pad2 + (((xcb_popcount(R->virtualMods) + 3) & (~3)) - xcb_popcount(R->virtualMods));
i.rem = 0;
i.index = (char *) i.data - (char *) S;
return i;
@@ -6292,6 +5409,60 @@ xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /*
/*****************************************************************************
**
+ ** uint16_t * xcb_xkb_get_map_map_alignment_pad_3
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint16_t *
+ **
+ *****************************************************************************/
+
+uint16_t *
+xcb_xkb_get_map_map_alignment_pad_3 (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->alignment_pad3;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_alignment_pad_3_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_alignment_pad_3_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return (((R->totalKeyExplicit + 1) & (~1)) - R->totalKeyExplicit);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_3_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_alignment_pad_3_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->alignment_pad3 + (((R->totalKeyExplicit + 1) & (~1)) - R->totalKeyExplicit);
+ i.rem = 0;
+ 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
@@ -6346,6 +5517,60 @@ xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**<
/*****************************************************************************
**
+ ** uint16_t * xcb_xkb_get_map_map_alignment_pad_4
+ **
+ ** @param const xcb_xkb_get_map_map_t *S
+ ** @returns uint16_t *
+ **
+ *****************************************************************************/
+
+uint16_t *
+xcb_xkb_get_map_map_alignment_pad_4 (const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return /* map */ S->alignment_pad4;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_map_map_alignment_pad_4_length
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_map_map_alignment_pad_4_length (const xcb_xkb_get_map_reply_t *R /**< */,
+ const xcb_xkb_get_map_map_t *S /**< */)
+{
+ return (((R->totalModMapKeys + 1) & (~1)) - R->totalModMapKeys);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_4_end
+ **
+ ** @param const xcb_xkb_get_map_map_t *R
+ ** @returns xcb_generic_iterator_t
+ **
+ *****************************************************************************/
+
+xcb_generic_iterator_t
+xcb_xkb_get_map_map_alignment_pad_4_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->alignment_pad4 + (((R->totalModMapKeys + 1) & (~1)) - R->totalModMapKeys);
+ i.rem = 0;
+ 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
@@ -6404,7 +5629,7 @@ xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -6413,11 +5638,11 @@ xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
{
char *xcb_out = *_buffer;
unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
unsigned int xcb_pad = 0;
char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[19];
+ struct iovec xcb_parts[27];
unsigned int xcb_parts_idx = 0;
unsigned int xcb_block_len = 0;
unsigned int i;
@@ -6496,6 +5721,22 @@ xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
xcb_pad = 0;
}
xcb_block_len = 0;
+ /* alignment_pad */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad;
+ xcb_block_len += (((nKeyActions + 3) & (~3)) - nKeyActions) * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = (((nKeyActions + 3) & (~3)) - 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);
@@ -6534,8 +5775,24 @@ xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
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_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * 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;
+ /* alignment_pad2 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad2;
+ xcb_block_len += (((xcb_popcount(virtualMods) + 3) & (~3)) - xcb_popcount(virtualMods)) * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = (((xcb_popcount(virtualMods) + 3) & (~3)) - xcb_popcount(virtualMods)) * sizeof(xcb_keycode_t);
xcb_parts_idx++;
xcb_align_to = ALIGNOF(uint8_t);
}
@@ -6556,6 +5813,22 @@ xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
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);
+ /* 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;
+ /* alignment_pad3 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad3;
+ xcb_block_len += (((totalKeyExplicit + 1) & (~1)) - totalKeyExplicit) * sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = (((totalKeyExplicit + 1) & (~1)) - totalKeyExplicit) * sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
}
if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
/* insert padding */
@@ -6574,6 +5847,22 @@ xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
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);
+ /* 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;
+ /* alignment_pad4 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad4;
+ xcb_block_len += (((totalModMapKeys + 1) & (~1)) - totalModMapKeys) * sizeof(uint16_t);
+ xcb_parts[xcb_parts_idx].iov_len = (((totalModMapKeys + 1) & (~1)) - totalModMapKeys) * sizeof(uint16_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint16_t);
}
if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
/* insert padding */
@@ -6628,7 +5917,7 @@ xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -6639,7 +5928,7 @@ xcb_xkb_get_map_map_unpack (const void *_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 xcb_align_to = 0;
unsigned int i;
unsigned int xcb_tmp_len;
@@ -6702,6 +5991,19 @@ xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
xcb_pad = 0;
}
xcb_block_len = 0;
+ /* alignment_pad */
+ _aux->alignment_pad = (uint8_t *)xcb_tmp;
+ xcb_block_len += (((nKeyActions + 3) & (~3)) - 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);
@@ -6734,7 +6036,20 @@ xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
xcb_block_len = 0;
/* vmods_rtrn */
_aux->vmods_rtrn = (uint8_t *)xcb_tmp;
- xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_block_len += xcb_popcount(virtualMods) * 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;
+ /* alignment_pad2 */
+ _aux->alignment_pad2 = (uint8_t *)xcb_tmp;
+ xcb_block_len += (((xcb_popcount(virtualMods) + 3) & (~3)) - xcb_popcount(virtualMods)) * sizeof(xcb_keycode_t);
xcb_tmp += xcb_block_len;
xcb_align_to = ALIGNOF(uint8_t);
}
@@ -6752,6 +6067,19 @@ xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
xcb_tmp += xcb_block_len;
xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_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;
+ /* alignment_pad3 */
+ _aux->alignment_pad3 = (uint16_t *)xcb_tmp;
+ xcb_block_len += (((totalKeyExplicit + 1) & (~1)) - totalKeyExplicit) * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint16_t);
}
if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
/* insert padding */
@@ -6767,6 +6095,19 @@ xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
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);
+ /* 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;
+ /* alignment_pad4 */
+ _aux->alignment_pad4 = (uint16_t *)xcb_tmp;
+ xcb_block_len += (((totalModMapKeys + 1) & (~1)) - totalModMapKeys) * sizeof(uint16_t);
+ xcb_tmp += xcb_block_len;
+ xcb_align_to = ALIGNOF(uint16_t);
}
if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
/* insert padding */
@@ -6802,14 +6143,14 @@ xcb_xkb_get_map_map_sizeof (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
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);
+ return xcb_xkb_get_map_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
}
@@ -7294,7 +6635,7 @@ 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;
+ return xcb_popcount(R->virtualMods);
}
@@ -7312,7 +6653,7 @@ 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.data = /* values */ S->vmods + xcb_popcount(R->virtualMods);
i.rem = 0;
i.index = (char *) i.data - (char *) S;
return i;
@@ -7487,7 +6828,7 @@ xcb_xkb_set_map_values_serialize (void **_buffer /**<
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -7496,7 +6837,7 @@ xcb_xkb_set_map_values_serialize (void **_buffer /**<
{
char *xcb_out = *_buffer;
unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
unsigned int xcb_pad = 0;
char xcb_pad0[3] = {0, 0, 0};
@@ -7617,8 +6958,8 @@ xcb_xkb_set_map_values_serialize (void **_buffer /**<
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_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
xcb_parts_idx++;
xcb_align_to = ALIGNOF(uint8_t);
}
@@ -7711,7 +7052,7 @@ xcb_xkb_set_map_values_unpack (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -7722,7 +7063,7 @@ xcb_xkb_set_map_values_unpack (const void *_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 xcb_align_to = 0;
unsigned int i;
unsigned int xcb_tmp_len;
@@ -7817,7 +7158,7 @@ xcb_xkb_set_map_values_unpack (const void *_buffer /**< */,
xcb_block_len = 0;
/* vmods */
_aux->vmods = (uint8_t *)xcb_tmp;
- xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
xcb_tmp += xcb_block_len;
xcb_align_to = ALIGNOF(uint8_t);
}
@@ -7885,14 +7226,14 @@ xcb_xkb_set_map_values_sizeof (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
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);
+ return xcb_xkb_set_map_values_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
}
@@ -8007,7 +7348,7 @@ xcb_xkb_set_map_checked (xcb_connection_t *c /**< */,
/* 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_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present);
xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
return xcb_ret;
@@ -8125,7 +7466,7 @@ xcb_xkb_set_map (xcb_connection_t *c /**< */,
/* 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_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present);
xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
return xcb_ret;
@@ -8243,7 +7584,7 @@ xcb_xkb_set_map_aux_checked (xcb_connection_t *c /**< */,
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_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, 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);
@@ -8363,7 +7704,7 @@ xcb_xkb_set_map_aux (xcb_connection_t *c /**< */,
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_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, 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);
@@ -8379,15 +7720,17 @@ xcb_xkb_get_compat_map_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_get_compat_map_reply_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* si_rtrn */
- xcb_block_len += (16 * _aux->nSIRtrn) * sizeof(uint8_t);
+ xcb_block_len += _aux->nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
/* insert padding */
xcb_pad = -xcb_block_len & (xcb_align_to - 1);
xcb_buffer_len += xcb_block_len + xcb_pad;
@@ -8513,17 +7856,17 @@ xcb_xkb_get_compat_map_unchecked (xcb_connection_t *c /**< */,
/*****************************************************************************
**
- ** uint8_t * xcb_xkb_get_compat_map_si_rtrn
+ ** xcb_xkb_sym_interpret_t * xcb_xkb_get_compat_map_si_rtrn
**
** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns uint8_t *
+ ** @returns xcb_xkb_sym_interpret_t *
**
*****************************************************************************/
-uint8_t *
+xcb_xkb_sym_interpret_t *
xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */)
{
- return (uint8_t *) (R + 1);
+ return (xcb_xkb_sym_interpret_t *) (R + 1);
}
@@ -8539,25 +7882,25 @@ 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 (const xcb_xkb_get_compat_map_reply_t *R /**< */)
{
- return (16 * R->nSIRtrn);
+ return R->nSIRtrn;
}
/*****************************************************************************
**
- ** xcb_generic_iterator_t xcb_xkb_get_compat_map_si_rtrn_end
+ ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_compat_map_si_rtrn_iterator
**
** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_generic_iterator_t
+ ** @returns xcb_xkb_sym_interpret_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_sym_interpret_iterator_t
+xcb_xkb_get_compat_map_si_rtrn_iterator (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;
+ xcb_xkb_sym_interpret_iterator_t i;
+ i.data = (xcb_xkb_sym_interpret_t *) (R + 1);
+ i.rem = R->nSIRtrn;
i.index = (char *) i.data - (char *) R;
return i;
}
@@ -8575,7 +7918,7 @@ 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 (const xcb_xkb_get_compat_map_reply_t *R /**< */)
{
- xcb_generic_iterator_t prev = xcb_xkb_get_compat_map_si_rtrn_end(R);
+ xcb_generic_iterator_t prev = xcb_xkb_sym_interpret_end(xcb_xkb_get_compat_map_si_rtrn_iterator(R));
return (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index) + 0);
}
@@ -8609,7 +7952,7 @@ 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);
+ xcb_generic_iterator_t prev = xcb_xkb_sym_interpret_end(xcb_xkb_get_compat_map_si_rtrn_iterator(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;
@@ -8644,15 +7987,17 @@ xcb_xkb_set_compat_map_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_set_compat_map_request_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* si */
- xcb_block_len += (16 * _aux->nSI) * sizeof(uint8_t);
+ xcb_block_len += _aux->nSI * sizeof(xcb_xkb_sym_interpret_t);
xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
/* insert padding */
xcb_pad = -xcb_block_len & (xcb_align_to - 1);
xcb_buffer_len += xcb_block_len + xcb_pad;
@@ -8682,29 +8027,29 @@ xcb_xkb_set_compat_map_sizeof (const void *_buffer /**< */)
**
** 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
+ ** @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 xcb_xkb_sym_interpret_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 /**< */)
+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 xcb_xkb_sym_interpret_t *si /**< */,
+ const xcb_xkb_mod_def_t *groupMaps /**< */)
{
static const xcb_protocol_request_t xcb_req = {
/* count */ 6,
@@ -8730,9 +8075,9 @@ xcb_xkb_set_compat_map_checked (xcb_connection_t *c /**< */,
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_xkb_sym_interpret_t si */
xcb_parts[4].iov_base = (char *) si;
- xcb_parts[4].iov_len = (16 * nSI) * sizeof(uint8_t);
+ xcb_parts[4].iov_len = nSI * sizeof(xcb_xkb_sym_interpret_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
/* xcb_xkb_mod_def_t groupMaps */
@@ -8750,29 +8095,29 @@ xcb_xkb_set_compat_map_checked (xcb_connection_t *c /**< */,
**
** 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
+ ** @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 xcb_xkb_sym_interpret_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 /**< */)
+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 xcb_xkb_sym_interpret_t *si /**< */,
+ const xcb_xkb_mod_def_t *groupMaps /**< */)
{
static const xcb_protocol_request_t xcb_req = {
/* count */ 6,
@@ -8798,9 +8143,9 @@ xcb_xkb_set_compat_map (xcb_connection_t *c /**< */,
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_xkb_sym_interpret_t si */
xcb_parts[4].iov_base = (char *) si;
- xcb_parts[4].iov_len = (16 * nSI) * sizeof(uint8_t);
+ xcb_parts[4].iov_len = nSI * sizeof(xcb_xkb_sym_interpret_t);
xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
/* xcb_xkb_mod_def_t groupMaps */
@@ -8917,13 +8262,15 @@ xcb_xkb_get_indicator_map_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_get_indicator_map_reply_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* maps */
- xcb_block_len += _aux->nIndicators * sizeof(xcb_xkb_indicator_map_t);
+ 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 */
@@ -9049,7 +8396,7 @@ xcb_xkb_get_indicator_map_maps (const xcb_xkb_get_indicator_map_reply_t *R /**<
int
xcb_xkb_get_indicator_map_maps_length (const xcb_xkb_get_indicator_map_reply_t *R /**< */)
{
- return R->nIndicators;
+ return xcb_popcount(R->which);
}
@@ -9067,7 +8414,7 @@ xcb_xkb_get_indicator_map_maps_iterator (const xcb_xkb_get_indicator_map_reply_t
{
xcb_xkb_indicator_map_iterator_t i;
i.data = (xcb_xkb_indicator_map_t *) (R + 1);
- i.rem = R->nIndicators;
+ i.rem = xcb_popcount(R->which);
i.index = (char *) i.data - (char *) R;
return i;
}
@@ -9100,11 +8447,13 @@ xcb_xkb_set_indicator_map_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_set_indicator_map_request_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* maps */
xcb_block_len += xcb_popcount(_aux->which) * sizeof(xcb_xkb_indicator_map_t);
xcb_tmp += xcb_block_len;
@@ -9604,6 +8953,60 @@ xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_repl
/*****************************************************************************
**
+ ** uint8_t * xcb_xkb_get_names_value_list_alignment_pad
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *S
+ ** @returns uint8_t *
+ **
+ *****************************************************************************/
+
+uint8_t *
+xcb_xkb_get_names_value_list_alignment_pad (const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return /* valueList */ S->alignment_pad;
+}
+
+
+/*****************************************************************************
+ **
+ ** int xcb_xkb_get_names_value_list_alignment_pad_length
+ **
+ ** @param const xcb_xkb_get_names_value_list_t *R
+ ** @returns int
+ **
+ *****************************************************************************/
+
+int
+xcb_xkb_get_names_value_list_alignment_pad_length (const xcb_xkb_get_names_reply_t *R /**< */,
+ const xcb_xkb_get_names_value_list_t *S /**< */)
+{
+ return (((R->nTypes + 3) & (~3)) - R->nTypes);
+}
+
+
+/*****************************************************************************
+ **
+ ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_alignment_pad_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_alignment_pad_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->alignment_pad + (((R->nTypes + 3) & (~3)) - 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
@@ -9993,11 +9396,11 @@ xcb_xkb_get_names_value_list_serialize (void **_
{
char *xcb_out = *_buffer;
unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
unsigned int xcb_pad = 0;
char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[25];
+ struct iovec xcb_parts[27];
unsigned int xcb_parts_idx = 0;
unsigned int xcb_block_len = 0;
unsigned int i;
@@ -10096,6 +9499,22 @@ xcb_xkb_get_names_value_list_serialize (void **_
xcb_pad = 0;
}
xcb_block_len = 0;
+ /* alignment_pad */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad;
+ xcb_block_len += (((nTypes + 3) & (~3)) - nTypes) * sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = (((nTypes + 3) & (~3)) - 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);
@@ -10255,7 +9674,7 @@ xcb_xkb_get_names_value_list_unpack (const void *_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 xcb_align_to = 0;
if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
@@ -10337,6 +9756,19 @@ xcb_xkb_get_names_value_list_unpack (const void *_buffer /
xcb_pad = 0;
}
xcb_block_len = 0;
+ /* alignment_pad */
+ _aux->alignment_pad = (uint8_t *)xcb_tmp;
+ xcb_block_len += (((nTypes + 3) & (~3)) - 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);
@@ -11079,7 +10511,7 @@ xcb_xkb_set_names_values_serialize (void **_buffer
{
char *xcb_out = *_buffer;
unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
unsigned int xcb_pad = 0;
char xcb_pad0[3] = {0, 0, 0};
@@ -11342,7 +10774,7 @@ xcb_xkb_set_names_values_unpack (const void *_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 xcb_align_to = 0;
if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
@@ -11884,914 +11316,6 @@ xcb_xkb_set_names_aux (xcb_connection_t *c /**< */,
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;
-}
-
/*****************************************************************************
**
@@ -12919,254 +11443,59 @@ xcb_xkb_per_client_flags_reply (xcb_connection_t *c /**< */,
}
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 /**< */)
+xcb_xkb_list_components_sizeof (const void *_buffer /**< */)
{
- char *xcb_out = *_buffer;
+ char *xcb_tmp = (char *)_buffer;
+ const xcb_xkb_list_components_reply_t *_aux = (xcb_xkb_list_components_reply_t *)_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 xcb_pad = 0;
+ unsigned int xcb_align_to = 0;
+
unsigned int i;
- char *xcb_tmp;
+ unsigned int xcb_tmp_len;
- /* 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);
+ xcb_block_len += sizeof(xcb_xkb_list_components_reply_t);
+ xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
+ /* keymaps */
+ for(i=0; i<_aux->nKeymaps; i++) {
+ xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_listing_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_tmp += xcb_pad;
xcb_pad = 0;
}
xcb_block_len = 0;
-
- if (NULL == xcb_out) {
- /* allocate memory */
- xcb_out = malloc(xcb_buffer_len);
- *_buffer = xcb_out;
+ /* keycodes */
+ for(i=0; i<_aux->nKeycodes; i++) {
+ xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
}
-
- 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;
+ xcb_align_to = ALIGNOF(xcb_xkb_listing_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;
}
-
- 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);
+ xcb_block_len = 0;
+ /* types */
+ for(i=0; i<_aux->nTypes; i++) {
+ xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
/* insert padding */
xcb_pad = -xcb_block_len & (xcb_align_to - 1);
xcb_buffer_len += xcb_block_len + xcb_pad;
@@ -13175,79 +11504,71 @@ xcb_xkb_list_components_unserialize (const void *_buffe
xcb_pad = 0;
}
xcb_block_len = 0;
-
- if (NULL == _aux)
- return xcb_buffer_len;
-
- if (NULL == *_aux) {
- /* allocate memory */
- *_aux = malloc(xcb_buffer_len);
+ /* compatMaps */
+ for(i=0; i<_aux->nCompatMaps; i++) {
+ xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_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;
+ xcb_align_to = ALIGNOF(xcb_xkb_listing_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;
+ /* symbols */
+ for(i=0; i<_aux->nSymbols; i++) {
+ xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_listing_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;
+ /* geometries */
+ for(i=0; i<_aux->nGeometries; i++) {
+ xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
+ xcb_block_len += xcb_tmp_len;
+ xcb_tmp += xcb_tmp_len;
+ }
+ xcb_align_to = ALIGNOF(xcb_xkb_listing_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_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
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t maxNames
** @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 /**< */)
+xcb_xkb_list_components (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t maxNames /**< */)
{
static const xcb_protocol_request_t xcb_req = {
/* count */ 2,
@@ -13259,25 +11580,16 @@ xcb_xkb_list_components (xcb_connection_t *c /**< */,
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_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);
- free(xcb_aux);
return xcb_ret;
}
@@ -13286,41 +11598,17 @@ xcb_xkb_list_components (xcb_connection_t *c /**< */,
**
** 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
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t maxNames
** @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 /**< */)
+xcb_xkb_list_components_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t maxNames /**< */)
{
static const xcb_protocol_request_t xcb_req = {
/* count */ 2,
@@ -13332,25 +11620,16 @@ xcb_xkb_list_components_unchecked (xcb_connection_t *c /**< */,
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_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);
- free(xcb_aux);
return xcb_ret;
}
@@ -13595,329 +11874,6 @@ xcb_xkb_list_components_reply (xcb_connection_t *c /**< */,
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);
-}
-
/*****************************************************************************
**
@@ -14186,7 +12142,7 @@ 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;
+ return xcb_popcount(/* replies */ S->types.virtualMods);
}
@@ -14204,7 +12160,7 @@ xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end (const xcb_xkb_get_kbd_
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.data = /* replies */ S->types.map.vmods_rtrn + xcb_popcount(/* replies */ S->types.virtualMods);
i.rem = 0;
i.index = (char *) i.data - (char *) S;
return i;
@@ -14379,7 +12335,7 @@ xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -14388,7 +12344,7 @@ xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void
{
char *xcb_out = *_buffer;
unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
unsigned int xcb_pad = 0;
char xcb_pad0[3] = {0, 0, 0};
@@ -14509,8 +12465,8 @@ xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void
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_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
+ xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
xcb_parts_idx++;
xcb_align_to = ALIGNOF(uint8_t);
}
@@ -14603,7 +12559,7 @@ xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
uint8_t totalKeyExplicit /**< */,
uint8_t totalModMapKeys /**< */,
uint8_t totalVModMapKeys /**< */,
@@ -14614,7 +12570,7 @@ xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void
unsigned int xcb_buffer_len = 0;
unsigned int xcb_block_len = 0;
unsigned int xcb_pad = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
unsigned int i;
unsigned int xcb_tmp_len;
@@ -14709,7 +12665,7 @@ xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void
xcb_block_len = 0;
/* vmods_rtrn */
_aux->vmods_rtrn = (uint8_t *)xcb_tmp;
- xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t);
+ xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
xcb_tmp += xcb_block_len;
xcb_align_to = ALIGNOF(uint8_t);
}
@@ -14777,1752 +12733,14 @@ xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer /**< */,
uint8_t nKeyActions /**< */,
uint16_t totalActions /**< */,
uint8_t totalKeyBehaviors /**< */,
- uint8_t nVModMapKeys /**< */,
+ uint16_t virtualMods /**< */,
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);
+ return xcb_xkb_get_kbd_by_name_replies_types_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
}
@@ -17026,7 +13244,7 @@ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void
{
char *xcb_out = *_buffer;
unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
unsigned int xcb_pad = 0;
char xcb_pad0[3] = {0, 0, 0};
@@ -17289,7 +13507,7 @@ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void
unsigned int xcb_buffer_len = 0;
unsigned int xcb_block_len = 0;
unsigned int xcb_pad = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
@@ -17498,976 +13716,6 @@ xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void *_buffe
/*****************************************************************************
**
- ** 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
@@ -18484,14 +13732,14 @@ xcb_xkb_get_kbd_by_name_replies_types_map (const xcb_xkb_get_kbd_by_name_replies
/*****************************************************************************
**
- ** uint8_t * xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn
+ ** xcb_xkb_sym_interpret_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 *
+ ** @returns xcb_xkb_sym_interpret_t *
**
*****************************************************************************/
-uint8_t *
+xcb_xkb_sym_interpret_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;
@@ -18511,26 +13759,26 @@ 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);
+ return /* replies */ S->compat_map.nSIRtrn;
}
/*****************************************************************************
**
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_end
+ ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator
**
** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_generic_iterator_t
+ ** @returns xcb_xkb_sym_interpret_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_sym_interpret_iterator_t
+xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator (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;
+ xcb_xkb_sym_interpret_iterator_t i;
+ i.data = /* replies */ S->compat_map.si_rtrn;
+ i.rem = /* replies */ S->compat_map.nSIRtrn;
i.index = (char *) i.data - (char *) S;
return i;
}
@@ -18592,38 +13840,6 @@ xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_ge
/*****************************************************************************
**
- ** 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
@@ -18694,22 +13910,6 @@ xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_n
/*****************************************************************************
**
- ** 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
@@ -18723,250 +13923,6 @@ xcb_xkb_get_kbd_by_name_replies_geometry_label_font (const xcb_xkb_get_kbd_by_na
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 /**< */,
@@ -18974,17 +13930,19 @@ xcb_xkb_get_kbd_by_name_replies_serialize (void
{
char *xcb_out = *_buffer;
unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
unsigned int xcb_pad = 0;
char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[172];
+ struct iovec xcb_parts[96];
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) {
+ if((reported & XCB_XKB_GBN_DETAIL_TYPES) ||
+ (reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) ||
+ (reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS)) {
/* 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);
@@ -19183,18 +14141,36 @@ xcb_xkb_get_kbd_by_name_replies_serialize (void
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_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.virtualMods, _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.virtualMods, _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.compatmap_type */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatmap_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.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.compatmap_sequence */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatmap_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.compat_map.compatmap_length */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatmap_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.compat_map.groupsRtrn */
xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.groupsRtrn;
xcb_block_len += sizeof(uint8_t);
@@ -19243,10 +14219,10 @@ xcb_xkb_get_kbd_by_name_replies_serialize (void
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_block_len += _aux->compat_map.nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
+ xcb_parts[xcb_parts_idx].iov_len = _aux->compat_map.nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
/* insert padding */
xcb_pad = -xcb_block_len & (xcb_align_to - 1);
xcb_buffer_len += xcb_block_len + xcb_pad;
@@ -19264,385 +14240,31 @@ xcb_xkb_get_kbd_by_name_replies_serialize (void
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;
+ if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_type */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatormap_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.server_symbols.pad1 */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
+ /* 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.server_symbols.virtualMods */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.virtualMods;
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_sequence */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatormap_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);
- /* 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_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_length */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatormap_length;
+ xcb_block_len += sizeof(uint32_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = ALIGNOF(uint32_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);
@@ -19684,13 +14306,32 @@ xcb_xkb_get_kbd_by_name_replies_serialize (void
xcb_parts_idx++;
xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
}
- if(reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) {
+ if((reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) ||
+ (reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES)) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_type */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyname_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.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.keyname_sequence */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyname_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.key_names.keyname_length */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyname_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.key_names.which */
xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.which;
xcb_block_len += sizeof(uint32_t);
@@ -19786,115 +14427,31 @@ xcb_xkb_get_kbd_by_name_replies_serialize (void
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;
+ if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_type */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometry_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.other_names.groupNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.groupNames;
+ /* 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.other_names.virtualMods */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.virtualMods;
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_sequence */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometry_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.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_xkb_get_kbd_by_name_replies_t.geometry.geometry_length */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometry_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.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);
@@ -19989,127 +14546,6 @@ xcb_xkb_get_kbd_by_name_replies_serialize (void
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);
@@ -20148,12 +14584,12 @@ xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buf
unsigned int xcb_buffer_len = 0;
unsigned int xcb_block_len = 0;
unsigned int xcb_pad = 0;
- unsigned int xcb_align_to;
+ unsigned int xcb_align_to = 0;
- unsigned int i;
- unsigned int xcb_tmp_len;
- if(reported & XCB_XKB_GBN_DETAIL_TYPES) {
+ if((reported & XCB_XKB_GBN_DETAIL_TYPES) ||
+ (reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) ||
+ (reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS)) {
/* 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);
@@ -20319,16 +14755,31 @@ xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buf
}
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_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.virtualMods, _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.compatmap_type */
+ _aux->compat_map.compatmap_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.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.compatmap_sequence */
+ _aux->compat_map.compatmap_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.compat_map.compatmap_length */
+ _aux->compat_map.compatmap_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.compat_map.groupsRtrn */
_aux->compat_map.groupsRtrn = *(uint8_t *)xcb_tmp;
xcb_block_len += sizeof(uint8_t);
@@ -20383,10 +14834,10 @@ xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buf
}
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);
+ _aux->compat_map.si_rtrn = (xcb_xkb_sym_interpret_t *)xcb_tmp;
+ xcb_block_len += _aux->compat_map.nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
+ xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
/* insert padding */
xcb_pad = -xcb_block_len & (xcb_align_to - 1);
xcb_buffer_len += xcb_block_len + xcb_pad;
@@ -20401,322 +14852,27 @@ xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buf
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;
+ if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_type */
+ _aux->indicator_maps.indicatormap_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.server_symbols.pad1 */
- _aux->server_symbols.pad1 = *(uint8_t *)xcb_tmp;
+ /* 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.server_symbols.virtualMods */
- _aux->server_symbols.virtualMods = *(uint16_t *)xcb_tmp;
+ /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_sequence */
+ _aux->indicator_maps.indicatormap_sequence = *(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.indicatormap_length */
+ _aux->indicator_maps.indicatormap_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.indicator_maps.which */
_aux->indicator_maps.which = *(uint32_t *)xcb_tmp;
xcb_block_len += sizeof(uint32_t);
@@ -20765,12 +14921,28 @@ xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buf
xcb_tmp += xcb_block_len;
xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
}
- if(reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) {
+ if((reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) ||
+ (reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES)) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_type */
+ _aux->key_names.keyname_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.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.keyname_sequence */
+ _aux->key_names.keyname_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.key_names.keyname_length */
+ _aux->key_names.keyname_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.key_names.which */
_aux->key_names.which = *(uint32_t *)xcb_tmp;
xcb_block_len += sizeof(uint32_t);
@@ -20852,99 +15024,27 @@ xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buf
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;
+ if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) {
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_type */
+ _aux->geometry.geometry_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.other_names.groupNames */
- _aux->other_names.groupNames = *(uint8_t *)xcb_tmp;
+ /* 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.other_names.virtualMods */
- _aux->other_names.virtualMods = *(uint16_t *)xcb_tmp;
+ /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_sequence */
+ _aux->geometry.geometry_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.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_xkb_get_kbd_by_name_replies_t.geometry.geometry_length */
+ _aux->geometry.geometry_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.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);
@@ -21023,99 +15123,6 @@ xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buf
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);
@@ -21142,45 +15149,21 @@ xcb_xkb_get_kbd_by_name_replies_sizeof (const void *_buffer /**< */,
**
** 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
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t need
+ ** @param uint16_t want
+ ** @param uint8_t load
** @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 /**< */)
+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 /**< */)
{
static const xcb_protocol_request_t xcb_req = {
/* count */ 2,
@@ -21192,28 +15175,19 @@ xcb_xkb_get_kbd_by_name (xcb_connection_t *c /**< */,
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_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);
- free(xcb_aux);
return xcb_ret;
}
@@ -21222,45 +15196,21 @@ xcb_xkb_get_kbd_by_name (xcb_connection_t *c /**< */,
**
** 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
+ ** @param xcb_connection_t *c
+ ** @param xcb_xkb_device_spec_t deviceSpec
+ ** @param uint16_t need
+ ** @param uint16_t want
+ ** @param uint8_t load
** @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_unchecked (xcb_connection_t *c /**< */,
+ xcb_xkb_device_spec_t deviceSpec /**< */,
+ uint16_t need /**< */,
+ uint16_t want /**< */,
+ uint8_t load /**< */)
{
static const xcb_protocol_request_t xcb_req = {
/* count */ 2,
@@ -21272,28 +15222,19 @@ xcb_xkb_get_kbd_by_name_unchecked (xcb_connection_t *c /**< */,
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_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);
- free(xcb_aux);
return xcb_ret;
}
@@ -21341,13 +15282,15 @@ xcb_xkb_get_device_info_sizeof (const void *_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 xcb_align_to = 0;
unsigned int i;
unsigned int xcb_tmp_len;
xcb_block_len += sizeof(xcb_xkb_get_device_info_reply_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* name */
xcb_block_len += _aux->nameLen * sizeof(xcb_xkb_string8_t);
xcb_tmp += xcb_block_len;
@@ -21674,13 +15617,15 @@ xcb_xkb_set_device_info_sizeof (const void *_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 xcb_align_to = 0;
unsigned int i;
unsigned int xcb_tmp_len;
xcb_block_len += sizeof(xcb_xkb_set_device_info_request_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* btnActions */
xcb_block_len += _aux->nBtns * sizeof(xcb_xkb_action_t);
xcb_tmp += xcb_block_len;
@@ -21864,11 +15809,13 @@ xcb_xkb_set_debugging_flags_sizeof (const void *_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 xcb_align_to = 0;
xcb_block_len += sizeof(xcb_xkb_set_debugging_flags_request_t);
xcb_tmp += xcb_block_len;
+ xcb_buffer_len += xcb_block_len;
+ xcb_block_len = 0;
/* message */
xcb_block_len += _aux->msgLength * sizeof(xcb_xkb_string8_t);
xcb_tmp += xcb_block_len;
diff --git a/src/3rdparty/xcb/libxcb/xkb.patch b/src/3rdparty/xcb/libxcb/xkb.patch
deleted file mode 100644
index 054d97467f..0000000000
--- a/src/3rdparty/xcb/libxcb/xkb.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-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
index 21a3e78e1c..57470c0499 100644
--- a/src/3rdparty/xkbcommon.pri
+++ b/src/3rdparty/xkbcommon.pri
@@ -1,7 +1,7 @@
QMAKE_CFLAGS += -std=gnu99 -w
INCLUDEPATH += $$PWD/xkbcommon $$PWD/xkbcommon/src $$PWD/xkbcommon/src/xkbcomp
-DEFINES += DFLT_XKB_CONFIG_ROOT='\\"$$QMAKE_X11_PREFIX/share/X11/xkb\\"'
+DEFINES += DFLT_XKB_CONFIG_ROOT='\\"$$QMAKE_XKB_CONFIG_ROOT\\"'
### RMLVO names can be overwritten with environmental variables (See libxkbcommon documentation)
DEFINES += DEFAULT_XKB_RULES='\\"evdev\\"'
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java b/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java
index 6ee1304c12..b8dbaa4829 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java
@@ -51,6 +51,8 @@ import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.ClipboardManager;
+import android.text.Html;
+import android.text.Spanned;
import android.util.TypedValue;
import android.view.View;
import android.widget.Button;
@@ -74,11 +76,11 @@ class ButtonStruct implements View.OnClickListener
{
m_dialog = dialog;
m_id = id;
- m_text = text;
+ m_text = Html.fromHtml(text);
}
QtMessageDialogHelper m_dialog;
private int m_id;
- String m_text;
+ Spanned m_text;
@Override
public void onClick(View view) {
@@ -153,22 +155,22 @@ public class QtMessageDialogHelper
public void setTile(String title)
{
- m_title = title;
+ m_title = Html.fromHtml(title);
}
public void setText(String text)
{
- m_text = text;
+ m_text = Html.fromHtml(text);
}
public void setInformativeText(String informativeText)
{
- m_informativeText = informativeText;
+ m_informativeText = Html.fromHtml(informativeText);
}
public void setDetailedText(String text)
{
- m_detailedText = text;
+ m_detailedText = Html.fromHtml(text);
}
public void addButton(int id, String text)
@@ -417,7 +419,7 @@ public class QtMessageDialogHelper
private Activity m_activity;
private int m_icon = 0;
- private String m_title, m_text, m_informativeText, m_detailedText;
+ private Spanned m_title, m_text, m_informativeText, m_detailedText;
private ArrayList<ButtonStruct> m_buttonsList;
private AlertDialog m_dialog;
private long m_handler = 0;
diff --git a/src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl b/src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl
index 236a62f63e..6c8af4f139 100644
--- a/src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl
+++ b/src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl
@@ -2,6 +2,16 @@
Copyright (c) 2011-2013, BogDan Vatra <bogdan@kde.org>
Contact: http://www.qt-project.org/legal
+ 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.
+
+ BSD License Usage
+ Alternatively, this file may be used under the BSD license as follows:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
diff --git a/src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl b/src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl
index 0bcb5285b8..82a18bb568 100644
--- a/src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl
+++ b/src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl
@@ -2,6 +2,16 @@
Copyright (c) 2011-2013, BogDan Vatra <bogdan@kde.org>
Contact: http://www.qt-project.org/legal
+ 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.
+
+ BSD License Usage
+ Alternatively, this file may be used under the BSD license as follows:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
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 3a0eaa77d6..f99bb84077 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
@@ -2,6 +2,16 @@
Copyright (c) 2012-2013, BogDan Vatra <bogdan@kde.org>
Contact: http://www.qt-project.org/legal
+ 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.
+
+ BSD License Usage
+ Alternatively, this file may be used under the BSD license as follows:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
@@ -624,11 +634,15 @@ public class QtActivity extends Activity
+ "\tQML_IMPORT_PATH=" + pluginsPrefix + "/imports"
+ "\tQT_PLUGIN_PATH=" + pluginsPrefix + "/plugins");
- Intent intent = getIntent();
- if (intent != null) {
- String parameters = intent.getStringExtra("applicationArguments");
- if (parameters != null)
- loaderParams.putString(APPLICATION_PARAMETERS_KEY, parameters.replace(' ', '\t'));
+ if (APPLICATION_PARAMETERS != null) {
+ loaderParams.putString(APPLICATION_PARAMETERS_KEY, APPLICATION_PARAMETERS);
+ } else {
+ Intent intent = getIntent();
+ if (intent != null) {
+ String parameters = intent.getStringExtra("applicationArguments");
+ if (parameters != null)
+ loaderParams.putString(APPLICATION_PARAMETERS_KEY, parameters.replace(' ', '\t'));
+ }
}
loadApplication(loaderParams);
diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtApplication.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtApplication.java
index 4de1c833f5..33485ac27b 100644
--- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtApplication.java
+++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtApplication.java
@@ -2,6 +2,16 @@
Copyright (c) 2012-2013, BogDan Vatra <bogdan@kde.org>
Contact: http://www.qt-project.org/legal
+ 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.
+
+ BSD License Usage
+ Alternatively, this file may be used under the BSD license as follows:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 79c90e0664..812aee3252 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -11,6 +11,8 @@ DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x67000000
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
+CONFIG += optimize_full
+
# otherwise mingw headers do not declare common functions like putenv
mingw:QMAKE_CXXFLAGS_CXX11 = -std=gnu++0x
diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
index 3a18eb8007..b907c9acb1 100644
--- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
@@ -195,7 +195,7 @@ int divide(int a, int b)
//! [18]
-ASSERT: "b == 0" in file div.cpp, line 7
+ASSERT: "b != 0" in file div.cpp, line 7
//! [18]
diff --git a/src/corelib/doc/snippets/qbytearraylist/qbytearraylist.pro b/src/corelib/doc/snippets/qbytearraylist/qbytearraylist.pro
deleted file mode 100644
index 87397b491d..0000000000
--- a/src/corelib/doc/snippets/qbytearraylist/qbytearraylist.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-QT = core
-SOURCES = main.cpp
diff --git a/src/corelib/doc/src/eventsandfilters.qdoc b/src/corelib/doc/src/eventsandfilters.qdoc
index cd31e36dee..a880cc8187 100644
--- a/src/corelib/doc/src/eventsandfilters.qdoc
+++ b/src/corelib/doc/src/eventsandfilters.qdoc
@@ -208,7 +208,7 @@
\l{QCoreApplication::}{postEvent()} is also used during object
initialization, since the posted event will typically be dispatched
very soon after the initialization of the object is complete.
- When implementing a widget, it is important to realise that events
+ When implementing a widget, it is important to realize that events
can be delivered very early in its lifetime so, in its constructor,
be sure to initialize member variables early on, before there's any
chance that it might receive an event.
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index a9f143502e..dfa3d83fb8 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -860,7 +860,7 @@
#ifdef Q_COMPILER_NULLPTR
# define Q_NULLPTR nullptr
#else
-# define Q_NULLPTR 0
+# define Q_NULLPTR NULL
#endif
#ifdef Q_COMPILER_DEFAULT_MEMBERS
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 710f7e8ba1..c15305322b 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -394,7 +394,7 @@ Q_STATIC_ASSERT_X(UCHAR_MAX == 255, "Qt assumes that char is 8 bits");
\fn bool QFlags::testFlag(Enum flag) const
\since 4.2
- Returns \c true if the \a flag is set, otherwise false.
+ Returns \c true if the \a flag is set, otherwise \c false.
*/
/*!
@@ -1937,7 +1937,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
\relates <QtGlobal>
Prints a warning message containing the source code file name and
- line number if \a test is false.
+ line number if \a test is \c false.
Q_ASSERT() is useful for testing pre- and post-conditions
during development. It does nothing if \c QT_NO_DEBUG was defined
@@ -1960,7 +1960,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
\relates <QtGlobal>
Prints the message \a what together with the location \a where,
- the source file name and line number if \a test is false.
+ the source file name and line number if \a test is \c false.
Q_ASSERT_X is useful for testing pre- and post-conditions during
development. It does nothing if \c QT_NO_DEBUG was defined during
@@ -1983,18 +1983,18 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
\relates <QtGlobal>
\since 5.0
- Causes the compiler to assume that \a expr is true. This macro is useful
+ Causes the compiler to assume that \a expr is \c true. This macro is useful
for improving code generation, by providing the compiler with hints about
conditions that it would not otherwise know about. However, there is no
guarantee that the compiler will actually use those hints.
This macro could be considered a "lighter" version of \l{Q_ASSERT()}. While
- Q_ASSERT will abort the program's execution if the condition is false,
+ Q_ASSERT will abort the program's execution if the condition is \c false,
Q_ASSUME will tell the compiler not to generate code for those conditions.
Therefore, it is important that the assumptions always hold, otherwise
undefined behaviour may occur.
- If \a expr is a constantly false condition, Q_ASSUME will tell the compiler
+ If \a expr is a constantly \c false condition, Q_ASSUME will tell the compiler
that the current code execution cannot be reached. That is, Q_ASSUME(false)
is equivalent to Q_UNREACHABLE().
@@ -3346,6 +3346,8 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
It expands to "std::move" if your compiler supports that C++11 function, or to nothing
otherwise.
+
+ qMove takes an rvalue reference to its parameter \a x, and converts it to an xvalue.
*/
/*!
@@ -3426,7 +3428,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
\relates <QtGlobal>
\since 5.0
- This macro marks a function as non-throwing if \a x is true. If
+ This macro marks a function as non-throwing if \a x is \c true. If
the function does nevertheless throw, the behaviour is defined:
std::terminate() is called.
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 00177b659e..bdaaa05768 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -110,10 +110,8 @@ public:
inline QDebug &operator<<(unsigned int t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(signed long t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(unsigned long t) { stream->ts << t; return maybeSpace(); }
- inline QDebug &operator<<(qint64 t)
- { stream->ts << QString::number(t); return maybeSpace(); }
- inline QDebug &operator<<(quint64 t)
- { stream->ts << QString::number(t); return maybeSpace(); }
+ inline QDebug &operator<<(qint64 t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(quint64 t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(const char* t) { stream->ts << QString::fromUtf8(t); return maybeSpace(); }
diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp
index 42a724670e..5365ca9bcc 100644
--- a/src/corelib/io/qfilesystementry.cpp
+++ b/src/corelib/io/qfilesystementry.cpp
@@ -195,7 +195,7 @@ QString QFileSystemEntry::path() const
if (m_lastSeparator == -1) {
#if defined(Q_OS_WIN)
if (m_filePath.length() >= 2 && m_filePath.at(1) == QLatin1Char(':'))
- return QFSFileEngine::currentPath(m_filePath.left(2));
+ return m_filePath.left(2);
#endif
return QString(QLatin1Char('.'));
}
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index eb8aeaca50..08ecd67dc8 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -108,8 +108,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
Rules are evaluated in text order, from first to last. That is, if two rules
apply to a category/type, the rule that comes later is applied.
- Rules can be set via \l setFilterRules(). Since Qt 5.3 logging rules
- are also automatically loaded from the \c [Rules] section of a logging
+ Rules can be set via \l setFilterRules(). Since Qt 5.3 logging rules can also
+ be set in the \c QT_LOGGING_RULES environment variable, and
+ are automatically loaded from the \c [Rules] section of a logging
configuration file. Such configuration files are looked up in the QtProject
configuration directory, or explicitly set in a \c QT_LOGGING_CONF
environment variable.
@@ -117,13 +118,15 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
Rules set by \l setFilterRules() take precedence over rules specified
in the QtProject configuration directory, and can, in turn, be
overwritten by rules from the configuration file specified by
- \c QT_LOGGING_CONF.
+ \c QT_LOGGING_CONF, and rules set by \c QT_LOGGING_RULES.
+
Order of evaluation:
\list
\li Rules from QtProject/qlogging.ini
\li Rules set by \l setFilterRules()
\li Rules from file in \c QT_LOGGING_CONF
+ \li Rules from environment variable QT_LOGGING_RULES
\endlist
The \c QtProject/qlogging.ini file is looked up in all directories returned
@@ -137,6 +140,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
QCoreApplication::applicationDirPath() + \c "/data"
\endlist
+ Set the \c QT_LOGGING_DEBUG environment variable to see from where
+ logging rules are loaded.
+
\section2 Installing a Custom Filter
As a lower-level alternative to the text rules you can also implement a
@@ -341,9 +347,8 @@ QLoggingCategory::installFilter(QLoggingCategory::CategoryFilter filter)
\snippet qloggingcategory/main.cpp 2
\note The rules might be ignored if a custom category filter is installed
- with \l installFilter(), or if the user defined a custom logging
- configuration file in the \c QT_LOGGING_CONF environment variable.
-
+ with \l installFilter(), or if the user defined \c QT_LOGGING_CONF or \c QT_LOGGING_RULES
+ environment variable.
*/
void QLoggingCategory::setFilterRules(const QString &rules)
{
diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp
index 2619743ff4..23f1ffbd16 100644
--- a/src/corelib/io/qloggingregistry.cpp
+++ b/src/corelib/io/qloggingregistry.cpp
@@ -45,6 +45,13 @@
#include <QtCore/qfile.h>
#include <QtCore/qstandardpaths.h>
#include <QtCore/qtextstream.h>
+#include <QtCore/qdir.h>
+
+// We can't use the default macros because this would lead to recursion.
+// Instead let's define our own one that unconditionally logs...
+#define debugMsg QMessageLogger(__FILE__, __LINE__, __FUNCTION__, "qt.core.logging").debug
+#define warnMsg QMessageLogger(__FILE__, __LINE__, __FUNCTION__, "qt.core.logging").warning
+
QT_BEGIN_NAMESPACE
@@ -64,12 +71,12 @@ QLoggingRule::QLoggingRule() :
\internal
Constructs a logging rule.
*/
-QLoggingRule::QLoggingRule(const QString &pattern, bool enabled) :
- pattern(pattern),
+QLoggingRule::QLoggingRule(const QStringRef &pattern, bool enabled) :
+ messageType(-1),
flags(Invalid),
enabled(enabled)
{
- parse();
+ parse(pattern);
}
/*!
@@ -77,48 +84,33 @@ QLoggingRule::QLoggingRule(const QString &pattern, bool enabled) :
Return value 1 means filter passed, 0 means filter doesn't influence this
category, -1 means category doesn't pass this filter.
*/
-int QLoggingRule::pass(const QString &categoryName, QtMsgType msgType) const
+int QLoggingRule::pass(const QString &cat, QtMsgType msgType) const
{
- QString fullCategory = categoryName;
- switch (msgType) {
- case QtDebugMsg:
- fullCategory += QLatin1String(".debug");
- break;
- case QtWarningMsg:
- fullCategory += QLatin1String(".warning");
- break;
- case QtCriticalMsg:
- fullCategory += QLatin1String(".critical");
- break;
- default:
- break;
- }
+ // check message type
+ if (messageType > -1 && messageType != msgType)
+ return 0;
if (flags == FullText) {
- // can be
- // qtproject.org.debug = true
- // or
- // qtproject.org = true
- if (pattern == categoryName
- || pattern == fullCategory)
+ // full match
+ if (category == cat)
return (enabled ? 1 : -1);
+ else
+ return 0;
}
- int idx = 0;
- if (flags == MidFilter) {
- // e.g. *.qtproject*
- idx = fullCategory.indexOf(pattern);
- if (idx >= 0)
- return (enabled ? 1 : -1);
- } else {
- idx = fullCategory.indexOf(pattern);
- if (flags == LeftFilter) {
- // e.g. org.qtproject.*
+ const int idx = cat.indexOf(category);
+ if (idx >= 0) {
+ if (flags == MidFilter) {
+ // matches somewhere
+ if (idx >= 0)
+ return (enabled ? 1 : -1);
+ } else if (flags == LeftFilter) {
+ // matches left
if (idx == 0)
return (enabled ? 1 : -1);
} else if (flags == RightFilter) {
- // e.g. *.qtproject
- if (idx == (fullCategory.count() - pattern.count()))
+ // matches right
+ if (idx == (cat.count() - category.count()))
return (enabled ? 1 : -1);
}
}
@@ -127,30 +119,51 @@ int QLoggingRule::pass(const QString &categoryName, QtMsgType msgType) const
/*!
\internal
- Parses the category and checks which kind of wildcard the filter can contain.
+ Parses \a pattern.
Allowed is f.ex.:
- org.qtproject.logging FullText
- org.qtproject.* LeftFilter
- *.qtproject RightFilter
- *.qtproject* MidFilter
+ qt.core.io.debug FullText, QtDebugMsg
+ qt.core.* LeftFilter, all types
+ *.io.warning RightFilter, QtWarningMsg
+ *.core.* MidFilter
*/
-void QLoggingRule::parse()
+void QLoggingRule::parse(const QStringRef &pattern)
{
- int index = pattern.indexOf(QLatin1Char('*'));
- if (index < 0) {
+ QStringRef p;
+
+ // strip trailing ".messagetype"
+ if (pattern.endsWith(QLatin1String(".debug"))) {
+ p = QStringRef(pattern.string(), pattern.position(),
+ pattern.length() - strlen(".debug"));
+ messageType = QtDebugMsg;
+ } else if (pattern.endsWith(QLatin1String(".warning"))) {
+ p = QStringRef(pattern.string(), pattern.position(),
+ pattern.length() - strlen(".warning"));
+ messageType = QtWarningMsg;
+ } else if (pattern.endsWith(QLatin1String(".critical"))) {
+ p = QStringRef(pattern.string(), pattern.position(),
+ pattern.length() - strlen(".critical"));
+ messageType = QtCriticalMsg;
+ } else {
+ p = pattern;
+ }
+
+ flags = Invalid;
+ if (!p.contains(QLatin1Char('*'))) {
flags = FullText;
} else {
- flags = Invalid;
- if (index == 0) {
- flags |= RightFilter;
- pattern = pattern.remove(0, 1);
- index = pattern.indexOf(QLatin1Char('*'));
- }
- if (index == (pattern.length() - 1)) {
+ if (p.endsWith(QLatin1Char('*'))) {
flags |= LeftFilter;
- pattern = pattern.remove(pattern.length() - 1, 1);
+ p = QStringRef(p.string(), p.position(), p.length() - 1);
+ }
+ if (p.startsWith(QLatin1Char('*'))) {
+ flags |= RightFilter;
+ p = QStringRef(p.string(), p.position() + 1, p.length() - 1);
}
+ if (p.contains(QLatin1Char('*'))) // '*' only supported at start/end
+ flags = Invalid;
}
+
+ category = p.toString();
}
/*!
@@ -207,7 +220,7 @@ void QLoggingSettingsParser::setContent(QTextStream &stream)
int equalPos = line.indexOf(QLatin1Char('='));
if ((equalPos != -1)
&& (line.lastIndexOf(QLatin1Char('=')) == equalPos)) {
- const QString pattern = line.left(equalPos);
+ const QStringRef pattern = line.leftRef(equalPos);
const QStringRef value = line.midRef(equalPos + 1);
bool enabled = (value.compare(QLatin1String("true"),
Qt::CaseInsensitive) == 0);
@@ -226,10 +239,16 @@ QLoggingRegistry::QLoggingRegistry()
{
}
+static bool qtLoggingDebug()
+{
+ static const bool debugEnv = qEnvironmentVariableIsSet("QT_LOGGING_DEBUG");
+ return debugEnv;
+}
+
/*!
\internal
Initializes the rules database by loading
- .config/QtProject/qtlogging.ini and $QT_LOGGING_CONF.
+ $QT_LOGGING_CONF, $QT_LOGGING_RULES, and .config/QtProject/qtlogging.ini.
*/
void QLoggingRegistry::init()
{
@@ -241,9 +260,20 @@ void QLoggingRegistry::init()
QTextStream stream(&file);
QLoggingSettingsParser parser;
parser.setContent(stream);
+ if (qtLoggingDebug())
+ debugMsg("Loading \"%s\" ...",
+ QDir::toNativeSeparators(file.fileName()).toUtf8().constData());
envRules = parser.rules();
}
}
+ const QByteArray rulesSrc = qgetenv("QT_LOGGING_RULES");
+ if (!rulesSrc.isEmpty()) {
+ QTextStream stream(rulesSrc);
+ QLoggingSettingsParser parser;
+ parser.setSection(QStringLiteral("Rules"));
+ parser.setContent(stream);
+ envRules += parser.rules();
+ }
// get rules from qt configuration
QString envPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation,
@@ -254,6 +284,9 @@ void QLoggingRegistry::init()
QTextStream stream(&file);
QLoggingSettingsParser parser;
parser.setContent(stream);
+ if (qtLoggingDebug())
+ debugMsg("Loading \"%s\" ...",
+ QDir::toNativeSeparators(envPath).toUtf8().constData());
configRules = parser.rules();
}
}
@@ -302,6 +335,10 @@ void QLoggingRegistry::setApiRules(const QString &content)
parser.setContent(content);
QMutexLocker locker(&registryMutex);
+
+ if (qtLoggingDebug())
+ debugMsg("Loading logging rules set by Qt API ...");
+
apiRules = parser.rules();
updateRules();
diff --git a/src/corelib/io/qloggingregistry_p.h b/src/corelib/io/qloggingregistry_p.h
index d4b97d42b8..21896bb268 100644
--- a/src/corelib/io/qloggingregistry_p.h
+++ b/src/corelib/io/qloggingregistry_p.h
@@ -64,11 +64,11 @@ class tst_QLoggingRegistry;
QT_BEGIN_NAMESPACE
-class QLoggingRule
+class Q_AUTOTEST_EXPORT QLoggingRule
{
public:
QLoggingRule();
- QLoggingRule(const QString &pattern, bool enabled);
+ QLoggingRule(const QStringRef &pattern, bool enabled);
int pass(const QString &categoryName, QtMsgType type) const;
enum PatternFlag {
@@ -80,12 +80,13 @@ public:
};
Q_DECLARE_FLAGS(PatternFlags, PatternFlag)
- QString pattern;
+ QString category;
+ int messageType;
PatternFlags flags;
bool enabled;
private:
- void parse();
+ void parse(const QStringRef &pattern);
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QLoggingRule::PatternFlags)
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 4076ec5855..0e917ef438 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -880,18 +880,18 @@ void QProcessPrivate::execChild(const char *workingDir, char **path, char **argv
// copy the stdin socket if asked to (without closing on exec)
if (inputChannelMode != QProcess::ForwardedInputChannel)
- qt_safe_dup2(stdinChannel.pipe[0], fileno(stdin), 0);
+ qt_safe_dup2(stdinChannel.pipe[0], STDIN_FILENO, 0);
// copy the stdout and stderr if asked to
if (processChannelMode != QProcess::ForwardedChannels) {
if (processChannelMode != QProcess::ForwardedOutputChannel)
- qt_safe_dup2(stdoutChannel.pipe[1], fileno(stdout), 0);
+ qt_safe_dup2(stdoutChannel.pipe[1], STDOUT_FILENO, 0);
// merge stdout and stderr if asked to
if (processChannelMode == QProcess::MergedChannels) {
- qt_safe_dup2(fileno(stdout), fileno(stderr), 0);
+ qt_safe_dup2(STDOUT_FILENO, STDERR_FILENO, 0);
} else if (processChannelMode != QProcess::ForwardedErrorChannel) {
- qt_safe_dup2(stderrChannel.pipe[1], fileno(stderr), 0);
+ qt_safe_dup2(stderrChannel.pipe[1], STDERR_FILENO, 0);
}
}
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 1e377abf3e..55c4885d92 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -2610,6 +2610,7 @@ void QSortFilterProxyModel::invalidateFilter()
\li QMetaType::UInt
\li QMetaType::LongLong
\li QMetaType::ULongLong
+ \li QMetaType::Float
\li QMetaType::Double
\li QMetaType::QChar
\li QMetaType::QDate
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index 487a431b8f..4c4838d314 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -343,18 +343,47 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
The conversion will convert QVariant types as follows:
- \list
- \li QMetaType::Bool to Bool
- \li QMetaType::Int
- \li QMetaType::Double
- \li QMetaType::LongLong
- \li QMetaType::ULongLong
- \li QMetaType::UInt to Double
- \li QMetaType::QString to String
- \li QMetaType::QStringList
- \li QMetaType::QVariantList to Array
- \li QMetaType::QVariantMap to Object
- \endlist
+ \table
+ \header
+ \li Source type
+ \li Destination type
+ \row
+ \li
+ \list
+ \li QMetaType::Bool
+ \endlist
+ \li QJsonValue::Bool
+ \row
+ \li
+ \list
+ \li QMetaType::Int
+ \li QMetaType::UInt
+ \li QMetaType::LongLong
+ \li QMetaType::ULongLong
+ \li QMetaType::Float
+ \li QMetaType::Double
+ \endlist
+ \li QJsonValue::Double
+ \row
+ \li
+ \list
+ \li QMetaType::QString
+ \endlist
+ \li QJsonValue::String
+ \row
+ \li
+ \list
+ \li QMetaType::QStringList
+ \li QMetaType::QVariantList
+ \endlist
+ \li QJsonValue::Array
+ \row
+ \li
+ \list
+ \li QMetaType::QVariantMap
+ \endlist
+ \li QJsonValue::Object
+ \endtable
For all other QVariant types a conversion to a QString will be attempted. If the returned string
is empty, a Null QJsonValue will be stored, otherwise a String value using the returned QString.
@@ -363,10 +392,11 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
*/
QJsonValue QJsonValue::fromVariant(const QVariant &variant)
{
- switch (variant.type()) {
+ switch (variant.userType()) {
case QVariant::Bool:
return QJsonValue(variant.toBool());
case QVariant::Int:
+ case QMetaType::Float:
case QVariant::Double:
case QVariant::LongLong:
case QVariant::ULongLong:
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index cce385352e..62c76c1a40 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -274,6 +274,7 @@ QT_BEGIN_NAMESPACE
\omitvalue NetworkReplyUpdated
\omitvalue FutureCallOut
\omitvalue NativeGesture
+ \omitvalue WindowChangeInternal
*/
/*!
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h
index e974c4d226..3ee0eaaa61 100644
--- a/src/corelib/kernel/qcoreevent.h
+++ b/src/corelib/kernel/qcoreevent.h
@@ -278,6 +278,8 @@ public:
StyleAnimationUpdate = 213, // style animation target should be updated
ApplicationStateChange = 214,
+ WindowChangeInternal = 215, // internal for QQuickWidget
+
// 512 reserved for Qt Jambi's MetaCall event
// 513 reserved for Qt Jambi's DeleteOnMainThread event
diff --git a/src/corelib/thread/qgenericatomic.h b/src/corelib/thread/qgenericatomic.h
index 0c66d45855..aeed199c97 100644
--- a/src/corelib/thread/qgenericatomic.h
+++ b/src/corelib/thread/qgenericatomic.h
@@ -264,12 +264,8 @@ template <typename BaseClass> struct QGenericAtomicOps
template <typename T> static inline always_inline
T fetchAndSubRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT operand) Q_DECL_NOTHROW
{
- // implement fetchAndSub on top of testAndSet
- Q_FOREVER {
- T tmp = BaseClass::load(_q_value);
- if (BaseClass::testAndSetRelaxed(_q_value, tmp, T(tmp - operand)))
- return tmp;
- }
+ // implement fetchAndSub on top of fetchAndAdd
+ return fetchAndAddRelaxed(_q_value, -operand);
}
template <typename T> static inline always_inline
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index db5c13157c..a12636778e 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -504,22 +504,22 @@ void QThread::usleep(unsigned long usecs)
void QThread::yieldCurrentThread()
{
- std::this_thread::yield();
+ msleep(1);
}
void QThread::sleep(unsigned long secs)
{
- std::this_thread::sleep_for(std::chrono::seconds(secs));
+ msleep(secs * 1000);
}
void QThread::msleep(unsigned long msecs)
{
- std::this_thread::sleep_for(std::chrono::milliseconds(msecs));
+ WaitForSingleObjectEx(GetCurrentThread(), msecs, FALSE);
}
void QThread::usleep(unsigned long usecs)
{
- std::this_thread::sleep_for(std::chrono::microseconds(usecs));
+ msleep((usecs / 1000) + 1);
}
#endif // Q_OS_WINRT
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 52207dcd4e..9c2a242e8e 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -4186,6 +4186,91 @@ QByteArray QByteArray::fromPercentEncoding(const QByteArray &input, char percent
return tmp;
}
+/*! \fn QByteArray QByteArray::fromCFData(CFDataRef data)
+ \since 5.3
+
+ Constructs a new QByteArray containing a copy of the CFData \a data.
+
+ \sa fromRawCFData(), fromRawData(), toRawCFData(), toCFData()
+*/
+
+/*! \fn QByteArray QByteArray::fromRawCFData(CFDataRef data)
+ \since 5.3
+
+ Constructs a QByteArray that uses the bytes of the CFData \a data.
+
+ The \a data's bytes are not copied.
+
+ The caller guarantees that the CFData will not be deleted
+ or modified as long as this QByteArray object exists.
+
+ \sa fromCFData(), fromRawData(), toRawCFData(), toCFData()
+*/
+
+/*! \fn CFDataRef QByteArray::toCFData() const
+ \since 5.3
+
+ Creates a CFData from a QByteArray. The caller owns the CFData object
+ and is responsible for releasing it.
+
+ \sa toRawCFData(), fromCFData(), fromRawCFData(), fromRawData()
+*/
+
+/*! \fn CFDataRef QByteArray::toRawCFData() const
+ \since 5.3
+
+ Constructs a CFData that uses the bytes of the QByteArray.
+
+ The QByteArray's bytes are not copied.
+
+ The caller guarantees that the QByteArray will not be deleted
+ or modified as long as this CFData object exists.
+
+ \sa toCFData(), fromRawCFData(), fromCFData(), fromRawData()
+*/
+
+/*! \fn QByteArray QByteArray::fromNSData(const NSData *data)
+ \since 5.3
+
+ Constructs a new QByteArray containing a copy of the NSData \a data.
+
+ \sa fromRawNSData(), fromRawData(), toNSData(), toRawNSData()
+*/
+
+/*! \fn QByteArray QByteArray::fromRawNSData(const NSData *data)
+ \since 5.3
+
+ Constructs a QByteArray that uses the bytes of the NSData \a data.
+
+ The \a data's bytes are not copied.
+
+ The caller guarantees that the NSData will not be deleted
+ or modified as long as this QByteArray object exists.
+
+ \sa fromNSData(), fromRawData(), toRawNSData(), toNSData()
+*/
+
+/*! \fn NSData QByteArray::toNSData() const
+ \since 5.3
+
+ Creates a NSData from a QByteArray. The NSData object is autoreleased.
+
+ \sa fromNSData(), fromRawNSData(), fromRawData(), toRawNSData()
+*/
+
+/*! \fn NSData QByteArray::toRawNSData() const
+ \since 5.3
+
+ Constructs a NSData that uses the bytes of the QByteArray.
+
+ The QByteArray's bytes are not copied.
+
+ The caller guarantees that the QByteArray will not be deleted
+ or modified as long as this NSData object exists.
+
+ \sa fromRawNSData(), fromNSData(), fromRawData(), toNSData()
+*/
+
static inline bool q_strchr(const char str[], char chr)
{
if (!str) return false;
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index ae8166db81..b0a6971964 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -65,6 +65,12 @@
#endif
+#ifdef Q_OS_MAC
+Q_FORWARD_DECLARE_CF_TYPE(CFData);
+# ifdef __OBJC__
+Q_FORWARD_DECLARE_OBJC_CLASS(NSData);
+# endif
+#endif
QT_BEGIN_NAMESPACE
@@ -354,6 +360,18 @@ public:
static QByteArray fromHex(const QByteArray &hexEncoded);
static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent = '%');
+#if defined(Q_OS_MAC) || defined(Q_QDOC)
+ static QByteArray fromCFData(CFDataRef data);
+ static QByteArray fromRawCFData(CFDataRef data);
+ CFDataRef toCFData() const Q_DECL_CF_RETURNS_RETAINED;
+ CFDataRef toRawCFData() const Q_DECL_CF_RETURNS_RETAINED;
+# if defined(__OBJC__) || defined(Q_QDOC)
+ static QByteArray fromNSData(const NSData *data);
+ static QByteArray fromRawNSData(const NSData *data);
+ NSData *toNSData() const Q_DECL_NS_RETURNS_AUTORELEASED;
+ NSData *toRawNSData() const Q_DECL_NS_RETURNS_AUTORELEASED;
+# endif
+#endif
typedef char *iterator;
typedef const char *const_iterator;
diff --git a/src/corelib/tools/qbytearray_mac.mm b/src/corelib/tools/qbytearray_mac.mm
new file mode 100644
index 0000000000..8bddf20dc6
--- /dev/null
+++ b/src/corelib/tools/qbytearray_mac.mm
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Samuel Gaist <samuel.gaist@edeltech.ch>
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtCore module 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 "qbytearray.h"
+
+#import <Foundation/Foundation.h>
+
+QT_BEGIN_NAMESPACE
+
+QByteArray QByteArray::fromCFData(CFDataRef data)
+{
+ if (!data)
+ return QByteArray();
+
+ return QByteArray(reinterpret_cast<const char *>(CFDataGetBytePtr(data)), CFDataGetLength(data));
+}
+
+QByteArray QByteArray::fromRawCFData(CFDataRef data)
+{
+ if (!data)
+ return QByteArray();
+
+ return QByteArray::fromRawData(reinterpret_cast<const char *>(CFDataGetBytePtr(data)), CFDataGetLength(data));
+}
+
+CFDataRef QByteArray::toCFData() const
+{
+ return CFDataCreate(kCFAllocatorDefault, reinterpret_cast<const UInt8 *>(data()), length());
+}
+
+CFDataRef QByteArray::toRawCFData() const
+{
+ return CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast<const UInt8 *>(data()),
+ length(), kCFAllocatorNull);
+}
+
+QByteArray QByteArray::fromNSData(const NSData *data)
+{
+ if (!data)
+ return QByteArray();
+ return QByteArray(reinterpret_cast<const char *>([data bytes]), [data length]);
+}
+
+QByteArray QByteArray::fromRawNSData(const NSData *data)
+{
+ if (!data)
+ return QByteArray();
+ return QByteArray::fromRawData(reinterpret_cast<const char *>([data bytes]), [data length]);
+}
+
+NSData *QByteArray::toNSData() const
+{
+ return [NSData dataWithBytes:constData() length:size()];
+}
+
+NSData *QByteArray::toRawNSData() const
+{
+ // const_cast is fine here because NSData is immutable thus will never modify bytes we're giving it
+ return [NSData dataWithBytesNoCopy:const_cast<char *>(constData()) length:size() freeWhenDone:NO];
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/tools/qbytearraylist.cpp b/src/corelib/tools/qbytearraylist.cpp
deleted file mode 100644
index 817342d682..0000000000
--- a/src/corelib/tools/qbytearraylist.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 by Southwest Research Institute (R)
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtCore module 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 <qbytearraylist.h>
-
-QT_BEGIN_NAMESPACE
-
-/*! \typedef QByteArrayListIterator
- \relates QByteArrayList
-
- The QByteArrayListIterator type definition provides a Java-style const
- iterator for QByteArrayList.
-
- QByteArrayList provides both \l{Java-style iterators} and
- \l{STL-style iterators}. The Java-style const iterator is simply
- a type definition for QListIterator<QByteArray>.
-
- \sa QMutableByteArrayListIterator, QByteArrayList::const_iterator
-*/
-
-/*! \typedef QMutableByteArrayListIterator
- \relates QByteArrayList
-
- The QByteArrayListIterator type definition provides a Java-style
- non-const iterator for QByteArrayList.
-
- QByteArrayList provides both \l{Java-style iterators} and
- \l{STL-style iterators}. The Java-style non-const iterator is
- simply a type definition for QMutableListIterator<QByteArray>.
-
- \sa QByteArrayListIterator, QByteArrayList::iterator
-*/
-
-/*!
- \class QByteArrayList
- \inmodule QtCore
- \since 5.3
- \brief The QByteArrayList class provides a list of byte arrays.
-
- \ingroup tools
- \ingroup shared
- \ingroup string-processing
-
- \reentrant
-
- QByteArrayList inherits from QList<QByteArray>. Like QList, QByteArrayList is
- \l{implicitly shared}. It provides fast index-based access as well as fast
- insertions and removals. Passing string lists as value parameters is both
- fast and safe.
-
- All of QList's functionality also applies to QByteArrayList. For example, you
- can use isEmpty() to test whether the list is empty, and you can call
- functions like append(), prepend(), insert(), replace(), removeAll(),
- removeAt(), removeFirst(), removeLast(), and removeOne() to modify a
- QByteArrayList. In addition, QByteArrayList provides several join()
- methods for concatenating the list into a single QByteArray.
-
- The purpose of QByteArrayList is quite different from that of QStringList.
- Whereas QStringList has many methods for manipulation of elements within
- the list, QByteArrayList does not.
- Normally, QStringList should be used whenever working with a list of printable
- strings. QByteArrayList should be used to handle and efficiently join large blobs
- of binary data, as when sequentially receiving serialized data through a
- QIODevice.
-
- \sa QByteArray, QStringList
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList()
-
- Constructs an empty byte array list.
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList(const QByteArray &ba)
-
- Constructs a byte array list that contains the given byte array,
- \a ba. Longer lists are easily created like this:
-
- \snippet qbytearraylist/main.cpp 0
-
- \sa append()
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList(const QByteArrayList &other)
-
- Constructs a copy of the \a other byte array list.
-
- This operation takes \l{constant time} because QByteArrayList is
- \l{implicitly shared}, making the process of returning a
- QByteArrayList from a function very fast. If a shared instance is
- modified, it will be copied (copy-on-write), and that takes
- \l{linear time}.
-
- \sa operator=()
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList(const QList<QByteArray> &other)
-
- Constructs a copy of \a other.
-
- This operation takes \l{constant time}, because QByteArrayList is
- \l{implicitly shared}. This makes returning a QByteArrayList from a
- function very fast. If a shared instance is modified, it will be
- copied (copy-on-write), and that takes \l{linear time}.
-
- \sa operator=()
-*/
-
-/*! \fn QByteArrayList::QByteArrayList(std::initializer_list<QByteArray> args)
-
- Construct a list from a std::initializer_list given by \a args.
-
- This constructor is only enabled if the compiler supports C++11 initializer
- lists.
-*/
-
-/*!
- \fn QByteArray QByteArrayList::join() const
-
- Joins all the byte arrays into a single byte array.
-*/
-
-/*!
- \fn QByteArray QByteArrayList::join(const QByteArray &separator) const
-
- Joins all the byte arrays into a single byte array with each
- element separated by the given \a separator.
-*/
-
-int QByteArrayList_joinedSize(const QByteArrayList *that, int seplen)
-{
- int totalLength = 0;
- const int size = that->size();
-
- for (int i = 0; i < size; ++i)
- totalLength += that->at(i).size();
-
- if (size > 0)
- totalLength += seplen * (size - 1);
-
- return totalLength;
-}
-
-/*!
- \fn QByteArray QByteArrayList::join(char separator) const
-
- Joins all the byte arrays into a single byte array with each
- element separated by the given \a separator.
-*/
-QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, const char *sep, int seplen)
-{
- int totalLength = QByteArrayList_joinedSize(that, seplen);
- QByteArray res;
- if (totalLength == 0)
- return res;
- res.reserve(totalLength);
- for (int i = 0; i < that->size(); ++i) {
- if (i)
- res.append(sep, seplen);
- res += that->at(i);
- }
- return res;
-}
-
-/*!
- \fn QByteArrayList operator+(const QByteArrayList &list1, const QByteArrayList &list2)
- \relates QByteArrayList
-
- Returns a byte array list that is the concatenation of \a list1 and \a list2.
-*/
-
-/*!
- \fn QByteArrayList& operator+=(QByteArrayList &list1, const QByteArrayList &list2)
- \relates QByteArrayList
-
- Appends \a list2 to \a list1 and returns a reference to \a list1.
-*/
-
-/*!
- \fn QByteArrayList &QByteArrayList::operator<<(const QByteArray &ba)
-
- Appends the given byte array, \a ba, to this byte array list and returns
- a reference to the byte array list.
-
- \sa append()
-*/
-
-/*!
- \fn QByteArrayList &QByteArrayList::operator<<(const QByteArrayList &other)
-
- \overload
-
- Appends the \a other byte array list to the byte array list and returns a reference to
- the latter byte array list.
-*/
-
-/*!
- \fn QDataStream &operator>>(QDataStream &in, QByteArrayList &list)
- \relates QByteArrayList
-
- Reads a byte array list from the given \a in stream into the specified
- \a list.
-
- \sa {Serializing Qt Data Types}
-*/
-
-/*!
- \fn QDataStream &operator<<(QDataStream &out, const QByteArrayList &list)
- \relates QByteArrayList
-
- Writes the given byte array \a list to the specified \a out stream.
-
- \sa {Serializing Qt Data Types}
-*/
-
-QT_END_NAMESPACE
diff --git a/src/corelib/tools/qbytearraylist.h b/src/corelib/tools/qbytearraylist.h
deleted file mode 100644
index 882bc68f09..0000000000
--- a/src/corelib/tools/qbytearraylist.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 by Southwest Research Institute (R)
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtCore module 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 QBYTEARRAYLIST_H
-#define QBYTEARRAYLIST_H
-
-#include <QtCore/qdatastream.h>
-#include <QtCore/qlist.h>
-#include <QtCore/qbytearray.h>
-
-QT_BEGIN_NAMESPACE
-
-
-typedef QListIterator<QByteArray> QByteArrayListIterator;
-typedef QMutableListIterator<QByteArray> QMutableByteArrayListIterator;
-
-class QByteArrayList : public QList<QByteArray>
-{
-public:
- inline QByteArrayList() { }
- inline explicit QByteArrayList(const QByteArray &i) { append(i); }
- inline QByteArrayList(const QByteArrayList &l) : QList<QByteArray>(l) { }
- inline QByteArrayList(const QList<QByteArray> &l) : QList<QByteArray>(l) { }
-#ifdef Q_COMPILER_INITIALIZER_LISTS
- inline QByteArrayList(std::initializer_list<QByteArray> args) : QList<QByteArray>(args) { }
-#endif
-
- inline QByteArray join() const;
- inline QByteArray join(const QByteArray &sep) const;
- inline QByteArray join(char sep) const;
-
- inline QByteArrayList &operator<<(const QByteArray &str)
- { append(str); return *this; }
- inline QByteArrayList &operator<<(const QByteArrayList &l)
- { *this += l; return *this; }
-};
-
-Q_DECLARE_TYPEINFO(QByteArrayList, Q_MOVABLE_TYPE);
-
-namespace QtPrivate {
- QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *s, int l);
-}
-
-inline QByteArray QByteArrayList::join() const
-{
- return QtPrivate::QByteArrayList_join(this, 0, 0);
-}
-
-inline QByteArray QByteArrayList::join(const QByteArray &sep) const
-{
- return QtPrivate::QByteArrayList_join(this, sep.constData(), sep.size());
-}
-
-inline QByteArray QByteArrayList::join(char sep) const
-{
- return QtPrivate::QByteArrayList_join(this, &sep, 1);
-}
-
-inline QByteArrayList operator+(const QByteArrayList &lhs, const QByteArrayList &rhs)
-{
- QByteArrayList res = lhs;
- res += rhs;
- return res;
-}
-
-inline QByteArrayList& operator+=(QByteArrayList &lhs, const QByteArrayList &rhs)
-{
- lhs.append( rhs );
- return lhs;
-}
-
-#ifndef QT_NO_DATASTREAM
-inline QDataStream &operator>>(QDataStream &in, QByteArrayList &list)
-{
- return operator>>(in, static_cast<QList<QByteArray> &>(list));
-}
-inline QDataStream &operator<<(QDataStream &out, const QByteArrayList &list)
-{
- return operator<<(out, static_cast<const QList<QByteArray> &>(list));
-}
-#endif // QT_NO_DATASTREAM
-
-QT_END_NAMESPACE
-
-#endif // QBYTEARRAYLIST_H
diff --git a/src/corelib/tools/qdatetimeparser_p.h b/src/corelib/tools/qdatetimeparser_p.h
index 2b4f59a23a..e2513b43a5 100644
--- a/src/corelib/tools/qdatetimeparser_p.h
+++ b/src/corelib/tools/qdatetimeparser_p.h
@@ -241,7 +241,7 @@ public:
3. User increments month: 31/03/2000
At step 1, cachedDay stores 31. At step 2, the 31 is invalid for February, so the cachedDay is not updated.
- At step 3, the the month is changed to March, for which 31 is a valid day. Since 29 < 31, the day is set to cachedDay.
+ At step 3, the month is changed to March, for which 31 is a valid day. Since 29 < 31, the day is set to cachedDay.
This is good for when users have selected their desired day and are scrolling up or down in the month or year section
and do not want smaller months (or non-leap years) to alter the day that they chose.
*/
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index 2708901866..409ebd1de5 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -1232,6 +1232,8 @@ void QEasingCurve::setOvershoot(qreal overshoot)
It is only applicable if type() is QEasingCurve::BezierSpline.
Note that the spline implicitly starts at (0.0, 0.0) and has to end at (1.0, 1.0) to
be a valid easing curve.
+ \a c1 and \a c2 are the control points used for drawing the curve.
+ \a endPoint is the endpoint of the curve.
*/
void QEasingCurve::addCubicBezierSegment(const QPointF & c1, const QPointF & c2, const QPointF & endPoint)
{
@@ -1290,8 +1292,12 @@ QVector<QPointF> static inline tcbToBezier(const TCBPoints &tcbPoints)
It is only applicable if type() is QEasingCurve::TCBSpline.
The spline has to start explitly at (0.0, 0.0) and has to end at (1.0, 1.0) to
be a valid easing curve.
- The three parameters are called tension, continuity and bias. All three parameters are
- valid between -1 and 1 and define the tangent of the control point.
+ The tension \a t changes the length of the tangent vector.
+ The continuity \a c changes the sharpness in change between the tangents.
+ The bias \a b changes the direction of the tangent vector.
+ \a nextPoint is the sample position.
+ All three parameters are valid between -1 and 1 and define the
+ tangent of the control point.
If all three parameters are 0 the resulting spline is a Catmull-Rom spline.
The begin and endpoint always have a bias of -1 and 1, since the outer tangent is not defined.
*/
@@ -1390,7 +1396,7 @@ void QEasingCurve::setType(Type type)
/*!
Sets a custom easing curve that is defined by the user in the function \a func.
The signature of the function is qreal myEasingFunction(qreal progress),
- where \e progress and the return value is considered to be normalized between 0 and 1.
+ where \e progress and the return value are considered to be normalized between 0 and 1.
(In some cases the return value can be outside that range)
After calling this function type() will return QEasingCurve::Custom.
\a func cannot be zero.
@@ -1420,8 +1426,8 @@ QEasingCurve::EasingFunction QEasingCurve::customType() const
/*!
Return the effective progress for the easing curve at \a progress.
- While \a progress must be between 0 and 1, the returned effective progress
- can be outside those bounds. For instance, QEasingCurve::InBack will
+ Whereas \a progress must be between 0 and 1, the returned effective progress
+ can be outside those bounds. For example, QEasingCurve::InBack will
return negative values in the beginning of the function.
*/
qreal QEasingCurve::valueForProgress(qreal progress) const
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 116da9e383..7547ba8c19 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -1617,7 +1617,7 @@ void QString::resize(int size)
This function is useful for code that needs to build up a long
string and wants to avoid repeated reallocation. In this example,
- we want to add to the string until some condition is true, and
+ we want to add to the string until some condition is \c true, and
we're fairly sure that size is large enough to make a call to
reserve() worthwhile:
@@ -2534,6 +2534,9 @@ bool QString::operator==(QLatin1String other) const
QT_NO_CAST_FROM_ASCII when you compile your applications. This
can be useful if you want to ensure that all user-visible strings
go through QObject::tr(), for example.
+
+ Returns \c true if this string is lexically equal to the parameter
+ string \a other. Otherwise returns \c false.
*/
/*! \fn bool QString::operator==(const char *other) const
@@ -2563,9 +2566,11 @@ bool operator<(const QString &s1, const QString &s2)
{
return ucstrcmp(s1.constData(), s1.length(), s2.constData(), s2.length()) < 0;
}
-
/*!
- \overload operator<()
+ \overload operator<()
+ \relates QString
+ Returns \c true if this string is lexically less than the parameter
+ string called \a other; otherwise returns \c false.
*/
bool QString::operator<(QLatin1String other) const
{
@@ -2592,6 +2597,9 @@ bool QString::operator<(QLatin1String other) const
/*! \fn bool QString::operator<(const char *other) const
+ Returns \c true if this string is lexically less than string \a other.
+ Otherwise returns \c false.
+
\overload operator<()
The \a other const char pointer is converted to a QString using
@@ -2616,6 +2624,9 @@ bool QString::operator<(QLatin1String other) const
/*! \fn bool QString::operator<=(QLatin1String other) const
+ Returns \c true if this string is lexically less than or equal to
+ parameter string \a other. Otherwise returns \c false.
+
\overload operator<=()
*/
@@ -2658,7 +2669,10 @@ bool QString::operator<(QLatin1String other) const
*/
/*!
- \overload operator>()
+ \overload operator>()
+ \relates QString
+ Returns \c true if this string is lexically greater than the parameter
+ string \a other; otherwise returns \c false.
*/
bool QString::operator>(QLatin1String other) const
{
@@ -2710,6 +2724,9 @@ bool QString::operator>(QLatin1String other) const
/*! \fn bool QString::operator>=(QLatin1String other) const
+ Returns \c true if this string is lexically greater than or equal to parameter
+ string \a other. Otherwise returns \c false.
+
\overload operator>=()
*/
@@ -2754,6 +2771,9 @@ bool QString::operator>(QLatin1String other) const
/*! \fn bool QString::operator!=(QLatin1String other) const
+ Returns \c true if this string is not equal to parameter string \a other.
+ Otherwise returns \c false.
+
\overload operator!=()
*/
@@ -4082,7 +4102,7 @@ QString QString::mid(int position, int n) const
/*!
Returns \c true if the string starts with \a s; otherwise returns
- false.
+ \c false.
If \a cs is Qt::CaseSensitive (default), the search is
case sensitive; otherwise the search is case insensitive.
@@ -4109,7 +4129,7 @@ bool QString::startsWith(QLatin1String s, Qt::CaseSensitivity cs) const
\overload startsWith()
Returns \c true if the string starts with \a c; otherwise returns
- false.
+ \c false.
*/
bool QString::startsWith(QChar c, Qt::CaseSensitivity cs) const
{
@@ -4138,7 +4158,7 @@ bool QString::startsWith(const QStringRef &s, Qt::CaseSensitivity cs) const
/*!
Returns \c true if the string ends with \a s; otherwise returns
- false.
+ \c false.
If \a cs is Qt::CaseSensitive (default), the search is case
sensitive; otherwise the search is case insensitive.
@@ -4181,7 +4201,7 @@ bool QString::endsWith(QLatin1String s, Qt::CaseSensitivity cs) const
/*!
Returns \c true if the string ends with \a c; otherwise returns
- false.
+ \c false.
\overload endsWith()
*/
@@ -4581,7 +4601,7 @@ QString& QString::setUnicode(const QChar *unicode, int size)
replaced with a single space.
Whitespace means any character for which QChar::isSpace() returns
- true. This includes the ASCII characters '\\t', '\\n', '\\v',
+ \c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
Example:
@@ -4671,7 +4691,7 @@ QString QString::simplified() const
the end.
Whitespace means any character for which QChar::isSpace() returns
- true. This includes the ASCII characters '\\t', '\\n', '\\v',
+ \c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
Example:
@@ -4866,7 +4886,7 @@ QString& QString::fill(QChar ch, int size)
/*! \fn bool QString::isEmpty() const
Returns \c true if the string has no characters; otherwise returns
- false.
+ \c false.
Example:
@@ -4981,7 +5001,7 @@ QString& QString::fill(QChar ch, int size)
\relates QString
Returns \c true if \a s1 is not equal to \a s2; otherwise returns
- false.
+ \c false.
For \a s1 != 0, this is equivalent to \c {compare(} \a s1, \a s2
\c {) != 0}. Note that no string is equal to \a s1 being 0.
@@ -5389,12 +5409,12 @@ const ushort *QString::utf16() const
Returns a string of size \a width that contains this string
padded by the \a fill character.
- If \a truncate is false and the size() of the string is more than
+ If \a truncate is \c false and the size() of the string is more than
\a width, then the returned string is a copy of the string.
\snippet qstring/main.cpp 32
- If \a truncate is true and the size() of the string is more than
+ If \a truncate is \c true and the size() of the string is more than
\a width, then any characters in a copy of the string after
position \a width are removed, and the copy is returned.
@@ -5430,7 +5450,7 @@ QString QString::leftJustified(int width, QChar fill, bool truncate) const
\snippet qstring/main.cpp 49
- If \a truncate is false and the size() of the string is more than
+ If \a truncate is \c false and the size() of the string is more than
\a width, then the returned string is a copy of the string.
If \a truncate is true and the size() of the string is more than
@@ -6053,8 +6073,8 @@ QString &QString::vsprintf(const char* cformat, va_list ap)
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6093,8 +6113,8 @@ qlonglong QString::toIntegral_helper(const QChar *data, int len, bool *ok, int b
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6134,8 +6154,8 @@ qulonglong QString::toIntegral_helper(const QChar *data, uint len, bool *ok, int
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6163,8 +6183,8 @@ long QString::toLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6191,8 +6211,8 @@ ulong QString::toULong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6218,8 +6238,8 @@ int QString::toInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6245,8 +6265,8 @@ uint QString::toUInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6272,8 +6292,8 @@ short QString::toShort(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6300,8 +6320,8 @@ ushort QString::toUShort(bool *ok, int base) const
Returns 0.0 if the conversion fails.
- If a conversion error occurs, \c{*}\a{ok} is set to false;
- otherwise \c{*}\a{ok} is set to true.
+ If a conversion error occurs, \c{*}\a{ok} is set to \c false;
+ otherwise \c{*}\a{ok} is set to \c true.
\snippet qstring/main.cpp 66
@@ -6332,8 +6352,8 @@ double QString::toDouble(bool *ok) const
/*!
Returns the string converted to a \c float value.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true. Returns 0.0 if the conversion fails.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true. Returns 0.0 if the conversion fails.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toFloat()
@@ -8276,7 +8296,7 @@ ownership of it, no memory is freed when instances are destroyed.
\fn bool QStringRef::isEmpty() const
Returns \c true if the string reference has no characters; otherwise returns
- false.
+ \c false.
A string reference is empty if its size is zero.
@@ -9523,7 +9543,7 @@ QVector<uint> QStringRef::toUcs4() const
the end.
Whitespace means any character for which QChar::isSpace() returns
- true. This includes the ASCII characters '\\t', '\\n', '\\v',
+ \c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
Unlike QString::simplified(), trimmed() leaves internal whitespace alone.
@@ -9555,8 +9575,8 @@ QStringRef QStringRef::trimmed() const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9580,8 +9600,8 @@ qint64 QStringRef::toLongLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9607,8 +9627,8 @@ quint64 QStringRef::toULongLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9634,8 +9654,8 @@ long QStringRef::toLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9660,8 +9680,8 @@ ulong QStringRef::toULong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9685,8 +9705,8 @@ int QStringRef::toInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9710,8 +9730,8 @@ uint QStringRef::toUInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9735,8 +9755,8 @@ short QStringRef::toShort(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9761,8 +9781,8 @@ ushort QStringRef::toUShort(bool *ok, int base) const
Returns 0.0 if the conversion fails.
- If a conversion error occurs, \c{*}\a{ok} is set to false;
- otherwise \c{*}\a{ok} is set to true.
+ If a conversion error occurs, \c{*}\a{ok} is set to \c false;
+ otherwise \c{*}\a{ok} is set to \c true.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toDouble()
@@ -9784,8 +9804,8 @@ double QStringRef::toDouble(bool *ok) const
/*!
Returns the string converted to a \c float value.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true. Returns 0.0 if the conversion fails.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true. Returns 0.0 if the conversion fails.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toFloat()
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index 05d9258c86..73036ceaed 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -189,6 +189,8 @@
/*! \fn bool QVarLengthArray::empty() const
\since 5.0
+ Returns \c true if the array has size 0; otherwise returns \c false.
+
Same as isEmpty(). Provided for STL-compatibility.
*/
@@ -285,7 +287,8 @@
\fn void QVarLengthArray::push_back(const T &t)
\since 5.0
- Same as append(). Provided for STL-compatibility.
+ Appends item \a t to the array, extending the array if necessary.
+ Provided for STL-compatibility.
*/
/*!
@@ -665,8 +668,7 @@
/*! \fn QVarLengthArray &QVarLengthArray::operator+=(const T &value)
\since 4.8
- Appends \a value to the array and returns a reference to this
- vector.
+ Appends \a value to the array and returns a reference to this vector.
\sa append(), operator<<()
*/
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index 4beb0f939c..89396540e0 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -565,6 +565,7 @@
/*! \fn void QVector::removeAt(int i)
\since 5.2
+ Removes the element at index position \a i.
Equivalent to
\code
remove(i);
@@ -588,6 +589,8 @@
/*! \fn T QVector::takeAt(int i)
\since 5.2
+ Removes the element at index position \a i and returns it.
+
Equivalent to
\code
T t = at(i);
@@ -907,7 +910,7 @@
/*! \fn bool QVector::empty() const
This function is provided for STL compatibility. It is equivalent
- to isEmpty(), returning true if the vector is empty; otherwise
+ to isEmpty(), returning \c true if the vector is empty; otherwise
returns \c false.
*/
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 1e4a503778..863cf03439 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -9,7 +9,6 @@ HEADERS += \
tools/qarraydatapointer.h \
tools/qbitarray.h \
tools/qbytearray.h \
- tools/qbytearraylist.h \
tools/qbytearraymatcher.h \
tools/qbytedata_p.h \
tools/qcache.h \
@@ -78,7 +77,6 @@ SOURCES += \
tools/qarraydata.cpp \
tools/qbitarray.cpp \
tools/qbytearray.cpp \
- tools/qbytearraylist.cpp \
tools/qbytearraymatcher.cpp \
tools/qcollator.cpp \
tools/qcommandlineoption.cpp \
@@ -127,7 +125,8 @@ false: SOURCES += $$NO_PCH_SOURCES # Hack for QtCreator
SOURCES += tools/qelapsedtimer_mac.cpp
OBJECTIVE_SOURCES += tools/qlocale_mac.mm \
tools/qtimezoneprivate_mac.mm \
- tools/qstring_mac.mm
+ tools/qstring_mac.mm \
+ tools/qbytearray_mac.mm
}
else:blackberry {
SOURCES += tools/qelapsedtimer_unix.cpp tools/qlocale_blackberry.cpp tools/qtimezoneprivate_tz.cpp
diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp
index 83a544c4e3..6157694d12 100644
--- a/src/dbus/qdbusargument.cpp
+++ b/src/dbus/qdbusargument.cpp
@@ -605,6 +605,8 @@ const QDBusArgument &QDBusArgument::operator>>(uchar &arg) const
{
if (QDBusArgumentPrivate::checkReadAndDetach(d))
arg = d->demarshaller()->toByte();
+ else
+ arg = 0;
return *this;
}
@@ -617,6 +619,8 @@ const QDBusArgument &QDBusArgument::operator>>(bool &arg) const
{
if (QDBusArgumentPrivate::checkReadAndDetach(d))
arg = d->demarshaller()->toBool();
+ else
+ arg = false;
return *this;
}
@@ -629,6 +633,8 @@ const QDBusArgument &QDBusArgument::operator>>(ushort &arg) const
{
if (QDBusArgumentPrivate::checkReadAndDetach(d))
arg = d->demarshaller()->toUShort();
+ else
+ arg = 0;
return *this;
}
@@ -641,6 +647,8 @@ const QDBusArgument &QDBusArgument::operator>>(short &arg) const
{
if (QDBusArgumentPrivate::checkReadAndDetach(d))
arg = d->demarshaller()->toShort();
+ else
+ arg = 0;
return *this;
}
@@ -653,6 +661,8 @@ const QDBusArgument &QDBusArgument::operator>>(int &arg) const
{
if (QDBusArgumentPrivate::checkReadAndDetach(d))
arg = d->demarshaller()->toInt();
+ else
+ arg = 0;
return *this;
}
@@ -665,6 +675,8 @@ const QDBusArgument &QDBusArgument::operator>>(uint &arg) const
{
if (QDBusArgumentPrivate::checkReadAndDetach(d))
arg = d->demarshaller()->toUInt();
+ else
+ arg = 0;
return *this;
}
@@ -677,6 +689,8 @@ const QDBusArgument &QDBusArgument::operator>>(qlonglong &arg) const
{
if (QDBusArgumentPrivate::checkReadAndDetach(d))
arg = d->demarshaller()->toLongLong();
+ else
+ arg = 0;
return *this;
}
@@ -689,6 +703,8 @@ const QDBusArgument &QDBusArgument::operator>>(qulonglong &arg) const
{
if (QDBusArgumentPrivate::checkReadAndDetach(d))
arg = d->demarshaller()->toULongLong();
+ else
+ arg = 0;
return *this;
}
@@ -701,6 +717,8 @@ const QDBusArgument &QDBusArgument::operator>>(double &arg) const
{
if (QDBusArgumentPrivate::checkReadAndDetach(d))
arg = d->demarshaller()->toDouble();
+ else
+ arg = 0;
return *this;
}
diff --git a/src/dbus/qdbusvirtualobject.cpp b/src/dbus/qdbusvirtualobject.cpp
index 15e01c2f20..fb9599f193 100644
--- a/src/dbus/qdbusvirtualobject.cpp
+++ b/src/dbus/qdbusvirtualobject.cpp
@@ -71,7 +71,8 @@ QT_END_NAMESPACE
This function needs to handle all messages to the path of the
virtual object, when the SubPath option is specified.
The service, path, interface and methos are all part of the \a message.
- Must return true when the message is handled, otherwise false (will generate dbus error message).
+ Parameter \a connection is the connection handle.
+ Must return \c true when the message is handled, otherwise \c false (will generate dbus error message).
*/
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 9bd33d1f57..f083245809 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -18,8 +18,6 @@ win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) {
\$\$QT_MODULE_INCLUDE_BASE/QtANGLE
}
-contains(QT_CONFIG, dynamicgl): DEFINES += QT_OPENGL_DYNAMIC_IN_GUI
-
load(qt_module)
# Code coverage with TestCocoon
@@ -32,7 +30,7 @@ testcocoon {
mac:!ios: LIBS_PRIVATE += -framework Cocoa
-CONFIG += simd
+CONFIG += simd optimize_full
include(accessible/accessible.pri)
include(kernel/kernel.pri)
@@ -86,7 +84,7 @@ contains(QT_CONFIG, angle) {
} else:contains(QT_CONFIG, opengl) {
!isEmpty(QMAKE_INCDIR_OPENGL): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL)
CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL)
- CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL)
+ !contains(QT_CONFIG, dynamicgl): CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL)
!isEmpty(QMAKE_LIBDIR_OPENGL): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL)
CMAKE_GL_HEADER_NAME = GL/gl.h
mac: CMAKE_GL_HEADER_NAME = gl.h
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 7759e812cb..295380a93c 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -3295,11 +3295,14 @@ QDebug operator<<(QDebug dbg, const QEvent *e) {
n = "MouseButtonDblClick";
break;
}
- dbg.nospace() << "QMouseEvent(" << n
+ QDebug nsp = dbg.nospace();
+ nsp << "QMouseEvent(" << n
<< ", " << me->button()
<< ", " << hex << (int)me->buttons()
- << ", " << hex << (int)me->modifiers()
- << ')';
+ << ", " << hex << (int)me->modifiers() << dec;
+ if (const Qt::MouseEventSource source = me->source())
+ nsp << ", source = " << source;
+ nsp << ')';
}
return dbg.space();
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index c587e51299..c6376b2647 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -145,7 +145,7 @@ ulong QGuiApplicationPrivate::mousePressTime = 0;
Qt::MouseButton QGuiApplicationPrivate::mousePressButton = Qt::NoButton;
int QGuiApplicationPrivate::mousePressX = 0;
int QGuiApplicationPrivate::mousePressY = 0;
-int QGuiApplicationPrivate::mouse_double_click_distance = 5;
+int QGuiApplicationPrivate::mouse_double_click_distance = -1;
static Qt::LayoutDirection layout_direction = Qt::LeftToRight;
static bool force_reverse = false;
@@ -910,7 +910,7 @@ qreal QGuiApplication::devicePixelRatio() const
}
/*!
- Returns the top level window at the given position, if any.
+ Returns the top level window at the given position \a pos, if any.
*/
QWindow *QGuiApplication::topLevelAt(const QPoint &pos)
{
@@ -1007,16 +1007,17 @@ static void init_platform(const QString &pluginArgument, const QString &platform
if (!platformThemeName.isEmpty())
themeNames.append(platformThemeName);
- // 2) Ask the platform integration for a list of names and try loading them.
+ // 2) Ask the platform integration for a list of theme names
themeNames += QGuiApplicationPrivate::platform_integration->themeNames();
+ // 3) Look for a theme plugin.
foreach (const QString &themeName, themeNames) {
QGuiApplicationPrivate::platform_theme = QPlatformThemeFactory::create(themeName, platformPluginPath);
if (QGuiApplicationPrivate::platform_theme)
break;
}
- // 3) If none found, look for a theme plugin. Theme plugins are located in the
- // same directory as platform plugins.
+ // 4) If no theme plugin was found ask the platform integration to
+ // create a theme
if (!QGuiApplicationPrivate::platform_theme) {
foreach (const QString &themeName, themeNames) {
QGuiApplicationPrivate::platform_theme = QGuiApplicationPrivate::platform_integration->createPlatformTheme(themeName);
@@ -1026,7 +1027,7 @@ static void init_platform(const QString &pluginArgument, const QString &platform
// No error message; not having a theme plugin is allowed.
}
- // 4) Fall back on the built-in "null" platform theme.
+ // 5) Fall back on the built-in "null" platform theme.
if (!QGuiApplicationPrivate::platform_theme)
QGuiApplicationPrivate::platform_theme = new QPlatformTheme;
@@ -1254,6 +1255,8 @@ void QGuiApplicationPrivate::init()
initPalette();
QFont::initialize();
+ mouse_double_click_distance = platformTheme()->themeHint(QPlatformTheme::MouseDoubleClickDistance).toInt();
+
#ifndef QT_NO_CURSOR
QCursorData::initialize();
#endif
@@ -2708,7 +2711,7 @@ void QGuiApplicationPrivate::notifyWindowIconChanged()
\brief whether the application implicitly quits when the last window is
closed.
- The default is true.
+ The default is \c true.
If this property is \c true, the applications quits when the last visible
primary window (i.e. window with no parent) is closed.
@@ -2736,7 +2739,7 @@ bool QGuiApplication::quitOnLastWindowClosed()
primary window (i.e. window with no parent) is closed.
By default, QGuiApplication quits after this signal is emitted. This feature
- can be turned off by setting \l quitOnLastWindowClosed to false.
+ can be turned off by setting \l quitOnLastWindowClosed to \c false.
\sa QWindow::close(), QWindow::isTopLevel()
*/
@@ -2912,7 +2915,7 @@ void QGuiApplicationPrivate::setApplicationState(Qt::ApplicationState state)
Returns \c true if the application is currently saving the
\l{Session Management}{session}; otherwise returns \c false.
- This is true when commitDataRequest() and saveStateRequest() are emitted,
+ This is \c true when commitDataRequest() and saveStateRequest() are emitted,
but also when the windows are closed afterwards by session management.
\sa sessionId(), commitDataRequest(), saveStateRequest()
@@ -3183,7 +3186,7 @@ QStyleHints *QGuiApplication::styleHints()
/*!
Sets whether Qt should use the system's standard colors, fonts, etc., to
- \a on. By default, this is true.
+ \a on. By default, this is \c true.
This function must be called before creating the QGuiApplication object, like
this:
@@ -3199,7 +3202,7 @@ void QGuiApplication::setDesktopSettingsAware(bool on)
/*!
Returns \c true if Qt is set to use the system's standard colors, fonts, etc.;
- otherwise returns \c false. The default is true.
+ otherwise returns \c false. The default is \c true.
\sa setDesktopSettingsAware()
*/
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 7257663799..fb7d15c160 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -52,6 +52,7 @@
#include <QtGui/private/qopengl_p.h>
#include <QtGui/private/qwindow_p.h>
#include <QtGui/QScreen>
+#include <qpa/qplatformnativeinterface.h>
#include <private/qopenglextensions_p.h>
#include <private/qopenglversionfunctionsfactory_p.h>
@@ -162,7 +163,7 @@ void QOpenGLVersionProfile::setVersion(int majorVersion, int minorVersion)
}
/*!
- Returns the OpenGL profile. Only make sense if profiles are supported by this version.
+ Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
\sa setProfile(), supportsProfiles()
*/
@@ -172,7 +173,8 @@ QSurfaceFormat::OpenGLContextProfile QOpenGLVersionProfile::profile() const
}
/*!
- Sets the profile. Only make sense if profiles are supported by this version.
+ Sets the OpenGL profile \a profile. Only makes sense if profiles are supported by
+ this version.
\sa profile(), supportsProfiles()
*/
@@ -204,7 +206,7 @@ bool QOpenGLVersionProfile::isLegacyVersion() const
/*!
Returns \c true if the version number is valid. Note that for a default constructed
- QOpenGLVersionProfile object this function will return false.
+ QOpenGLVersionProfile object this function will return \c false.
\sa setVersion(), version()
*/
@@ -256,12 +258,10 @@ QMutex QOpenGLContextPrivate::makeCurrentTrackerMutex;
rendering a new frame, after calling swapBuffers().
If the context is temporarily not needed, such as when the application is
- not rendering, it can be useful to call destroy() to free resources.
- However, if you do so you will need to call create() again before the
- context can be used, and you might need to recreate any OpenGL resources
- and reinitialize the OpenGL state. You can connect to the
- aboutToBeDestroyed() signal to clean up any resources that have been
- allocated with different ownership from the QOpenGLContext itself.
+ not rendering, it can be useful to delete it in order to free resources.
+ You can connect to the aboutToBeDestroyed() signal to clean up any
+ resources that have been allocated with different ownership from the
+ QOpenGLContext itself.
Once a QOpenGLContext has been made current, you can render to it in a
platform independent way by using Qt's OpenGL enablers such as
@@ -335,16 +335,18 @@ int QOpenGLContextPrivate::maxTextureSize()
if (max_texture_size != -1)
return max_texture_size;
- glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
+ Q_Q(QOpenGLContext);
+ QOpenGLFunctions *funcs = q->functions();
+ funcs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
#ifndef QT_OPENGL_ES
- if (!QOpenGLFunctions::isES()) {
+ if (!q->isES()) {
GLenum proxy = GL_PROXY_TEXTURE_2D;
GLint size;
GLint next = 64;
- glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
- glGetTexLevelParameteriv(proxy, 0, GL_TEXTURE_WIDTH, &size);
+ funcs->glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ funcs->glGetTexLevelParameteriv(proxy, 0, GL_TEXTURE_WIDTH, &size);
if (size == 0) {
return max_texture_size;
}
@@ -354,8 +356,8 @@ int QOpenGLContextPrivate::maxTextureSize()
if (next > max_texture_size)
break;
- glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
- glGetTexLevelParameteriv(proxy, 0, GL_TEXTURE_WIDTH, &next);
+ funcs->glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ funcs->glGetTexLevelParameteriv(proxy, 0, GL_TEXTURE_WIDTH, &next);
} while (next > size);
max_texture_size = size;
@@ -633,9 +635,9 @@ QOpenGLFunctions *QOpenGLContext::functions() const
*/
/*!
- Returns a pointer to an object that provides access to all functions for
- the version of the current context. Before using any of the functions
- they must be initialized by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions().
+ Returns a pointer to an object that provides access to all functions for the
+ \a versionProfile of the current context. Before using any of the functions they must
+ be initialized by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions().
Usually one would use the template version of this function to automatically
have the result cast to the correct type.
@@ -643,8 +645,8 @@ QOpenGLFunctions *QOpenGLContext::functions() const
QAbstractOpenGLFunctions *QOpenGLContext::versionFunctions(const QOpenGLVersionProfile &versionProfile) const
{
#ifndef QT_OPENGL_ES_2
- if (QOpenGLFunctions::isES()) {
- qWarning("versionFunctions: Not supported on dynamic GL ES");
+ if (isES()) {
+ qWarning("versionFunctions: Not supported on OpenGL ES");
return 0;
}
#endif // QT_OPENGL_ES_2
@@ -703,7 +705,7 @@ QSet<QByteArray> QOpenGLContext::extensions() const
/*!
Returns \c true if this OpenGL context supports the specified OpenGL
- \a extension, false otherwise.
+ \a extension, \c false otherwise.
The context or a sharing context must be current.
@@ -864,7 +866,7 @@ void QOpenGLContext::swapBuffers(QSurface *surface)
qWarning() << "QOpenGLContext::swapBuffers() called without corresponding makeCurrent()";
#endif
if (surface->format().swapBehavior() == QSurfaceFormat::SingleBuffer)
- glFlush();
+ functions()->glFlush();
d->platformGLContext->swapBuffers(surfaceHandle);
}
@@ -885,6 +887,20 @@ QFunctionPointer QOpenGLContext::getProcAddress(const QByteArray &procName) cons
Returns the format of the underlying platform context, if create() has been called.
Otherwise, returns the requested format.
+
+ The requested and the actual format may differ. Requesting a given OpenGL version does
+ not mean the resulting context will target exactly the requested version. It is only
+ guaranteed that the version/profile/options combination for the created context is
+ compatible with the request, as long as the driver is able to provide such a context.
+
+ For example, requesting an OpenGL version 3.x core profile context may result in an
+ OpenGL 4.x core profile context. Similarly, a request for OpenGL 2.1 may result in an
+ OpenGL 3.0 context with deprecated functions enabled. Finally, depending on the
+ driver, unsupported versions may result in either a context creation failure or in a
+ context for the highest supported version.
+
+ Similar differences are possible in the buffer sizes, for example, the resulting
+ context may have a larger depth buffer than requested. This is perfectly normal.
*/
QSurfaceFormat QOpenGLContext::format() const
{
@@ -960,6 +976,88 @@ void QOpenGLContext::deleteQGLContext()
}
/*!
+ Returns the platform-specific handle for the OpenGL implementation that
+ is currently in use. (for example, a HMODULE on Windows)
+
+ On platforms that do not use dynamic GL switch the return value is null.
+
+ The library might be GL-only, meaning that windowing system interface
+ functions (for example EGL) may live in another, separate library.
+
+ \note This function requires that the QGuiApplication instance is already created.
+
+ \sa openGLModuleType()
+
+ \since 5.3
+ */
+void *QOpenGLContext::openGLModuleHandle()
+{
+#ifdef QT_OPENGL_DYNAMIC
+ QGuiApplication *app = qGuiApp;
+ Q_ASSERT(app);
+ return app->platformNativeInterface()->nativeResourceForIntegration(QByteArrayLiteral("glhandle"));
+#else
+ return 0;
+#endif
+}
+
+/*!
+ \enum QOpenGLContext::OpenGLModuleType
+ This enum defines the type of the underlying OpenGL implementation.
+
+ \value DesktopGL Desktop OpenGL
+ \value GLES2 OpenGL ES 2.0 or higher
+ \value GLES1 OpenGL ES 1.x
+
+ \since 5.3
+*/
+
+/*!
+ Returns the underlying OpenGL implementation type.
+
+ On platforms where the OpenGL implementation is not dynamically
+ loaded, the return value is determined during compile time and never
+ changes.
+
+ \note A desktop OpenGL implementation may be capable of creating
+ ES-compatible contexts too. Therefore in most cases it is more
+ appropriate to check QSurfaceFormat::renderableType() or using the
+ the convenience function isES().
+
+ \note This function requires that the QGuiApplication instance is already created.
+
+ \since 5.3
+ */
+QOpenGLContext::OpenGLModuleType QOpenGLContext::openGLModuleType()
+{
+#if defined(QT_OPENGL_DYNAMIC)
+ Q_ASSERT(qGuiApp);
+ return QGuiApplicationPrivate::instance()->platformIntegration()->openGLModuleType();
+#elif defined(QT_OPENGL_ES_2)
+ return GLES2;
+#elif defined(QT_OPENGL_ES)
+ return GLES1;
+#else
+ return DesktopGL;
+#endif
+}
+
+/*!
+ Returns true if the context is an OpenGL ES context.
+
+ If the context has not yet been created, the result is based on the
+ requested format set via setFormat().
+
+ \sa create(), format(), setFormat()
+
+ \since 5.3
+ */
+bool QOpenGLContext::isES() const
+{
+ return format().renderableType() == QSurfaceFormat::OpenGLES;
+}
+
+/*!
\internal
*/
QOpenGLVersionFunctionsBackend *QOpenGLContext::functionsBackend(const QOpenGLVersionStatus &v) const
diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h
index ce34a2d5a5..06a7b723b4 100644
--- a/src/gui/kernel/qopenglcontext.h
+++ b/src/gui/kernel/qopenglcontext.h
@@ -192,6 +192,18 @@ public:
QSet<QByteArray> extensions() const;
bool hasExtension(const QByteArray &extension) const;
+ static void *openGLModuleHandle();
+
+ enum OpenGLModuleType {
+ DesktopGL,
+ GLES2,
+ GLES1
+ };
+
+ static OpenGLModuleType openGLModuleType();
+
+ bool isES() const;
+
Q_SIGNALS:
void aboutToBeDestroyed();
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index 9abca30f12..8d9754d388 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -72,8 +72,7 @@ public:
#ifdef Q_COMPILER_RVALUE_REFS
inline QPalette &operator=(QPalette &&other)
{
- data.resolve_mask = other.data.resolve_mask;
- data.current_group = other.data.current_group;
+ for_faster_swapping_dont_use = other.for_faster_swapping_dont_use;
qSwap(d, other.d); return *this;
}
#endif
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index bec201f3f7..a6e0d4705b 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -229,6 +229,16 @@ QPlatformServices *QPlatformIntegration::services() const
management. This includes the typical desktop platforms. Can be set to false on
platforms where no window management is available, meaning for example that windows
are never repositioned by the window manager. The default implementation returns \c true.
+
+ \value AllGLFunctionsQueryable The QOpenGLContext backend provided by the platform is
+ able to return function pointers from getProcAddress() even for standard OpenGL
+ functions, for example OpenGL 1 functions like glClear() or glDrawArrays(). This is
+ important because the OpenGL specifications do not require this ability from the
+ getProcAddress implementations of the windowing system interfaces (EGL, WGL, GLX). The
+ platform plugins may however choose to enhance the behavior in the backend
+ implementation for QOpenGLContext::getProcAddress() and support returning a function
+ pointer also for the standard, non-extension functions. This capability is a
+ prerequisite for dynamic OpenGL loading.
*/
/*!
@@ -465,7 +475,31 @@ QPlatformSessionManager *QPlatformIntegration::createPlatformSessionManager(cons
*/
void QPlatformIntegration::sync()
{
+}
+
+#ifndef QT_NO_OPENGL
+/*!
+ Platform integration function for querying the OpenGL implementation type.
+
+ Used only when dynamic OpenGL implementation loading is enabled.
+ Subclasses should reimplement this function and return a value based on
+ the OpenGL implementation they have chosen to load.
+
+ \note The return value does not indicate or limit the types of
+ contexts that can be created by a given implementation. For example
+ a desktop OpenGL implementation may be capable of creating OpenGL
+ ES-compatible contexts too.
+
+ \sa QOpenGLContext::openGLModuleType(), QOpenGLContext::isES()
+
+ \since 5.3
+ */
+QOpenGLContext::OpenGLModuleType QPlatformIntegration::openGLModuleType()
+{
+ qWarning("This plugin does not support dynamic OpenGL loading!");
+ return QOpenGLContext::DesktopGL;
}
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index 35ef88949f..4804048fde 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -54,6 +54,7 @@
#include <QtGui/qwindowdefs.h>
#include <qpa/qplatformscreen.h>
#include <QtGui/qsurfaceformat.h>
+#include <QtGui/qopenglcontext.h>
QT_BEGIN_NAMESPACE
@@ -96,7 +97,8 @@ public:
NativeWidgets,
WindowManagement,
SyncState,
- RasterGLSurface
+ RasterGLSurface,
+ AllGLFunctionsQueryable
};
virtual ~QPlatformIntegration() { }
@@ -169,6 +171,11 @@ public:
#endif
virtual void sync();
+
+#ifndef QT_NO_OPENGL
+ virtual QOpenGLContext::OpenGLModuleType openGLModuleType();
+#endif
+
protected:
void screenAdded(QPlatformScreen *screen);
};
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index e12eb318dc..05ab2f15ba 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -499,6 +499,8 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
return QVariant(false);
case MousePressAndHoldInterval:
return QVariant(800);
+ case MouseDoubleClickDistance:
+ return QVariant(5);
}
return QVariant();
}
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
index 205a5bab69..073eda8d07 100644
--- a/src/gui/kernel/qplatformtheme.h
+++ b/src/gui/kernel/qplatformtheme.h
@@ -108,7 +108,8 @@ public:
PasswordMaskCharacter,
DialogSnapToDefaultButton,
ContextMenuOnMouseRelease,
- MousePressAndHoldInterval
+ MousePressAndHoldInterval,
+ MouseDoubleClickDistance
};
enum DialogType {
diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp
index f6912a2d57..d53239e74f 100644
--- a/src/gui/kernel/qsimpledrag.cpp
+++ b/src/gui/kernel/qsimpledrag.cpp
@@ -116,6 +116,8 @@ void QBasicDrag::disableEventFilter()
bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
{
+ Q_UNUSED(o);
+
if (!m_drag) {
if (e->type() == QEvent::KeyRelease && static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape) {
disableEventFilter();
@@ -125,9 +127,6 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
return false;
}
- if (!qobject_cast<QWindow *>(o))
- return false;
-
switch (e->type()) {
case QEvent::ShortcutOverride:
// prevent accelerators from firing while dragging
@@ -324,9 +323,10 @@ void QSimpleDrag::startDrag()
void QSimpleDrag::cancel()
{
QBasicDrag::cancel();
- if (drag())
+ if (drag() && m_current_window) {
QWindowSystemInterface::handleDrag(m_current_window, 0, QPoint(), Qt::IgnoreAction);
- m_current_window = 0;
+ m_current_window = 0;
+ }
}
void QSimpleDrag::move(const QMouseEvent *me)
diff --git a/src/gui/kernel/qtouchdevice.cpp b/src/gui/kernel/qtouchdevice.cpp
index 3ad4b4161e..117f2c5e76 100644
--- a/src/gui/kernel/qtouchdevice.cpp
+++ b/src/gui/kernel/qtouchdevice.cpp
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QTouchDevice
- \brief The QTouchDevice class describes the device from with touch events originate.
+ \brief The QTouchDevice class describes the device from which touch events originate.
\since 5.0
\ingroup touch
\inmodule QtGui
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 04a2615c81..fd9e0ad61b 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -642,7 +642,7 @@ void QWindow::setFormat(const QSurfaceFormat &format)
}
/*!
- Returns the requested surfaceformat of this window.
+ Returns the requested surface format of this window.
If the requested format was not supported by the platform implementation,
the requestedFormat will differ from the actual window format.
@@ -662,9 +662,17 @@ QSurfaceFormat QWindow::requestedFormat() const
After the window has been created, this function will return the actual surface format
of the window. It might differ from the requested format if the requested format could
- not be fulfilled by the platform.
+ not be fulfilled by the platform. It might also be a superset, for example certain
+ buffer sizes may be larger than requested.
- \sa create(), requestedFormat()
+ \note Depending on the platform, certain values in this surface format may still
+ contain the requested values, that is, the values that have been passed to
+ setFormat(). Typical examples are the OpenGL version, profile and options. These may
+ not get updated during create() since these are context specific and a single window
+ may be used together with multiple contexts over its lifetime. Use the
+ QOpenGLContext's format() instead to query such values.
+
+ \sa create(), requestedFormat(), QOpenGLContext::format()
*/
QSurfaceFormat QWindow::format() const
{
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index 649d45d477..bd1d28274c 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -80,12 +80,7 @@ public:
float operator[](int i) const;
float length() const;
-#ifdef QT_BUILD_GUI_LIB
- float lengthSquared() const;
-#else
- Q_DECL_CONSTEXPR inline float lengthSquared() const
- { return xp * xp + yp * yp; }
-#endif
+ float lengthSquared() const; //In Qt 6 convert to inline and constexpr
QVector2D normalized() const;
void normalize();
@@ -99,12 +94,7 @@ public:
QVector2D &operator*=(const QVector2D &vector);
QVector2D &operator/=(float divisor);
-#ifdef QT_BUILD_GUI_LIB
- static float dotProduct(const QVector2D& v1, const QVector2D& v2);
-#else
- Q_DECL_CONSTEXPR inline static float dotProduct(const QVector2D& v1, const QVector2D& v2)
- { return v1.xp * v2.xp + v1.yp * v2.yp; }
-#endif
+ static float dotProduct(const QVector2D& v1, const QVector2D& v2); //In Qt 6 convert to inline and constexpr
Q_DECL_CONSTEXPR friend inline bool operator==(const QVector2D &v1, const QVector2D &v2);
Q_DECL_CONSTEXPR friend inline bool operator!=(const QVector2D &v1, const QVector2D &v2);
diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h
index c5506bf1ac..51412a940a 100644
--- a/src/gui/math3d/qvector3d.h
+++ b/src/gui/math3d/qvector3d.h
@@ -95,17 +95,9 @@ public:
QVector3D &operator*=(const QVector3D& vector);
QVector3D &operator/=(float divisor);
-#ifdef QT_BUILD_GUI_LIB
- static float dotProduct(const QVector3D& v1, const QVector3D& v2);
- static QVector3D crossProduct(const QVector3D& v1, const QVector3D& v2);
-#else
- Q_DECL_CONSTEXPR inline static float dotProduct(const QVector3D& v1, const QVector3D& v2)
- { return v1.xp * v2.xp + v1.yp * v2.yp + v1.zp * v2.zp; }
- Q_DECL_CONSTEXPR inline static QVector3D crossProduct(const QVector3D& v1, const QVector3D& v2)
- { return QVector3D(v1.yp * v2.zp - v1.zp * v2.yp,
- v1.zp * v2.xp - v1.xp * v2.zp,
- v1.xp * v2.yp - v1.yp * v2.xp); }
-#endif
+ static float dotProduct(const QVector3D& v1, const QVector3D& v2); //In Qt 6 convert to inline and constexpr
+ static QVector3D crossProduct(const QVector3D& v1, const QVector3D& v2); //in Qt 6 convert to inline and constexpr
+
static QVector3D normal(const QVector3D& v1, const QVector3D& v2);
static QVector3D normal
(const QVector3D& v1, const QVector3D& v2, const QVector3D& v3);
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index 1256f384a0..9ab0eba09f 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -86,12 +86,7 @@ public:
float operator[](int i) const;
float length() const;
-#ifdef QT_BUILD_GUI_LIB
- float lengthSquared() const;
-#else
- Q_DECL_CONSTEXPR inline float lengthSquared() const
- { return xp * xp + yp * yp + zp * zp + wp * wp; }
-#endif
+ float lengthSquared() const; //In Qt 6 convert to inline and constexpr
QVector4D normalized() const;
void normalize();
@@ -102,12 +97,7 @@ public:
QVector4D &operator*=(const QVector4D &vector);
QVector4D &operator/=(float divisor);
-#ifdef QT_BUILD_GUI_LIB
- static float dotProduct(const QVector4D& v1, const QVector4D& v2);
-#else
- static float dotProduct(const QVector4D& v1, const QVector4D& v2)
- { return v1.xp * v2.xp + v1.yp * v2.yp + v1.zp * v2.zp + v1.wp * v2.wp; }
-#endif
+ static float dotProduct(const QVector4D& v1, const QVector4D& v2); //In Qt 6 convert to inline and constexpr
Q_DECL_CONSTEXPR friend inline bool operator==(const QVector4D &v1, const QVector4D &v2);
Q_DECL_CONSTEXPR friend inline bool operator!=(const QVector4D &v1, const QVector4D &v2);
diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri
index 56aecd49e2..cadba26797 100644
--- a/src/gui/opengl/opengl.pri
+++ b/src/gui/opengl/opengl.pri
@@ -122,8 +122,4 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
SOURCES += opengl/qopenglfunctions_es2.cpp
}
-
- contains(QT_CONFIG, dynamicgl) {
- win32: SOURCES += opengl/qopenglproxy_win.cpp
- }
}
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index 94270ba0c4..b452c605e3 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -53,7 +53,9 @@ typedef const GLubyte * (QOPENGLF_APIENTRYP qt_glGetStringi)(GLenum, GLuint);
QOpenGLExtensionMatcher::QOpenGLExtensionMatcher()
{
- const char *extensionStr = reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ QOpenGLFunctions *funcs = ctx->functions();
+ const char *extensionStr = reinterpret_cast<const char *>(funcs->glGetString(GL_EXTENSIONS));
if (extensionStr) {
QByteArray ba(extensionStr);
@@ -64,9 +66,8 @@ QOpenGLExtensionMatcher::QOpenGLExtensionMatcher()
#else
} else {
// clear error state
- while (glGetError()) {}
+ while (funcs->glGetError()) {}
- QOpenGLContext *ctx = QOpenGLContext::currentContext();
if (ctx) {
qt_glGetStringi glGetStringi = (qt_glGetStringi)ctx->getProcAddress("glGetStringi");
@@ -74,7 +75,7 @@ QOpenGLExtensionMatcher::QOpenGLExtensionMatcher()
return;
GLint numExtensions;
- glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
+ funcs->glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
for (int i = 0; i < numExtensions; ++i) {
const char *str = reinterpret_cast<const char *>(glGetStringi(GL_EXTENSIONS, i));
diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h
index 025f8b823c..190c05ba26 100644
--- a/src/gui/opengl/qopengl.h
+++ b/src/gui/opengl/qopengl.h
@@ -66,7 +66,7 @@
// which the system headers do not.
#if defined(QT_OPENGL_ES_2)
-# if defined(Q_OS_MAC)
+# if defined(Q_OS_MAC) // iOS
# include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h>
@@ -78,7 +78,7 @@
*/
typedef void* GLeglImageOES;
-# else // "uncontrolled" platforms
+# else // "uncontrolled" ES2 platforms
# include <GLES2/gl2.h>
/*
@@ -90,14 +90,14 @@ typedef void* GLeglImageOES;
typedef char GLchar;
# include <QtGui/qopengles2ext.h>
-# ifndef GL_DOUBLE
-# define GL_DOUBLE GL_FLOAT
-# endif
-# ifndef GLdouble
-typedef GLfloat GLdouble;
-# endif
# endif // Q_OS_MAC
-#else
+# ifndef GL_DOUBLE
+# define GL_DOUBLE GL_FLOAT
+# endif
+# ifndef GLdouble
+typedef GLfloat GLdouble;
+# endif
+#else // non-ES2 platforms
# if defined(Q_OS_MAC)
# include <OpenGL/gl.h>
# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
@@ -107,20 +107,10 @@ typedef GLfloat GLdouble;
# include <OpenGL/glext.h>
# else
# define GL_GLEXT_LEGACY // Prevents GL/gl.h from #including system glext.h
- // In dynamic GL builds qopenglproxy will export the GL functions that are
- // called also in QtGui itself. To prevent linker warnings (msvc) or errors (mingw)
- // we need to make sure the prototypes do not have dllimport.
-# ifdef QT_OPENGL_DYNAMIC_IN_GUI
-# undef WINGDIAPI
-# define WINGDIAPI
-# endif // QT_OPENGL_DYNAMIC_IN_GUI
# include <GL/gl.h>
-# ifdef QT_OPENGL_DYNAMIC_IN_GUI
-# undef WINGDIAPI
-# endif // QT_OPENGL_DYNAMIC_IN_GUI
# include <QtGui/qopenglext.h>
# endif // Q_OS_MAC
-#endif
+#endif // QT_OPENGL_ES_2
// Desktops, apart from Mac OS X prior to 10.7 can support OpenGL 3
// and desktops apart from Mac can support OpenGL 4
diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp
index a4c1e538ee..2e1a4577f6 100644
--- a/src/gui/opengl/qopenglbuffer.cpp
+++ b/src/gui/opengl/qopenglbuffer.cpp
@@ -333,13 +333,13 @@ void QOpenGLBuffer::destroy()
bool QOpenGLBuffer::read(int offset, void *data, int count)
{
#if !defined(QT_OPENGL_ES)
- if (QOpenGLFunctions::platformGLType() != QOpenGLFunctions::GLES1) {
+ if (QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) {
Q_D(QOpenGLBuffer);
if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id())
return false;
- while (glGetError() != GL_NO_ERROR) ; // Clear error state.
+ while (d->funcs->glGetError() != GL_NO_ERROR) ; // Clear error state.
d->funcs->glGetBufferSubData(d->type, offset, count, data);
- return glGetError() == GL_NO_ERROR;
+ return d->funcs->glGetError() == GL_NO_ERROR;
}
#else
Q_UNUSED(offset);
diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp
index 2355d0a8a7..79b59a8e98 100644
--- a/src/gui/opengl/qopengldebug.cpp
+++ b/src/gui/opengl/qopengldebug.cpp
@@ -1370,7 +1370,7 @@ bool QOpenGLDebugLogger::initialize()
// through wglGetProcAddress
#if defined(Q_OS_WIN) && !defined(QT_OPENGL_ES_2)
{
- HMODULE handle = static_cast<HMODULE>(QOpenGLFunctions::platformGLHandle());
+ HMODULE handle = static_cast<HMODULE>(QOpenGLContext::openGLModuleHandle());
if (!handle)
handle = GetModuleHandleA("opengl32.dll");
d->glGetPointerv = reinterpret_cast<qt_glGetPointerv_t>(GetProcAddress(handle, QByteArrayLiteral("glGetPointerv")));
@@ -1381,7 +1381,7 @@ bool QOpenGLDebugLogger::initialize()
#undef GET_DEBUG_PROC_ADDRESS
- glGetIntegerv(GL_MAX_DEBUG_MESSAGE_LENGTH, &d->maxMessageLength);
+ QOpenGLContext::currentContext()->functions()->glGetIntegerv(GL_MAX_DEBUG_MESSAGE_LENGTH, &d->maxMessageLength);
#ifndef QT_NO_DEBUG
if (!d->context->format().testOption(QSurfaceFormat::DebugContext)) {
@@ -1449,15 +1449,16 @@ void QOpenGLDebugLogger::startLogging(QOpenGLDebugLogger::LoggingMode loggingMod
d->glDebugMessageCallback(&qt_opengl_debug_callback, d);
- d->debugWasEnabled = glIsEnabled(GL_DEBUG_OUTPUT);
- d->syncDebugWasEnabled = glIsEnabled(GL_DEBUG_OUTPUT_SYNCHRONOUS);
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
+ d->debugWasEnabled = funcs->glIsEnabled(GL_DEBUG_OUTPUT);
+ d->syncDebugWasEnabled = funcs->glIsEnabled(GL_DEBUG_OUTPUT_SYNCHRONOUS);
if (d->loggingMode == SynchronousLogging)
- glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
+ funcs->glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
else
- glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
+ funcs->glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
- glEnable(GL_DEBUG_OUTPUT);
+ funcs->glEnable(GL_DEBUG_OUTPUT);
}
/*!
@@ -1486,13 +1487,14 @@ void QOpenGLDebugLogger::stopLogging()
d->glDebugMessageCallback(d->oldDebugCallbackFunction, d->oldDebugCallbackParameter);
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
if (!d->debugWasEnabled)
- glDisable(GL_DEBUG_OUTPUT);
+ funcs->glDisable(GL_DEBUG_OUTPUT);
if (d->syncDebugWasEnabled)
- glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
+ funcs->glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
else
- glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
+ funcs->glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
}
/*!
diff --git a/src/gui/opengl/qopenglengineshadermanager.cpp b/src/gui/opengl/qopenglengineshadermanager.cpp
index 95bafb07d9..a1215acb7e 100644
--- a/src/gui/opengl/qopenglengineshadermanager.cpp
+++ b/src/gui/opengl/qopenglengineshadermanager.cpp
@@ -164,7 +164,7 @@ QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context)
code[NonPremultipliedImageSrcFragmentShader] = qopenglslNonPremultipliedImageSrcFragmentShader;
code[CustomImageSrcFragmentShader] = qopenglslCustomSrcFragmentShader; // Calls "customShader", which must be appended
code[SolidBrushSrcFragmentShader] = qopenglslSolidBrushSrcFragmentShader;
- if (QOpenGLFunctions::isES())
+ if (context->isES())
code[TextureBrushSrcFragmentShader] = qopenglslTextureBrushSrcFragmentShader_ES;
else
code[TextureBrushSrcFragmentShader] = qopenglslTextureBrushSrcFragmentShader_desktop;
diff --git a/src/gui/opengl/qopenglengineshadermanager_p.h b/src/gui/opengl/qopenglengineshadermanager_p.h
index 49c03a7fee..893574a6e5 100644
--- a/src/gui/opengl/qopenglengineshadermanager_p.h
+++ b/src/gui/opengl/qopenglengineshadermanager_p.h
@@ -90,7 +90,7 @@
qopenglslMainVertexShader
qopenglslMainWithTexCoordsVertexShader
- And the the following position vertex shaders:
+ And the following position vertex shaders:
qopenglslPositionOnlyVertexShader
qopenglslPositionWithTextureBrushVertexShader
qopenglslPositionWithPatternBrushVertexShader
diff --git a/src/gui/opengl/qopenglengineshadersource_p.h b/src/gui/opengl/qopenglengineshadersource_p.h
index 5bb0bc4704..02a23193a8 100644
--- a/src/gui/opengl/qopenglengineshadersource_p.h
+++ b/src/gui/opengl/qopenglengineshadersource_p.h
@@ -517,6 +517,41 @@ static const char* const qopenglslRgbMaskFragmentShaderPass2 = "\n\
ExclusionCompositionModeFragmentShader,
*/
+// OpenGL 3.2 core profile versions of shaders that are used by QOpenGLTextureGlyphCache
+
+static const char* const qopenglslMainWithTexCoordsVertexShader_core = "#version 150 core \n\
+ in vec2 textureCoordArray; \n\
+ out vec2 textureCoords; \n\
+ void setPosition(); \n\
+ void main(void) \n\
+ { \n\
+ setPosition(); \n\
+ textureCoords = textureCoordArray; \n\
+ }\n";
+
+static const char* const qopenglslUntransformedPositionVertexShader_core = "\n\
+ in vec4 vertexCoordsArray; \n\
+ void setPosition(void) \n\
+ { \n\
+ gl_Position = vertexCoordsArray; \n\
+ }\n";
+
+static const char* const qopenglslMainFragmentShader_core = "#version 150 core \n\
+ vec4 srcPixel(); \n\
+ out vec4 fragColor; \n\
+ void main() \n\
+ { \n\
+ fragColor = srcPixel(); \n\
+ }\n";
+
+static const char* const qopenglslImageSrcFragmentShader_core = "\n\
+ in vec2 textureCoords; \n\
+ uniform sampler2D imageTexture; \n\
+ vec4 srcPixel() \n\
+ { \n"
+ "return texture(imageTexture, textureCoords); \n"
+ "}\n";
+
QT_END_NAMESPACE
#endif // GLGC_SHADER_SOURCE_H
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index 9953b4e889..55edaf7baf 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -57,11 +57,11 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_DEBUG
#define QT_RESET_GLERROR() \
{ \
- while (glGetError() != GL_NO_ERROR) {} \
+ while (QOpenGLContext::currentContext()->functions()->glGetError() != GL_NO_ERROR) {} \
}
#define QT_CHECK_GLERROR() \
{ \
- GLenum err = glGetError(); \
+ GLenum err = QOpenGLContext::currentContext()->functions()->glGetError(); \
if (err != GL_NO_ERROR) { \
qDebug("[%s line %d] OpenGL Error: %d", \
__FILE__, __LINE__, (int)err); \
@@ -405,9 +405,9 @@ namespace
funcs->glDeleteRenderbuffers(1, &id);
}
- void freeTextureFunc(QOpenGLFunctions *, GLuint id)
+ void freeTextureFunc(QOpenGLFunctions *funcs, GLuint id)
{
- glDeleteTextures(1, &id);
+ funcs->glDeleteTextures(1, &id);
}
}
@@ -432,7 +432,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi
#ifndef QT_OPENGL_ES_2
GLint maxSamples;
- glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
+ funcs.glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
samples = qBound(0, int(samples), int(maxSamples));
#endif
@@ -497,16 +497,16 @@ void QOpenGLFramebufferObjectPrivate::initTexture(GLenum target, GLenum internal
QOpenGLContext *ctx = QOpenGLContext::currentContext();
GLuint texture = 0;
- glGenTextures(1, &texture);
- glBindTexture(target, texture);
+ funcs.glGenTextures(1, &texture);
+ funcs.glBindTexture(target, texture);
- glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ funcs.glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ funcs.glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ funcs.glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ funcs.glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexImage2D(target, 0, internal_format, size.width(), size.height(), 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ funcs.glTexImage2D(target, 0, internal_format, size.width(), size.height(), 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, NULL);
if (mipmap) {
int width = size.width();
int height = size.height();
@@ -515,20 +515,20 @@ void QOpenGLFramebufferObjectPrivate::initTexture(GLenum target, GLenum internal
width = qMax(1, width >> 1);
height = qMax(1, height >> 1);
++level;
- glTexImage2D(target, level, internal_format, width, height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ funcs.glTexImage2D(target, level, internal_format, width, height, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, NULL);
}
}
funcs.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
target, texture, 0);
QT_CHECK_GLERROR();
- glBindTexture(target, 0);
+ funcs.glBindTexture(target, 0);
valid = checkFramebufferStatus(ctx);
if (valid)
texture_guard = new QOpenGLSharedResourceGuard(ctx, texture, freeTextureFunc);
else
- glDeleteTextures(1, &texture);
+ funcs.glDeleteTextures(1, &texture);
}
void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpenGLFramebufferObject::Attachment attachment)
@@ -590,7 +590,7 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
- if (QOpenGLFunctions::isES()) {
+ if (ctx->isES()) {
if (funcs.hasOpenGLExtension(QOpenGLExtensions::Depth24))
funcs.glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples,
GL_DEPTH_COMPONENT24, size.width(), size.height());
@@ -602,7 +602,7 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
GL_DEPTH_COMPONENT, size.width(), size.height());
}
} else {
- if (QOpenGLFunctions::isES()) {
+ if (ctx->isES()) {
if (funcs.hasOpenGLExtension(QOpenGLExtensions::Depth24)) {
funcs.glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24,
size.width(), size.height());
@@ -631,7 +631,7 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
#ifdef QT_OPENGL_ES
GLenum storage = GL_STENCIL_INDEX8;
#else
- GLenum storage = QOpenGLFunctions::isES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
+ GLenum storage = ctx->isES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
#endif
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample))
@@ -773,7 +773,7 @@ QOpenGLFramebufferObject::QOpenGLFramebufferObject(const QSize &size, GLenum tar
Q_D(QOpenGLFramebufferObject);
d->init(this, size, NoAttachment, target,
#ifndef QT_OPENGL_ES_2
- QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8
+ QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8
#else
GL_RGBA
#endif
@@ -793,7 +793,7 @@ QOpenGLFramebufferObject::QOpenGLFramebufferObject(int width, int height, GLenum
Q_D(QOpenGLFramebufferObject);
d->init(this, QSize(width, height), NoAttachment, target,
#ifndef QT_OPENGL_ES_2
- QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8
+ QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8
#else
GL_RGBA
#endif
@@ -850,7 +850,7 @@ QOpenGLFramebufferObject::QOpenGLFramebufferObject(int width, int height, Attach
#ifdef QT_OPENGL_ES_2
internal_format = GL_RGBA;
#else
- internal_format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ internal_format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8;
#endif
d->init(this, QSize(width, height), attachment, target, internal_format);
}
@@ -877,7 +877,7 @@ QOpenGLFramebufferObject::QOpenGLFramebufferObject(const QSize &size, Attachment
#ifdef QT_OPENGL_ES_2
internal_format = GL_RGBA;
#else
- internal_format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ internal_format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8;
#endif
d->init(this, size, attachment, target, internal_format);
}
@@ -1084,7 +1084,8 @@ Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format,
int w = size.width();
int h = size.height();
- while (glGetError());
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
+ while (funcs->glGetError());
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
QImage img(size, (alpha_format && include_alpha) ? QImage::Format_ARGB32_Premultiplied
@@ -1094,14 +1095,14 @@ Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format,
#else
GLint fmt = GL_BGRA;
#endif
- glReadPixels(0, 0, w, h, fmt, GL_UNSIGNED_BYTE, img.bits());
- if (!glGetError())
+ funcs->glReadPixels(0, 0, w, h, fmt, GL_UNSIGNED_BYTE, img.bits());
+ if (!funcs->glGetError())
return img.mirrored();
#endif
QImage rgbaImage(size, (alpha_format && include_alpha) ? QImage::Format_RGBA8888_Premultiplied
: QImage::Format_RGBX8888);
- glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, rgbaImage.bits());
+ funcs->glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, rgbaImage.bits());
return rgbaImage.mirrored();
}
diff --git a/src/gui/opengl/qopenglframebufferobject_p.h b/src/gui/opengl/qopenglframebufferobject_p.h
index f0e07f2119..bd830b38e9 100644
--- a/src/gui/opengl/qopenglframebufferobject_p.h
+++ b/src/gui/opengl/qopenglframebufferobject_p.h
@@ -70,7 +70,12 @@ public:
mipmap(false)
{
#ifndef QT_OPENGL_ES_2
- internal_format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ // There is nothing that says QOpenGLFramebufferObjectFormat needs a current
+ // context, so we need a fallback just to be safe, even though in pratice there
+ // will usually be a context current.
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ const bool isES = ctx ? ctx->isES() : QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL;
+ internal_format = isES ? GL_RGBA : GL_RGBA8;
#else
internal_format = GL_RGBA;
#endif
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 60743b3a27..84c70606b1 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -42,8 +42,10 @@
#include "qopenglfunctions.h"
#include "qopenglextensions_p.h"
#include "qdebug.h"
-#include "QtGui/private/qopenglcontext_p.h"
-#include "QtGui/private/qopengl_p.h"
+#include <QtGui/private/qopenglcontext_p.h>
+#include <QtGui/private/qopengl_p.h>
+#include <QtGui/private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
QT_BEGIN_NAMESPACE
@@ -124,9 +126,13 @@ QT_BEGIN_NAMESPACE
glFuncs.glActiveTexture(GL_TEXTURE1);
\endcode
- QOpenGLFunctions provides wrappers for all OpenGL/ES 2.0 functions,
- except those like \c{glDrawArrays()}, \c{glViewport()}, and
- \c{glBindTexture()} that don't have portability issues.
+ QOpenGLFunctions provides wrappers for all OpenGL/ES 2.0
+ functions, including the common subset of OpenGL 1.x and ES
+ 2.0. While such functions, for example glClear() or
+ glDrawArrays(), can be called also directly, as long as the
+ application links to the platform-specific OpenGL library, calling
+ them via QOpenGLFunctions enables the possibility of dynamically
+ loading the OpenGL implementation.
The hasOpenGLFeature() and openGLFeatures() functions can be used
to determine if the OpenGL implementation has a major OpenGL/ES 2.0
@@ -249,7 +255,9 @@ QOpenGLExtensions::QOpenGLExtensions(QOpenGLContext *context)
static int qt_gl_resolve_features()
{
- if (QOpenGLFunctions::platformGLType() == QOpenGLFunctions::GLES2) {
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ if (ctx->isES() && QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) {
+ // OpenGL ES 2
int features = QOpenGLFunctions::Multitexture |
QOpenGLFunctions::Shaders |
QOpenGLFunctions::Buffers |
@@ -269,7 +277,8 @@ static int qt_gl_resolve_features()
features |= QOpenGLFunctions::NPOTTextures |
QOpenGLFunctions::NPOTTextureRepeat;
return features;
- } else if (QOpenGLFunctions::platformGLType() == QOpenGLFunctions::GLES1) {
+ } else if (ctx->isES()) {
+ // OpenGL ES 1
int features = QOpenGLFunctions::Multitexture |
QOpenGLFunctions::Buffers |
QOpenGLFunctions::CompressedTextures |
@@ -289,6 +298,7 @@ static int qt_gl_resolve_features()
features |= QOpenGLFunctions::NPOTTextures;
return features;
} else {
+ // OpenGL
int features = 0;
QSurfaceFormat format = QOpenGLContext::currentContext()->format();
QOpenGLExtensionMatcher extensions;
@@ -352,7 +362,7 @@ static int qt_gl_resolve_extensions()
if (extensionMatcher.match("GL_EXT_bgra"))
extensions |= QOpenGLExtensions::BGRATextureFormat;
- if (QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::currentContext()->isES()) {
if (extensionMatcher.match("GL_OES_mapbuffer"))
extensions |= QOpenGLExtensions::MapBuffer;
if (extensionMatcher.match("GL_OES_packed_depth_stencil"))
@@ -484,6 +494,501 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
}
/*!
+ \fn void QOpenGLFunctions::glBindTexture(GLenum target, GLuint texture)
+
+ Convenience function that calls glBindTexture(\a target, \a texture).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glBindTexture.xml}{glBindTexture()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glBlendFunc(GLenum sfactor, GLenum dfactor)
+
+ Convenience function that calls glBlendFunc(\a sfactor, \a dfactor).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glBlendFunc.xml}{glBlendFunc()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glClear(GLbitfield mask)
+
+ Convenience function that calls glClear(\a mask).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glClear.xml}{glClear()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+
+ Convenience function that calls glClearColor(\a red, \a green, \a blue, \a alpha).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glClearColor.xml}{glClearColor()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glClearStencil(GLint s)
+
+ Convenience function that calls glClearStencil(\a s).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glClearStencil.xml}{glClearStencil()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+
+ Convenience function that calls glColorMask(\a red, \a green, \a blue, \a alpha).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glColorMask.xml}{glColorMask()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+
+ Convenience function that calls glCopyTexImage2D(\a target, \a level, \a internalformat, \a x, \a y, \a width, \a height, \a border).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glCopyTexImage2D.xml}{glCopyTexImage2D()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+
+ Convenience function that calls glCopyTexSubImage2D(\a target, \a level, \a xoffset, \a yoffset, \a x, \a y, \a width, \a height).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glCopyTexSubImage2D.xml}{glCopyTexSubImage2D()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glCullFace(GLenum mode)
+
+ Convenience function that calls glCullFace(\a mode).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glCullFace.xml}{glCullFace()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glDeleteTextures(GLsizei n, const GLuint* textures)
+
+ Convenience function that calls glDeleteTextures(\a n, \a textures).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glDeleteTextures.xml}{glDeleteTextures()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glDepthFunc(GLenum func)
+
+ Convenience function that calls glDepthFunc(\a func).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glDepthFunc.xml}{glDepthFunc()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glDepthMask(GLboolean flag)
+
+ Convenience function that calls glDepthMask(\a flag).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glDepthMask.xml}{glDepthMask()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glDisable(GLenum cap)
+
+ Convenience function that calls glDisable(\a cap).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glDisable.xml}{glDisable()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glDrawArrays(GLenum mode, GLint first, GLsizei count)
+
+ Convenience function that calls glDrawArrays(\a mode, \a first, \a count).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glDrawArrays.xml}{glDrawArrays()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
+
+ Convenience function that calls glDrawElements(\a mode, \a count, \a type, \a indices).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glDrawElements.xml}{glDrawElements()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glEnable(GLenum cap)
+
+ Convenience function that calls glEnable(\a cap).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glEnable.xml}{glEnable()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glFinish()
+
+ Convenience function that calls glFinish().
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glFinish.xml}{glFinish()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glFlush()
+
+ Convenience function that calls glFlush().
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glFlush.xml}{glFlush()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glFrontFace(GLenum mode)
+
+ Convenience function that calls glFrontFace(\a mode).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glFrontFace.xml}{glFrontFace()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glGenTextures(GLsizei n, GLuint* textures)
+
+ Convenience function that calls glGenTextures(\a n, \a textures).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glGenTextures.xml}{glGenTextures()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glGetBooleanv(GLenum pname, GLboolean* params)
+
+ Convenience function that calls glGetBooleanv(\a pname, \a params).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glGetBooleanv.xml}{glGetBooleanv()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn GLenum QOpenGLFunctions::glGetError()
+
+ Convenience function that calls glGetError().
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glGetError.xml}{glGetError()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glGetFloatv(GLenum pname, GLfloat* params)
+
+ Convenience function that calls glGetFloatv(\a pname, \a params).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glGetFloatv.xml}{glGetFloatv()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glGetIntegerv(GLenum pname, GLint* params)
+
+ Convenience function that calls glGetIntegerv(\a pname, \a params).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glGetIntegerv.xml}{glGetIntegerv()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn const GLubyte *QOpenGLFunctions::glGetString(GLenum name)
+
+ Convenience function that calls glGetString(\a name).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glGetString.xml}{glGetString()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
+
+ Convenience function that calls glGetTexParameterfv(\a target, \a pname, \a params).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glGetTexParameterfv.xml}{glGetTexParameterfv()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
+
+ Convenience function that calls glGetTexParameteriv(\a target, \a pname, \a params).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glGetTexParameteriv.xml}{glGetTexParameteriv()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glHint(GLenum target, GLenum mode)
+
+ Convenience function that calls glHint(\a target, \a mode).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glHint.xml}{glHint()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn GLboolean QOpenGLFunctions::glIsEnabled(GLenum cap)
+
+ Convenience function that calls glIsEnabled(\a cap).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glIsEnabled.xml}{glIsEnabled()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn GLboolean QOpenGLFunctions::glIsTexture(GLuint texture)
+
+ Convenience function that calls glIsTexture(\a texture).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glIsTexture.xml}{glIsTexture()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glLineWidth(GLfloat width)
+
+ Convenience function that calls glLineWidth(\a width).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glLineWidth.xml}{glLineWidth()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glPixelStorei(GLenum pname, GLint param)
+
+ Convenience function that calls glPixelStorei(\a pname, \a param).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glPixelStorei.xml}{glPixelStorei()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glPolygonOffset(GLfloat factor, GLfloat units)
+
+ Convenience function that calls glPolygonOffset(\a factor, \a units).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glPolygonOffset.xml}{glPolygonOffset()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
+
+ Convenience function that calls glReadPixels(\a x, \a y, \a width, \a height, \a format, \a type, \a pixels).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glReadPixels.xml}{glReadPixels()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+
+ Convenience function that calls glScissor(\a x, \a y, \a width, \a height).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glScissor.xml}{glScissor()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glStencilFunc(GLenum func, GLint ref, GLuint mask)
+
+ Convenience function that calls glStencilFunc(\a func, \a ref, \a mask).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glStencilFunc.xml}{glStencilFunc()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glStencilMask(GLuint mask)
+
+ Convenience function that calls glStencilMask(\a mask).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glStencilMask.xml}{glStencilMask()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+
+ Convenience function that calls glStencilOp(\a fail, \a zfail, \a zpass).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glStencilOp.xml}{glStencilOp()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
+
+ Convenience function that calls glTexImage2D(\a target, \a level, \a internalformat, \a width, \a height, \a border, \a format, \a type, \a pixels).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glTexImage2D.xml}{glTexImage2D()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+
+ Convenience function that calls glTexParameterf(\a target, \a pname, \a param).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glTexParameterf.xml}{glTexParameterf()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
+
+ Convenience function that calls glTexParameterfv(\a target, \a pname, \a params).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glTexParameterfv.xml}{glTexParameterfv()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glTexParameteri(GLenum target, GLenum pname, GLint param)
+
+ Convenience function that calls glTexParameteri(\a target, \a pname, \a param).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glTexParameteri.xml}{glTexParameteri()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
+
+ Convenience function that calls glTexParameteriv(\a target, \a pname, \a params).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glTexParameteriv.xml}{glTexParameteriv()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
+
+ Convenience function that calls glTexSubImage2D(\a target, \a level, \a xoffset, \a yoffset, \a width, \a height, \a format, \a type, \a pixels).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glTexSubImage2D.xml}{glTexSubImage2D()}.
+
+ \since 5.3
+*/
+
+/*!
+ \fn void QOpenGLFunctions::glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+
+ Convenience function that calls glViewport(\a x, \a y, \a width, \a height).
+
+ For more information, see the OpenGL/ES 2.0 documentation for
+ \l{http://www.khronos.org/opengles/sdk/docs/man/glViewport.xml}{glViewport()}.
+
+ \since 5.3
+*/
+
+/*!
\fn void QOpenGLFunctions::glActiveTexture(GLenum texture)
Convenience function that calls glActiveTexture(\a texture).
@@ -1488,6 +1993,12 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
*/
/*!
+ \fn void QOpenGLFunctions::glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
+
+ \internal
+*/
+
+/*!
\fn bool QOpenGLFunctions::isInitialized(const QOpenGLFunctionsPrivate *d)
\internal
*/
@@ -1866,6 +2377,254 @@ Resolver<Base, FuncType, Policy, ReturnType> functionResolver(FuncType Base::*fu
#ifndef QT_OPENGL_ES_2
+// GLES2 + OpenGL1 common subset. These are normally not resolvable,
+// but the underlying platform code may hide this limitation.
+
+static void QOPENGLF_APIENTRY qopenglfResolveBindTexture(GLenum target, GLuint texture)
+{
+ RESOLVE_FUNC_VOID(0, BindTexture)(target, texture);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+ RESOLVE_FUNC_VOID(0, BlendFunc)(sfactor, dfactor);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveClear(GLbitfield mask)
+{
+ RESOLVE_FUNC_VOID(0, Clear)(mask);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ RESOLVE_FUNC_VOID(0, ClearColor)(red, green, blue, alpha);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveClearDepthf(GLclampf depth)
+{
+ if (QOpenGLContext::currentContext()->isES()) {
+ RESOLVE_FUNC_VOID(0, ClearDepthf)(depth);
+ } else {
+ RESOLVE_FUNC_VOID(0, ClearDepth)((GLdouble) depth);
+ }
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveClearStencil(GLint s)
+{
+ RESOLVE_FUNC_VOID(0, ClearStencil)(s);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ RESOLVE_FUNC_VOID(0, ColorMask)(red, green, blue, alpha);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ RESOLVE_FUNC_VOID(0, CopyTexImage2D)(target, level, internalformat, x, y, width, height, border);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ RESOLVE_FUNC_VOID(0, CopyTexSubImage2D)(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveCullFace(GLenum mode)
+{
+ RESOLVE_FUNC_VOID(0, CullFace)(mode);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveDeleteTextures(GLsizei n, const GLuint* textures)
+{
+ RESOLVE_FUNC_VOID(0, DeleteTextures)(n, textures);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveDepthFunc(GLenum func)
+{
+ RESOLVE_FUNC_VOID(0, DepthFunc)(func);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveDepthMask(GLboolean flag)
+{
+ RESOLVE_FUNC_VOID(0, DepthMask)(flag);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveDepthRangef(GLclampf zNear, GLclampf zFar)
+{
+ if (QOpenGLContext::currentContext()->isES()) {
+ RESOLVE_FUNC_VOID(0, DepthRangef)(zNear, zFar);
+ } else {
+ RESOLVE_FUNC_VOID(0, DepthRange)((GLdouble) zNear, (GLdouble) zFar);
+ }
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveDisable(GLenum cap)
+{
+ RESOLVE_FUNC_VOID(0, Disable)(cap);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ RESOLVE_FUNC_VOID(0, DrawArrays)(mode, first, count);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
+{
+ RESOLVE_FUNC_VOID(0, DrawElements)(mode, count, type, indices);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveEnable(GLenum cap)
+{
+ RESOLVE_FUNC_VOID(0, Enable)(cap);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveFinish()
+{
+ RESOLVE_FUNC_VOID(0, Finish)();
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveFlush()
+{
+ RESOLVE_FUNC_VOID(0, Flush)();
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveFrontFace(GLenum mode)
+{
+ RESOLVE_FUNC_VOID(0, FrontFace)(mode);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveGenTextures(GLsizei n, GLuint* textures)
+{
+ RESOLVE_FUNC_VOID(0, GenTextures)(n, textures);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveGetBooleanv(GLenum pname, GLboolean* params)
+{
+ RESOLVE_FUNC_VOID(0, GetBooleanv)(pname, params);
+}
+
+static GLenum QOPENGLF_APIENTRY qopenglfResolveGetError()
+{
+ RESOLVE_FUNC(GLenum, 0, GetError)();
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveGetFloatv(GLenum pname, GLfloat* params)
+{
+ RESOLVE_FUNC_VOID(0, GetFloatv)(pname, params);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveGetIntegerv(GLenum pname, GLint* params)
+{
+ RESOLVE_FUNC_VOID(0, GetIntegerv)(pname, params);
+}
+
+static const GLubyte * QOPENGLF_APIENTRY qopenglfResolveGetString(GLenum name)
+{
+ RESOLVE_FUNC(const GLubyte *, 0, GetString)(name);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
+{
+ RESOLVE_FUNC_VOID(0, GetTexParameterfv)(target, pname, params);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
+{
+ RESOLVE_FUNC_VOID(0, GetTexParameteriv)(target, pname, params);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveHint(GLenum target, GLenum mode)
+{
+ RESOLVE_FUNC_VOID(0, Hint)(target, mode);
+}
+
+static GLboolean QOPENGLF_APIENTRY qopenglfResolveIsEnabled(GLenum cap)
+{
+ RESOLVE_FUNC(GLboolean, 0, IsEnabled)(cap);
+}
+
+static GLboolean QOPENGLF_APIENTRY qopenglfResolveIsTexture(GLuint texture)
+{
+ RESOLVE_FUNC(GLboolean, 0, IsTexture)(texture);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveLineWidth(GLfloat width)
+{
+ RESOLVE_FUNC_VOID(0, LineWidth)(width);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolvePixelStorei(GLenum pname, GLint param)
+{
+ RESOLVE_FUNC_VOID(0, PixelStorei)(pname, param);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolvePolygonOffset(GLfloat factor, GLfloat units)
+{
+ RESOLVE_FUNC_VOID(0, PolygonOffset)(factor, units);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
+{
+ RESOLVE_FUNC_VOID(0, ReadPixels)(x, y, width, height, format, type, pixels);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ RESOLVE_FUNC_VOID(0, Scissor)(x, y, width, height);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+ RESOLVE_FUNC_VOID(0, StencilFunc)(func, ref, mask);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveStencilMask(GLuint mask)
+{
+ RESOLVE_FUNC_VOID(0, StencilMask)(mask);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ RESOLVE_FUNC_VOID(0, StencilOp)(fail, zfail, zpass);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
+{
+ RESOLVE_FUNC_VOID(0, TexImage2D)(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ RESOLVE_FUNC_VOID(0, TexParameterf)(target, pname, param);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
+{
+ RESOLVE_FUNC_VOID(0, TexParameterfv)(target, pname, params);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+ RESOLVE_FUNC_VOID(0, TexParameteri)(target, pname, param);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveTexParameteriv(GLenum target, GLenum pname, const GLint* params)
+{
+ RESOLVE_FUNC_VOID(0, TexParameteriv)(target, pname, params);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
+{
+ RESOLVE_FUNC_VOID(0, TexSubImage2D)(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+static void QOPENGLF_APIENTRY qopenglfResolveViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ RESOLVE_FUNC_VOID(0, Viewport)(x, y, width, height);
+}
+
+// GL(ES)2
+
static void QOPENGLF_APIENTRY qopenglfResolveActiveTexture(GLenum texture)
{
RESOLVE_FUNC_VOID(0, ActiveTexture)(texture);
@@ -2396,6 +3155,29 @@ static void QOPENGLF_APIENTRY qopenglfResolveGetBufferSubData(GLenum target, qop
(target, offset, size, data);
}
+#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_DYNAMIC)
+
+// Desktop only
+
+static void QOPENGLF_APIENTRY qopenglfResolveGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
+{
+ RESOLVE_FUNC_VOID(0, GetTexLevelParameteriv)(target, level, pname, params);
+}
+
+// Special translation functions for ES-specific calls on desktop GL
+
+static void QOPENGLF_APIENTRY qopenglfTranslateClearDepthf(GLclampf depth)
+{
+ ::glClearDepth(depth);
+}
+
+static void QOPENGLF_APIENTRY qopenglfTranslateDepthRangef(GLclampf zNear, GLclampf zFar)
+{
+ ::glDepthRange(zNear, zFar);
+}
+
+#endif // !ES2 && !DYNAMIC
+
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *)
{
/* Assign a pointer to an above defined static function
@@ -2403,6 +3185,116 @@ QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *)
* context, assigns it to the member variable and executes it
* (see Resolver template) */
#ifndef QT_OPENGL_ES_2
+ // The GL1 functions may not be queriable via getProcAddress().
+ if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::AllGLFunctionsQueryable)) {
+ // The platform plugin supports resolving these.
+ BindTexture = qopenglfResolveBindTexture;
+ BlendFunc = qopenglfResolveBlendFunc;
+ Clear = qopenglfResolveClear;
+ ClearColor = qopenglfResolveClearColor;
+ ClearDepthf = qopenglfResolveClearDepthf;
+ ClearStencil = qopenglfResolveClearStencil;
+ ColorMask = qopenglfResolveColorMask;
+ CopyTexImage2D = qopenglfResolveCopyTexImage2D;
+ CopyTexSubImage2D = qopenglfResolveCopyTexSubImage2D;
+ CullFace = qopenglfResolveCullFace;
+ DeleteTextures = qopenglfResolveDeleteTextures;
+ DepthFunc = qopenglfResolveDepthFunc;
+ DepthMask = qopenglfResolveDepthMask;
+ DepthRangef = qopenglfResolveDepthRangef;
+ Disable = qopenglfResolveDisable;
+ DrawArrays = qopenglfResolveDrawArrays;
+ DrawElements = qopenglfResolveDrawElements;
+ Enable = qopenglfResolveEnable;
+ Finish = qopenglfResolveFinish;
+ Flush = qopenglfResolveFlush;
+ FrontFace = qopenglfResolveFrontFace;
+ GenTextures = qopenglfResolveGenTextures;
+ GetBooleanv = qopenglfResolveGetBooleanv;
+ GetError = qopenglfResolveGetError;
+ GetFloatv = qopenglfResolveGetFloatv;
+ GetIntegerv = qopenglfResolveGetIntegerv;
+ GetString = qopenglfResolveGetString;
+ GetTexParameterfv = qopenglfResolveGetTexParameterfv;
+ GetTexParameteriv = qopenglfResolveGetTexParameteriv;
+ Hint = qopenglfResolveHint;
+ IsEnabled = qopenglfResolveIsEnabled;
+ IsTexture = qopenglfResolveIsTexture;
+ LineWidth = qopenglfResolveLineWidth;
+ PixelStorei = qopenglfResolvePixelStorei;
+ PolygonOffset = qopenglfResolvePolygonOffset;
+ ReadPixels = qopenglfResolveReadPixels;
+ Scissor = qopenglfResolveScissor;
+ StencilFunc = qopenglfResolveStencilFunc;
+ StencilMask = qopenglfResolveStencilMask;
+ StencilOp = qopenglfResolveStencilOp;
+ TexImage2D = qopenglfResolveTexImage2D;
+ TexParameterf = qopenglfResolveTexParameterf;
+ TexParameterfv = qopenglfResolveTexParameterfv;
+ TexParameteri = qopenglfResolveTexParameteri;
+ TexParameteriv = qopenglfResolveTexParameteriv;
+ TexSubImage2D = qopenglfResolveTexSubImage2D;
+ Viewport = qopenglfResolveViewport;
+
+ GetTexLevelParameteriv = qopenglfResolveGetTexLevelParameteriv;
+ } else {
+#ifndef QT_OPENGL_DYNAMIC
+ // Use the functions directly. This requires linking QtGui to an OpenGL implementation.
+ BindTexture = ::glBindTexture;
+ BlendFunc = ::glBlendFunc;
+ Clear = ::glClear;
+ ClearColor = ::glClearColor;
+ ClearDepthf = qopenglfTranslateClearDepthf;
+ ClearStencil = ::glClearStencil;
+ ColorMask = ::glColorMask;
+ CopyTexImage2D = ::glCopyTexImage2D;
+ CopyTexSubImage2D = ::glCopyTexSubImage2D;
+ CullFace = ::glCullFace;
+ DeleteTextures = ::glDeleteTextures;
+ DepthFunc = ::glDepthFunc;
+ DepthMask = ::glDepthMask;
+ DepthRangef = qopenglfTranslateDepthRangef;
+ Disable = ::glDisable;
+ DrawArrays = ::glDrawArrays;
+ DrawElements = ::glDrawElements;
+ Enable = ::glEnable;
+ Finish = ::glFinish;
+ Flush = ::glFlush;
+ FrontFace = ::glFrontFace;
+ GenTextures = ::glGenTextures;
+ GetBooleanv = ::glGetBooleanv;
+ GetError = ::glGetError;
+ GetFloatv = ::glGetFloatv;
+ GetIntegerv = ::glGetIntegerv;
+ GetString = ::glGetString;
+ GetTexParameterfv = ::glGetTexParameterfv;
+ GetTexParameteriv = ::glGetTexParameteriv;
+ Hint = ::glHint;
+ IsEnabled = ::glIsEnabled;
+ IsTexture = ::glIsTexture;
+ LineWidth = ::glLineWidth;
+ PixelStorei = ::glPixelStorei;
+ PolygonOffset = ::glPolygonOffset;
+ ReadPixels = ::glReadPixels;
+ Scissor = ::glScissor;
+ StencilFunc = ::glStencilFunc;
+ StencilMask = ::glStencilMask;
+ StencilOp = ::glStencilOp;
+ TexImage2D = ::glTexImage2D;
+ TexParameterf = ::glTexParameterf;
+ TexParameterfv = ::glTexParameterfv;
+ TexParameteri = ::glTexParameteri;
+ TexParameteriv = ::glTexParameteriv;
+ TexSubImage2D = ::glTexSubImage2D;
+ Viewport = ::glViewport;
+
+ GetTexLevelParameteriv = ::glGetTexLevelParameteriv;
+#else // QT_OPENGL_DYNAMIC
+ // This should not happen.
+ qFatal("QOpenGLFunctions: Dynamic OpenGL builds do not support platforms with insufficient function resolving capabilities");
+#endif
+ }
+
ActiveTexture = qopenglfResolveActiveTexture;
AttachShader = qopenglfResolveAttachShader;
BindAttribLocation = qopenglfResolveBindAttribLocation;
@@ -2511,88 +3403,4 @@ QOpenGLExtensionsPrivate::QOpenGLExtensionsPrivate(QOpenGLContext *ctx)
GetBufferSubData = qopenglfResolveGetBufferSubData;
}
-#if defined(QT_OPENGL_DYNAMIC)
-extern int qgl_proxyLibraryType(void);
-extern HMODULE qgl_glHandle(void);
-#endif
-
-/*!
- \enum QOpenGLFunctions::PlatformGLType
- This enum defines the type of the underlying GL implementation.
-
- \value DesktopGL Desktop OpenGL
- \value GLES2 OpenGL ES 2.0 or higher
- \value GLES1 OpenGL ES 1.x
-
- \since 5.3
- */
-
-/*!
- \fn QOpenGLFunctions::isES()
-
- On platforms where the OpenGL implementation is dynamically loaded
- this function returns true if the underlying GL implementation is
- Open GL ES.
-
- On platforms that do not use runtime loading of the GL the return
- value is based on Qt's compile-time configuration and will never
- change during runtime.
-
- \sa platformGLType()
-
- \since 5.3
- */
-
-/*!
- Returns the underlying GL implementation type.
-
- On platforms where the OpenGL implementation is not dynamically
- loaded, the return value is determined during compile time and never
- changes.
-
- Platforms that use dynamic GL loading (e.g. Windows) cannot rely on
- compile-time defines for differentiating between desktop and ES
- OpenGL code. Instead, they rely on this function to query, during
- runtime, the type of the loaded graphics library.
-
- \since 5.3
- */
-QOpenGLFunctions::PlatformGLType QOpenGLFunctions::platformGLType()
-{
-#if defined(QT_OPENGL_DYNAMIC)
- return PlatformGLType(qgl_proxyLibraryType());
-#elif defined(QT_OPENGL_ES_2)
- return GLES2;
-#elif defined(QT_OPENGL_ES)
- return GLES1;
-#else
- return DesktopGL;
-#endif
-}
-
-/*!
- Returns the platform-specific handle for the OpenGL implementation that
- is currently in use. (for example, a HMODULE on Windows)
-
- On platforms that do not use dynamic GL switch the return value is null.
-
- The library might be GL-only, meaning that windowing system interface
- functions (for example EGL) may live in another, separate library.
-
- Always use platformGLType() before resolving any functions to check if the
- library implements desktop OpenGL or OpenGL ES.
-
- \sa platformGLType()
-
- \since 5.3
- */
-void *QOpenGLFunctions::platformGLHandle()
-{
-#if defined(QT_OPENGL_DYNAMIC)
- return qgl_glHandle();
-#else
- return 0;
-#endif
-}
-
QT_END_NAMESPACE
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 6d3f038004..03c12200d5 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -79,6 +79,52 @@ struct QOpenGLFunctionsPrivate;
// Undefine any macros from GLEW, qopenglextensions_p.h, etc that
// may interfere with the definition of QOpenGLFunctions.
+#undef glBindTexture
+#undef glBlendFunc
+#undef glClear
+#undef glClearColor
+#undef glClearStencil
+#undef glColorMask
+#undef glCopyTexImage2D
+#undef glCopyTexSubImage2D
+#undef glCullFace
+#undef glDeleteTextures
+#undef glDepthFunc
+#undef glDepthMask
+#undef glDisable
+#undef glDrawArrays
+#undef glDrawElements
+#undef glEnable
+#undef glFinish
+#undef glFlush
+#undef glFrontFace
+#undef glGenTextures
+#undef glGetBooleanv
+#undef glGetError
+#undef glGetFloatv
+#undef glGetIntegerv
+#undef glGetString
+#undef glGetTexParameterfv
+#undef glGetTexParameteriv
+#undef glHint
+#undef glIsEnabled
+#undef glIsTexture
+#undef glLineWidth
+#undef glPixelStorei
+#undef glPolygonOffset
+#undef glReadPixels
+#undef glScissor
+#undef glStencilFunc
+#undef glStencilMask
+#undef glStencilOp
+#undef glTexImage2D
+#undef glTexParameterf
+#undef glTexParameterfv
+#undef glTexParameteri
+#undef glTexParameteriv
+#undef glTexSubImage2D
+#undef glViewport
+
#undef glActiveTexture
#undef glAttachShader
#undef glBindAttribLocation
@@ -177,6 +223,8 @@ struct QOpenGLFunctionsPrivate;
#undef glVertexAttrib4fv
#undef glVertexAttribPointer
+#undef glTexLevelParameteriv
+
class Q_GUI_EXPORT QOpenGLFunctions
{
public:
@@ -213,6 +261,54 @@ public:
QT_DEPRECATED void initializeGLFunctions() { initializeOpenGLFunctions(); }
#endif
+ // GLES2 + OpenGL1 common subset
+ void glBindTexture(GLenum target, GLuint texture);
+ void glBlendFunc(GLenum sfactor, GLenum dfactor);
+ void glClear(GLbitfield mask);
+ void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+ void glClearStencil(GLint s);
+ void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+ void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+ void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glCullFace(GLenum mode);
+ void glDeleteTextures(GLsizei n, const GLuint* textures);
+ void glDepthFunc(GLenum func);
+ void glDepthMask(GLboolean flag);
+ void glDisable(GLenum cap);
+ void glDrawArrays(GLenum mode, GLint first, GLsizei count);
+ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
+ void glEnable(GLenum cap);
+ void glFinish();
+ void glFlush();
+ void glFrontFace(GLenum mode);
+ void glGenTextures(GLsizei n, GLuint* textures);
+ void glGetBooleanv(GLenum pname, GLboolean* params);
+ GLenum glGetError();
+ void glGetFloatv(GLenum pname, GLfloat* params);
+ void glGetIntegerv(GLenum pname, GLint* params);
+ const GLubyte *glGetString(GLenum name);
+ void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
+ void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
+ void glHint(GLenum target, GLenum mode);
+ GLboolean glIsEnabled(GLenum cap);
+ GLboolean glIsTexture(GLuint texture);
+ void glLineWidth(GLfloat width);
+ void glPixelStorei(GLenum pname, GLint param);
+ void glPolygonOffset(GLfloat factor, GLfloat units);
+ void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
+ void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
+ void glStencilFunc(GLenum func, GLint ref, GLuint mask);
+ void glStencilMask(GLuint mask);
+ void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+ void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+ void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
+ void glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
+ void glTexParameteri(GLenum target, GLenum pname, GLint param);
+ void glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
+ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
+ void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
+
+ // GL(ES)2
void glActiveTexture(GLenum texture);
void glAttachShader(GLuint program, GLuint shader);
void glBindAttribLocation(GLuint program, GLuint index, const char* name);
@@ -311,14 +407,8 @@ public:
void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
- enum PlatformGLType {
- DesktopGL = 0,
- GLES2,
- GLES1
- };
- static PlatformGLType platformGLType();
- static void *platformGLHandle();
- static bool isES() { return platformGLType() != DesktopGL; }
+ // OpenGL1, not GLES2
+ void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params);
protected:
QOpenGLFunctionsPrivate *d_ptr;
@@ -331,6 +421,54 @@ struct QOpenGLFunctionsPrivate
{
QOpenGLFunctionsPrivate(QOpenGLContext *ctx);
+ void (QOPENGLF_APIENTRYP BindTexture)(GLenum target, GLuint texture);
+ void (QOPENGLF_APIENTRYP BlendFunc)(GLenum sfactor, GLenum dfactor);
+ void (QOPENGLF_APIENTRYP Clear)(GLbitfield mask);
+ void (QOPENGLF_APIENTRYP ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+ void (QOPENGLF_APIENTRYP ClearDepthf)(GLclampf depth);
+ void (QOPENGLF_APIENTRYP ClearStencil)(GLint s);
+ void (QOPENGLF_APIENTRYP ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+ void (QOPENGLF_APIENTRYP CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+ void (QOPENGLF_APIENTRYP CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void (QOPENGLF_APIENTRYP CullFace)(GLenum mode);
+ void (QOPENGLF_APIENTRYP DeleteTextures)(GLsizei n, const GLuint* textures);
+ void (QOPENGLF_APIENTRYP DepthFunc)(GLenum func);
+ void (QOPENGLF_APIENTRYP DepthMask)(GLboolean flag);
+ void (QOPENGLF_APIENTRYP DepthRangef)(GLclampf nearVal, GLclampf farVal);
+ void (QOPENGLF_APIENTRYP Disable)(GLenum cap);
+ void (QOPENGLF_APIENTRYP DrawArrays)(GLenum mode, GLint first, GLsizei count);
+ void (QOPENGLF_APIENTRYP DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
+ void (QOPENGLF_APIENTRYP Enable)(GLenum cap);
+ void (QOPENGLF_APIENTRYP Finish)();
+ void (QOPENGLF_APIENTRYP Flush)();
+ void (QOPENGLF_APIENTRYP FrontFace)(GLenum mode);
+ void (QOPENGLF_APIENTRYP GenTextures)(GLsizei n, GLuint* textures);
+ void (QOPENGLF_APIENTRYP GetBooleanv)(GLenum pname, GLboolean* params);
+ GLenum (QOPENGLF_APIENTRYP GetError)();
+ void (QOPENGLF_APIENTRYP GetFloatv)(GLenum pname, GLfloat* params);
+ void (QOPENGLF_APIENTRYP GetIntegerv)(GLenum pname, GLint* params);
+ const GLubyte * (QOPENGLF_APIENTRYP GetString)(GLenum name);
+ void (QOPENGLF_APIENTRYP GetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params);
+ void (QOPENGLF_APIENTRYP GetTexParameteriv)(GLenum target, GLenum pname, GLint* params);
+ void (QOPENGLF_APIENTRYP Hint)(GLenum target, GLenum mode);
+ GLboolean (QOPENGLF_APIENTRYP IsEnabled)(GLenum cap);
+ GLboolean (QOPENGLF_APIENTRYP IsTexture)(GLuint texture);
+ void (QOPENGLF_APIENTRYP LineWidth)(GLfloat width);
+ void (QOPENGLF_APIENTRYP PixelStorei)(GLenum pname, GLint param);
+ void (QOPENGLF_APIENTRYP PolygonOffset)(GLfloat factor, GLfloat units);
+ void (QOPENGLF_APIENTRYP ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
+ void (QOPENGLF_APIENTRYP Scissor)(GLint x, GLint y, GLsizei width, GLsizei height);
+ void (QOPENGLF_APIENTRYP StencilFunc)(GLenum func, GLint ref, GLuint mask);
+ void (QOPENGLF_APIENTRYP StencilMask)(GLuint mask);
+ void (QOPENGLF_APIENTRYP StencilOp)(GLenum fail, GLenum zfail, GLenum zpass);
+ void (QOPENGLF_APIENTRYP TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+ void (QOPENGLF_APIENTRYP TexParameterf)(GLenum target, GLenum pname, GLfloat param);
+ void (QOPENGLF_APIENTRYP TexParameterfv)(GLenum target, GLenum pname, const GLfloat* params);
+ void (QOPENGLF_APIENTRYP TexParameteri)(GLenum target, GLenum pname, GLint param);
+ void (QOPENGLF_APIENTRYP TexParameteriv)(GLenum target, GLenum pname, const GLint* params);
+ void (QOPENGLF_APIENTRYP TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
+ void (QOPENGLF_APIENTRYP Viewport)(GLint x, GLint y, GLsizei width, GLsizei height);
+
void (QOPENGLF_APIENTRYP ActiveTexture)(GLenum texture);
void (QOPENGLF_APIENTRYP AttachShader)(GLuint program, GLuint shader);
void (QOPENGLF_APIENTRYP BindAttribLocation)(GLuint program, GLuint index, const char* name);
@@ -426,11 +564,520 @@ struct QOpenGLFunctionsPrivate
void (QOPENGLF_APIENTRYP VertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
void (QOPENGLF_APIENTRYP VertexAttrib4fv)(GLuint indx, const GLfloat* values);
void (QOPENGLF_APIENTRYP VertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
+
+ // OpenGL1 only, not GLES2
+ void (QOPENGLF_APIENTRYP GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
+
+ // Special non-ES OpenGL variants, not to be called directly
+ void (QOPENGLF_APIENTRYP ClearDepth)(GLdouble depth);
+ void (QOPENGLF_APIENTRYP DepthRange)(GLdouble zNear, GLdouble zFar);
};
+// GLES2 + OpenGL1 common subset
+
+inline void QOpenGLFunctions::glBindTexture(GLenum target, GLuint texture)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glBindTexture(target, texture);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->BindTexture(target, texture);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glBlendFunc(sfactor, dfactor);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->BlendFunc(sfactor, dfactor);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glClear(GLbitfield mask)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glClear(mask);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->Clear(mask);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glClearColor(red, green, blue, alpha);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->ClearColor(red, green, blue, alpha);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glClearStencil(GLint s)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glClearStencil(s);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->ClearStencil(s);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glColorMask(red, green, blue, alpha);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->ColorMask(red, green, blue, alpha);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glCopyTexImage2D(target, level, internalformat, x, y, width,height, border);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->CopyTexImage2D(target, level, internalformat, x, y, width,height, border);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glCullFace(GLenum mode)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glCullFace(mode);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->CullFace(mode);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glDeleteTextures(GLsizei n, const GLuint* textures)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glDeleteTextures(n, textures);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->DeleteTextures(n, textures);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glDepthFunc(GLenum func)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glDepthFunc(func);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->DepthFunc(func);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glDepthMask(GLboolean flag)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glDepthMask(flag);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->DepthMask(flag);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glDisable(GLenum cap)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glDisable(cap);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->Disable(cap);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glDrawArrays(mode, first, count);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->DrawArrays(mode, first, count);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glDrawElements(mode, count, type, indices);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->DrawElements(mode, count, type, indices);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glEnable(GLenum cap)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glEnable(cap);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->Enable(cap);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glFinish()
+{
+#ifdef QT_OPENGL_ES_2
+ ::glFinish();
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->Finish();
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glFlush()
+{
+#ifdef QT_OPENGL_ES_2
+ ::glFlush();
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->Flush();
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glFrontFace(GLenum mode)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glFrontFace(mode);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->FrontFace(mode);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glGenTextures(GLsizei n, GLuint* textures)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glGenTextures(n, textures);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->GenTextures(n, textures);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glGetBooleanv(GLenum pname, GLboolean* params)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glGetBooleanv(pname, params);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->GetBooleanv(pname, params);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline GLenum QOpenGLFunctions::glGetError()
+{
+#ifdef QT_OPENGL_ES_2
+ GLenum result = ::glGetError();
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ GLenum result = d_ptr->GetError();
+#endif
+ return result;
+}
+
+inline void QOpenGLFunctions::glGetFloatv(GLenum pname, GLfloat* params)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glGetFloatv(pname, params);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->GetFloatv(pname, params);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glGetIntegerv(GLenum pname, GLint* params)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glGetIntegerv(pname, params);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->GetIntegerv(pname, params);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline const GLubyte *QOpenGLFunctions::glGetString(GLenum name)
+{
+#ifdef QT_OPENGL_ES_2
+ const GLubyte *result = ::glGetString(name);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ const GLubyte *result = d_ptr->GetString(name);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+ return result;
+}
+
+inline void QOpenGLFunctions::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glGetTexParameterfv(target, pname, params);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->GetTexParameterfv(target, pname, params);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glGetTexParameteriv(target, pname, params);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->GetTexParameteriv(target, pname, params);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glHint(GLenum target, GLenum mode)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glHint(target, mode);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->Hint(target, mode);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline GLboolean QOpenGLFunctions::glIsEnabled(GLenum cap)
+{
+#ifdef QT_OPENGL_ES_2
+ GLboolean result = ::glIsEnabled(cap);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ GLboolean result = d_ptr->IsEnabled(cap);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+ return result;
+}
+
+inline GLboolean QOpenGLFunctions::glIsTexture(GLuint texture)
+{
+#ifdef QT_OPENGL_ES_2
+ GLboolean result = ::glIsTexture(texture);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ GLboolean result = d_ptr->IsTexture(texture);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+ return result;
+}
+
+inline void QOpenGLFunctions::glLineWidth(GLfloat width)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glLineWidth(width);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->LineWidth(width);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glPixelStorei(GLenum pname, GLint param)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glPixelStorei(pname, param);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->PixelStorei(pname, param);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glPolygonOffset(GLfloat factor, GLfloat units)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glPolygonOffset(factor, units);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->PolygonOffset(factor, units);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glReadPixels(x, y, width, height, format, type, pixels);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->ReadPixels(x, y, width, height, format, type, pixels);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glScissor(x, y, width, height);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->Scissor(x, y, width, height);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glStencilFunc(func, ref, mask);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->StencilFunc(func, ref, mask);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glStencilMask(GLuint mask)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glStencilMask(mask);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->StencilMask(mask);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glStencilOp(fail, zfail, zpass);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->StencilOp(fail, zfail, zpass);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glTexImage2D(target, level, internalformat, width,height, border, format, type, pixels);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->TexImage2D(target, level, internalformat, width,height, border, format, type, pixels);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glTexParameterf(target, pname, param);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->TexParameterf(target, pname, param);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glTexParameterfv(target, pname, params);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->TexParameterfv(target, pname, params);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glTexParameteri(target, pname, param);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->TexParameteri(target, pname, param);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glTexParameteriv(target, pname, params);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->TexParameteriv(target, pname, params);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+inline void QOpenGLFunctions::glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+#ifdef QT_OPENGL_ES_2
+ ::glViewport(x, y, width, height);
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->Viewport(x, y, width, height);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
+// GL(ES)2
+
inline void QOpenGLFunctions::glActiveTexture(GLenum texture)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glActiveTexture(texture);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -441,7 +1088,7 @@ inline void QOpenGLFunctions::glActiveTexture(GLenum texture)
inline void QOpenGLFunctions::glAttachShader(GLuint program, GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glAttachShader(program, shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -452,7 +1099,7 @@ inline void QOpenGLFunctions::glAttachShader(GLuint program, GLuint shader)
inline void QOpenGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBindAttribLocation(program, index, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -463,7 +1110,7 @@ inline void QOpenGLFunctions::glBindAttribLocation(GLuint program, GLuint index,
inline void QOpenGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBindBuffer(target, buffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -476,7 +1123,7 @@ inline void QOpenGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffe
{
if (framebuffer == 0)
framebuffer = QOpenGLContext::currentContext()->defaultFramebufferObject();
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBindFramebuffer(target, framebuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -487,7 +1134,7 @@ inline void QOpenGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffe
inline void QOpenGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBindRenderbuffer(target, renderbuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -498,7 +1145,7 @@ inline void QOpenGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuf
inline void QOpenGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBlendColor(red, green, blue, alpha);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -509,7 +1156,7 @@ inline void QOpenGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclamp
inline void QOpenGLFunctions::glBlendEquation(GLenum mode)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBlendEquation(mode);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -520,7 +1167,7 @@ inline void QOpenGLFunctions::glBlendEquation(GLenum mode)
inline void QOpenGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBlendEquationSeparate(modeRGB, modeAlpha);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -531,7 +1178,7 @@ inline void QOpenGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum mod
inline void QOpenGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -542,7 +1189,7 @@ inline void QOpenGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB,
inline void QOpenGLFunctions::glBufferData(GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBufferData(target, size, data, usage);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -553,7 +1200,7 @@ inline void QOpenGLFunctions::glBufferData(GLenum target, qopengl_GLsizeiptr siz
inline void QOpenGLFunctions::glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void* data)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glBufferSubData(target, offset, size, data);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -564,7 +1211,7 @@ inline void QOpenGLFunctions::glBufferSubData(GLenum target, qopengl_GLintptr of
inline GLenum QOpenGLFunctions::glCheckFramebufferStatus(GLenum target)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLenum result = ::glCheckFramebufferStatus(target);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -577,7 +1224,8 @@ inline GLenum QOpenGLFunctions::glCheckFramebufferStatus(GLenum target)
inline void QOpenGLFunctions::glClearDepthf(GLclampf depth)
{
#ifndef QT_OPENGL_ES
- ::glClearDepth(depth);
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->ClearDepthf(depth);
#else
::glClearDepthf(depth);
#endif
@@ -586,7 +1234,7 @@ inline void QOpenGLFunctions::glClearDepthf(GLclampf depth)
inline void QOpenGLFunctions::glCompileShader(GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glCompileShader(shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -597,7 +1245,7 @@ inline void QOpenGLFunctions::glCompileShader(GLuint shader)
inline void QOpenGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -608,7 +1256,7 @@ inline void QOpenGLFunctions::glCompressedTexImage2D(GLenum target, GLint level,
inline void QOpenGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -619,7 +1267,7 @@ inline void QOpenGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint lev
inline GLuint QOpenGLFunctions::glCreateProgram()
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLuint result = ::glCreateProgram();
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -631,7 +1279,7 @@ inline GLuint QOpenGLFunctions::glCreateProgram()
inline GLuint QOpenGLFunctions::glCreateShader(GLenum type)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLuint result = ::glCreateShader(type);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -643,7 +1291,7 @@ inline GLuint QOpenGLFunctions::glCreateShader(GLenum type)
inline void QOpenGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glDeleteBuffers(n, buffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -654,7 +1302,7 @@ inline void QOpenGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers)
inline void QOpenGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glDeleteFramebuffers(n, framebuffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -665,7 +1313,7 @@ inline void QOpenGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* fram
inline void QOpenGLFunctions::glDeleteProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glDeleteProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -676,7 +1324,7 @@ inline void QOpenGLFunctions::glDeleteProgram(GLuint program)
inline void QOpenGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glDeleteRenderbuffers(n, renderbuffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -687,7 +1335,7 @@ inline void QOpenGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* ren
inline void QOpenGLFunctions::glDeleteShader(GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glDeleteShader(shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -699,7 +1347,8 @@ inline void QOpenGLFunctions::glDeleteShader(GLuint shader)
inline void QOpenGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
{
#ifndef QT_OPENGL_ES
- ::glDepthRange(zNear, zFar);
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->DepthRangef(zNear, zFar);
#else
::glDepthRangef(zNear, zFar);
#endif
@@ -708,7 +1357,7 @@ inline void QOpenGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
inline void QOpenGLFunctions::glDetachShader(GLuint program, GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glDetachShader(program, shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -719,7 +1368,7 @@ inline void QOpenGLFunctions::glDetachShader(GLuint program, GLuint shader)
inline void QOpenGLFunctions::glDisableVertexAttribArray(GLuint index)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glDisableVertexAttribArray(index);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -730,7 +1379,7 @@ inline void QOpenGLFunctions::glDisableVertexAttribArray(GLuint index)
inline void QOpenGLFunctions::glEnableVertexAttribArray(GLuint index)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glEnableVertexAttribArray(index);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -741,7 +1390,7 @@ inline void QOpenGLFunctions::glEnableVertexAttribArray(GLuint index)
inline void QOpenGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -752,7 +1401,7 @@ inline void QOpenGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum at
inline void QOpenGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glFramebufferTexture2D(target, attachment, textarget, texture, level);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -763,7 +1412,7 @@ inline void QOpenGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attac
inline void QOpenGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGenBuffers(n, buffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -774,7 +1423,7 @@ inline void QOpenGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers)
inline void QOpenGLFunctions::glGenerateMipmap(GLenum target)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGenerateMipmap(target);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -785,7 +1434,7 @@ inline void QOpenGLFunctions::glGenerateMipmap(GLenum target)
inline void QOpenGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGenFramebuffers(n, framebuffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -796,7 +1445,7 @@ inline void QOpenGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
inline void QOpenGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGenRenderbuffers(n, renderbuffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -807,7 +1456,7 @@ inline void QOpenGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffer
inline void QOpenGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetActiveAttrib(program, index, bufsize, length, size, type, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -818,7 +1467,7 @@ inline void QOpenGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GL
inline void QOpenGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetActiveUniform(program, index, bufsize, length, size, type, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -829,7 +1478,7 @@ inline void QOpenGLFunctions::glGetActiveUniform(GLuint program, GLuint index, G
inline void QOpenGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetAttachedShaders(program, maxcount, count, shaders);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -840,7 +1489,7 @@ inline void QOpenGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxco
inline GLint QOpenGLFunctions::glGetAttribLocation(GLuint program, const char* name)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLint result = ::glGetAttribLocation(program, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -852,7 +1501,7 @@ inline GLint QOpenGLFunctions::glGetAttribLocation(GLuint program, const char* n
inline void QOpenGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetBufferParameteriv(target, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -863,7 +1512,7 @@ inline void QOpenGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname
inline void QOpenGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -874,7 +1523,7 @@ inline void QOpenGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum targe
inline void QOpenGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetProgramiv(program, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -885,7 +1534,7 @@ inline void QOpenGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint
inline void QOpenGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetProgramInfoLog(program, bufsize, length, infolog);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -896,7 +1545,7 @@ inline void QOpenGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsiz
inline void QOpenGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetRenderbufferParameteriv(target, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -907,7 +1556,7 @@ inline void QOpenGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum
inline void QOpenGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetShaderiv(shader, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -918,7 +1567,7 @@ inline void QOpenGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint*
inline void QOpenGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetShaderInfoLog(shader, bufsize, length, infolog);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -929,7 +1578,7 @@ inline void QOpenGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize,
inline void QOpenGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -940,7 +1589,7 @@ inline void QOpenGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLen
inline void QOpenGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetShaderSource(shader, bufsize, length, source);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -951,7 +1600,7 @@ inline void QOpenGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize,
inline void QOpenGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat* params)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetUniformfv(program, location, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -962,7 +1611,7 @@ inline void QOpenGLFunctions::glGetUniformfv(GLuint program, GLint location, GLf
inline void QOpenGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetUniformiv(program, location, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -973,7 +1622,7 @@ inline void QOpenGLFunctions::glGetUniformiv(GLuint program, GLint location, GLi
inline GLint QOpenGLFunctions::glGetUniformLocation(GLuint program, const char* name)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLint result = ::glGetUniformLocation(program, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -985,7 +1634,7 @@ inline GLint QOpenGLFunctions::glGetUniformLocation(GLuint program, const char*
inline void QOpenGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetVertexAttribfv(index, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -996,7 +1645,7 @@ inline void QOpenGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GL
inline void QOpenGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetVertexAttribiv(index, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1007,7 +1656,7 @@ inline void QOpenGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GL
inline void QOpenGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glGetVertexAttribPointerv(index, pname, pointer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1018,7 +1667,7 @@ inline void QOpenGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pna
inline GLboolean QOpenGLFunctions::glIsBuffer(GLuint buffer)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLboolean result = ::glIsBuffer(buffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1030,7 +1679,7 @@ inline GLboolean QOpenGLFunctions::glIsBuffer(GLuint buffer)
inline GLboolean QOpenGLFunctions::glIsFramebuffer(GLuint framebuffer)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLboolean result = ::glIsFramebuffer(framebuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1042,7 +1691,7 @@ inline GLboolean QOpenGLFunctions::glIsFramebuffer(GLuint framebuffer)
inline GLboolean QOpenGLFunctions::glIsProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLboolean result = ::glIsProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1054,7 +1703,7 @@ inline GLboolean QOpenGLFunctions::glIsProgram(GLuint program)
inline GLboolean QOpenGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLboolean result = ::glIsRenderbuffer(renderbuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1066,7 +1715,7 @@ inline GLboolean QOpenGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
inline GLboolean QOpenGLFunctions::glIsShader(GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
GLboolean result = ::glIsShader(shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1078,7 +1727,7 @@ inline GLboolean QOpenGLFunctions::glIsShader(GLuint shader)
inline void QOpenGLFunctions::glLinkProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glLinkProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1089,7 +1738,7 @@ inline void QOpenGLFunctions::glLinkProgram(GLuint program)
inline void QOpenGLFunctions::glReleaseShaderCompiler()
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glReleaseShaderCompiler();
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1100,7 +1749,7 @@ inline void QOpenGLFunctions::glReleaseShaderCompiler()
inline void QOpenGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glRenderbufferStorage(target, internalformat, width, height);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1111,7 +1760,7 @@ inline void QOpenGLFunctions::glRenderbufferStorage(GLenum target, GLenum intern
inline void QOpenGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glSampleCoverage(value, invert);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1122,7 +1771,7 @@ inline void QOpenGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
inline void QOpenGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glShaderBinary(n, shaders, binaryformat, binary, length);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1133,7 +1782,7 @@ inline void QOpenGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLe
inline void QOpenGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glShaderSource(shader, count, string, length);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1144,7 +1793,7 @@ inline void QOpenGLFunctions::glShaderSource(GLuint shader, GLsizei count, const
inline void QOpenGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glStencilFuncSeparate(face, func, ref, mask);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1155,7 +1804,7 @@ inline void QOpenGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GL
inline void QOpenGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glStencilMaskSeparate(face, mask);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1166,7 +1815,7 @@ inline void QOpenGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
inline void QOpenGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glStencilOpSeparate(face, fail, zfail, zpass);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1177,7 +1826,7 @@ inline void QOpenGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLen
inline void QOpenGLFunctions::glUniform1f(GLint location, GLfloat x)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform1f(location, x);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1188,7 +1837,7 @@ inline void QOpenGLFunctions::glUniform1f(GLint location, GLfloat x)
inline void QOpenGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform1fv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1199,7 +1848,7 @@ inline void QOpenGLFunctions::glUniform1fv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform1i(GLint location, GLint x)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform1i(location, x);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1210,7 +1859,7 @@ inline void QOpenGLFunctions::glUniform1i(GLint location, GLint x)
inline void QOpenGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform1iv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1221,7 +1870,7 @@ inline void QOpenGLFunctions::glUniform1iv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform2f(location, x, y);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1232,7 +1881,7 @@ inline void QOpenGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
inline void QOpenGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform2fv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1243,7 +1892,7 @@ inline void QOpenGLFunctions::glUniform2fv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform2i(location, x, y);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1254,7 +1903,7 @@ inline void QOpenGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
inline void QOpenGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform2iv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1265,7 +1914,7 @@ inline void QOpenGLFunctions::glUniform2iv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform3f(location, x, y, z);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1276,7 +1925,7 @@ inline void QOpenGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y,
inline void QOpenGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform3fv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1287,7 +1936,7 @@ inline void QOpenGLFunctions::glUniform3fv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform3i(location, x, y, z);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1298,7 +1947,7 @@ inline void QOpenGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLin
inline void QOpenGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform3iv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1309,7 +1958,7 @@ inline void QOpenGLFunctions::glUniform3iv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform4f(location, x, y, z, w);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1320,7 +1969,7 @@ inline void QOpenGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y,
inline void QOpenGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform4fv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1331,7 +1980,7 @@ inline void QOpenGLFunctions::glUniform4fv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform4i(location, x, y, z, w);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1342,7 +1991,7 @@ inline void QOpenGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLin
inline void QOpenGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniform4iv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1353,7 +2002,7 @@ inline void QOpenGLFunctions::glUniform4iv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniformMatrix2fv(location, count, transpose, value);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1364,7 +2013,7 @@ inline void QOpenGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count,
inline void QOpenGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniformMatrix3fv(location, count, transpose, value);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1375,7 +2024,7 @@ inline void QOpenGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count,
inline void QOpenGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUniformMatrix4fv(location, count, transpose, value);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1386,7 +2035,7 @@ inline void QOpenGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count,
inline void QOpenGLFunctions::glUseProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glUseProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1397,7 +2046,7 @@ inline void QOpenGLFunctions::glUseProgram(GLuint program)
inline void QOpenGLFunctions::glValidateProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glValidateProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1408,7 +2057,7 @@ inline void QOpenGLFunctions::glValidateProgram(GLuint program)
inline void QOpenGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glVertexAttrib1f(indx, x);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1419,7 +2068,7 @@ inline void QOpenGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
inline void QOpenGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glVertexAttrib1fv(indx, values);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1430,7 +2079,7 @@ inline void QOpenGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* valu
inline void QOpenGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glVertexAttrib2f(indx, x, y);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1441,7 +2090,7 @@ inline void QOpenGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y
inline void QOpenGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glVertexAttrib2fv(indx, values);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1452,7 +2101,7 @@ inline void QOpenGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* valu
inline void QOpenGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glVertexAttrib3f(indx, x, y, z);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1463,7 +2112,7 @@ inline void QOpenGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y
inline void QOpenGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glVertexAttrib3fv(indx, values);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1474,7 +2123,7 @@ inline void QOpenGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* valu
inline void QOpenGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glVertexAttrib4f(indx, x, y, z, w);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1485,7 +2134,7 @@ inline void QOpenGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y
inline void QOpenGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glVertexAttrib4fv(indx, values);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1496,7 +2145,7 @@ inline void QOpenGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* valu
inline void QOpenGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
{
-#if defined(QT_OPENGL_ES_2)
+#ifdef QT_OPENGL_ES_2
::glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1505,6 +2154,24 @@ inline void QOpenGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLe
Q_OPENGL_FUNCTIONS_DEBUG
}
+// OpenGL1, not GLES2
+
+inline void QOpenGLFunctions::glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
+{
+#ifdef QT_OPENGL_ES_2
+ Q_UNUSED(target);
+ Q_UNUSED(level);
+ Q_UNUSED(pname);
+ Q_UNUSED(params);
+ // Cannot get here.
+ qFatal("QOpenGLFunctions: glGetTexLevelParameteriv not available with OpenGL ES");
+#else
+ Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
+ d_ptr->GetTexLevelParameteriv(target, level, pname, params);
+#endif
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
+
QT_END_NAMESPACE
#endif // QT_NO_OPENGL
diff --git a/src/gui/opengl/qopenglgradientcache.cpp b/src/gui/opengl/qopenglgradientcache.cpp
index 9c312808a2..91b4d08474 100644
--- a/src/gui/opengl/qopenglgradientcache.cpp
+++ b/src/gui/opengl/qopenglgradientcache.cpp
@@ -43,6 +43,7 @@
#include <private/qdrawhelper_p.h>
#include <private/qopenglcontext_p.h>
#include <QtCore/qmutex.h>
+#include <QtGui/qopenglfunctions.h>
QT_BEGIN_NAMESPACE
@@ -91,9 +92,10 @@ void QOpenGL2GradientCache::cleanCache()
{
QMutexLocker lock(&m_mutex);
QOpenGLGradientColorTableHash::const_iterator it = cache.constBegin();
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
for (; it != cache.constEnd(); ++it) {
const CacheInfo &cache_info = it.value();
- glDeleteTextures(1, &cache_info.texId);
+ funcs->glDeleteTextures(1, &cache_info.texId);
}
cache.clear();
}
@@ -129,6 +131,7 @@ GLuint QOpenGL2GradientCache::getBuffer(const QGradient &gradient, qreal opacity
GLuint QOpenGL2GradientCache::addCacheElement(quint64 hash_val, const QGradient &gradient, qreal opacity)
{
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
if (cache.size() == maxCacheSize()) {
int elem_to_remove = qrand() % maxCacheSize();
quint64 key = cache.keys()[elem_to_remove];
@@ -136,7 +139,7 @@ GLuint QOpenGL2GradientCache::addCacheElement(quint64 hash_val, const QGradient
// need to call glDeleteTextures on each removed cache entry:
QOpenGLGradientColorTableHash::const_iterator it = cache.constFind(key);
do {
- glDeleteTextures(1, &it.value().texId);
+ funcs->glDeleteTextures(1, &it.value().texId);
} while (++it != cache.constEnd() && it.key() == key);
cache.remove(key); // may remove more than 1, but OK
}
@@ -144,10 +147,10 @@ GLuint QOpenGL2GradientCache::addCacheElement(quint64 hash_val, const QGradient
CacheInfo cache_entry(gradient.stops(), opacity, gradient.interpolationMode());
uint buffer[1024];
generateGradientColorTable(gradient, buffer, paletteSize(), opacity);
- glGenTextures(1, &cache_entry.texId);
- glBindTexture(GL_TEXTURE_2D, cache_entry.texId);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, paletteSize(), 1,
- 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+ funcs->glGenTextures(1, &cache_entry.texId);
+ funcs->glBindTexture(GL_TEXTURE_2D, cache_entry.texId);
+ funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, paletteSize(), 1,
+ 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
return cache.insert(hash_val, cache_entry).value().texId;
}
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 63127668a5..f160b340e0 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -123,14 +123,14 @@ void QOpenGL2PaintEngineExPrivate::updateTextureFilter(GLenum target, GLenum wra
lastTextureUsed = id;
if (smoothPixmapTransform) {
- glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ funcs.glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ funcs.glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
} else {
- glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ funcs.glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ funcs.glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
}
- glTexParameteri(target, GL_TEXTURE_WRAP_S, wrapMode);
- glTexParameteri(target, GL_TEXTURE_WRAP_T, wrapMode);
+ funcs.glTexParameteri(target, GL_TEXTURE_WRAP_S, wrapMode);
+ funcs.glTexParameteri(target, GL_TEXTURE_WRAP_T, wrapMode);
}
@@ -204,7 +204,7 @@ void QOpenGL2PaintEngineExPrivate::updateBrushTexture()
GLuint texId = QOpenGL2GradientCache::cacheForContext(ctx)->getBuffer(*g, 1.0);
funcs.glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
- glBindTexture(GL_TEXTURE_2D, texId);
+ funcs.glBindTexture(GL_TEXTURE_2D, texId);
if (g->spread() == QGradient::RepeatSpread || g->type() == QGradient::ConicalGradient)
updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
@@ -221,7 +221,7 @@ void QOpenGL2PaintEngineExPrivate::updateBrushTexture()
currentBrushPixmap = currentBrushPixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
GLuint wrapMode = GL_REPEAT;
- if (QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::currentContext()->isES()) {
// 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.
@@ -439,43 +439,43 @@ void QOpenGL2PaintEngineExPrivate::updateCompositionMode()
// qDebug() << "QOpenGL2PaintEngineExPrivate::updateCompositionMode() - Setting GL composition mode for " << q->state()->composition_mode;
switch(q->state()->composition_mode) {
case QPainter::CompositionMode_SourceOver:
- glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ funcs.glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
break;
case QPainter::CompositionMode_DestinationOver:
- glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ONE);
+ funcs.glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ONE);
break;
case QPainter::CompositionMode_Clear:
- glBlendFunc(GL_ZERO, GL_ZERO);
+ funcs.glBlendFunc(GL_ZERO, GL_ZERO);
break;
case QPainter::CompositionMode_Source:
- glBlendFunc(GL_ONE, GL_ZERO);
+ funcs.glBlendFunc(GL_ONE, GL_ZERO);
break;
case QPainter::CompositionMode_Destination:
- glBlendFunc(GL_ZERO, GL_ONE);
+ funcs.glBlendFunc(GL_ZERO, GL_ONE);
break;
case QPainter::CompositionMode_SourceIn:
- glBlendFunc(GL_DST_ALPHA, GL_ZERO);
+ funcs.glBlendFunc(GL_DST_ALPHA, GL_ZERO);
break;
case QPainter::CompositionMode_DestinationIn:
- glBlendFunc(GL_ZERO, GL_SRC_ALPHA);
+ funcs.glBlendFunc(GL_ZERO, GL_SRC_ALPHA);
break;
case QPainter::CompositionMode_SourceOut:
- glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ZERO);
+ funcs.glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ZERO);
break;
case QPainter::CompositionMode_DestinationOut:
- glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA);
+ funcs.glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA);
break;
case QPainter::CompositionMode_SourceAtop:
- glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ funcs.glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
break;
case QPainter::CompositionMode_DestinationAtop:
- glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_SRC_ALPHA);
+ funcs.glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_SRC_ALPHA);
break;
case QPainter::CompositionMode_Xor:
- glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ funcs.glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
break;
case QPainter::CompositionMode_Plus:
- glBlendFunc(GL_ONE, GL_ONE);
+ funcs.glBlendFunc(GL_ONE, GL_ONE);
break;
default:
qWarning("Unsupported composition mode");
@@ -524,7 +524,7 @@ void QOpenGL2PaintEngineExPrivate::drawTexture(const QOpenGLRect& dest, const QO
setCoords(staticVertexCoordinateArray, dest);
setCoords(staticTextureCoordinateArray, srcTextureRect);
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ funcs.glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
void QOpenGL2PaintEngineEx::beginNativePainting()
@@ -541,37 +541,35 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i)
d->funcs.glDisableVertexAttribArray(i);
-#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
- Q_ASSERT(QOpenGLContext::currentContext());
- const QOpenGLContext *ctx = d->ctx;
- const QSurfaceFormat &fmt = d->device->context()->format();
- if (fmt.majorVersion() < 3 || (fmt.majorVersion() == 3 && fmt.minorVersion() < 1)
- || (fmt.majorVersion() == 3 && fmt.minorVersion() == 1 && ctx->hasExtension(QByteArrayLiteral("GL_ARB_compatibility")))
- || fmt.profile() == QSurfaceFormat::CompatibilityProfile)
- {
- // be nice to people who mix OpenGL 1.x code with QPainter commands
- // by setting modelview and projection matrices to mirror the GL 1
- // paint engine
- const QTransform& mtx = state()->matrix;
-
- float mv_matrix[4][4] =
- {
- { float(mtx.m11()), float(mtx.m12()), 0, float(mtx.m13()) },
- { float(mtx.m21()), float(mtx.m22()), 0, float(mtx.m23()) },
- { 0, 0, 1, 0 },
- { float(mtx.dx()), float(mtx.dy()), 0, float(mtx.m33()) }
- };
-
- const QSize sz = d->device->size();
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0, sz.width(), sz.height(), 0, -999999, 999999);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadMatrixf(&mv_matrix[0][0]);
- }
+#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_DYNAMIC)
+ Q_ASSERT(QOpenGLContext::currentContext());
+ const QOpenGLContext *ctx = d->ctx;
+ const QSurfaceFormat &fmt = d->device->context()->format();
+ if (fmt.majorVersion() < 3 || (fmt.majorVersion() == 3 && fmt.minorVersion() < 1)
+ || (fmt.majorVersion() == 3 && fmt.minorVersion() == 1 && ctx->hasExtension(QByteArrayLiteral("GL_ARB_compatibility")))
+ || fmt.profile() == QSurfaceFormat::CompatibilityProfile)
+ {
+ // be nice to people who mix OpenGL 1.x code with QPainter commands
+ // by setting modelview and projection matrices to mirror the GL 1
+ // paint engine
+ const QTransform& mtx = state()->matrix;
+
+ float mv_matrix[4][4] =
+ {
+ { float(mtx.m11()), float(mtx.m12()), 0, float(mtx.m13()) },
+ { float(mtx.m21()), float(mtx.m22()), 0, float(mtx.m23()) },
+ { 0, 0, 1, 0 },
+ { float(mtx.dx()), float(mtx.dy()), 0, float(mtx.m33()) }
+ };
+
+ const QSize sz = d->device->size();
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(0, sz.width(), sz.height(), 0, -999999, 999999);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadMatrixf(&mv_matrix[0][0]);
}
#endif // QT_OPENGL_ES_2
@@ -586,21 +584,21 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
void QOpenGL2PaintEngineExPrivate::resetGLState()
{
- glDisable(GL_BLEND);
+ funcs.glDisable(GL_BLEND);
funcs.glActiveTexture(GL_TEXTURE0);
- glDisable(GL_STENCIL_TEST);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_SCISSOR_TEST);
- glDepthMask(true);
- glDepthFunc(GL_LESS);
+ funcs.glDisable(GL_STENCIL_TEST);
+ funcs.glDisable(GL_DEPTH_TEST);
+ funcs.glDisable(GL_SCISSOR_TEST);
+ funcs.glDepthMask(true);
+ funcs.glDepthFunc(GL_LESS);
funcs.glClearDepthf(1);
- glStencilMask(0xff);
- glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
- glStencilFunc(GL_ALWAYS, 0, 0xff);
+ funcs.glStencilMask(0xff);
+ funcs.glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
+ funcs.glStencilFunc(GL_ALWAYS, 0, 0xff);
setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, false);
setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false);
setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
// gl_Color, corresponding to vertex attribute 3, may have been changed
float color[] = { 1.0f, 1.0f, 1.0f, 1.0f };
funcs.glVertexAttrib4fv(3, color);
@@ -755,9 +753,9 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
cache->primitiveType = GL_TRIANGLE_FAN;
cache->iscale = inverseScale;
#ifdef QT_OPENGL_CACHE_AS_VBOS
- glGenBuffers(1, &cache->vbo);
- glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
- glBufferData(GL_ARRAY_BUFFER, floatSizeInBytes, vertexCoordinateArray.data(), GL_STATIC_DRAW);
+ funcs.glGenBuffers(1, &cache->vbo);
+ funcs.glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
+ funcs.glBufferData(GL_ARRAY_BUFFER, floatSizeInBytes, vertexCoordinateArray.data(), GL_STATIC_DRAW);
cache->ibo = 0;
#else
cache->vertices = (float *) malloc(floatSizeInBytes);
@@ -768,12 +766,12 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
prepareForDraw(currentBrush.isOpaque());
#ifdef QT_OPENGL_CACHE_AS_VBOS
- glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
+ funcs.glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, 0);
#else
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, cache->vertices);
#endif
- glDrawArrays(cache->primitiveType, 0, cache->vertexCount);
+ funcs.glDrawArrays(cache->primitiveType, 0, cache->vertexCount);
} else {
// printf(" - Marking path as cachable...\n");
@@ -833,10 +831,10 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
cache->iscale = inverseScale;
cache->indexType = polys.indices.type();
#ifdef QT_OPENGL_CACHE_AS_VBOS
- glGenBuffers(1, &cache->vbo);
- glGenBuffers(1, &cache->ibo);
- glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, cache->ibo);
+ funcs.glGenBuffers(1, &cache->vbo);
+ funcs.glGenBuffers(1, &cache->ibo);
+ funcs.glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
+ funcs.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, cache->ibo);
if (polys.indices.type() == QVertexIndexVector::UnsignedInt)
funcs.glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(quint32) * polys.indices.size(), polys.indices.data(), GL_STATIC_DRAW);
@@ -863,21 +861,21 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
prepareForDraw(currentBrush.isOpaque());
#ifdef QT_OPENGL_CACHE_AS_VBOS
- glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, cache->ibo);
+ funcs.glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
+ funcs.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, cache->ibo);
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, 0);
if (cache->indexType == QVertexIndexVector::UnsignedInt)
- glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_INT, 0);
+ funcs.glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_INT, 0);
else
- glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_SHORT, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ARRAY_BUFFER, 0);
+ funcs.glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_SHORT, 0);
+ funcs.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+ funcs.glBindBuffer(GL_ARRAY_BUFFER, 0);
#else
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, cache->vertices);
if (cache->indexType == QVertexIndexVector::UnsignedInt)
- glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_INT, (qint32 *)cache->indices);
+ funcs.glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_INT, (qint32 *)cache->indices);
else
- glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_SHORT, (qint16 *)cache->indices);
+ funcs.glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_SHORT, (qint16 *)cache->indices);
#endif
} else {
@@ -904,9 +902,9 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
prepareForDraw(currentBrush.isOpaque());
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, vertices.constData());
if (funcs.hasOpenGLExtension(QOpenGLExtensions::ElementIndexUint))
- glDrawElements(GL_TRIANGLES, polys.indices.size(), GL_UNSIGNED_INT, polys.indices.data());
+ funcs.glDrawElements(GL_TRIANGLES, polys.indices.size(), GL_UNSIGNED_INT, polys.indices.data());
else
- glDrawElements(GL_TRIANGLES, polys.indices.size(), GL_UNSIGNED_SHORT, polys.indices.data());
+ funcs.glDrawElements(GL_TRIANGLES, polys.indices.size(), GL_UNSIGNED_SHORT, polys.indices.data());
} else {
// We can't handle big, concave painter paths with OpenGL without stencil buffer.
qWarning("Painter path exceeds +/-32767 pixels.");
@@ -920,24 +918,24 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill());
- glStencilMask(0xff);
- glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
+ funcs.glStencilMask(0xff);
+ funcs.glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
if (q->state()->clipTestEnabled) {
// Pass when high bit is set, replace stencil value with current clip
- glStencilFunc(GL_NOTEQUAL, q->state()->currentClip, GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_NOTEQUAL, q->state()->currentClip, GL_STENCIL_HIGH_BIT);
} else if (path.hasWindingFill()) {
// Pass when any bit is set, replace stencil value with 0
- glStencilFunc(GL_NOTEQUAL, 0, 0xff);
+ funcs.glStencilFunc(GL_NOTEQUAL, 0, 0xff);
} else {
// Pass when high bit is set, replace stencil value with 0
- glStencilFunc(GL_NOTEQUAL, 0, GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_NOTEQUAL, 0, GL_STENCIL_HIGH_BIT);
}
prepareForDraw(currentBrush.isOpaque());
// Stencil the brush onto the dest buffer
composite(vertexCoordinateArray.boundingRect());
- glStencilMask(0);
+ funcs.glStencilMask(0);
updateClipScissorTest();
}
}
@@ -954,16 +952,16 @@ void QOpenGL2PaintEngineExPrivate::fillStencilWithVertexArray(const float *data,
Q_ASSERT(count || stops);
// qDebug("QOpenGL2PaintEngineExPrivate::fillStencilWithVertexArray()");
- glStencilMask(0xff); // Enable stencil writes
+ funcs.glStencilMask(0xff); // Enable stencil writes
if (dirtyStencilRegion.intersects(currentScissorBounds)) {
QVector<QRect> clearRegion = dirtyStencilRegion.intersected(currentScissorBounds).rects();
- glClearStencil(0); // Clear to zero
+ funcs.glClearStencil(0); // Clear to zero
for (int i = 0; i < clearRegion.size(); ++i) {
#ifndef QT_GL_NO_SCISSOR_TEST
setScissor(clearRegion.at(i));
#endif
- glClear(GL_STENCIL_BUFFER_BIT);
+ funcs.glClear(GL_STENCIL_BUFFER_BIT);
}
dirtyStencilRegion -= currentScissorBounds;
@@ -973,23 +971,23 @@ void QOpenGL2PaintEngineExPrivate::fillStencilWithVertexArray(const float *data,
#endif
}
- glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); // Disable color writes
+ funcs.glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); // Disable color writes
useSimpleShader();
- glEnable(GL_STENCIL_TEST); // For some reason, this has to happen _after_ the simple shader is use()'d
+ funcs.glEnable(GL_STENCIL_TEST); // For some reason, this has to happen _after_ the simple shader is use()'d
if (mode == WindingFillMode) {
Q_ASSERT(stops && !count);
if (q->state()->clipTestEnabled) {
// Flatten clip values higher than current clip, and set high bit to match current clip
- glStencilFunc(GL_LEQUAL, GL_STENCIL_HIGH_BIT | q->state()->currentClip, ~GL_STENCIL_HIGH_BIT);
- glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
+ funcs.glStencilFunc(GL_LEQUAL, GL_STENCIL_HIGH_BIT | q->state()->currentClip, ~GL_STENCIL_HIGH_BIT);
+ funcs.glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
composite(bounds);
- glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT, GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT, GL_STENCIL_HIGH_BIT);
} else if (!stencilClean) {
// Clear stencil buffer within bounding rect
- glStencilFunc(GL_ALWAYS, 0, 0xff);
- glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO);
+ funcs.glStencilFunc(GL_ALWAYS, 0, 0xff);
+ funcs.glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO);
composite(bounds);
}
@@ -997,44 +995,44 @@ void QOpenGL2PaintEngineExPrivate::fillStencilWithVertexArray(const float *data,
funcs.glStencilOpSeparate(GL_FRONT, GL_KEEP, GL_INCR_WRAP, GL_INCR_WRAP);
// Dec. for back-facing "holes"
funcs.glStencilOpSeparate(GL_BACK, GL_KEEP, GL_DECR_WRAP, GL_DECR_WRAP);
- glStencilMask(~GL_STENCIL_HIGH_BIT);
+ funcs.glStencilMask(~GL_STENCIL_HIGH_BIT);
drawVertexArrays(data, stops, stopCount, GL_TRIANGLE_FAN);
if (q->state()->clipTestEnabled) {
// Clear high bit of stencil outside of path
- glStencilFunc(GL_EQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT);
- glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
- glStencilMask(GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_EQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT);
+ funcs.glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
+ funcs.glStencilMask(GL_STENCIL_HIGH_BIT);
composite(bounds);
}
} else if (mode == OddEvenFillMode) {
- glStencilMask(GL_STENCIL_HIGH_BIT);
- glStencilOp(GL_KEEP, GL_KEEP, GL_INVERT); // Simply invert the stencil bit
+ funcs.glStencilMask(GL_STENCIL_HIGH_BIT);
+ funcs.glStencilOp(GL_KEEP, GL_KEEP, GL_INVERT); // Simply invert the stencil bit
drawVertexArrays(data, stops, stopCount, GL_TRIANGLE_FAN);
} else { // TriStripStrokeFillMode
Q_ASSERT(count && !stops); // tristrips generated directly, so no vertexArray or stops
- glStencilMask(GL_STENCIL_HIGH_BIT);
+ funcs.glStencilMask(GL_STENCIL_HIGH_BIT);
#if 0
- glStencilOp(GL_KEEP, GL_KEEP, GL_INVERT); // Simply invert the stencil bit
+ funcs.glStencilOp(GL_KEEP, GL_KEEP, GL_INVERT); // Simply invert the stencil bit
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, data);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, count);
+ funcs.glDrawArrays(GL_TRIANGLE_STRIP, 0, count);
#else
- glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
+ funcs.glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
if (q->state()->clipTestEnabled) {
- glStencilFunc(GL_LEQUAL, q->state()->currentClip | GL_STENCIL_HIGH_BIT,
- ~GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_LEQUAL, q->state()->currentClip | GL_STENCIL_HIGH_BIT,
+ ~GL_STENCIL_HIGH_BIT);
} else {
- glStencilFunc(GL_ALWAYS, GL_STENCIL_HIGH_BIT, 0xff);
+ funcs.glStencilFunc(GL_ALWAYS, GL_STENCIL_HIGH_BIT, 0xff);
}
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, data);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, count);
+ funcs.glDrawArrays(GL_TRIANGLE_STRIP, 0, count);
#endif
}
// Enable color writes & disable stencil writes
- glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+ funcs.glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
}
/*
@@ -1050,22 +1048,22 @@ void QOpenGL2PaintEngineExPrivate::resetClipIfNeeded()
Q_Q(QOpenGL2PaintEngineEx);
useSimpleShader();
- glEnable(GL_STENCIL_TEST);
- glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
+ funcs.glEnable(GL_STENCIL_TEST);
+ funcs.glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
QRectF bounds = q->state()->matrix.inverted().mapRect(QRectF(0, 0, width, height));
QOpenGLRect rect(bounds.left(), bounds.top(), bounds.right(), bounds.bottom());
// Set high bit on clip region
- glStencilFunc(GL_LEQUAL, q->state()->currentClip, 0xff);
- glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT);
- glStencilMask(GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_LEQUAL, q->state()->currentClip, 0xff);
+ funcs.glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT);
+ funcs.glStencilMask(GL_STENCIL_HIGH_BIT);
composite(rect);
// Reset clipping to 1 and everything else to zero
- glStencilFunc(GL_NOTEQUAL, 0x01, GL_STENCIL_HIGH_BIT);
- glStencilOp(GL_ZERO, GL_REPLACE, GL_REPLACE);
- glStencilMask(0xff);
+ funcs.glStencilFunc(GL_NOTEQUAL, 0x01, GL_STENCIL_HIGH_BIT);
+ funcs.glStencilOp(GL_ZERO, GL_REPLACE, GL_REPLACE);
+ funcs.glStencilMask(0xff);
composite(rect);
q->state()->currentClip = 1;
@@ -1073,8 +1071,8 @@ void QOpenGL2PaintEngineExPrivate::resetClipIfNeeded()
maxClip = 1;
- glStencilMask(0x0);
- glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+ funcs.glStencilMask(0x0);
+ funcs.glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
}
bool QOpenGL2PaintEngineExPrivate::prepareForCachedGlyphDraw(const QFontEngineGlyphCache &cache)
@@ -1107,9 +1105,9 @@ bool QOpenGL2PaintEngineExPrivate::prepareForDraw(bool srcPixelsAreOpaque)
|| (q->state()->composition_mode == QPainter::CompositionMode_SourceOver
&& srcPixelsAreOpaque && !stateHasOpacity))
{
- glDisable(GL_BLEND);
+ funcs.glDisable(GL_BLEND);
} else {
- glEnable(GL_BLEND);
+ funcs.glEnable(GL_BLEND);
}
QOpenGLEngineShaderManager::OpacityMode opacityMode;
@@ -1159,7 +1157,7 @@ void QOpenGL2PaintEngineExPrivate::composite(const QOpenGLRect& boundingRect)
{
setCoords(staticVertexCoordinateArray, boundingRect);
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, staticVertexCoordinateArray);
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ funcs.glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
// Draws the vertex array as a set of <vertexArrayStops.size()> triangle fans.
@@ -1177,7 +1175,7 @@ void QOpenGL2PaintEngineExPrivate::drawVertexArrays(const float *data, int *stop
for (int i=previousStop; i<stop; ++i)
qDebug(" %02d: [%.2f, %.2f]", i, vertexArray.data()[i].x, vertexArray.data()[i].y);
*/
- glDrawArrays(primitive, previousStop, stop - previousStop);
+ funcs.glDrawArrays(primitive, previousStop, stop - previousStop);
previousStop = stop;
}
}
@@ -1269,7 +1267,7 @@ void QOpenGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &p
if (opaque) {
prepareForDraw(opaque);
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, stroker.vertices());
- glDrawArrays(GL_TRIANGLE_STRIP, 0, stroker.vertexCount() / 2);
+ funcs.glDrawArrays(GL_TRIANGLE_STRIP, 0, stroker.vertexCount() / 2);
// QBrush b(Qt::green);
// d->setBrush(&b);
@@ -1292,16 +1290,16 @@ void QOpenGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &p
fillStencilWithVertexArray(stroker.vertices(), stroker.vertexCount() / 2,
0, 0, bounds, QOpenGL2PaintEngineExPrivate::TriStripStrokeFillMode);
- glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
+ funcs.glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
// Pass when any bit is set, replace stencil value with 0
- glStencilFunc(GL_NOTEQUAL, 0, GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_NOTEQUAL, 0, GL_STENCIL_HIGH_BIT);
prepareForDraw(false);
// Stencil the brush onto the dest buffer
composite(bounds);
- glStencilMask(0);
+ funcs.glStencilMask(0);
updateClipScissorTest();
}
@@ -1335,12 +1333,13 @@ void QOpenGL2PaintEngineEx::renderHintsChanged()
state()->renderHintsChanged = true;
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
+ Q_D(QOpenGL2PaintEngineEx);
if ((state()->renderHints & QPainter::Antialiasing)
|| (state()->renderHints & QPainter::HighQualityAntialiasing))
- glEnable(GL_MULTISAMPLE);
+ d->funcs.glEnable(GL_MULTISAMPLE);
else
- glDisable(GL_MULTISAMPLE);
+ d->funcs.glDisable(GL_MULTISAMPLE);
}
#endif // QT_OPENGL_ES_2
@@ -1461,7 +1460,7 @@ bool QOpenGL2PaintEngineEx::drawTexture(const QRectF &dest, GLuint textureId, co
d->transferMode(ImageDrawingMode);
d->funcs.glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
- glBindTexture(GL_TEXTURE_2D, textureId);
+ d->funcs.glBindTexture(GL_TEXTURE_2D, textureId);
QOpenGLRect srcRect(src.left(), src.bottom(), src.right(), src.top());
@@ -1720,15 +1719,15 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly
#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
if (elementIndicesVBOId == 0)
- glGenBuffers(1, &elementIndicesVBOId);
+ funcs.glGenBuffers(1, &elementIndicesVBOId);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementIndicesVBOId);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, elementIndices.size() * sizeof(GLushort),
- elementIndices.constData(), GL_STATIC_DRAW);
+ funcs.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementIndicesVBOId);
+ funcs.glBufferData(GL_ELEMENT_ARRAY_BUFFER, elementIndices.size() * sizeof(GLushort),
+ elementIndices.constData(), GL_STATIC_DRAW);
#endif
} else {
#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementIndicesVBOId);
+ funcs.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementIndicesVBOId);
#endif
}
@@ -1774,8 +1773,8 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly
opacityUniformDirty = true;
}
- glEnable(GL_BLEND);
- glBlendFunc(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_COLOR);
+ funcs.glEnable(GL_BLEND);
+ funcs.glBlendFunc(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_COLOR);
funcs.glBlendColor(c.redF(), c.greenF(), c.blueF(), c.alphaF());
} else {
// Other brush styles need two passes.
@@ -1790,17 +1789,17 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly
compositionModeDirty = false; // I can handle this myself, thank you very much
prepareForCachedGlyphDraw(*cache);
- glEnable(GL_BLEND);
- glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
+ funcs.glEnable(GL_BLEND);
+ funcs.glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
funcs.glActiveTexture(GL_TEXTURE0 + QT_MASK_TEXTURE_UNIT);
- glBindTexture(GL_TEXTURE_2D, cache->texture());
+ funcs.glBindTexture(GL_TEXTURE_2D, cache->texture());
updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, false);
#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
- glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, 0);
+ funcs.glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, 0);
#else
- glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, elementIndices.data());
+ funcs.glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, elementIndices.data());
#endif
shaderManager->setMaskType(QOpenGLEngineShaderManager::SubPixelMaskPass2);
@@ -1814,8 +1813,8 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly
compositionModeDirty = false;
prepareForCachedGlyphDraw(*cache);
- glEnable(GL_BLEND);
- glBlendFunc(GL_ONE, GL_ONE);
+ funcs.glEnable(GL_BLEND);
+ funcs.glBlendFunc(GL_ONE, GL_ONE);
}
compositionModeDirty = true;
} else if (glyphFormat == QFontEngine::Format_ARGB) {
@@ -1839,27 +1838,27 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly
funcs.glActiveTexture(GL_TEXTURE0 + QT_MASK_TEXTURE_UNIT);
if (lastMaskTextureUsed != cache->texture()) {
- glBindTexture(GL_TEXTURE_2D, cache->texture());
+ funcs.glBindTexture(GL_TEXTURE_2D, cache->texture());
lastMaskTextureUsed = cache->texture();
}
if (cache->filterMode() != filterMode) {
if (filterMode == QOpenGLTextureGlyphCache::Linear) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ funcs.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ funcs.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
} else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ funcs.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ funcs.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
}
cache->setFilterMode(filterMode);
}
}
#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
- glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+ funcs.glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, 0);
+ funcs.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
#else
- glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, elementIndices.data());
+ funcs.glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, elementIndices.data());
#endif
}
@@ -1960,7 +1959,7 @@ void QOpenGL2PaintEngineExPrivate::drawPixmapFragments(const QPainter::PixmapFra
shaderManager->currentProgram()->setUniformValue(location(QOpenGLEngineShaderManager::PatternColor), col);
}
- glDrawArrays(GL_TRIANGLES, 0, 6 * fragmentCount);
+ funcs.glDrawArrays(GL_TRIANGLES, 0, 6 * fragmentCount);
}
bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev)
@@ -2005,15 +2004,15 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->shaderManager = new QOpenGLEngineShaderManager(d->ctx);
- glDisable(GL_STENCIL_TEST);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_SCISSOR_TEST);
+ d->funcs.glDisable(GL_STENCIL_TEST);
+ d->funcs.glDisable(GL_DEPTH_TEST);
+ d->funcs.glDisable(GL_SCISSOR_TEST);
d->glyphCacheFormat = QFontEngine::Format_A8;
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
- glDisable(GL_MULTISAMPLE);
+ if (!QOpenGLContext::currentContext()->isES()) {
+ d->funcs.glDisable(GL_MULTISAMPLE);
d->glyphCacheFormat = QFontEngine::Format_A32;
d->multisamplingAlwaysEnabled = false;
} else
@@ -2071,7 +2070,7 @@ void QOpenGL2PaintEngineEx::ensureActive()
d->device->ensureActiveTarget();
d->transferMode(BrushDrawingMode);
- glViewport(0, 0, d->width, d->height);
+ d->funcs.glViewport(0, 0, d->width, d->height);
d->needsSync = false;
d->lastMaskTextureUsed = 0;
d->shaderManager->setDirty();
@@ -2086,11 +2085,11 @@ void QOpenGL2PaintEngineExPrivate::updateClipScissorTest()
{
Q_Q(QOpenGL2PaintEngineEx);
if (q->state()->clipTestEnabled) {
- glEnable(GL_STENCIL_TEST);
- glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT);
+ funcs.glEnable(GL_STENCIL_TEST);
+ funcs.glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT);
} else {
- glDisable(GL_STENCIL_TEST);
- glStencilFunc(GL_ALWAYS, 0, 0xff);
+ funcs.glDisable(GL_STENCIL_TEST);
+ funcs.glStencilFunc(GL_ALWAYS, 0, 0xff);
}
#ifdef QT_GL_NO_SCISSOR_TEST
@@ -2112,9 +2111,9 @@ void QOpenGL2PaintEngineExPrivate::updateClipScissorTest()
currentScissorBounds = bounds;
if (bounds == QRect(0, 0, width, height)) {
- glDisable(GL_SCISSOR_TEST);
+ funcs.glDisable(GL_SCISSOR_TEST);
} else {
- glEnable(GL_SCISSOR_TEST);
+ funcs.glEnable(GL_SCISSOR_TEST);
setScissor(bounds);
}
#endif
@@ -2130,7 +2129,7 @@ void QOpenGL2PaintEngineExPrivate::setScissor(const QRect &rect)
}
const int height = rect.height();
- glScissor(left, bottom, width, height);
+ funcs.glScissor(left, bottom, width, height);
}
void QOpenGL2PaintEngineEx::clipEnabledChanged()
@@ -2149,10 +2148,10 @@ void QOpenGL2PaintEngineExPrivate::clearClip(uint value)
{
dirtyStencilRegion -= currentScissorBounds;
- glStencilMask(0xff);
- glClearStencil(value);
- glClear(GL_STENCIL_BUFFER_BIT);
- glStencilMask(0x0);
+ funcs.glStencilMask(0xff);
+ funcs.glClearStencil(value);
+ funcs.glClear(GL_STENCIL_BUFFER_BIT);
+ funcs.glStencilMask(0x0);
q->state()->needsClipBufferClear = false;
}
@@ -2180,15 +2179,15 @@ void QOpenGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value
clearClip(1);
if (path.isEmpty()) {
- glEnable(GL_STENCIL_TEST);
- glStencilFunc(GL_LEQUAL, value, ~GL_STENCIL_HIGH_BIT);
+ funcs.glEnable(GL_STENCIL_TEST);
+ funcs.glStencilFunc(GL_LEQUAL, value, ~GL_STENCIL_HIGH_BIT);
return;
}
if (q->state()->clipTestEnabled)
- glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT);
else
- glStencilFunc(GL_ALWAYS, 0, 0xff);
+ funcs.glStencilFunc(GL_ALWAYS, 0, 0xff);
vertexCoordinateArray.clear();
vertexCoordinateArray.addPath(path, inverseScale, false);
@@ -2196,39 +2195,39 @@ void QOpenGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value
if (!singlePass)
fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill());
- glColorMask(false, false, false, false);
- glEnable(GL_STENCIL_TEST);
+ funcs.glColorMask(false, false, false, false);
+ funcs.glEnable(GL_STENCIL_TEST);
useSimpleShader();
if (singlePass) {
// Under these conditions we can set the new stencil value in a single
// pass, by using the current value and the "new value" as the toggles
- glStencilFunc(GL_LEQUAL, referenceClipValue, ~GL_STENCIL_HIGH_BIT);
- glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT);
- glStencilMask(value ^ referenceClipValue);
+ funcs.glStencilFunc(GL_LEQUAL, referenceClipValue, ~GL_STENCIL_HIGH_BIT);
+ funcs.glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT);
+ funcs.glStencilMask(value ^ referenceClipValue);
drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN);
} else {
- glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
- glStencilMask(0xff);
+ funcs.glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
+ funcs.glStencilMask(0xff);
if (!q->state()->clipTestEnabled && path.hasWindingFill()) {
// Pass when any clip bit is set, set high bit
- glStencilFunc(GL_NOTEQUAL, GL_STENCIL_HIGH_BIT, ~GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_NOTEQUAL, GL_STENCIL_HIGH_BIT, ~GL_STENCIL_HIGH_BIT);
composite(vertexCoordinateArray.boundingRect());
}
// Pass when high bit is set, replace stencil value with new clip value
- glStencilFunc(GL_NOTEQUAL, value, GL_STENCIL_HIGH_BIT);
+ funcs.glStencilFunc(GL_NOTEQUAL, value, GL_STENCIL_HIGH_BIT);
composite(vertexCoordinateArray.boundingRect());
}
- glStencilFunc(GL_LEQUAL, value, ~GL_STENCIL_HIGH_BIT);
- glStencilMask(0);
+ funcs.glStencilFunc(GL_LEQUAL, value, ~GL_STENCIL_HIGH_BIT);
+ funcs.glStencilMask(0);
- glColorMask(true, true, true, true);
+ funcs.glColorMask(true, true, true, true);
}
void QOpenGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
@@ -2384,7 +2383,7 @@ void QOpenGL2PaintEngineEx::setState(QPainterState *new_state)
if (old_state == s || old_state->clipChanged) {
if (old_state && old_state != s && old_state->canRestoreClip) {
d->updateClipScissorTest();
- glDepthFunc(GL_LEQUAL);
+ d->funcs.glDepthFunc(GL_LEQUAL);
} else {
d->regenerateClip();
}
diff --git a/src/gui/opengl/qopenglproxy_win.cpp b/src/gui/opengl/qopenglproxy_win.cpp
deleted file mode 100644
index 88f3a1d11d..0000000000
--- a/src/gui/opengl/qopenglproxy_win.cpp
+++ /dev/null
@@ -1,4597 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtGui module 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 <QByteArray>
-#include <QVector>
-#include <QCoreApplication>
-#include <QLoggingCategory>
-#include <qt_windows.h>
-// Must not include QOpenGLFunctions or anything that pulls in qopengl.h.
-// Otherwise we end up with errors about inconsistent linkage.
-#include <GL/gl.h>
-#include <EGL/egl.h>
-
-#if defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2)
-# error "Proxy GL is not compatible with static ES builds"
-#endif
-
-// This should not be an issue with the compilers used on Windows, but just in case:
-#ifndef Q_COMPILER_VARIADIC_MACROS
-# error "Proxy GL requires variadic macro support"
-#endif
-
-// Disable inconsistent dll linkage warnings. gl.h and egl.h are included and these mark
-// the egl and (w)gl functions as imported. We will mark them as exported.
-#if defined(Q_CC_MSVC)
-# pragma warning(disable : 4273)
-#elif defined(Q_CC_MINGW)
-# pragma GCC diagnostic ignored "-Wattributes"
-#endif
-
-#ifdef Q_OS_WIN64
-typedef signed long long int khronos_intptr_t;
-typedef signed long long int khronos_ssize_t;
-#else
-typedef signed long int khronos_intptr_t;
-typedef signed long int khronos_ssize_t;
-#endif
-
-typedef char GLchar;
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t GLsizeiptr;
-
-Q_LOGGING_CATEGORY(qglLc, "qt.gui.openglproxy")
-
-class QAbstractWindowsOpenGL
-{
-public:
- QAbstractWindowsOpenGL();
- virtual ~QAbstractWindowsOpenGL() { }
-
- enum LibType { // must match QOpenGLFunctions::PlatformGLType
- DesktopGL = 0,
- GLES2
- };
-
- LibType libraryType() const { return m_libraryType; }
- HMODULE libraryHandle() const { return m_lib; }
- bool functionsReady() const { return m_loaded; }
-
- // WGL
- BOOL (WINAPI * CopyContext)(HGLRC src, HGLRC dst, UINT mask);
- HGLRC (WINAPI * CreateContext)(HDC dc);
- HGLRC (WINAPI * CreateLayerContext)(HDC dc, int plane);
- BOOL (WINAPI * DeleteContext)(HGLRC context);
- HGLRC (WINAPI * GetCurrentContext)();
- HDC (WINAPI * GetCurrentDC)();
- PROC (WINAPI * GetProcAddress)(LPCSTR name);
- BOOL (WINAPI * MakeCurrent)(HDC dc, HGLRC context);
- BOOL (WINAPI * ShareLists)(HGLRC context1, HGLRC context2);
- BOOL (WINAPI * UseFontBitmapsW)(HDC dc, DWORD first, DWORD count, DWORD base);
- BOOL (WINAPI * UseFontOutlinesW)(HDC dc, DWORD first, DWORD count, DWORD base, FLOAT deviation,
- FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT gmf);
- BOOL (WINAPI * DescribeLayerPlane)(HDC dc, int pixelFormat, int plane, UINT n,
- LPLAYERPLANEDESCRIPTOR planeDescriptor);
- int (WINAPI * SetLayerPaletteEntries)(HDC dc, int plane, int start, int entries,
- CONST COLORREF *colors);
- int (WINAPI * GetLayerPaletteEntries)(HDC dc, int plane, int start, int entries,
- COLORREF *color);
- BOOL (WINAPI * RealizeLayerPalette)(HDC dc, int plane, BOOL realize);
- BOOL (WINAPI * SwapLayerBuffers)(HDC dc, UINT planes);
- DWORD (WINAPI * SwapMultipleBuffers)(UINT n, CONST WGLSWAP *buffers);
-
- // EGL
- EGLint (EGLAPIENTRY * EGL_GetError)(void);
- EGLDisplay (EGLAPIENTRY * EGL_GetDisplay)(EGLNativeDisplayType display_id);
- EGLBoolean (EGLAPIENTRY * EGL_Initialize)(EGLDisplay dpy, EGLint *major, EGLint *minor);
- EGLBoolean (EGLAPIENTRY * EGL_Terminate)(EGLDisplay dpy);
- const char * (EGLAPIENTRY * EGL_QueryString)(EGLDisplay dpy, EGLint name);
- EGLBoolean (EGLAPIENTRY * EGL_GetConfigs)(EGLDisplay dpy, EGLConfig *configs,
- EGLint config_size, EGLint *num_config);
- EGLBoolean (EGLAPIENTRY * EGL_ChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list,
- EGLConfig *configs, EGLint config_size,
- EGLint *num_config);
- EGLBoolean (EGLAPIENTRY * EGL_GetConfigAttrib)(EGLDisplay dpy, EGLConfig config,
- EGLint attribute, EGLint *value);
- EGLSurface (EGLAPIENTRY * EGL_CreateWindowSurface)(EGLDisplay dpy, EGLConfig config,
- EGLNativeWindowType win,
- const EGLint *attrib_list);
- EGLSurface (EGLAPIENTRY * EGL_CreatePbufferSurface)(EGLDisplay dpy, EGLConfig config,
- const EGLint *attrib_list);
- EGLSurface (EGLAPIENTRY * EGL_CreatePixmapSurface)(EGLDisplay dpy, EGLConfig config,
- EGLNativePixmapType pixmap,
- const EGLint *attrib_list);
- EGLBoolean (EGLAPIENTRY * EGL_DestroySurface)(EGLDisplay dpy, EGLSurface surface);
- EGLBoolean (EGLAPIENTRY * EGL_QuerySurface)(EGLDisplay dpy, EGLSurface surface,
- EGLint attribute, EGLint *value);
- EGLBoolean (EGLAPIENTRY * EGL_BindAPI)(EGLenum api);
- EGLenum (EGLAPIENTRY * EGL_QueryAPI)(void);
- EGLBoolean (EGLAPIENTRY * EGL_WaitClient)(void);
- EGLBoolean (EGLAPIENTRY * EGL_ReleaseThread)(void);
- EGLSurface (EGLAPIENTRY * EGL_CreatePbufferFromClientBuffer)(EGLDisplay dpy, EGLenum buftype,
- EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list);
- EGLBoolean (EGLAPIENTRY * EGL_SurfaceAttrib)(EGLDisplay dpy, EGLSurface surface,
- EGLint attribute, EGLint value);
- EGLBoolean (EGLAPIENTRY * EGL_BindTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
- EGLBoolean (EGLAPIENTRY * EGL_ReleaseTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
- EGLBoolean (EGLAPIENTRY * EGL_SwapInterval)(EGLDisplay dpy, EGLint interval);
- EGLContext (EGLAPIENTRY * EGL_CreateContext)(EGLDisplay dpy, EGLConfig config,
- EGLContext share_context,
- const EGLint *attrib_list);
- EGLBoolean (EGLAPIENTRY * EGL_DestroyContext)(EGLDisplay dpy, EGLContext ctx);
- EGLBoolean (EGLAPIENTRY * EGL_MakeCurrent)(EGLDisplay dpy, EGLSurface draw,
- EGLSurface read, EGLContext ctx);
- EGLContext (EGLAPIENTRY * EGL_GetCurrentContext)(void);
- EGLSurface (EGLAPIENTRY * EGL_GetCurrentSurface)(EGLint readdraw);
- EGLDisplay (EGLAPIENTRY * EGL_GetCurrentDisplay)(void);
- EGLBoolean (EGLAPIENTRY * EGL_QueryContext)(EGLDisplay dpy, EGLContext ctx,
- EGLint attribute, EGLint *value);
- EGLBoolean (EGLAPIENTRY * EGL_WaitGL)(void);
- EGLBoolean (EGLAPIENTRY * EGL_WaitNative)(EGLint engine);
- EGLBoolean (EGLAPIENTRY * EGL_SwapBuffers)(EGLDisplay dpy, EGLSurface surface);
- EGLBoolean (EGLAPIENTRY * EGL_CopyBuffers)(EGLDisplay dpy, EGLSurface surface,
- EGLNativePixmapType target);
- __eglMustCastToProperFunctionPointerType (EGLAPIENTRY * EGL_GetProcAddress)(const char *procname);
-
- // OpenGL 1.0
- void (APIENTRY * Viewport)(GLint x, GLint y, GLsizei width, GLsizei height);
- void (APIENTRY * DepthRange)(GLdouble nearVal, GLdouble farVal);
- GLboolean (APIENTRY * IsEnabled)(GLenum cap);
- void (APIENTRY * GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
- void (APIENTRY * GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params);
- void (APIENTRY * GetTexParameteriv)(GLenum target, GLenum pname, GLint *params);
- void (APIENTRY * GetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params);
- void (APIENTRY * GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
- const GLubyte * (APIENTRY * GetString)(GLenum name);
- void (APIENTRY * GetIntegerv)(GLenum pname, GLint *params);
- void (APIENTRY * GetFloatv)(GLenum pname, GLfloat *params);
- GLenum (APIENTRY * GetError)();
- void (APIENTRY * GetDoublev)(GLenum pname, GLdouble *params);
- void (APIENTRY * GetBooleanv)(GLenum pname, GLboolean *params);
- void (APIENTRY * ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
- void (APIENTRY * ReadBuffer)(GLenum mode);
- void (APIENTRY * PixelStorei)(GLenum pname, GLint param);
- void (APIENTRY * PixelStoref)(GLenum pname, GLfloat param);
- void (APIENTRY * DepthFunc)(GLenum func);
- void (APIENTRY * StencilOp)(GLenum fail, GLenum zfail, GLenum zpass);
- void (APIENTRY * StencilFunc)(GLenum func, GLint ref, GLuint mask);
- void (APIENTRY * LogicOp)(GLenum opcode);
- void (APIENTRY * BlendFunc)(GLenum sfactor, GLenum dfactor);
- void (APIENTRY * Flush)();
- void (APIENTRY * Finish)();
- void (APIENTRY * Enable)(GLenum cap);
- void (APIENTRY * Disable)(GLenum cap);
- void (APIENTRY * DepthMask)(GLboolean flag);
- void (APIENTRY * ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
- void (APIENTRY * StencilMask)(GLuint mask);
- void (APIENTRY * ClearDepth)(GLdouble depth);
- void (APIENTRY * ClearStencil)(GLint s);
- void (APIENTRY * ClearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
- void (APIENTRY * Clear)(GLbitfield mask);
- void (APIENTRY * DrawBuffer)(GLenum mode);
- void (APIENTRY * TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
- void (APIENTRY * TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
- void (APIENTRY * TexParameteriv)(GLenum target, GLenum pname, const GLint *params);
- void (APIENTRY * TexParameteri)(GLenum target, GLenum pname, GLint param);
- void (APIENTRY * TexParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
- void (APIENTRY * TexParameterf)(GLenum target, GLenum pname, GLfloat param);
- void (APIENTRY * Scissor)(GLint x, GLint y, GLsizei width, GLsizei height);
- void (APIENTRY * PolygonMode)(GLenum face, GLenum mode);
- void (APIENTRY * PointSize)(GLfloat size);
- void (APIENTRY * LineWidth)(GLfloat width);
- void (APIENTRY * Hint)(GLenum target, GLenum mode);
- void (APIENTRY * FrontFace)(GLenum mode);
- void (APIENTRY * CullFace)(GLenum mode);
-
- void (APIENTRY * Translatef)(GLfloat x, GLfloat y, GLfloat z);
- void (APIENTRY * Translated)(GLdouble x, GLdouble y, GLdouble z);
- void (APIENTRY * Scalef)(GLfloat x, GLfloat y, GLfloat z);
- void (APIENTRY * Scaled)(GLdouble x, GLdouble y, GLdouble z);
- void (APIENTRY * Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
- void (APIENTRY * Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
- void (APIENTRY * PushMatrix)();
- void (APIENTRY * PopMatrix)();
- void (APIENTRY * Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
- void (APIENTRY * MultMatrixd)(const GLdouble *m);
- void (APIENTRY * MultMatrixf)(const GLfloat *m);
- void (APIENTRY * MatrixMode)(GLenum mode);
- void (APIENTRY * LoadMatrixd)(const GLdouble *m);
- void (APIENTRY * LoadMatrixf)(const GLfloat *m);
- void (APIENTRY * LoadIdentity)();
- void (APIENTRY * Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
- GLboolean (APIENTRY * IsList)(GLuint list);
- void (APIENTRY * GetTexGeniv)(GLenum coord, GLenum pname, GLint *params);
- void (APIENTRY * GetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params);
- void (APIENTRY * GetTexGendv)(GLenum coord, GLenum pname, GLdouble *params);
- void (APIENTRY * GetTexEnviv)(GLenum target, GLenum pname, GLint *params);
- void (APIENTRY * GetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params);
- void (APIENTRY * GetPolygonStipple)(GLubyte *mask);
- void (APIENTRY * GetPixelMapusv)(GLenum map, GLushort *values);
- void (APIENTRY * GetPixelMapuiv)(GLenum map, GLuint *values);
- void (APIENTRY * GetPixelMapfv)(GLenum map, GLfloat *values);
- void (APIENTRY * GetMaterialiv)(GLenum face, GLenum pname, GLint *params);
- void (APIENTRY * GetMaterialfv)(GLenum face, GLenum pname, GLfloat *params);
- void (APIENTRY * GetMapiv)(GLenum target, GLenum query, GLint *v);
- void (APIENTRY * GetMapfv)(GLenum target, GLenum query, GLfloat *v);
- void (APIENTRY * GetMapdv)(GLenum target, GLenum query, GLdouble *v);
- void (APIENTRY * GetLightiv)(GLenum light, GLenum pname, GLint *params);
- void (APIENTRY * GetLightfv)(GLenum light, GLenum pname, GLfloat *params);
- void (APIENTRY * GetClipPlane)(GLenum plane, GLdouble *equation);
- void (APIENTRY * DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
- void (APIENTRY * CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
- void (APIENTRY * PixelMapusv)(GLenum map, GLint mapsize, const GLushort *values);
- void (APIENTRY * PixelMapuiv)(GLenum map, GLint mapsize, const GLuint *values);
- void (APIENTRY * PixelMapfv)(GLenum map, GLint mapsize, const GLfloat *values);
- void (APIENTRY * PixelTransferi)(GLenum pname, GLint param);
- void (APIENTRY * PixelTransferf)(GLenum pname, GLfloat param);
- void (APIENTRY * PixelZoom)(GLfloat xfactor, GLfloat yfactor);
- void (APIENTRY * AlphaFunc)(GLenum func, GLfloat ref);
- void (APIENTRY * EvalPoint2)(GLint i, GLint j);
- void (APIENTRY * EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
- void (APIENTRY * EvalPoint1)(GLint i);
- void (APIENTRY * EvalMesh1)(GLenum mode, GLint i1, GLint i2);
- void (APIENTRY * EvalCoord2fv)(const GLfloat *u);
- void (APIENTRY * EvalCoord2f)(GLfloat u, GLfloat v);
- void (APIENTRY * EvalCoord2dv)(const GLdouble *u);
- void (APIENTRY * EvalCoord2d)(GLdouble u, GLdouble v);
- void (APIENTRY * EvalCoord1fv)(const GLfloat *u);
- void (APIENTRY * EvalCoord1f)(GLfloat u);
- void (APIENTRY * EvalCoord1dv)(const GLdouble *u);
- void (APIENTRY * EvalCoord1d)(GLdouble u);
- void (APIENTRY * MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
- void (APIENTRY * MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
- void (APIENTRY * MapGrid1f)(GLint un, GLfloat u1, GLfloat u2);
- void (APIENTRY * MapGrid1d)(GLint un, GLdouble u1, GLdouble u2);
- void (APIENTRY * Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
- void (APIENTRY * Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
- void (APIENTRY * Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
- void (APIENTRY * Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
- void (APIENTRY * PushAttrib)(GLbitfield mask);
- void (APIENTRY * PopAttrib)();
- void (APIENTRY * Accum)(GLenum op, GLfloat value);
- void (APIENTRY * IndexMask)(GLuint mask);
- void (APIENTRY * ClearIndex)(GLfloat c);
- void (APIENTRY * ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
- void (APIENTRY * PushName)(GLuint name);
- void (APIENTRY * PopName)();
- void (APIENTRY * PassThrough)(GLfloat token);
- void (APIENTRY * LoadName)(GLuint name);
- void (APIENTRY * InitNames)();
- GLint (APIENTRY * RenderMode)(GLenum mode);
- void (APIENTRY * SelectBuffer)(GLsizei size, GLuint *buffer);
- void (APIENTRY * FeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer);
- void (APIENTRY * TexGeniv)(GLenum coord, GLenum pname, const GLint *params);
- void (APIENTRY * TexGeni)(GLenum coord, GLenum pname, GLint param);
- void (APIENTRY * TexGenfv)(GLenum coord, GLenum pname, const GLfloat *params);
- void (APIENTRY * TexGenf)(GLenum coord, GLenum pname, GLfloat param);
- void (APIENTRY * TexGendv)(GLenum coord, GLenum pname, const GLdouble *params);
- void (APIENTRY * TexGend)(GLenum coord, GLenum pname, GLdouble param);
- void (APIENTRY * TexEnviv)(GLenum target, GLenum pname, const GLint *params);
- void (APIENTRY * TexEnvi)(GLenum target, GLenum pname, GLint param);
- void (APIENTRY * TexEnvfv)(GLenum target, GLenum pname, const GLfloat *params);
- void (APIENTRY * TexEnvf)(GLenum target, GLenum pname, GLfloat param);
- void (APIENTRY * ShadeModel)(GLenum mode);
- void (APIENTRY * PolygonStipple)(const GLubyte *mask);
- void (APIENTRY * Materialiv)(GLenum face, GLenum pname, const GLint *params);
- void (APIENTRY * Materiali)(GLenum face, GLenum pname, GLint param);
- void (APIENTRY * Materialfv)(GLenum face, GLenum pname, const GLfloat *params);
- void (APIENTRY * Materialf)(GLenum face, GLenum pname, GLfloat param);
- void (APIENTRY * LineStipple)(GLint factor, GLushort pattern);
- void (APIENTRY * LightModeliv)(GLenum pname, const GLint *params);
- void (APIENTRY * LightModeli)(GLenum pname, GLint param);
- void (APIENTRY * LightModelfv)(GLenum pname, const GLfloat *params);
- void (APIENTRY * LightModelf)(GLenum pname, GLfloat param);
- void (APIENTRY * Lightiv)(GLenum light, GLenum pname, const GLint *params);
- void (APIENTRY * Lighti)(GLenum light, GLenum pname, GLint param);
- void (APIENTRY * Lightfv)(GLenum light, GLenum pname, const GLfloat *params);
- void (APIENTRY * Lightf)(GLenum light, GLenum pname, GLfloat param);
- void (APIENTRY * Fogiv)(GLenum pname, const GLint *params);
- void (APIENTRY * Fogi)(GLenum pname, GLint param);
- void (APIENTRY * Fogfv)(GLenum pname, const GLfloat *params);
- void (APIENTRY * Fogf)(GLenum pname, GLfloat param);
- void (APIENTRY * ColorMaterial)(GLenum face, GLenum mode);
- void (APIENTRY * ClipPlane)(GLenum plane, const GLdouble *equation);
- void (APIENTRY * Vertex4sv)(const GLshort *v);
- void (APIENTRY * Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w);
- void (APIENTRY * Vertex4iv)(const GLint *v);
- void (APIENTRY * Vertex4i)(GLint x, GLint y, GLint z, GLint w);
- void (APIENTRY * Vertex4fv)(const GLfloat *v);
- void (APIENTRY * Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- void (APIENTRY * Vertex4dv)(const GLdouble *v);
- void (APIENTRY * Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
- void (APIENTRY * Vertex3sv)(const GLshort *v);
- void (APIENTRY * Vertex3s)(GLshort x, GLshort y, GLshort z);
- void (APIENTRY * Vertex3iv)(const GLint *v);
- void (APIENTRY * Vertex3i)(GLint x, GLint y, GLint z);
- void (APIENTRY * Vertex3fv)(const GLfloat *v);
- void (APIENTRY * Vertex3f)(GLfloat x, GLfloat y, GLfloat z);
- void (APIENTRY * Vertex3dv)(const GLdouble *v);
- void (APIENTRY * Vertex3d)(GLdouble x, GLdouble y, GLdouble z);
- void (APIENTRY * Vertex2sv)(const GLshort *v);
- void (APIENTRY * Vertex2s)(GLshort x, GLshort y);
- void (APIENTRY * Vertex2iv)(const GLint *v);
- void (APIENTRY * Vertex2i)(GLint x, GLint y);
- void (APIENTRY * Vertex2fv)(const GLfloat *v);
- void (APIENTRY * Vertex2f)(GLfloat x, GLfloat y);
- void (APIENTRY * Vertex2dv)(const GLdouble *v);
- void (APIENTRY * Vertex2d)(GLdouble x, GLdouble y);
- void (APIENTRY * TexCoord4sv)(const GLshort *v);
- void (APIENTRY * TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q);
- void (APIENTRY * TexCoord4iv)(const GLint *v);
- void (APIENTRY * TexCoord4i)(GLint s, GLint t, GLint r, GLint q);
- void (APIENTRY * TexCoord4fv)(const GLfloat *v);
- void (APIENTRY * TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
- void (APIENTRY * TexCoord4dv)(const GLdouble *v);
- void (APIENTRY * TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
- void (APIENTRY * TexCoord3sv)(const GLshort *v);
- void (APIENTRY * TexCoord3s)(GLshort s, GLshort t, GLshort r);
- void (APIENTRY * TexCoord3iv)(const GLint *v);
- void (APIENTRY * TexCoord3i)(GLint s, GLint t, GLint r);
- void (APIENTRY * TexCoord3fv)(const GLfloat *v);
- void (APIENTRY * TexCoord3f)(GLfloat s, GLfloat t, GLfloat r);
- void (APIENTRY * TexCoord3dv)(const GLdouble *v);
- void (APIENTRY * TexCoord3d)(GLdouble s, GLdouble t, GLdouble r);
- void (APIENTRY * TexCoord2sv)(const GLshort *v);
- void (APIENTRY * TexCoord2s)(GLshort s, GLshort t);
- void (APIENTRY * TexCoord2iv)(const GLint *v);
- void (APIENTRY * TexCoord2i)(GLint s, GLint t);
- void (APIENTRY * TexCoord2fv)(const GLfloat *v);
- void (APIENTRY * TexCoord2f)(GLfloat s, GLfloat t);
- void (APIENTRY * TexCoord2dv)(const GLdouble *v);
- void (APIENTRY * TexCoord2d)(GLdouble s, GLdouble t);
- void (APIENTRY * TexCoord1sv)(const GLshort *v);
- void (APIENTRY * TexCoord1s)(GLshort s);
- void (APIENTRY * TexCoord1iv)(const GLint *v);
- void (APIENTRY * TexCoord1i)(GLint s);
- void (APIENTRY * TexCoord1fv)(const GLfloat *v);
- void (APIENTRY * TexCoord1f)(GLfloat s);
- void (APIENTRY * TexCoord1dv)(const GLdouble *v);
- void (APIENTRY * TexCoord1d)(GLdouble s);
- void (APIENTRY * Rectsv)(const GLshort *v1, const GLshort *v2);
- void (APIENTRY * Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
- void (APIENTRY * Rectiv)(const GLint *v1, const GLint *v2);
- void (APIENTRY * Recti)(GLint x1, GLint y1, GLint x2, GLint y2);
- void (APIENTRY * Rectfv)(const GLfloat *v1, const GLfloat *v2);
- void (APIENTRY * Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
- void (APIENTRY * Rectdv)(const GLdouble *v1, const GLdouble *v2);
- void (APIENTRY * Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
- void (APIENTRY * RasterPos4sv)(const GLshort *v);
- void (APIENTRY * RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w);
- void (APIENTRY * RasterPos4iv)(const GLint *v);
- void (APIENTRY * RasterPos4i)(GLint x, GLint y, GLint z, GLint w);
- void (APIENTRY * RasterPos4fv)(const GLfloat *v);
- void (APIENTRY * RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- void (APIENTRY * RasterPos4dv)(const GLdouble *v);
- void (APIENTRY * RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
- void (APIENTRY * RasterPos3sv)(const GLshort *v);
- void (APIENTRY * RasterPos3s)(GLshort x, GLshort y, GLshort z);
- void (APIENTRY * RasterPos3iv)(const GLint *v);
- void (APIENTRY * RasterPos3i)(GLint x, GLint y, GLint z);
- void (APIENTRY * RasterPos3fv)(const GLfloat *v);
- void (APIENTRY * RasterPos3f)(GLfloat x, GLfloat y, GLfloat z);
- void (APIENTRY * RasterPos3dv)(const GLdouble *v);
- void (APIENTRY * RasterPos3d)(GLdouble x, GLdouble y, GLdouble z);
- void (APIENTRY * RasterPos2sv)(const GLshort *v);
- void (APIENTRY * RasterPos2s)(GLshort x, GLshort y);
- void (APIENTRY * RasterPos2iv)(const GLint *v);
- void (APIENTRY * RasterPos2i)(GLint x, GLint y);
- void (APIENTRY * RasterPos2fv)(const GLfloat *v);
- void (APIENTRY * RasterPos2f)(GLfloat x, GLfloat y);
- void (APIENTRY * RasterPos2dv)(const GLdouble *v);
- void (APIENTRY * RasterPos2d)(GLdouble x, GLdouble y);
- void (APIENTRY * Normal3sv)(const GLshort *v);
- void (APIENTRY * Normal3s)(GLshort nx, GLshort ny, GLshort nz);
- void (APIENTRY * Normal3iv)(const GLint *v);
- void (APIENTRY * Normal3i)(GLint nx, GLint ny, GLint nz);
- void (APIENTRY * Normal3fv)(const GLfloat *v);
- void (APIENTRY * Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz);
- void (APIENTRY * Normal3dv)(const GLdouble *v);
- void (APIENTRY * Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz);
- void (APIENTRY * Normal3bv)(const GLbyte *v);
- void (APIENTRY * Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz);
- void (APIENTRY * Indexsv)(const GLshort *c);
- void (APIENTRY * Indexs)(GLshort c);
- void (APIENTRY * Indexiv)(const GLint *c);
- void (APIENTRY * Indexi)(GLint c);
- void (APIENTRY * Indexfv)(const GLfloat *c);
- void (APIENTRY * Indexf)(GLfloat c);
- void (APIENTRY * Indexdv)(const GLdouble *c);
- void (APIENTRY * Indexd)(GLdouble c);
- void (APIENTRY * End)();
- void (APIENTRY * EdgeFlagv)(const GLboolean *flag);
- void (APIENTRY * EdgeFlag)(GLboolean flag);
- void (APIENTRY * Color4usv)(const GLushort *v);
- void (APIENTRY * Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha);
- void (APIENTRY * Color4uiv)(const GLuint *v);
- void (APIENTRY * Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
- void (APIENTRY * Color4ubv)(const GLubyte *v);
- void (APIENTRY * Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
- void (APIENTRY * Color4sv)(const GLshort *v);
- void (APIENTRY * Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
- void (APIENTRY * Color4iv)(const GLint *v);
- void (APIENTRY * Color4i)(GLint red, GLint green, GLint blue, GLint alpha);
- void (APIENTRY * Color4fv)(const GLfloat *v);
- void (APIENTRY * Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
- void (APIENTRY * Color4dv)(const GLdouble *v);
- void (APIENTRY * Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
- void (APIENTRY * Color4bv)(const GLbyte *v);
- void (APIENTRY * Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
- void (APIENTRY * Color3usv)(const GLushort *v);
- void (APIENTRY * Color3us)(GLushort red, GLushort green, GLushort blue);
- void (APIENTRY * Color3uiv)(const GLuint *v);
- void (APIENTRY * Color3ui)(GLuint red, GLuint green, GLuint blue);
- void (APIENTRY * Color3ubv)(const GLubyte *v);
- void (APIENTRY * Color3ub)(GLubyte red, GLubyte green, GLubyte blue);
- void (APIENTRY * Color3sv)(const GLshort *v);
- void (APIENTRY * Color3s)(GLshort red, GLshort green, GLshort blue);
- void (APIENTRY * Color3iv)(const GLint *v);
- void (APIENTRY * Color3i)(GLint red, GLint green, GLint blue);
- void (APIENTRY * Color3fv)(const GLfloat *v);
- void (APIENTRY * Color3f)(GLfloat red, GLfloat green, GLfloat blue);
- void (APIENTRY * Color3dv)(const GLdouble *v);
- void (APIENTRY * Color3d)(GLdouble red, GLdouble green, GLdouble blue);
- void (APIENTRY * Color3bv)(const GLbyte *v);
- void (APIENTRY * Color3b)(GLbyte red, GLbyte green, GLbyte blue);
- void (APIENTRY * Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
- void (APIENTRY * Begin)(GLenum mode);
- void (APIENTRY * ListBase)(GLuint base);
- GLuint (APIENTRY * GenLists)(GLsizei range);
- void (APIENTRY * DeleteLists)(GLuint list, GLsizei range);
- void (APIENTRY * CallLists)(GLsizei n, GLenum type, const GLvoid *lists);
- void (APIENTRY * CallList)(GLuint list);
- void (APIENTRY * EndList)();
- void (APIENTRY * NewList)(GLuint list, GLenum mode);
-
- // OpenGL 1.1
- void (APIENTRY * Indexubv)(const GLubyte *c);
- void (APIENTRY * Indexub)(GLubyte c);
- GLboolean (APIENTRY * IsTexture)(GLuint texture);
- void (APIENTRY * GenTextures)(GLsizei n, GLuint *textures);
- void (APIENTRY * DeleteTextures)(GLsizei n, const GLuint *textures);
- void (APIENTRY * BindTexture)(GLenum target, GLuint texture);
- void (APIENTRY * TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
- void (APIENTRY * TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
- void (APIENTRY * CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
- void (APIENTRY * CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
- void (APIENTRY * CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
- void (APIENTRY * CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
- void (APIENTRY * PolygonOffset)(GLfloat factor, GLfloat units);
- void (APIENTRY * GetPointerv)(GLenum pname, GLvoid* *params);
- void (APIENTRY * DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
- void (APIENTRY * DrawArrays)(GLenum mode, GLint first, GLsizei count);
-
- void (APIENTRY * PushClientAttrib)(GLbitfield mask);
- void (APIENTRY * PopClientAttrib)();
- void (APIENTRY * PrioritizeTextures)(GLsizei n, const GLuint *textures, const GLfloat *priorities);
- GLboolean (APIENTRY * AreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences);
- void (APIENTRY * VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
- void (APIENTRY * TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
- void (APIENTRY * NormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
- void (APIENTRY * InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer);
- void (APIENTRY * IndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
- void (APIENTRY * EnableClientState)(GLenum array);
- void (APIENTRY * EdgeFlagPointer)(GLsizei stride, const GLvoid *pointer);
- void (APIENTRY * DisableClientState)(GLenum array);
- void (APIENTRY * ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
- void (APIENTRY * ArrayElement)(GLint i);
-
- // OpenGL ES 2.0
- void (APIENTRY * ActiveTexture)(GLenum texture);
- void (APIENTRY * AttachShader)(GLuint program, GLuint shader);
- void (APIENTRY * BindAttribLocation)(GLuint program, GLuint index, const GLchar* name);
- void (APIENTRY * BindBuffer)(GLenum target, GLuint buffer);
- void (APIENTRY * BindFramebuffer)(GLenum target, GLuint framebuffer);
- void (APIENTRY * BindRenderbuffer)(GLenum target, GLuint renderbuffer);
- void (APIENTRY * BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
- void (APIENTRY * BlendEquation)(GLenum mode);
- void (APIENTRY * BlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
- void (APIENTRY * BlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
- void (APIENTRY * BufferData)(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
- void (APIENTRY * BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
- GLenum (APIENTRY * CheckFramebufferStatus)(GLenum target);
- void (APIENTRY * ClearDepthf)(GLclampf depth);
- void (APIENTRY * CompileShader)(GLuint shader);
- void (APIENTRY * CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
- void (APIENTRY * CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
- GLuint (APIENTRY * CreateProgram)(void);
- GLuint (APIENTRY * CreateShader)(GLenum type);
- void (APIENTRY * DeleteBuffers)(GLsizei n, const GLuint* buffers);
- void (APIENTRY * DeleteFramebuffers)(GLsizei n, const GLuint* framebuffers);
- void (APIENTRY * DeleteProgram)(GLuint program);
- void (APIENTRY * DeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers);
- void (APIENTRY * DeleteShader)(GLuint shader);
- void (APIENTRY * DepthRangef)(GLclampf zNear, GLclampf zFar);
- void (APIENTRY * DetachShader)(GLuint program, GLuint shader);
- void (APIENTRY * DisableVertexAttribArray)(GLuint index);
- void (APIENTRY * EnableVertexAttribArray)(GLuint index);
- void (APIENTRY * FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
- void (APIENTRY * FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
- void (APIENTRY * GenBuffers)(GLsizei n, GLuint* buffers);
- void (APIENTRY * GenerateMipmap)(GLenum target);
- void (APIENTRY * GenFramebuffers)(GLsizei n, GLuint* framebuffers);
- void (APIENTRY * GenRenderbuffers)(GLsizei n, GLuint* renderbuffers);
- void (APIENTRY * GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
- void (APIENTRY * GetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
- void (APIENTRY * GetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
- int (APIENTRY * GetAttribLocation)(GLuint program, const GLchar* name);
- void (APIENTRY * GetBufferParameteriv)(GLenum target, GLenum pname, GLint* params);
- void (APIENTRY * GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params);
- void (APIENTRY * GetProgramiv)(GLuint program, GLenum pname, GLint* params);
- void (APIENTRY * GetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
- void (APIENTRY * GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params);
- void (APIENTRY * GetShaderiv)(GLuint shader, GLenum pname, GLint* params);
- void (APIENTRY * GetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
- void (APIENTRY * GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
- void (APIENTRY * GetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
- void (APIENTRY * GetUniformfv)(GLuint program, GLint location, GLfloat* params);
- void (APIENTRY * GetUniformiv)(GLuint program, GLint location, GLint* params);
- int (APIENTRY * GetUniformLocation)(GLuint program, const GLchar* name);
- void (APIENTRY * GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params);
- void (APIENTRY * GetVertexAttribiv)(GLuint index, GLenum pname, GLint* params);
- void (APIENTRY * GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer);
- GLboolean (APIENTRY * IsBuffer)(GLuint buffer);
- GLboolean (APIENTRY * IsFramebuffer)(GLuint framebuffer);
- GLboolean (APIENTRY * IsProgram)(GLuint program);
- GLboolean (APIENTRY * IsRenderbuffer)(GLuint renderbuffer);
- GLboolean (APIENTRY * IsShader)(GLuint shader);
- void (APIENTRY * LinkProgram)(GLuint program);
- void (APIENTRY * ReleaseShaderCompiler)(void);
- void (APIENTRY * RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
- void (APIENTRY * SampleCoverage)(GLclampf value, GLboolean invert);
- void (APIENTRY * ShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
- void (APIENTRY * ShaderSource)(GLuint shader, GLsizei count, const GLchar* *string, const GLint* length);
- void (APIENTRY * StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask);
- void (APIENTRY * StencilMaskSeparate)(GLenum face, GLuint mask);
- void (APIENTRY * StencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
- void (APIENTRY * Uniform1f)(GLint location, GLfloat x);
- void (APIENTRY * Uniform1fv)(GLint location, GLsizei count, const GLfloat* v);
- void (APIENTRY * Uniform1i)(GLint location, GLint x);
- void (APIENTRY * Uniform1iv)(GLint location, GLsizei count, const GLint* v);
- void (APIENTRY * Uniform2f)(GLint location, GLfloat x, GLfloat y);
- void (APIENTRY * Uniform2fv)(GLint location, GLsizei count, const GLfloat* v);
- void (APIENTRY * Uniform2i)(GLint location, GLint x, GLint y);
- void (APIENTRY * Uniform2iv)(GLint location, GLsizei count, const GLint* v);
- void (APIENTRY * Uniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z);
- void (APIENTRY * Uniform3fv)(GLint location, GLsizei count, const GLfloat* v);
- void (APIENTRY * Uniform3i)(GLint location, GLint x, GLint y, GLint z);
- void (APIENTRY * Uniform3iv)(GLint location, GLsizei count, const GLint* v);
- void (APIENTRY * Uniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- void (APIENTRY * Uniform4fv)(GLint location, GLsizei count, const GLfloat* v);
- void (APIENTRY * Uniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w);
- void (APIENTRY * Uniform4iv)(GLint location, GLsizei count, const GLint* v);
- void (APIENTRY * UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
- void (APIENTRY * UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
- void (APIENTRY * UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
- void (APIENTRY * UseProgram)(GLuint program);
- void (APIENTRY * ValidateProgram)(GLuint program);
- void (APIENTRY * VertexAttrib1f)(GLuint indx, GLfloat x);
- void (APIENTRY * VertexAttrib1fv)(GLuint indx, const GLfloat* values);
- void (APIENTRY * VertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y);
- void (APIENTRY * VertexAttrib2fv)(GLuint indx, const GLfloat* values);
- void (APIENTRY * VertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
- void (APIENTRY * VertexAttrib3fv)(GLuint indx, const GLfloat* values);
- void (APIENTRY * VertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- void (APIENTRY * VertexAttrib4fv)(GLuint indx, const GLfloat* values);
- void (APIENTRY * VertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
-
-protected:
- HMODULE m_lib;
- LibType m_libraryType;
- bool m_loaded;
-};
-
-class QWindowsOpenGL : public QAbstractWindowsOpenGL
-{
-public:
- QWindowsOpenGL();
- ~QWindowsOpenGL();
-
-private:
- bool load(const char *glName, const char *eglName);
- void unload();
-
- void resolve();
-
- void resolveWGL();
- void resolveEGL();
- void resolveGLCommon();
- void resolveGL11();
- void resolveGLES2();
-
- FARPROC resolveFunc(const char *name);
- FARPROC resolveEglFunc(const char *name);
-
- bool testDesktopGL();
-
- HMODULE m_eglLib;
-};
-
-static QString qgl_windowsErrorMessage(unsigned long errorCode)
-{
- QString rc = QString::fromLatin1("#%1: ").arg(errorCode);
- ushort *lpMsgBuf;
-
- const int len = FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, errorCode, 0, (LPTSTR)&lpMsgBuf, 0, NULL);
- if (len) {
- rc += QString::fromUtf16(lpMsgBuf, len);
- LocalFree(lpMsgBuf);
- } else {
- rc += QString::fromLatin1("<unknown error>");
- }
- return rc;
-}
-
-static HMODULE qgl_loadLib(const char *name, bool warnOnFail = true)
-{
- HMODULE lib = LoadLibraryA(name);
-
- if (lib)
- return lib;
-
- if (warnOnFail) {
- QString msg = qgl_windowsErrorMessage(GetLastError());
- qCWarning(qglLc, "Failed to load %s: %s", name, qPrintable(msg));
- }
-
- return 0;
-}
-
-QWindowsOpenGL::QWindowsOpenGL()
- : m_eglLib(0)
-{
- enum RequestedLib {
- Unknown,
- Desktop,
- GLES
- } req = Unknown;
-
- // Check if the application has requested a certain implementation.
- if (QCoreApplication::testAttribute(Qt::AA_UseDesktopOpenGL))
- req = Desktop;
- else if (QCoreApplication::testAttribute(Qt::AA_UseOpenGLES))
- req = GLES;
-
- // Check if an implementation is forced through the environment variable.
- QByteArray requested = qgetenv("QT_OPENGL");
- if (requested == QByteArrayLiteral("desktop"))
- req = Desktop;
- else if (requested == QByteArrayLiteral("angle"))
- req = GLES;
-
- bool desktopTested = false;
- if (req == Unknown) {
- // No explicit request. Start testing. opengl32.dll is preferred. Angle is the fallback.
- desktopTested = true;
- if (testDesktopGL())
- req = Desktop;
- else
- req = GLES;
- }
-
- Q_ASSERT(req != Unknown);
-
- if (req == GLES) {
- qCDebug(qglLc, "Using Angle");
-#ifdef QT_DEBUG
- m_loaded = load("libglesv2d.dll", "libegld.dll");
-#else
- m_loaded = load("libglesv2.dll", "libegl.dll");
-#endif
- if (m_loaded) {
- m_libraryType = QWindowsOpenGL::GLES2;
- } else {
- // Could not load Angle. Try opengl32.dll.
- if (!desktopTested && testDesktopGL())
- req = Desktop;
- }
- }
-
- if (req == Desktop) {
- qCDebug(qglLc, "Using desktop OpenGL");
- m_loaded = load("opengl32.dll", 0);
- if (m_loaded)
- m_libraryType = QWindowsOpenGL::DesktopGL;
- }
-
- if (m_loaded)
- resolve();
-
- // When no library is loaded, keep on running. All EGL/WGL/GL functions will
- // return 0 in this case without further errors. It is up to the clients
- // (application code, Qt Quick, etc.) to act when eglInitialize() and
- // friends fail, i.e. when QOpenGLContext::create() returns false due to the
- // platform plugin's failure to create a platform context.
-}
-
-QWindowsOpenGL::~QWindowsOpenGL()
-{
- unload();
-}
-
-bool QWindowsOpenGL::load(const char *glName, const char *eglName)
-{
- qCDebug(qglLc, "Loading %s %s", glName, eglName ? eglName : "");
-
- bool result = true;
-
- if (glName) {
- m_lib = qgl_loadLib(glName);
- result &= m_lib != 0;
- }
-
- if (eglName) {
- m_eglLib = qgl_loadLib(eglName);
- result &= m_eglLib != 0;
- }
-
- if (!result)
- unload();
-
- return result;
-}
-
-void QWindowsOpenGL::unload()
-{
- if (m_lib) {
- FreeLibrary(m_lib);
- m_lib = 0;
- }
- if (m_eglLib) {
- FreeLibrary(m_eglLib);
- m_eglLib = 0;
- }
- m_loaded = false;
-}
-
-FARPROC QWindowsOpenGL::resolveFunc(const char *name)
-{
- FARPROC proc = m_lib ? ::GetProcAddress(m_lib, name) : 0;
- if (!proc)
- qCDebug(qglLc, "Failed to resolve GL function %s", name);
- return proc;
-}
-
-FARPROC QWindowsOpenGL::resolveEglFunc(const char *name)
-{
- FARPROC proc = m_eglLib ? ::GetProcAddress(m_eglLib, name) : 0;
- if (!proc)
- qCDebug(qglLc, "Failed to resolve EGL function %s", name);
- return proc;
-}
-
-void QWindowsOpenGL::resolveWGL()
-{
- CopyContext = reinterpret_cast<BOOL (WINAPI *)(HGLRC, HGLRC, UINT)>(resolveFunc("wglCopyContext"));
- CreateContext = reinterpret_cast<HGLRC (WINAPI *)(HDC)>(resolveFunc("wglCreateContext"));
- CreateLayerContext = reinterpret_cast<HGLRC (WINAPI *)(HDC, int)>(resolveFunc("wglCreateLayerContext"));
- DeleteContext = reinterpret_cast<BOOL (WINAPI *)(HGLRC)>(resolveFunc("wglDeleteContext"));
- GetCurrentContext = reinterpret_cast<HGLRC (WINAPI *)()>(resolveFunc("wglGetCurrentContext"));
- GetCurrentDC = reinterpret_cast<HDC (WINAPI *)()>(resolveFunc("wglGetCurrentDC"));
- GetProcAddress = reinterpret_cast<PROC (WINAPI *)(LPCSTR)>(resolveFunc("wglGetProcAddress"));
- MakeCurrent = reinterpret_cast<BOOL (WINAPI *)(HDC, HGLRC)>(resolveFunc("wglMakeCurrent"));
- ShareLists = reinterpret_cast<BOOL (WINAPI *)(HGLRC, HGLRC)>(resolveFunc("wglShareLists"));
- UseFontBitmapsW = reinterpret_cast<BOOL (WINAPI *)(HDC, DWORD, DWORD, DWORD)>(resolveFunc("wglUseFontBitmapsW"));
- UseFontOutlinesW = reinterpret_cast<BOOL (WINAPI *)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int, LPGLYPHMETRICSFLOAT)>(resolveFunc("wglUseFontOutlinesW"));
- DescribeLayerPlane = reinterpret_cast<BOOL (WINAPI *)(HDC, int, int, UINT, LPLAYERPLANEDESCRIPTOR)>(resolveFunc("wglDescribeLayerPlane"));
- SetLayerPaletteEntries = reinterpret_cast<int (WINAPI *)(HDC, int, int, int, CONST COLORREF *)>(resolveFunc("wglSetLayerPaletteEntries"));
- GetLayerPaletteEntries = reinterpret_cast<int (WINAPI *)(HDC, int, int, int, COLORREF *)>(resolveFunc("wglGetLayerPaletteEntries"));
- RealizeLayerPalette = reinterpret_cast<BOOL (WINAPI *)(HDC, int, BOOL)>(resolveFunc("wglRealizeLayerPalette"));
- SwapLayerBuffers = reinterpret_cast<BOOL (WINAPI *)(HDC, UINT)>(resolveFunc("wglSwapLayerBuffers"));
- SwapMultipleBuffers = reinterpret_cast<DWORD (WINAPI *)(UINT, CONST WGLSWAP *)>(resolveFunc("wglSwapMultipleBuffers"));
-}
-
-void QWindowsOpenGL::resolveEGL()
-{
- EGL_GetError = reinterpret_cast<EGLint (EGLAPIENTRY *)(void)>(resolveEglFunc("eglGetError"));
- EGL_GetDisplay = reinterpret_cast<EGLDisplay (EGLAPIENTRY *)(EGLNativeDisplayType)>(resolveEglFunc("eglGetDisplay"));
- EGL_Initialize = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay, EGLint *, EGLint *)>(resolveEglFunc("eglInitialize"));
- EGL_Terminate = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay)>(resolveEglFunc("eglTerminate"));
- EGL_QueryString = reinterpret_cast<const char * (EGLAPIENTRY *)(EGLDisplay, EGLint)>(resolveEglFunc("eglQueryString"));
- EGL_GetConfigs = reinterpret_cast<EGLBoolean (EGLAPIENTRY * )(EGLDisplay, EGLConfig *, EGLint, EGLint *)>(resolveEglFunc("eglGetConfigs"));
- EGL_ChooseConfig = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay, const EGLint *, EGLConfig *, EGLint, EGLint *)>(resolveEglFunc("eglChooseConfig"));
- EGL_GetConfigAttrib = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay, EGLConfig, EGLint, EGLint *)>(resolveEglFunc("eglGetConfigAttrib"));
- EGL_CreateWindowSurface = reinterpret_cast<EGLSurface (EGLAPIENTRY *)(EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint *)>(resolveEglFunc("eglCreateWindowSurface"));
- EGL_CreatePbufferSurface = reinterpret_cast<EGLSurface (EGLAPIENTRY *)(EGLDisplay , EGLConfig, const EGLint *)>(resolveEglFunc("eglCreatePbufferSurface"));
- EGL_CreatePixmapSurface = reinterpret_cast<EGLSurface (EGLAPIENTRY * )(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType , const EGLint *)>(resolveEglFunc("eglCreatePixmapSurface"));
- EGL_DestroySurface = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay , EGLSurface )>(resolveEglFunc("eglDestroySurface"));
- EGL_QuerySurface = reinterpret_cast<EGLBoolean (EGLAPIENTRY * )(EGLDisplay , EGLSurface , EGLint , EGLint *)>(resolveEglFunc("eglQuerySurface"));
- EGL_BindAPI = reinterpret_cast<EGLBoolean (EGLAPIENTRY * )(EGLenum )>(resolveEglFunc("eglBindAPI"));
- EGL_QueryAPI = reinterpret_cast<EGLenum (EGLAPIENTRY *)(void)>(resolveEglFunc("eglQueryAPI"));
- EGL_WaitClient = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(void)>(resolveEglFunc("eglWaitClient"));
- EGL_ReleaseThread = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(void)>(resolveEglFunc("eglReleaseThread"));
- EGL_CreatePbufferFromClientBuffer = reinterpret_cast<EGLSurface (EGLAPIENTRY * )(EGLDisplay , EGLenum , EGLClientBuffer , EGLConfig , const EGLint *)>(resolveEglFunc("eglCreatePbufferFromClientBuffer"));
- EGL_SurfaceAttrib = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay , EGLSurface , EGLint , EGLint )>(resolveEglFunc("eglSurfaceAttrib"));
- EGL_BindTexImage = reinterpret_cast<EGLBoolean (EGLAPIENTRY * )(EGLDisplay, EGLSurface , EGLint )>(resolveEglFunc("eglBindTexImage"));
- EGL_ReleaseTexImage = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay, EGLSurface , EGLint)>(resolveEglFunc("eglReleaseTexImage"));
- EGL_SwapInterval = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay , EGLint )>(resolveEglFunc("eglSwapInterval"));
- EGL_CreateContext = reinterpret_cast<EGLContext (EGLAPIENTRY *)(EGLDisplay , EGLConfig , EGLContext , const EGLint *)>(resolveEglFunc("eglCreateContext"));
- EGL_DestroyContext = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay, EGLContext)>(resolveEglFunc("eglDestroyContext"));
- EGL_MakeCurrent = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay , EGLSurface , EGLSurface , EGLContext )>(resolveEglFunc("eglMakeCurrent"));
- EGL_GetCurrentContext = reinterpret_cast<EGLContext (EGLAPIENTRY *)(void)>(resolveEglFunc("eglGetCurrentContext"));
- EGL_GetCurrentSurface = reinterpret_cast<EGLSurface (EGLAPIENTRY *)(EGLint )>(resolveEglFunc("eglGetCurrentSurface"));
- EGL_GetCurrentDisplay = reinterpret_cast<EGLDisplay (EGLAPIENTRY *)(void)>(resolveEglFunc("eglGetCurrentDisplay"));
- EGL_QueryContext = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay , EGLContext , EGLint , EGLint *)>(resolveEglFunc("eglQueryContext"));
- EGL_WaitGL = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(void)>(resolveEglFunc("eglWaitGL"));
- EGL_WaitNative = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLint )>(resolveEglFunc("eglWaitNative"));
- EGL_SwapBuffers = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay , EGLSurface)>(resolveEglFunc("eglSwapBuffers"));
- EGL_CopyBuffers = reinterpret_cast<EGLBoolean (EGLAPIENTRY *)(EGLDisplay , EGLSurface , EGLNativePixmapType )>(resolveEglFunc("eglCopyBuffers"));
- EGL_GetProcAddress = reinterpret_cast<__eglMustCastToProperFunctionPointerType (EGLAPIENTRY * )(const char *)>(resolveEglFunc("eglGetProcAddress"));
-}
-
-void QWindowsOpenGL::resolveGLCommon()
-{
- Viewport = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLsizei , GLsizei )>(resolveFunc("glViewport"));
- IsEnabled = reinterpret_cast<GLboolean (APIENTRY *)(GLenum )>(resolveFunc("glIsEnabled"));
- GetTexParameteriv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint *)>(resolveFunc("glGetTexParameteriv"));
- GetTexParameterfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat *)>(resolveFunc("glGetTexParameterfv"));
- GetString = reinterpret_cast<const GLubyte * (APIENTRY *)(GLenum )>(resolveFunc("glGetString"));
- GetIntegerv = reinterpret_cast<void (APIENTRY *)(GLenum , GLint *)>(resolveFunc("glGetIntegerv"));
- GetFloatv = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat *)>(resolveFunc("glGetFloatv"));
- GetError = reinterpret_cast<GLenum (APIENTRY *)()>(resolveFunc("glGetError"));
- GetBooleanv = reinterpret_cast<void (APIENTRY *)(GLenum , GLboolean *)>(resolveFunc("glGetBooleanv"));
- ReadPixels = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLsizei , GLsizei , GLenum , GLenum , GLvoid *)>(resolveFunc("glReadPixels"));
- PixelStorei = reinterpret_cast<void (APIENTRY *)(GLenum , GLint )>(resolveFunc("glPixelStorei"));
- DepthFunc = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glDepthFunc"));
- StencilOp = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLenum )>(resolveFunc("glStencilOp"));
- StencilFunc = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLuint )>(resolveFunc("glStencilFunc"));
- BlendFunc = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum )>(resolveFunc("glBlendFunc"));
- Flush = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glFlush"));
- Finish = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glFinish"));
- Enable = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glEnable"));
- Disable = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glDisable"));
- DepthMask = reinterpret_cast<void (APIENTRY *)(GLboolean )>(resolveFunc("glDepthMask"));
- ColorMask = reinterpret_cast<void (APIENTRY *)(GLboolean , GLboolean , GLboolean , GLboolean )>(resolveFunc("glColorMask"));
- StencilMask = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glStencilMask"));
- ClearStencil = reinterpret_cast<void (APIENTRY *)(GLint )>(resolveFunc("glClearStencil"));
- ClearColor = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glClearColor"));
- Clear = reinterpret_cast<void (APIENTRY *)(GLbitfield )>(resolveFunc("glClear"));
- TexImage2D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLint , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(resolveFunc("glTexImage2D"));
- TexParameteriv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLint *)>(resolveFunc("glTexParameteriv"));
- TexParameteri = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint )>(resolveFunc("glTexParameteri"));
- TexParameterfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLfloat *)>(resolveFunc("glTexParameterfv"));
- TexParameterf = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat )>(resolveFunc("glTexParameterf"));
- Scissor = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLsizei , GLsizei )>(resolveFunc("glScissor"));
- LineWidth = reinterpret_cast<void (APIENTRY *)(GLfloat )>(resolveFunc("glLineWidth"));
- Hint = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum )>(resolveFunc("glHint"));
- FrontFace = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glFrontFace"));
- CullFace = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glCullFace"));
-
- IsTexture = reinterpret_cast<GLboolean (APIENTRY *)(GLuint )>(resolveFunc("glIsTexture"));
- GenTextures = reinterpret_cast<void (APIENTRY *)(GLsizei , GLuint *)>(resolveFunc("glGenTextures"));
- DeleteTextures = reinterpret_cast<void (APIENTRY *)(GLsizei , const GLuint *)>(resolveFunc("glDeleteTextures"));
- BindTexture = reinterpret_cast<void (APIENTRY *)(GLenum , GLuint )>(resolveFunc("glBindTexture"));
- TexSubImage2D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLenum , const GLvoid *)>(resolveFunc("glTexSubImage2D"));
- CopyTexSubImage2D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLint , GLint , GLint , GLint , GLsizei , GLsizei )>(resolveFunc("glCopyTexSubImage2D"));
- CopyTexImage2D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLsizei , GLint )>(resolveFunc("glCopyTexImage2D"));
- PolygonOffset = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat )>(resolveFunc("glPolygonOffset"));
- DrawElements = reinterpret_cast<void (APIENTRY *)(GLenum , GLsizei , GLenum , const GLvoid *)>(resolveFunc("glDrawElements"));
- DrawArrays = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLsizei )>(resolveFunc("glDrawArrays"));
-}
-
-void QWindowsOpenGL::resolveGL11()
-{
- DepthRange = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble )>(resolveFunc("glDepthRange"));
- GetTexImage = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLenum , GLenum , GLvoid *)>(resolveFunc("glGetTexImage"));
- LogicOp = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glLogicOp"));
- ClearDepth = reinterpret_cast<void (APIENTRY *)(GLdouble )>(resolveFunc("glClearDepth"));
- PolygonMode = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum )>(resolveFunc("glPolygonMode"));
- PointSize = reinterpret_cast<void (APIENTRY *)(GLfloat )>(resolveFunc("glPointSize"));
- GetTexLevelParameteriv = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLenum , GLint *)>(resolveFunc("glGetTexLevelParameteriv"));
- GetTexLevelParameterfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLenum , GLfloat *)>(resolveFunc("glGetTexLevelParameterfv"));
- GetDoublev = reinterpret_cast<void (APIENTRY *)(GLenum , GLdouble *)>(resolveFunc("glGetDoublev"));
- PixelStoref = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat )>(resolveFunc("glPixelStoref"));
- ReadBuffer = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glReadBuffer"));
- DrawBuffer = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glDrawBuffer"));
- TexImage1D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLint , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(resolveFunc("glTexImage1D"));
-
- Translatef = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat )>(resolveFunc("glTranslatef"));
- Translated = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble )>(resolveFunc("glTranslated"));
- Scalef = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat )>(resolveFunc("glScalef"));
- Scaled = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble )>(resolveFunc("glScaled"));
- Rotatef = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glRotatef"));
- Rotated = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble , GLdouble )>(resolveFunc("glRotated"));
- PushMatrix = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glPushMatrix"));
- PopMatrix = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glPopMatrix"));
- Ortho = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble , GLdouble , GLdouble , GLdouble )>(resolveFunc("glOrtho"));
- MultMatrixd = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glMultMatrixd"));
- MultMatrixf = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glMultMatrixf"));
- MatrixMode = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glMatrixMode"));
- LoadMatrixd = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glLoadMatrixd"));
- LoadMatrixf = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glLoadMatrixf"));
- LoadIdentity = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glLoadIdentity"));
- Frustum = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble , GLdouble , GLdouble , GLdouble )>(resolveFunc("glFrustum"));
- IsList = reinterpret_cast<GLboolean (APIENTRY *)(GLuint )>(resolveFunc("glIsList"));
- GetTexGeniv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint *)>(resolveFunc("glGetTexGeniv"));
- GetTexGenfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat *)>(resolveFunc("glGetTexGenfv"));
- GetTexGendv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLdouble *)>(resolveFunc("glGetTexGendv"));
- GetTexEnviv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint *)>(resolveFunc("glGetTexEnviv"));
- GetTexEnvfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat *)>(resolveFunc("glGetTexEnvfv"));
- GetPolygonStipple = reinterpret_cast<void (APIENTRY *)(GLubyte *)>(resolveFunc("glGetPolygonStipple"));
- GetPixelMapusv = reinterpret_cast<void (APIENTRY *)(GLenum , GLushort *)>(resolveFunc("glGetPixelMapusv"));
- GetPixelMapuiv = reinterpret_cast<void (APIENTRY *)(GLenum , GLuint *)>(resolveFunc("glGetPixelMapuiv"));
- GetPixelMapfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat *)>(resolveFunc("glGetPixelMapfv"));
- GetMaterialiv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint *)>(resolveFunc("glGetMaterialiv"));
- GetMaterialfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat *)>(resolveFunc("glGetMaterialfv"));
- GetMapiv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint *)>(resolveFunc("glGetMapiv"));
- GetMapfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat *)>(resolveFunc("glGetMapfv"));
- GetMapdv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLdouble *)>(resolveFunc("glGetMapdv"));
- GetLightiv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint *)>(resolveFunc("glGetLightiv"));
- GetLightfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat *)>(resolveFunc("glGetLightfv"));
- GetClipPlane = reinterpret_cast<void (APIENTRY *)(GLenum , GLdouble *)>(resolveFunc("glGetClipPlane"));
- DrawPixels = reinterpret_cast<void (APIENTRY *)(GLsizei , GLsizei , GLenum , GLenum , const GLvoid *)>(resolveFunc("glDrawPixels"));
- CopyPixels = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLsizei , GLsizei , GLenum )>(resolveFunc("glCopyPixels"));
- PixelMapusv = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , const GLushort *)>(resolveFunc("glPixelMapusv"));
- PixelMapuiv = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , const GLuint *)>(resolveFunc("glPixelMapuiv"));
- PixelMapfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , const GLfloat *)>(resolveFunc("glPixelMapfv"));
- PixelTransferi = reinterpret_cast<void (APIENTRY *)(GLenum , GLint )>(resolveFunc("glPixelTransferi"));
- PixelTransferf = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat )>(resolveFunc("glPixelTransferf"));
- PixelZoom = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat )>(resolveFunc("glPixelZoom"));
- AlphaFunc = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat )>(resolveFunc("glAlphaFunc"));
- EvalPoint2 = reinterpret_cast<void (APIENTRY *)(GLint , GLint )>(resolveFunc("glEvalPoint2"));
- EvalMesh2 = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLint , GLint , GLint )>(resolveFunc("glEvalMesh2"));
- EvalPoint1 = reinterpret_cast<void (APIENTRY *)(GLint )>(resolveFunc("glEvalPoint1"));
- EvalMesh1 = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLint )>(resolveFunc("glEvalMesh1"));
- EvalCoord2fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glEvalCoord2fv"));
- EvalCoord2f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat )>(resolveFunc("glEvalCoord2f"));
- EvalCoord2dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glEvalCoord2dv"));
- EvalCoord2d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble )>(resolveFunc("glEvalCoord2d"));
- EvalCoord1fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glEvalCoord1fv"));
- EvalCoord1f = reinterpret_cast<void (APIENTRY *)(GLfloat )>(resolveFunc("glEvalCoord1f"));
- EvalCoord1dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glEvalCoord1dv"));
- EvalCoord1d = reinterpret_cast<void (APIENTRY *)(GLdouble )>(resolveFunc("glEvalCoord1d"));
- MapGrid2f = reinterpret_cast<void (APIENTRY *)(GLint , GLfloat , GLfloat , GLint , GLfloat , GLfloat )>(resolveFunc("glMapGrid2f"));
- MapGrid2d = reinterpret_cast<void (APIENTRY *)(GLint , GLdouble , GLdouble , GLint , GLdouble , GLdouble )>(resolveFunc("glMapGrid2d"));
- MapGrid1f = reinterpret_cast<void (APIENTRY *)(GLint , GLfloat , GLfloat )>(resolveFunc("glMapGrid1f"));
- MapGrid1d = reinterpret_cast<void (APIENTRY *)(GLint , GLdouble , GLdouble )>(resolveFunc("glMapGrid1d"));
- Map2f = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat , GLfloat , GLint , GLint , GLfloat , GLfloat , GLint , GLint , const GLfloat *)>(resolveFunc("glMap2f"));
- Map2d = reinterpret_cast<void (APIENTRY *)(GLenum , GLdouble , GLdouble , GLint , GLint , GLdouble , GLdouble , GLint , GLint , const GLdouble *)>(resolveFunc("glMap2d"));
- Map1f = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat , GLfloat , GLint , GLint , const GLfloat *)>(resolveFunc("glMap1f"));
- Map1d = reinterpret_cast<void (APIENTRY *)(GLenum , GLdouble , GLdouble , GLint , GLint , const GLdouble *)>(resolveFunc("glMap1d"));
- PushAttrib = reinterpret_cast<void (APIENTRY *)(GLbitfield )>(resolveFunc("glPushAttrib"));
- PopAttrib = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glPopAttrib"));
- Accum = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat )>(resolveFunc("glAccum"));
- IndexMask = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glIndexMask"));
- ClearIndex = reinterpret_cast<void (APIENTRY *)(GLfloat )>(resolveFunc("glClearIndex"));
- ClearAccum = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glClearAccum"));
- PushName = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glPushName"));
- PopName = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glPopName"));
- PassThrough = reinterpret_cast<void (APIENTRY *)(GLfloat )>(resolveFunc("glPassThrough"));
- LoadName = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glLoadName"));
- InitNames = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glInitNames"));
- RenderMode = reinterpret_cast<GLint (APIENTRY *)(GLenum )>(resolveFunc("glRenderMode"));
- SelectBuffer = reinterpret_cast<void (APIENTRY *)(GLsizei , GLuint *)>(resolveFunc("glSelectBuffer"));
- FeedbackBuffer = reinterpret_cast<void (APIENTRY *)(GLsizei , GLenum , GLfloat *)>(resolveFunc("glFeedbackBuffer"));
- TexGeniv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLint *)>(resolveFunc("glTexGeniv"));
- TexGeni = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint )>(resolveFunc("glTexGeni"));
- TexGenfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLfloat *)>(resolveFunc("glTexGenfv"));
- TexGenf = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat )>(resolveFunc("glTexGenf"));
- TexGendv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLdouble *)>(resolveFunc("glTexGendv"));
- TexGend = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLdouble )>(resolveFunc("glTexGend"));
- TexEnviv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLint *)>(resolveFunc("glTexEnviv"));
- TexEnvi = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint )>(resolveFunc("glTexEnvi"));
- TexEnvfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLfloat *)>(resolveFunc("glTexEnvfv"));
- TexEnvf = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat )>(resolveFunc("glTexEnvf"));
- ShadeModel = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glShadeModel"));
- PolygonStipple = reinterpret_cast<void (APIENTRY *)(const GLubyte *)>(resolveFunc("glPolygonStipple"));
- Materialiv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLint *)>(resolveFunc("glMaterialiv"));
- Materiali = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint )>(resolveFunc("glMateriali"));
- Materialfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLfloat *)>(resolveFunc("glMaterialfv"));
- Materialf = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat )>(resolveFunc("glMaterialf"));
- LineStipple = reinterpret_cast<void (APIENTRY *)(GLint , GLushort )>(resolveFunc("glLineStipple"));
- LightModeliv = reinterpret_cast<void (APIENTRY *)(GLenum , const GLint *)>(resolveFunc("glLightModeliv"));
- LightModeli = reinterpret_cast<void (APIENTRY *)(GLenum , GLint )>(resolveFunc("glLightModeli"));
- LightModelfv = reinterpret_cast<void (APIENTRY *)(GLenum , const GLfloat *)>(resolveFunc("glLightModelfv"));
- LightModelf = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat )>(resolveFunc("glLightModelf"));
- Lightiv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLint *)>(resolveFunc("glLightiv"));
- Lighti = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint )>(resolveFunc("glLighti"));
- Lightfv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , const GLfloat *)>(resolveFunc("glLightfv"));
- Lightf = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLfloat )>(resolveFunc("glLightf"));
- Fogiv = reinterpret_cast<void (APIENTRY *)(GLenum , const GLint *)>(resolveFunc("glFogiv"));
- Fogi = reinterpret_cast<void (APIENTRY *)(GLenum , GLint )>(resolveFunc("glFogi"));
- Fogfv = reinterpret_cast<void (APIENTRY *)(GLenum , const GLfloat *)>(resolveFunc("glFogfv"));
- Fogf = reinterpret_cast<void (APIENTRY *)(GLenum , GLfloat )>(resolveFunc("glFogf"));
- ColorMaterial = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum )>(resolveFunc("glColorMaterial"));
- ClipPlane = reinterpret_cast<void (APIENTRY *)(GLenum , const GLdouble *)>(resolveFunc("glClipPlane"));
- Vertex4sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glVertex4sv"));
- Vertex4s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort , GLshort )>(resolveFunc("glVertex4s"));
- Vertex4iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glVertex4iv"));
- Vertex4i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint , GLint )>(resolveFunc("glVertex4i"));
- Vertex4fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glVertex4fv"));
- Vertex4f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glVertex4f"));
- Vertex4dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glVertex4dv"));
- Vertex4d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble , GLdouble )>(resolveFunc("glVertex4d"));
- Vertex3sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glVertex3sv"));
- Vertex3s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort )>(resolveFunc("glVertex3s"));
- Vertex3iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glVertex3iv"));
- Vertex3i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint )>(resolveFunc("glVertex3i"));
- Vertex3fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glVertex3fv"));
- Vertex3f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat )>(resolveFunc("glVertex3f"));
- Vertex3dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glVertex3dv"));
- Vertex3d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble )>(resolveFunc("glVertex3d"));
- Vertex2sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glVertex2sv"));
- Vertex2s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort )>(resolveFunc("glVertex2s"));
- Vertex2iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glVertex2iv"));
- Vertex2i = reinterpret_cast<void (APIENTRY *)(GLint , GLint )>(resolveFunc("glVertex2i"));
- Vertex2fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glVertex2fv"));
- Vertex2f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat )>(resolveFunc("glVertex2f"));
- Vertex2dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glVertex2dv"));
- Vertex2d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble )>(resolveFunc("glVertex2d"));
- TexCoord4sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glTexCoord4sv"));
- TexCoord4s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort , GLshort )>(resolveFunc("glTexCoord4s"));
- TexCoord4iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glTexCoord4iv"));
- TexCoord4i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint , GLint )>(resolveFunc("glTexCoord4i"));
- TexCoord4fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glTexCoord4fv"));
- TexCoord4f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glTexCoord4f"));
- TexCoord4dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glTexCoord4dv"));
- TexCoord4d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble , GLdouble )>(resolveFunc("glTexCoord4d"));
- TexCoord3sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glTexCoord3sv"));
- TexCoord3s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort )>(resolveFunc("glTexCoord3s"));
- TexCoord3iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glTexCoord3iv"));
- TexCoord3i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint )>(resolveFunc("glTexCoord3i"));
- TexCoord3fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glTexCoord3fv"));
- TexCoord3f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat )>(resolveFunc("glTexCoord3f"));
- TexCoord3dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glTexCoord3dv"));
- TexCoord3d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble )>(resolveFunc("glTexCoord3d"));
- TexCoord2sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glTexCoord2sv"));
- TexCoord2s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort )>(resolveFunc("glTexCoord2s"));
- TexCoord2iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glTexCoord2iv"));
- TexCoord2i = reinterpret_cast<void (APIENTRY *)(GLint , GLint )>(resolveFunc("glTexCoord2i"));
- TexCoord2fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glTexCoord2fv"));
- TexCoord2f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat )>(resolveFunc("glTexCoord2f"));
- TexCoord2dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glTexCoord2dv"));
- TexCoord2d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble )>(resolveFunc("glTexCoord2d"));
- TexCoord1sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glTexCoord1sv"));
- TexCoord1s = reinterpret_cast<void (APIENTRY *)(GLshort )>(resolveFunc("glTexCoord1s"));
- TexCoord1iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glTexCoord1iv"));
- TexCoord1i = reinterpret_cast<void (APIENTRY *)(GLint )>(resolveFunc("glTexCoord1i"));
- TexCoord1fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glTexCoord1fv"));
- TexCoord1f = reinterpret_cast<void (APIENTRY *)(GLfloat )>(resolveFunc("glTexCoord1f"));
- TexCoord1dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glTexCoord1dv"));
- TexCoord1d = reinterpret_cast<void (APIENTRY *)(GLdouble )>(resolveFunc("glTexCoord1d"));
- Rectsv = reinterpret_cast<void (APIENTRY *)(const GLshort *, const GLshort *)>(resolveFunc("glRectsv"));
- Rects = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort , GLshort )>(resolveFunc("glRects"));
- Rectiv = reinterpret_cast<void (APIENTRY *)(const GLint *, const GLint *)>(resolveFunc("glRectiv"));
- Recti = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint , GLint )>(resolveFunc("glRecti"));
- Rectfv = reinterpret_cast<void (APIENTRY *)(const GLfloat *, const GLfloat *)>(resolveFunc("glRectfv"));
- Rectf = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glRectf"));
- Rectdv = reinterpret_cast<void (APIENTRY *)(const GLdouble *, const GLdouble *)>(resolveFunc("glRectdv"));
- Rectd = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble , GLdouble )>(resolveFunc("glRectd"));
- RasterPos4sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glRasterPos4sv"));
- RasterPos4s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort , GLshort )>(resolveFunc("glRasterPos4s"));
- RasterPos4iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glRasterPos4iv"));
- RasterPos4i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint , GLint )>(resolveFunc("glRasterPos4i"));
- RasterPos4fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glRasterPos4fv"));
- RasterPos4f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glRasterPos4f"));
- RasterPos4dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glRasterPos4dv"));
- RasterPos4d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble , GLdouble )>(resolveFunc("glRasterPos4d"));
- RasterPos3sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glRasterPos3sv"));
- RasterPos3s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort )>(resolveFunc("glRasterPos3s"));
- RasterPos3iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glRasterPos3iv"));
- RasterPos3i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint )>(resolveFunc("glRasterPos3i"));
- RasterPos3fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glRasterPos3fv"));
- RasterPos3f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat )>(resolveFunc("glRasterPos3f"));
- RasterPos3dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glRasterPos3dv"));
- RasterPos3d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble )>(resolveFunc("glRasterPos3d"));
- RasterPos2sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glRasterPos2sv"));
- RasterPos2s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort )>(resolveFunc("glRasterPos2s"));
- RasterPos2iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glRasterPos2iv"));
- RasterPos2i = reinterpret_cast<void (APIENTRY *)(GLint , GLint )>(resolveFunc("glRasterPos2i"));
- RasterPos2fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glRasterPos2fv"));
- RasterPos2f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat )>(resolveFunc("glRasterPos2f"));
- RasterPos2dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glRasterPos2dv"));
- RasterPos2d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble )>(resolveFunc("glRasterPos2d"));
- Normal3sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glNormal3sv"));
- Normal3s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort )>(resolveFunc("glNormal3s"));
- Normal3iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glNormal3iv"));
- Normal3i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint )>(resolveFunc("glNormal3i"));
- Normal3fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glNormal3fv"));
- Normal3f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat )>(resolveFunc("glNormal3f"));
- Normal3dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glNormal3dv"));
- Normal3d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble )>(resolveFunc("glNormal3d"));
- Normal3bv = reinterpret_cast<void (APIENTRY *)(const GLbyte *)>(resolveFunc("glNormal3bv"));
- Normal3b = reinterpret_cast<void (APIENTRY *)(GLbyte , GLbyte , GLbyte )>(resolveFunc("glNormal3b"));
- Indexsv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glIndexsv"));
- Indexs = reinterpret_cast<void (APIENTRY *)(GLshort )>(resolveFunc("glIndexs"));
- Indexiv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glIndexiv"));
- Indexi = reinterpret_cast<void (APIENTRY *)(GLint )>(resolveFunc("glIndexi"));
- Indexfv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glIndexfv"));
- Indexf = reinterpret_cast<void (APIENTRY *)(GLfloat )>(resolveFunc("glIndexf"));
- Indexdv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glIndexdv"));
- Indexd = reinterpret_cast<void (APIENTRY *)(GLdouble )>(resolveFunc("glIndexd"));
- End = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glEnd"));
- EdgeFlagv = reinterpret_cast<void (APIENTRY *)(const GLboolean *)>(resolveFunc("glEdgeFlagv"));
- EdgeFlag = reinterpret_cast<void (APIENTRY *)(GLboolean )>(resolveFunc("glEdgeFlag"));
- Color4usv = reinterpret_cast<void (APIENTRY *)(const GLushort *)>(resolveFunc("glColor4usv"));
- Color4us = reinterpret_cast<void (APIENTRY *)(GLushort , GLushort , GLushort , GLushort )>(resolveFunc("glColor4us"));
- Color4uiv = reinterpret_cast<void (APIENTRY *)(const GLuint *)>(resolveFunc("glColor4uiv"));
- Color4ui = reinterpret_cast<void (APIENTRY *)(GLuint , GLuint , GLuint , GLuint )>(resolveFunc("glColor4ui"));
- Color4ubv = reinterpret_cast<void (APIENTRY *)(const GLubyte *)>(resolveFunc("glColor4ubv"));
- Color4ub = reinterpret_cast<void (APIENTRY *)(GLubyte , GLubyte , GLubyte , GLubyte )>(resolveFunc("glColor4ub"));
- Color4sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glColor4sv"));
- Color4s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort , GLshort )>(resolveFunc("glColor4s"));
- Color4iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glColor4iv"));
- Color4i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint , GLint )>(resolveFunc("glColor4i"));
- Color4fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glColor4fv"));
- Color4f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glColor4f"));
- Color4dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glColor4dv"));
- Color4d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble , GLdouble )>(resolveFunc("glColor4d"));
- Color4bv = reinterpret_cast<void (APIENTRY *)(const GLbyte *)>(resolveFunc("glColor4bv"));
- Color4b = reinterpret_cast<void (APIENTRY *)(GLbyte , GLbyte , GLbyte , GLbyte )>(resolveFunc("glColor4b"));
- Color3usv = reinterpret_cast<void (APIENTRY *)(const GLushort *)>(resolveFunc("glColor3usv"));
- Color3us = reinterpret_cast<void (APIENTRY *)(GLushort , GLushort , GLushort )>(resolveFunc("glColor3us"));
- Color3uiv = reinterpret_cast<void (APIENTRY *)(const GLuint *)>(resolveFunc("glColor3uiv"));
- Color3ui = reinterpret_cast<void (APIENTRY *)(GLuint , GLuint , GLuint )>(resolveFunc("glColor3ui"));
- Color3ubv = reinterpret_cast<void (APIENTRY *)(const GLubyte *)>(resolveFunc("glColor3ubv"));
- Color3ub = reinterpret_cast<void (APIENTRY *)(GLubyte , GLubyte , GLubyte )>(resolveFunc("glColor3ub"));
- Color3sv = reinterpret_cast<void (APIENTRY *)(const GLshort *)>(resolveFunc("glColor3sv"));
- Color3s = reinterpret_cast<void (APIENTRY *)(GLshort , GLshort , GLshort )>(resolveFunc("glColor3s"));
- Color3iv = reinterpret_cast<void (APIENTRY *)(const GLint *)>(resolveFunc("glColor3iv"));
- Color3i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint )>(resolveFunc("glColor3i"));
- Color3fv = reinterpret_cast<void (APIENTRY *)(const GLfloat *)>(resolveFunc("glColor3fv"));
- Color3f = reinterpret_cast<void (APIENTRY *)(GLfloat , GLfloat , GLfloat )>(resolveFunc("glColor3f"));
- Color3dv = reinterpret_cast<void (APIENTRY *)(const GLdouble *)>(resolveFunc("glColor3dv"));
- Color3d = reinterpret_cast<void (APIENTRY *)(GLdouble , GLdouble , GLdouble )>(resolveFunc("glColor3d"));
- Color3bv = reinterpret_cast<void (APIENTRY *)(const GLbyte *)>(resolveFunc("glColor3bv"));
- Color3b = reinterpret_cast<void (APIENTRY *)(GLbyte , GLbyte , GLbyte )>(resolveFunc("glColor3b"));
- Bitmap = reinterpret_cast<void (APIENTRY *)(GLsizei , GLsizei , GLfloat , GLfloat , GLfloat , GLfloat , const GLubyte *)>(resolveFunc("glBitmap"));
- Begin = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glBegin"));
- ListBase = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glListBase"));
- GenLists = reinterpret_cast<GLuint (APIENTRY *)(GLsizei )>(resolveFunc("glGenLists"));
- DeleteLists = reinterpret_cast<void (APIENTRY *)(GLuint , GLsizei )>(resolveFunc("glDeleteLists"));
- CallLists = reinterpret_cast<void (APIENTRY *)(GLsizei , GLenum , const GLvoid *)>(resolveFunc("glCallLists"));
- CallList = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glCallList"));
- EndList = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glEndList"));
- NewList = reinterpret_cast<void (APIENTRY *)(GLuint , GLenum )>(resolveFunc("glNewList"));
-
- Indexubv = reinterpret_cast<void (APIENTRY *)(const GLubyte *)>(resolveFunc("glIndexubv"));
- Indexub = reinterpret_cast<void (APIENTRY *)(GLubyte )>(resolveFunc("glIndexub"));
- TexSubImage1D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *)>(resolveFunc("glTexSubImage1D"));
- CopyTexSubImage1D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLint , GLint , GLint , GLsizei )>(resolveFunc("glCopyTexSubImage1D"));
- CopyTexImage1D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLint )>(resolveFunc("glCopyTexImage1D"));
- GetPointerv = reinterpret_cast<void (APIENTRY *)(GLenum , GLvoid* *)>(resolveFunc("glGetPointerv"));
-
- PushClientAttrib = reinterpret_cast<void (APIENTRY *)(GLbitfield )>(resolveFunc("glPushClientAttrib"));
- PopClientAttrib = reinterpret_cast<void (APIENTRY *)()>(resolveFunc("glPopClientAttrib"));
- PrioritizeTextures = reinterpret_cast<void (APIENTRY *)(GLsizei , const GLuint *, const GLfloat *)>(resolveFunc("glPrioritizeTextures"));
- AreTexturesResident = reinterpret_cast<GLboolean (APIENTRY *)(GLsizei , const GLuint *, GLboolean *)>(resolveFunc("glAreTexturesResident"));
- VertexPointer = reinterpret_cast<void (APIENTRY *)(GLint , GLenum , GLsizei , const GLvoid *)>(resolveFunc("glVertexPointer"));
- TexCoordPointer = reinterpret_cast<void (APIENTRY *)(GLint , GLenum , GLsizei , const GLvoid *)>(resolveFunc("glTexCoordPointer"));
- NormalPointer = reinterpret_cast<void (APIENTRY *)(GLenum , GLsizei , const GLvoid *)>(resolveFunc("glNormalPointer"));
- InterleavedArrays = reinterpret_cast<void (APIENTRY *)(GLenum , GLsizei , const GLvoid *)>(resolveFunc("glInterleavedArrays"));
- IndexPointer = reinterpret_cast<void (APIENTRY *)(GLenum , GLsizei , const GLvoid *)>(resolveFunc("glIndexPointer"));
- EnableClientState = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glEnableClientState"));
- EdgeFlagPointer = reinterpret_cast<void (APIENTRY *)(GLsizei , const GLvoid *)>(resolveFunc("glEdgeFlagPointer"));
- DisableClientState = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glDisableClientState"));
- ColorPointer = reinterpret_cast<void (APIENTRY *)(GLint , GLenum , GLsizei , const GLvoid *)>(resolveFunc("glColorPointer"));
- ArrayElement = reinterpret_cast<void (APIENTRY *)(GLint )>(resolveFunc("glArrayElement"));
-}
-
-void QWindowsOpenGL::resolveGLES2()
-{
- ActiveTexture = reinterpret_cast<void (APIENTRY *)(GLenum)>(resolveFunc("glActiveTexture"));
- AttachShader = reinterpret_cast<void (APIENTRY *)(GLuint , GLuint )>(resolveFunc("glAttachShader"));
- BindAttribLocation = reinterpret_cast<void (APIENTRY *)(GLuint , GLuint , const GLchar* )>(resolveFunc("glBindAttribLocation"));
- BindBuffer = reinterpret_cast<void (APIENTRY *)(GLenum , GLuint )>(resolveFunc("glBindBuffer"));
- BindFramebuffer = reinterpret_cast<void (APIENTRY *)(GLenum , GLuint )>(resolveFunc("glBindFramebuffer"));
- BindRenderbuffer = reinterpret_cast<void (APIENTRY *)(GLenum , GLuint )>(resolveFunc("glBindRenderbuffer"));
- BlendColor = reinterpret_cast<void (APIENTRY *)(GLclampf , GLclampf , GLclampf , GLclampf )>(resolveFunc("glBlendColor"));
- BlendEquation = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glBlendEquation"));
- BlendEquationSeparate = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum )>(resolveFunc("glBlendEquationSeparate"));
- BlendFuncSeparate = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLenum , GLenum )>(resolveFunc("glBlendFuncSeparate"));
- BufferData = reinterpret_cast<void (APIENTRY *)(GLenum , GLsizeiptr , const GLvoid* , GLenum )>(resolveFunc("glBufferData"));
- BufferSubData = reinterpret_cast<void (APIENTRY *)(GLenum , GLintptr , GLsizeiptr , const GLvoid* )>(resolveFunc("glBufferSubData"));
- CheckFramebufferStatus = reinterpret_cast<GLenum (APIENTRY *)(GLenum )>(resolveFunc("glCheckFramebufferStatus"));
- ClearDepthf = reinterpret_cast<void (APIENTRY *)(GLclampf )>(resolveFunc("glClearDepthf"));
- CompileShader = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glCompileShader"));
- CompressedTexImage2D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLenum , GLsizei , GLsizei, GLint, GLsizei, const GLvoid* )>(resolveFunc("glCompressedTexImage2D"));
- CompressedTexSubImage2D = reinterpret_cast<void (APIENTRY *)(GLenum , GLint , GLint , GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid* )>(resolveFunc("glCompressedTexSubImage2D"));
- CreateProgram = reinterpret_cast<GLuint (APIENTRY *)(void)>(resolveFunc("glCreateProgram"));
- CreateShader = reinterpret_cast<GLuint (APIENTRY *)(GLenum )>(resolveFunc("glCreateShader"));
- DeleteBuffers = reinterpret_cast<void (APIENTRY *)(GLsizei , const GLuint*)>(resolveFunc("glDeleteBuffers"));
- DeleteFramebuffers = reinterpret_cast<void (APIENTRY *)(GLsizei , const GLuint* )>(resolveFunc("glDeleteFramebuffers"));
- DeleteProgram = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glDeleteProgram"));
- DeleteRenderbuffers = reinterpret_cast<void (APIENTRY *)(GLsizei , const GLuint* )>(resolveFunc("glDeleteRenderbuffers"));
- DeleteShader = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glDeleteShader"));
- DepthRangef = reinterpret_cast<void (APIENTRY *)(GLclampf , GLclampf )>(resolveFunc("glDepthRangef"));
- DetachShader = reinterpret_cast<void (APIENTRY *)(GLuint , GLuint )>(resolveFunc("glDetachShader"));
- DisableVertexAttribArray = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glDisableVertexAttribArray"));
- EnableVertexAttribArray = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glEnableVertexAttribArray"));
- FramebufferRenderbuffer = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLenum , GLuint )>(resolveFunc("glFramebufferRenderbuffer"));
- FramebufferTexture2D = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLenum , GLuint , GLint )>(resolveFunc("glFramebufferTexture2D"));
- GenBuffers = reinterpret_cast<void (APIENTRY *)(GLsizei , GLuint* )>(resolveFunc("glGenBuffers"));
- GenerateMipmap = reinterpret_cast<void (APIENTRY *)(GLenum )>(resolveFunc("glGenerateMipmap"));
- GenFramebuffers = reinterpret_cast<void (APIENTRY *)(GLsizei , GLuint* )>(resolveFunc("glGenFramebuffers"));
- GenRenderbuffers = reinterpret_cast<void (APIENTRY *)(GLsizei , GLuint* )>(resolveFunc("glGenRenderbuffers"));
- GetActiveAttrib = reinterpret_cast<void (APIENTRY *)(GLuint , GLuint , GLsizei , GLsizei* , GLint* , GLenum* , GLchar* )>(resolveFunc("glGetActiveAttrib"));
- GetActiveUniform = reinterpret_cast<void (APIENTRY *)(GLuint , GLuint , GLsizei , GLsizei* , GLint* , GLenum* , GLchar* )>(resolveFunc("glGetActiveUniform"));
- GetAttachedShaders = reinterpret_cast<void (APIENTRY *)(GLuint , GLsizei , GLsizei*, GLuint* )>(resolveFunc("glGetAttachedShaders"));
- GetAttribLocation = reinterpret_cast<int (APIENTRY *)(GLuint , const GLchar* )>(resolveFunc("glGetAttribLocation"));
- GetBufferParameteriv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint* )>(resolveFunc("glGetBufferParameteriv"));
- GetFramebufferAttachmentParameteriv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum, GLenum , GLint* )>(resolveFunc("glGetFramebufferAttachmentParameteriv"));
- GetProgramiv = reinterpret_cast<void (APIENTRY *)(GLuint , GLenum , GLint* )>(resolveFunc("glGetProgramiv"));
- GetProgramInfoLog = reinterpret_cast<void (APIENTRY *)(GLuint , GLsizei , GLsizei* , GLchar* )>(resolveFunc("glGetProgramInfoLog"));
- GetRenderbufferParameteriv = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint* )>(resolveFunc("glGetRenderbufferParameteriv"));
- GetShaderiv = reinterpret_cast<void (APIENTRY *)(GLuint , GLenum , GLint* )>(resolveFunc("glGetShaderiv"));
- GetShaderInfoLog = reinterpret_cast<void (APIENTRY *)(GLuint , GLsizei , GLsizei*, GLchar*)>(resolveFunc("glGetShaderInfoLog"));
- GetShaderPrecisionFormat = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint* , GLint* )>(resolveFunc("glGetShaderPrecisionFormat"));
- GetShaderSource = reinterpret_cast<void (APIENTRY *)(GLuint , GLsizei , GLsizei* , GLchar* )>(resolveFunc("glGetShaderSource"));
- GetUniformfv = reinterpret_cast<void (APIENTRY *)(GLuint , GLint , GLfloat*)>(resolveFunc("glGetUniformfv"));
- GetUniformiv = reinterpret_cast<void (APIENTRY *)(GLuint , GLint , GLint*)>(resolveFunc("glGetUniformiv"));
- GetUniformLocation = reinterpret_cast<int (APIENTRY *)(GLuint , const GLchar* )>(resolveFunc("glGetUniformLocation"));
- GetVertexAttribfv = reinterpret_cast<void (APIENTRY *)(GLuint , GLenum , GLfloat* )>(resolveFunc("glGetVertexAttribfv"));
- GetVertexAttribiv = reinterpret_cast<void (APIENTRY *)(GLuint , GLenum , GLint* )>(resolveFunc("glGetVertexAttribiv"));
- GetVertexAttribPointerv = reinterpret_cast<void (APIENTRY *)(GLuint , GLenum , GLvoid** pointer)>(resolveFunc("glGetVertexAttribPointerv"));
- IsBuffer = reinterpret_cast<GLboolean (APIENTRY *)(GLuint )>(resolveFunc("glIsBuffer"));
- IsFramebuffer = reinterpret_cast<GLboolean (APIENTRY *)(GLuint )>(resolveFunc("glIsFramebuffer"));
- IsProgram = reinterpret_cast<GLboolean (APIENTRY *)(GLuint )>(resolveFunc("glIsProgram"));
- IsRenderbuffer = reinterpret_cast<GLboolean (APIENTRY *)(GLuint )>(resolveFunc("glIsRenderbuffer"));
- IsShader = reinterpret_cast<GLboolean (APIENTRY *)(GLuint )>(resolveFunc("glIsShader"));
- LinkProgram = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glLinkProgram"));
- ReleaseShaderCompiler = reinterpret_cast<void (APIENTRY *)(void)>(resolveFunc("glReleaseShaderCompiler"));
- RenderbufferStorage = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLsizei , GLsizei )>(resolveFunc("glRenderbufferStorage"));
- SampleCoverage = reinterpret_cast<void (APIENTRY *)(GLclampf , GLboolean )>(resolveFunc("glSampleCoverage"));
- ShaderBinary = reinterpret_cast<void (APIENTRY *)(GLsizei , const GLuint*, GLenum , const GLvoid* , GLsizei )>(resolveFunc("glShaderBinary"));
- ShaderSource = reinterpret_cast<void (APIENTRY *)(GLuint , GLsizei , const GLchar* *, const GLint* )>(resolveFunc("glShaderSource"));
- StencilFuncSeparate = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLint , GLuint )>(resolveFunc("glStencilFuncSeparate"));
- StencilMaskSeparate = reinterpret_cast<void (APIENTRY *)(GLenum , GLuint )>(resolveFunc("glStencilMaskSeparate"));
- StencilOpSeparate = reinterpret_cast<void (APIENTRY *)(GLenum , GLenum , GLenum , GLenum )>(resolveFunc("glStencilOpSeparate"));
- Uniform1f = reinterpret_cast<void (APIENTRY *)(GLint , GLfloat )>(resolveFunc("glUniform1f"));
- Uniform1fv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , const GLfloat* )>(resolveFunc("glUniform1fv"));
- Uniform1i = reinterpret_cast<void (APIENTRY *)(GLint , GLint )>(resolveFunc("glUniform1i"));
- Uniform1iv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , const GLint* )>(resolveFunc("glUniform1iv"));
- Uniform2f = reinterpret_cast<void (APIENTRY *)(GLint , GLfloat , GLfloat )>(resolveFunc("glUniform2f"));
- Uniform2fv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , const GLfloat* )>(resolveFunc("glUniform2fv"));
- Uniform2i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint )>(resolveFunc("glUniform2i"));
- Uniform2iv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , const GLint* )>(resolveFunc("glUniform2iv"));
- Uniform3f = reinterpret_cast<void (APIENTRY *)(GLint , GLfloat , GLfloat , GLfloat )>(resolveFunc("glUniform3f"));
- Uniform3fv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , const GLfloat* )>(resolveFunc("glUniform3fv"));
- Uniform3i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint , GLint )>(resolveFunc("glUniform3i"));
- Uniform3iv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , const GLint* )>(resolveFunc("glUniform3iv"));
- Uniform4f = reinterpret_cast<void (APIENTRY *)(GLint , GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glUniform4f"));
- Uniform4fv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , const GLfloat* )>(resolveFunc("glUniform4fv"));
- Uniform4i = reinterpret_cast<void (APIENTRY *)(GLint , GLint , GLint , GLint , GLint )>(resolveFunc("glUniform4i"));
- Uniform4iv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , const GLint* )>(resolveFunc("glUniform4iv"));
- UniformMatrix2fv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , GLboolean , const GLfloat* )>(resolveFunc("glUniformMatrix2fv"));
- UniformMatrix3fv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , GLboolean , const GLfloat* )>(resolveFunc("glUniformMatrix3fv"));
- UniformMatrix4fv = reinterpret_cast<void (APIENTRY *)(GLint , GLsizei , GLboolean , const GLfloat* )>(resolveFunc("glUniformMatrix4fv"));
- UseProgram = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glUseProgram"));
- ValidateProgram = reinterpret_cast<void (APIENTRY *)(GLuint )>(resolveFunc("glValidateProgram"));
- VertexAttrib1f = reinterpret_cast<void (APIENTRY *)(GLuint , GLfloat )>(resolveFunc("glVertexAttrib1f"));
- VertexAttrib1fv = reinterpret_cast<void (APIENTRY *)(GLuint , const GLfloat* )>(resolveFunc("glVertexAttrib1fv"));
- VertexAttrib2f = reinterpret_cast<void (APIENTRY *)(GLuint , GLfloat , GLfloat )>(resolveFunc("glVertexAttrib2f"));
- VertexAttrib2fv = reinterpret_cast<void (APIENTRY *)(GLuint , const GLfloat* )>(resolveFunc("glVertexAttrib2fv"));
- VertexAttrib3f = reinterpret_cast<void (APIENTRY *)(GLuint , GLfloat , GLfloat , GLfloat )>(resolveFunc("glVertexAttrib3f"));
- VertexAttrib3fv = reinterpret_cast<void (APIENTRY *)(GLuint , const GLfloat* )>(resolveFunc("glVertexAttrib3fv"));
- VertexAttrib4f = reinterpret_cast<void (APIENTRY *)(GLuint , GLfloat , GLfloat , GLfloat , GLfloat )>(resolveFunc("glVertexAttrib4f"));
- VertexAttrib4fv = reinterpret_cast<void (APIENTRY *)(GLuint , const GLfloat* )>(resolveFunc("glVertexAttrib4fv"));
- VertexAttribPointer = reinterpret_cast<void (APIENTRY *)(GLuint , GLint, GLenum, GLboolean, GLsizei, const GLvoid* )>(resolveFunc("glVertexAttribPointer"));
-}
-
-void QWindowsOpenGL::resolve()
-{
- switch (libraryType()) {
- case DesktopGL:
- resolveWGL();
- resolveGLCommon();
- resolveGL11();
- break;
-
- case GLES2:
- resolveEGL();
- resolveGLCommon();
- resolveGLES2();
- break;
-
- default:
- Q_ASSERT_X(0, "QWindowsOpenGL", "Nothing to resolve");
- break;
- }
-}
-
-bool QWindowsOpenGL::testDesktopGL()
-{
- HMODULE lib = 0;
- HWND wnd = 0;
- HDC dc = 0;
- HGLRC context = 0;
- LPCTSTR className = L"qtopenglproxytest";
-
- HGLRC (WINAPI * CreateContext)(HDC dc) = 0;
- BOOL (WINAPI * DeleteContext)(HGLRC context) = 0;
- BOOL (WINAPI * MakeCurrent)(HDC dc, HGLRC context) = 0;
- PROC (WINAPI * WGL_GetProcAddress)(LPCSTR name) = 0;
-
- bool result = false;
-
- // Test #1: Load opengl32.dll and try to resolve an OpenGL 2 function.
- // This will typically fail on systems that do not have a real OpenGL driver.
- lib = qgl_loadLib("opengl32.dll", false);
- if (lib) {
- CreateContext = reinterpret_cast<HGLRC (WINAPI *)(HDC)>(::GetProcAddress(lib, "wglCreateContext"));
- if (!CreateContext)
- goto cleanup;
- DeleteContext = reinterpret_cast<BOOL (WINAPI *)(HGLRC)>(::GetProcAddress(lib, "wglDeleteContext"));
- if (!DeleteContext)
- goto cleanup;
- MakeCurrent = reinterpret_cast<BOOL (WINAPI *)(HDC, HGLRC)>(::GetProcAddress(lib, "wglMakeCurrent"));
- if (!MakeCurrent)
- goto cleanup;
- WGL_GetProcAddress = reinterpret_cast<PROC (WINAPI *)(LPCSTR)>(::GetProcAddress(lib, "wglGetProcAddress"));
- if (!WGL_GetProcAddress)
- goto cleanup;
-
- WNDCLASS wclass;
- wclass.cbClsExtra = 0;
- wclass.cbWndExtra = 0;
- wclass.hInstance = (HINSTANCE) GetModuleHandle(0);
- wclass.hIcon = 0;
- wclass.hCursor = 0;
- wclass.hbrBackground = (HBRUSH) (COLOR_BACKGROUND);
- wclass.lpszMenuName = 0;
- wclass.lpfnWndProc = DefWindowProc;
- wclass.lpszClassName = className;
- wclass.style = CS_OWNDC;
- if (!RegisterClass(&wclass))
- goto cleanup;
- wnd = CreateWindow(className, L"qtopenglproxytest", WS_OVERLAPPED,
- 0, 0, 640, 480, 0, 0, wclass.hInstance, 0);
- if (!wnd)
- goto cleanup;
- dc = GetDC(wnd);
- if (!dc)
- goto cleanup;
-
- PIXELFORMATDESCRIPTOR pfd;
- memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
- pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
- pfd.nVersion = 1;
- pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_GENERIC_FORMAT;
- pfd.iPixelType = PFD_TYPE_RGBA;
- // Use the GDI functions. Under the hood this will call the wgl variants in opengl32.dll.
- int pixelFormat = ChoosePixelFormat(dc, &pfd);
- if (!pixelFormat)
- goto cleanup;
- if (!SetPixelFormat(dc, pixelFormat, &pfd))
- goto cleanup;
- context = CreateContext(dc);
- if (!context)
- goto cleanup;
- if (!MakeCurrent(dc, context))
- goto cleanup;
-
- // Now that there is finally a context current, try doing something useful.
- if (WGL_GetProcAddress("glCreateShader")) {
- result = true;
- qCDebug(qglLc, "OpenGL 2 entry points available");
- } else {
- qCDebug(qglLc, "OpenGL 2 entry points not found");
- }
- } else {
- qCDebug(qglLc, "Failed to load opengl32.dll");
- }
-
-cleanup:
- if (MakeCurrent)
- MakeCurrent(0, 0);
- if (context)
- DeleteContext(context);
- if (dc && wnd)
- ReleaseDC(wnd, dc);
- if (wnd)
- DestroyWindow(wnd);
- UnregisterClass(className, GetModuleHandle(0));
- if (lib)
- FreeLibrary(lib);
-
- return result;
-}
-
-class QWindowsOpenGLList
-{
-public:
- QWindowsOpenGLList();
- ~QWindowsOpenGLList();
- QVector<QAbstractWindowsOpenGL *> list;
-};
-
-QWindowsOpenGLList::QWindowsOpenGLList()
-{
- // For now there is always one OpenGL ( + winsys interface) loaded.
- // This may change in the future.
- list.append(new QWindowsOpenGL);
-}
-
-QWindowsOpenGLList::~QWindowsOpenGLList()
-{
- qDeleteAll(list);
-}
-
-// Use Q_GLOBAL_STATIC and perform initialization in the constructor to be
-// thread safe.
-Q_GLOBAL_STATIC(QWindowsOpenGLList, gl)
-
-static inline QAbstractWindowsOpenGL *qgl_choose()
-{
- return gl()->list[0];
-}
-
-// functionsReady() -> the DLL is there but some functions were not resolved. This is fatal.
-// !functionsReady() -> could not load a GL implementation. No error message in this case.
-#define GLWARN(g, func, prefix) \
- { \
- if (g->functionsReady()) \
- qFatal("Qt OpenGL: Attempted to call unresolved function %s%s. " \
- "This is likely caused by making OpenGL-only calls with an OpenGL ES implementation (Angle).", \
- prefix, #func); \
- }
-
-#define GLCALLV(func, ...) \
- { \
- QAbstractWindowsOpenGL *g = qgl_choose(); \
- if (g->func) \
- g->func(__VA_ARGS__); \
- else \
- GLWARN(g, func, "gl") \
- }
-
-#define GLCALL(func, ...) \
- { \
- QAbstractWindowsOpenGL *g = qgl_choose(); \
- if (g->func) \
- return g->func(__VA_ARGS__); \
- GLWARN(g, func, "gl") \
- return 0; \
- }
-
-#define WGLCALL(func, ...) \
- { \
- QAbstractWindowsOpenGL *g = qgl_choose(); \
- if (g->func) \
- return g->func(__VA_ARGS__); \
- GLWARN(g, func, "wgl") \
- return 0; \
- }
-
-#define EGLCALL(func, ...) \
- { \
- QAbstractWindowsOpenGL *g = qgl_choose(); \
- if (g->EGL_##func) \
- return g->EGL_##func(__VA_ARGS__); \
- GLWARN(g, func, "egl") \
- return 0; \
- }
-
-
-extern "C" {
-
-// WGL
-
-Q_DECL_EXPORT BOOL WINAPI wglCopyContext(HGLRC src, HGLRC dst, UINT mask)
-{
- WGLCALL(CopyContext, src, dst, mask);
-}
-
-Q_DECL_EXPORT HGLRC WINAPI wglCreateContext(HDC dc)
-{
- WGLCALL(CreateContext, dc);
-}
-
-Q_DECL_EXPORT HGLRC WINAPI wglCreateLayerContext(HDC dc, int plane)
-{
- WGLCALL(CreateLayerContext, dc, plane);
-}
-
-Q_DECL_EXPORT BOOL WINAPI wglDeleteContext(HGLRC context)
-{
- WGLCALL(DeleteContext, context);
-}
-
-Q_DECL_EXPORT HGLRC WINAPI wglGetCurrentContext(VOID)
-{
- WGLCALL(GetCurrentContext);
-}
-
-Q_DECL_EXPORT HDC WINAPI wglGetCurrentDC(VOID)
-{
- WGLCALL(GetCurrentDC);
-}
-
-Q_DECL_EXPORT PROC WINAPI wglGetProcAddress(LPCSTR name)
-{
- WGLCALL(GetProcAddress, name);
-}
-
-Q_DECL_EXPORT BOOL WINAPI wglMakeCurrent(HDC dc, HGLRC context)
-{
- WGLCALL(MakeCurrent, dc, context);
-}
-
-Q_DECL_EXPORT BOOL WINAPI wglShareLists(HGLRC context1, HGLRC context2)
-{
- WGLCALL(ShareLists, context1, context2);
-}
-
-Q_DECL_EXPORT BOOL WINAPI wglUseFontBitmapsW(HDC dc, DWORD first, DWORD count, DWORD base)
-{
- WGLCALL(UseFontBitmapsW, dc, first, count, base);
-}
-
-Q_DECL_EXPORT BOOL WINAPI wglUseFontOutlinesW(HDC dc, DWORD first, DWORD count, DWORD base, FLOAT deviation,
- FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT gmf)
-{
- WGLCALL(UseFontOutlinesW, dc, first, count, base, deviation, extrusion, format, gmf);
-}
-
-Q_DECL_EXPORT BOOL WINAPI wglDescribeLayerPlane(HDC dc, int pixelFormat, int plane, UINT n,
- LPLAYERPLANEDESCRIPTOR planeDescriptor)
-{
- WGLCALL(DescribeLayerPlane, dc, pixelFormat, plane, n, planeDescriptor);
-}
-
-Q_DECL_EXPORT int WINAPI wglSetLayerPaletteEntries(HDC dc, int plane, int start, int entries,
- CONST COLORREF *colors)
-{
- WGLCALL(SetLayerPaletteEntries, dc, plane, start, entries, colors);
-}
-
-Q_DECL_EXPORT int WINAPI wglGetLayerPaletteEntries(HDC dc, int plane, int start, int entries,
- COLORREF *color)
-{
- WGLCALL(GetLayerPaletteEntries, dc, plane, start, entries, color);
-}
-
-Q_DECL_EXPORT BOOL WINAPI wglRealizeLayerPalette(HDC dc, int plane, BOOL realize)
-{
- WGLCALL(RealizeLayerPalette, dc, plane, realize);
-}
-
-Q_DECL_EXPORT BOOL WINAPI wglSwapLayerBuffers(HDC dc, UINT planes)
-{
- WGLCALL(SwapLayerBuffers, dc, planes);
-}
-
-Q_DECL_EXPORT DWORD WINAPI wglSwapMultipleBuffers(UINT n, CONST WGLSWAP *buffers)
-{
- WGLCALL(SwapMultipleBuffers, n, buffers);
-}
-
-// EGL
-
-Q_DECL_EXPORT EGLint EGLAPIENTRY eglGetError(void)
-{
- EGLCALL(GetError);
-}
-
-Q_DECL_EXPORT EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id)
-{
- EGLCALL(GetDisplay, display_id);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
-{
- EGLCALL(Initialize, dpy, major, minor);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy)
-{
- EGLCALL(Terminate, dpy);
-}
-
-Q_DECL_EXPORT const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name)
-{
- EGLCALL(QueryString, dpy, name);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
- EGLint config_size, EGLint *num_config)
-{
- EGLCALL(GetConfigs, dpy, configs, config_size, num_config);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
- EGLConfig *configs, EGLint config_size,
- EGLint *num_config)
-{
- EGLCALL(ChooseConfig, dpy, attrib_list, configs, config_size, num_config);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
- EGLint attribute, EGLint *value)
-{
- EGLCALL(GetConfigAttrib, dpy, config, attribute, value);
-}
-
-Q_DECL_EXPORT EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
- EGLNativeWindowType win,
- const EGLint *attrib_list)
-{
- EGLCALL(CreateWindowSurface, dpy, config, win, attrib_list);
-}
-
-Q_DECL_EXPORT EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
- const EGLint *attrib_list)
-{
- EGLCALL(CreatePbufferSurface, dpy, config, attrib_list);
-}
-
-Q_DECL_EXPORT EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
- EGLNativePixmapType pixmap,
- const EGLint *attrib_list)
-{
- EGLCALL(CreatePixmapSurface, dpy, config, pixmap, attrib_list);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
-{
- EGLCALL(DestroySurface, dpy, surface);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
- EGLint attribute, EGLint *value)
-{
- EGLCALL(QuerySurface, dpy, surface, attribute, value);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api)
-{
- EGLCALL(BindAPI, api);
-}
-
-Q_DECL_EXPORT EGLenum EGLAPIENTRY eglQueryAPI(void)
-{
- EGLCALL(QueryAPI);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglWaitClient(void)
-{
- EGLCALL(WaitClient);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglReleaseThread(void)
-{
- EGLCALL(ReleaseThread);
-}
-
-Q_DECL_EXPORT EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
- EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list)
-{
- EGLCALL(CreatePbufferFromClientBuffer, dpy, buftype, buffer, config, attrib_list);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
- EGLint attribute, EGLint value)
-{
- EGLCALL(SurfaceAttrib, dpy, surface, attribute, value);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
-{
- EGLCALL(BindTexImage, dpy, surface, buffer);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
-{
- EGLCALL(ReleaseTexImage, dpy, surface, buffer);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval)
-{
- EGLCALL(SwapInterval, dpy, interval);
-}
-
-Q_DECL_EXPORT EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
- EGLContext share_context,
- const EGLint *attrib_list)
-{
- EGLCALL(CreateContext, dpy, config, share_context, attrib_list);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
-{
- EGLCALL(DestroyContext, dpy, ctx);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
- EGLSurface read, EGLContext ctx)
-{
- EGLCALL(MakeCurrent, dpy, draw, read, ctx);
-}
-
-Q_DECL_EXPORT EGLContext EGLAPIENTRY eglGetCurrentContext(void)
-{
- EGLCALL(GetCurrentContext);
-}
-
-Q_DECL_EXPORT EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw)
-{
- EGLCALL(GetCurrentSurface, readdraw);
-}
-
-Q_DECL_EXPORT EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void)
-{
- EGLCALL(GetCurrentDisplay);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
- EGLint attribute, EGLint *value)
-{
- EGLCALL(QueryContext, dpy, ctx, attribute, value);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglWaitGL(void)
-{
- EGLCALL(WaitGL);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine)
-{
- EGLCALL(WaitNative, engine);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
-{
- EGLCALL(SwapBuffers, dpy, surface);
-}
-
-Q_DECL_EXPORT EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
- EGLNativePixmapType target)
-{
- EGLCALL(CopyBuffers, dpy, surface, target);
-}
-
-// OpenGL
-
-Q_DECL_EXPORT void APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
-{
- GLCALLV(Viewport, x, y, width, height);
-}
-
-Q_DECL_EXPORT void APIENTRY glDepthRange(GLdouble nearVal, GLdouble farVal)
-{
- if (qgl_choose()->libraryType() == QAbstractWindowsOpenGL::DesktopGL) {
- GLCALLV(DepthRange, nearVal, farVal);
- } else {
- GLCALLV(DepthRangef, nearVal, farVal);
- }
-}
-
-Q_DECL_EXPORT GLboolean APIENTRY glIsEnabled(GLenum cap)
-{
- GLCALL(IsEnabled, cap);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
-{
- GLCALLV(GetTexLevelParameteriv, target, level, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
-{
- GLCALLV(GetTexLevelParameterfv, target, level, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
-{
- GLCALLV(GetTexParameteriv, target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
-{
- GLCALLV(GetTexParameterfv, target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)
-{
- GLCALLV(GetTexImage, target, level, format, type, pixels);
-}
-
-Q_DECL_EXPORT const GLubyte * APIENTRY glGetString(GLenum name)
-{
- GLCALL(GetString, name);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetIntegerv(GLenum pname, GLint *params)
-{
- GLCALLV(GetIntegerv, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetFloatv(GLenum pname, GLfloat *params)
-{
- GLCALLV(GetFloatv, pname, params);
-}
-
-Q_DECL_EXPORT GLenum APIENTRY glGetError()
-{
- GLCALL(GetError);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetDoublev(GLenum pname, GLdouble *params)
-{
- GLCALLV(GetDoublev, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetBooleanv(GLenum pname, GLboolean *params)
-{
- GLCALLV(GetBooleanv, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
-{
- GLCALLV(ReadPixels, x, y, width, height, format, type, pixels);
-}
-
-Q_DECL_EXPORT void APIENTRY glReadBuffer(GLenum mode)
-{
- GLCALLV(ReadBuffer, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glPixelStorei(GLenum pname, GLint param)
-{
- GLCALLV(PixelStorei, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glPixelStoref(GLenum pname, GLfloat param)
-{
- GLCALLV(PixelStoref, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glDepthFunc(GLenum func)
-{
- GLCALLV(DepthFunc, func);
-}
-
-Q_DECL_EXPORT void APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
-{
- GLCALLV(StencilOp, fail, zfail, zpass);
-}
-
-Q_DECL_EXPORT void APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
-{
- GLCALLV(StencilFunc, func, ref, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glLogicOp(GLenum opcode)
-{
- GLCALLV(LogicOp, opcode);
-}
-
-Q_DECL_EXPORT void APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
-{
- GLCALLV(BlendFunc, sfactor, dfactor);
-}
-
-Q_DECL_EXPORT void APIENTRY glFlush()
-{
- GLCALLV(Flush);
-}
-
-Q_DECL_EXPORT void APIENTRY glFinish()
-{
- GLCALLV(Finish);
-}
-
-Q_DECL_EXPORT void APIENTRY glEnable(GLenum cap)
-{
- GLCALLV(Enable, cap);
-}
-
-Q_DECL_EXPORT void APIENTRY glDisable(GLenum cap)
-{
- GLCALLV(Disable, cap);
-}
-
-Q_DECL_EXPORT void APIENTRY glDepthMask(GLboolean flag)
-{
- GLCALLV(DepthMask, flag);
-}
-
-Q_DECL_EXPORT void APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
-{
- GLCALLV(ColorMask, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glStencilMask(GLuint mask)
-{
- GLCALLV(StencilMask, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glClearDepth(GLdouble depth)
-{
- if (qgl_choose()->libraryType() == QAbstractWindowsOpenGL::DesktopGL) {
- GLCALLV(ClearDepth, depth);
- } else {
- GLCALLV(ClearDepthf, depth);
- }
-}
-
-Q_DECL_EXPORT void APIENTRY glClearStencil(GLint s)
-{
- GLCALLV(ClearStencil, s);
-}
-
-Q_DECL_EXPORT void APIENTRY glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- GLCALLV(ClearColor, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glClear(GLbitfield mask)
-{
- GLCALLV(Clear, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glDrawBuffer(GLenum mode)
-{
- GLCALLV(DrawBuffer, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
-{
- GLCALLV(TexImage2D, target, level, internalformat, width, height, border, format, type, pixels);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
-{
- GLCALLV(TexImage1D, target, level, internalformat, width, border, format, type, pixels);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
-{
- GLCALLV(TexParameteriv, target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
-{
- GLCALLV(TexParameteri, target, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
-{
- GLCALLV(TexParameterfv, target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
-{
- GLCALLV(TexParameterf, target, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
-{
- GLCALLV(Scissor, x, y, width, height);
-}
-
-Q_DECL_EXPORT void APIENTRY glPolygonMode(GLenum face, GLenum mode)
-{
- GLCALLV(PolygonMode, face, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glPointSize(GLfloat size)
-{
- GLCALLV(PointSize, size);
-}
-
-Q_DECL_EXPORT void APIENTRY glLineWidth(GLfloat width)
-{
- GLCALLV(LineWidth, width);
-}
-
-Q_DECL_EXPORT void APIENTRY glHint(GLenum target, GLenum mode)
-{
- GLCALLV(Hint, target, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glFrontFace(GLenum mode)
-{
- GLCALLV(FrontFace, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glCullFace(GLenum mode)
-{
- GLCALLV(CullFace, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z)
-{
- GLCALLV(Translatef, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glTranslated(GLdouble x, GLdouble y, GLdouble z)
-{
- GLCALLV(Translated, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z)
-{
- GLCALLV(Scalef, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glScaled(GLdouble x, GLdouble y, GLdouble z)
-{
- GLCALLV(Scaled, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
-{
- GLCALLV(Rotatef, angle, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
-{
- GLCALLV(Rotated, angle, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glPushMatrix()
-{
- GLCALLV(PushMatrix);
-}
-
-Q_DECL_EXPORT void APIENTRY glPopMatrix()
-{
- GLCALLV(PopMatrix);
-}
-
-Q_DECL_EXPORT void APIENTRY glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
-{
- GLCALLV(Ortho, left, right, bottom, top, zNear, zFar);
-}
-
-Q_DECL_EXPORT void APIENTRY glMultMatrixd(const GLdouble *m)
-{
- GLCALLV(MultMatrixd, m);
-}
-
-Q_DECL_EXPORT void APIENTRY glMultMatrixf(const GLfloat *m)
-{
- GLCALLV(MultMatrixf, m);
-}
-
-Q_DECL_EXPORT void APIENTRY glMatrixMode(GLenum mode)
-{
- GLCALLV(MatrixMode, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glLoadMatrixd(const GLdouble *m)
-{
- GLCALLV(LoadMatrixd, m);
-}
-
-Q_DECL_EXPORT void APIENTRY glLoadMatrixf(const GLfloat *m)
-{
- GLCALLV(LoadMatrixf, m);
-}
-
-Q_DECL_EXPORT void APIENTRY glLoadIdentity()
-{
- GLCALLV(LoadIdentity);
-}
-
-Q_DECL_EXPORT void APIENTRY glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
-{
- GLCALLV(Frustum, left, right, bottom, top, zNear, zFar);
-}
-
-Q_DECL_EXPORT GLboolean APIENTRY glIsList(GLuint list)
-{
- GLCALL(IsList, list);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexGeniv(GLenum coord, GLenum pname, GLint *params)
-{
- GLCALLV(GetTexGeniv, coord, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
-{
- GLCALLV(GetTexGenfv, coord, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
-{
- GLCALLV(GetTexGendv, coord, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexEnviv(GLenum target, GLenum pname, GLint *params)
-{
- GLCALLV(GetTexEnviv, target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
-{
- GLCALLV(GetTexEnvfv, target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetPolygonStipple(GLubyte *mask)
-{
- GLCALLV(GetPolygonStipple, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetPixelMapusv(GLenum map, GLushort *values)
-{
- GLCALLV(GetPixelMapusv, map, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetPixelMapuiv(GLenum map, GLuint *values)
-{
- GLCALLV(GetPixelMapuiv, map, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetPixelMapfv(GLenum map, GLfloat *values)
-{
- GLCALLV(GetPixelMapfv, map, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetMaterialiv(GLenum face, GLenum pname, GLint *params)
-{
- GLCALLV(GetMaterialiv, face, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
-{
- GLCALLV(GetMaterialfv, face, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetMapiv(GLenum target, GLenum query, GLint *v)
-{
- GLCALLV(GetMapiv, target, query, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetMapfv(GLenum target, GLenum query, GLfloat *v)
-{
- GLCALLV(GetMapfv, target, query, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetMapdv(GLenum target, GLenum query, GLdouble *v)
-{
- GLCALLV(GetMapdv, target, query, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetLightiv(GLenum light, GLenum pname, GLint *params)
-{
- GLCALLV(GetLightiv, light, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat *params)
-{
- GLCALLV(GetLightfv, light, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetClipPlane(GLenum plane, GLdouble *equation)
-{
- GLCALLV(GetClipPlane, plane, equation);
-}
-
-Q_DECL_EXPORT void APIENTRY glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
-{
- GLCALLV(DrawPixels, width, height, format, type, pixels);
-}
-
-Q_DECL_EXPORT void APIENTRY glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
-{
- GLCALLV(CopyPixels, x, y, width, height, type);
-}
-
-Q_DECL_EXPORT void APIENTRY glPixelMapusv(GLenum map, GLint mapsize, const GLushort *values)
-{
- GLCALLV(PixelMapusv, map, mapsize, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glPixelMapuiv(GLenum map, GLint mapsize, const GLuint *values)
-{
- GLCALLV(PixelMapuiv, map, mapsize, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glPixelMapfv(GLenum map, GLint mapsize, const GLfloat *values)
-{
- GLCALLV(PixelMapfv, map, mapsize, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glPixelTransferi(GLenum pname, GLint param)
-{
- GLCALLV(PixelTransferi, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glPixelTransferf(GLenum pname, GLfloat param)
-{
- GLCALLV(PixelTransferf, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glPixelZoom(GLfloat xfactor, GLfloat yfactor)
-{
- GLCALLV(PixelZoom, xfactor, yfactor);
-}
-
-Q_DECL_EXPORT void APIENTRY glAlphaFunc(GLenum func, GLfloat ref)
-{
- GLCALLV(AlphaFunc, func, ref);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalPoint2(GLint i, GLint j)
-{
- GLCALLV(EvalPoint2, i, j);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
-{
- GLCALLV(EvalMesh2, mode, i1, i2, j1, j2);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalPoint1(GLint i)
-{
- GLCALLV(EvalPoint1, i);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalMesh1(GLenum mode, GLint i1, GLint i2)
-{
- GLCALLV(EvalMesh1, mode, i1, i2);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalCoord2fv(const GLfloat *u)
-{
- GLCALLV(EvalCoord2fv, u);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalCoord2f(GLfloat u, GLfloat v)
-{
- GLCALLV(EvalCoord2f, u, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalCoord2dv(const GLdouble *u)
-{
- GLCALLV(EvalCoord2dv, u);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalCoord2d(GLdouble u, GLdouble v)
-{
- GLCALLV(EvalCoord2d, u, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalCoord1fv(const GLfloat *u)
-{
- GLCALLV(EvalCoord1fv, u);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalCoord1f(GLfloat u)
-{
- GLCALLV(EvalCoord1f, u);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalCoord1dv(const GLdouble *u)
-{
- GLCALLV(EvalCoord1dv, u);
-}
-
-Q_DECL_EXPORT void APIENTRY glEvalCoord1d(GLdouble u)
-{
- GLCALLV(EvalCoord1d, u);
-}
-
-Q_DECL_EXPORT void APIENTRY glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
-{
- GLCALLV(MapGrid2f, un, u1, u2, vn, v1, v2);
-}
-
-Q_DECL_EXPORT void APIENTRY glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
-{
- GLCALLV(MapGrid2d, un, u1, u2, vn, v1, v2);
-}
-
-Q_DECL_EXPORT void APIENTRY glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
-{
- GLCALLV(MapGrid1f, un, u1, u2);
-}
-
-Q_DECL_EXPORT void APIENTRY glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
-{
- GLCALLV(MapGrid1d, un, u1, u2);
-}
-
-Q_DECL_EXPORT void APIENTRY glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
-{
- GLCALLV(Map2f, target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
-}
-
-Q_DECL_EXPORT void APIENTRY glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
-{
- GLCALLV(Map2d, target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
-}
-
-Q_DECL_EXPORT void APIENTRY glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
-{
- GLCALLV(Map1f, target, u1, u2, stride, order, points);
-}
-
-Q_DECL_EXPORT void APIENTRY glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
-{
- GLCALLV(Map1d, target, u1, u2, stride, order, points);
-}
-
-Q_DECL_EXPORT void APIENTRY glPushAttrib(GLbitfield mask)
-{
- GLCALLV(PushAttrib, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glPopAttrib()
-{
- GLCALLV(PopAttrib);
-}
-
-Q_DECL_EXPORT void APIENTRY glAccum(GLenum op, GLfloat value)
-{
- GLCALLV(Accum, op, value);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexMask(GLuint mask)
-{
- GLCALLV(IndexMask, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glClearIndex(GLfloat c)
-{
- GLCALLV(ClearIndex, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- GLCALLV(ClearAccum, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glPushName(GLuint name)
-{
- GLCALLV(PushName, name);
-}
-
-Q_DECL_EXPORT void APIENTRY glPopName()
-{
- GLCALLV(PopName);
-}
-
-Q_DECL_EXPORT void APIENTRY glPassThrough(GLfloat token)
-{
- GLCALLV(PassThrough, token);
-}
-
-Q_DECL_EXPORT void APIENTRY glLoadName(GLuint name)
-{
- GLCALLV(LoadName, name);
-}
-
-Q_DECL_EXPORT void APIENTRY glInitNames()
-{
- GLCALLV(InitNames);
-}
-
-Q_DECL_EXPORT GLint APIENTRY glRenderMode(GLenum mode)
-{
- GLCALL(RenderMode, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glSelectBuffer(GLsizei size, GLuint *buffer)
-{
- GLCALLV(SelectBuffer, size, buffer);
-}
-
-Q_DECL_EXPORT void APIENTRY glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer)
-{
- GLCALLV(FeedbackBuffer, size, type, buffer);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexGeniv(GLenum coord, GLenum pname, const GLint *params)
-{
- GLCALLV(TexGeniv, coord, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexGeni(GLenum coord, GLenum pname, GLint param)
-{
- GLCALLV(TexGeni, coord, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
-{
- GLCALLV(TexGenfv, coord, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexGenf(GLenum coord, GLenum pname, GLfloat param)
-{
- GLCALLV(TexGenf, coord, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexGendv(GLenum coord, GLenum pname, const GLdouble *params)
-{
- GLCALLV(TexGendv, coord, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexGend(GLenum coord, GLenum pname, GLdouble param)
-{
- GLCALLV(TexGend, coord, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexEnviv(GLenum target, GLenum pname, const GLint *params)
-{
- GLCALLV(TexEnviv, target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param)
-{
- GLCALLV(TexEnvi, target, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
-{
- GLCALLV(TexEnvfv, target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param)
-{
- GLCALLV(TexEnvf, target, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glShadeModel(GLenum mode)
-{
- GLCALLV(ShadeModel, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glPolygonStipple(const GLubyte *mask)
-{
- GLCALLV(PolygonStipple, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glMaterialiv(GLenum face, GLenum pname, const GLint *params)
-{
- GLCALLV(Materialiv, face, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glMateriali(GLenum face, GLenum pname, GLint param)
-{
- GLCALLV(Materiali, face, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
-{
- GLCALLV(Materialfv, face, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glMaterialf(GLenum face, GLenum pname, GLfloat param)
-{
- GLCALLV(Materialf, face, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glLineStipple(GLint factor, GLushort pattern)
-{
- GLCALLV(LineStipple, factor, pattern);
-}
-
-Q_DECL_EXPORT void APIENTRY glLightModeliv(GLenum pname, const GLint *params)
-{
- GLCALLV(LightModeliv, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glLightModeli(GLenum pname, GLint param)
-{
- GLCALLV(LightModeli, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glLightModelfv(GLenum pname, const GLfloat *params)
-{
- GLCALLV(LightModelfv, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glLightModelf(GLenum pname, GLfloat param)
-{
- GLCALLV(LightModelf, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glLightiv(GLenum light, GLenum pname, const GLint *params)
-{
- GLCALLV(Lightiv, light, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glLighti(GLenum light, GLenum pname, GLint param)
-{
- GLCALLV(Lighti, light, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params)
-{
- GLCALLV(Lightfv, light, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param)
-{
- GLCALLV(Lightf, light, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glFogiv(GLenum pname, const GLint *params)
-{
- GLCALLV(Fogiv, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glFogi(GLenum pname, GLint param)
-{
- GLCALLV(Fogi, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glFogfv(GLenum pname, const GLfloat *params)
-{
- GLCALLV(Fogfv, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glFogf(GLenum pname, GLfloat param)
-{
- GLCALLV(Fogf, pname, param);
-}
-
-Q_DECL_EXPORT void APIENTRY glColorMaterial(GLenum face, GLenum mode)
-{
- GLCALLV(ColorMaterial, face, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glClipPlane(GLenum plane, const GLdouble *equation)
-{
- GLCALLV(ClipPlane, plane, equation);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex4sv(const GLshort *v)
-{
- GLCALLV(Vertex4sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
-{
- GLCALLV(Vertex4s, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex4iv(const GLint *v)
-{
- GLCALLV(Vertex4iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex4i(GLint x, GLint y, GLint z, GLint w)
-{
- GLCALLV(Vertex4i, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex4fv(const GLfloat *v)
-{
- GLCALLV(Vertex4fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- GLCALLV(Vertex4f, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex4dv(const GLdouble *v)
-{
- GLCALLV(Vertex4dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-{
- GLCALLV(Vertex4d, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex3sv(const GLshort *v)
-{
- GLCALLV(Vertex3sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex3s(GLshort x, GLshort y, GLshort z)
-{
- GLCALLV(Vertex3s, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex3iv(const GLint *v)
-{
- GLCALLV(Vertex3iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex3i(GLint x, GLint y, GLint z)
-{
- GLCALLV(Vertex3i, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex3fv(const GLfloat *v)
-{
- GLCALLV(Vertex3fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
-{
- GLCALLV(Vertex3f, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex3dv(const GLdouble *v)
-{
- GLCALLV(Vertex3dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex3d(GLdouble x, GLdouble y, GLdouble z)
-{
- GLCALLV(Vertex3d, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex2sv(const GLshort *v)
-{
- GLCALLV(Vertex2sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex2s(GLshort x, GLshort y)
-{
- GLCALLV(Vertex2s, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex2iv(const GLint *v)
-{
- GLCALLV(Vertex2iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex2i(GLint x, GLint y)
-{
- GLCALLV(Vertex2i, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex2fv(const GLfloat *v)
-{
- GLCALLV(Vertex2fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex2f(GLfloat x, GLfloat y)
-{
- GLCALLV(Vertex2f, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex2dv(const GLdouble *v)
-{
- GLCALLV(Vertex2dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertex2d(GLdouble x, GLdouble y)
-{
- GLCALLV(Vertex2d, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord4sv(const GLshort *v)
-{
- GLCALLV(TexCoord4sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
-{
- GLCALLV(TexCoord4s, s, t, r, q);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord4iv(const GLint *v)
-{
- GLCALLV(TexCoord4iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
-{
- GLCALLV(TexCoord4i, s, t, r, q);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord4fv(const GLfloat *v)
-{
- GLCALLV(TexCoord4fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-{
- GLCALLV(TexCoord4f, s, t, r, q);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord4dv(const GLdouble *v)
-{
- GLCALLV(TexCoord4dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
-{
- GLCALLV(TexCoord4d, s, t, r, q);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord3sv(const GLshort *v)
-{
- GLCALLV(TexCoord3sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord3s(GLshort s, GLshort t, GLshort r)
-{
- GLCALLV(TexCoord3s, s, t, r);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord3iv(const GLint *v)
-{
- GLCALLV(TexCoord3iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord3i(GLint s, GLint t, GLint r)
-{
- GLCALLV(TexCoord3i, s, t, r);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord3fv(const GLfloat *v)
-{
- GLCALLV(TexCoord3fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
-{
- GLCALLV(TexCoord3f, s, t, r);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord3dv(const GLdouble *v)
-{
- GLCALLV(TexCoord3dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
-{
- GLCALLV(TexCoord3d, s, t, r);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord2sv(const GLshort *v)
-{
- GLCALLV(TexCoord2sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord2s(GLshort s, GLshort t)
-{
- GLCALLV(TexCoord2s, s, t);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord2iv(const GLint *v)
-{
- GLCALLV(TexCoord2iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord2i(GLint s, GLint t)
-{
- GLCALLV(TexCoord2i, s, t);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord2fv(const GLfloat *v)
-{
- GLCALLV(TexCoord2fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord2f(GLfloat s, GLfloat t)
-{
- GLCALLV(TexCoord2f, s, t);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord2dv(const GLdouble *v)
-{
- GLCALLV(TexCoord2dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord2d(GLdouble s, GLdouble t)
-{
- GLCALLV(TexCoord2d, s, t);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord1sv(const GLshort *v)
-{
- GLCALLV(TexCoord1sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord1s(GLshort s)
-{
- GLCALLV(TexCoord1s, s);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord1iv(const GLint *v)
-{
- GLCALLV(TexCoord1iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord1i(GLint s)
-{
- GLCALLV(TexCoord1i, s);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord1fv(const GLfloat *v)
-{
- GLCALLV(TexCoord1fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord1f(GLfloat s)
-{
- GLCALLV(TexCoord1f, s);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord1dv(const GLdouble *v)
-{
- GLCALLV(TexCoord1dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoord1d(GLdouble s)
-{
- GLCALLV(TexCoord1d, s);
-}
-
-Q_DECL_EXPORT void APIENTRY glRectsv(const GLshort *v1, const GLshort *v2)
-{
- GLCALLV(Rectsv, v1, v2);
-}
-
-Q_DECL_EXPORT void APIENTRY glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
-{
- GLCALLV(Rects, x1, y1, x2, y2);
-}
-
-Q_DECL_EXPORT void APIENTRY glRectiv(const GLint *v1, const GLint *v2)
-{
- GLCALLV(Rectiv, v1, v2);
-}
-
-Q_DECL_EXPORT void APIENTRY glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
-{
- GLCALLV(Recti, x1, y1, x2, y2);
-}
-
-Q_DECL_EXPORT void APIENTRY glRectfv(const GLfloat *v1, const GLfloat *v2)
-{
- GLCALLV(Rectfv, v1, v2);
-}
-
-Q_DECL_EXPORT void APIENTRY glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
- GLCALLV(Rectf, x1, y1, x2, y2);
-}
-
-Q_DECL_EXPORT void APIENTRY glRectdv(const GLdouble *v1, const GLdouble *v2)
-{
- GLCALLV(Rectdv, v1, v2);
-}
-
-Q_DECL_EXPORT void APIENTRY glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
-{
- GLCALLV(Rectd, x1, y1, x2, y2);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos4sv(const GLshort *v)
-{
- GLCALLV(RasterPos4sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
-{
- GLCALLV(RasterPos4s, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos4iv(const GLint *v)
-{
- GLCALLV(RasterPos4iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
-{
- GLCALLV(RasterPos4i, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos4fv(const GLfloat *v)
-{
- GLCALLV(RasterPos4fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- GLCALLV(RasterPos4f, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos4dv(const GLdouble *v)
-{
- GLCALLV(RasterPos4dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-{
- GLCALLV(RasterPos4d, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos3sv(const GLshort *v)
-{
- GLCALLV(RasterPos3sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos3s(GLshort x, GLshort y, GLshort z)
-{
- GLCALLV(RasterPos3s, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos3iv(const GLint *v)
-{
- GLCALLV(RasterPos3iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos3i(GLint x, GLint y, GLint z)
-{
- GLCALLV(RasterPos3i, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos3fv(const GLfloat *v)
-{
- GLCALLV(RasterPos3fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
-{
- GLCALLV(RasterPos3f, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos3dv(const GLdouble *v)
-{
- GLCALLV(RasterPos3dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
-{
- GLCALLV(RasterPos3d, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos2sv(const GLshort *v)
-{
- GLCALLV(RasterPos2sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos2s(GLshort x, GLshort y)
-{
- GLCALLV(RasterPos2s, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos2iv(const GLint *v)
-{
- GLCALLV(RasterPos2iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos2i(GLint x, GLint y)
-{
- GLCALLV(RasterPos2i, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos2fv(const GLfloat *v)
-{
- GLCALLV(RasterPos2fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos2f(GLfloat x, GLfloat y)
-{
- GLCALLV(RasterPos2f, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos2dv(const GLdouble *v)
-{
- GLCALLV(RasterPos2dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glRasterPos2d(GLdouble x, GLdouble y)
-{
- GLCALLV(RasterPos2d, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3sv(const GLshort *v)
-{
- GLCALLV(Normal3sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3s(GLshort nx, GLshort ny, GLshort nz)
-{
- GLCALLV(Normal3s, nx, ny, nz);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3iv(const GLint *v)
-{
- GLCALLV(Normal3iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3i(GLint nx, GLint ny, GLint nz)
-{
- GLCALLV(Normal3i, nx, ny, nz);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3fv(const GLfloat *v)
-{
- GLCALLV(Normal3fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
-{
- GLCALLV(Normal3f, nx, ny, nz);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3dv(const GLdouble *v)
-{
- GLCALLV(Normal3dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
-{
- GLCALLV(Normal3d, nx, ny, nz);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3bv(const GLbyte *v)
-{
- GLCALLV(Normal3bv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
-{
- GLCALLV(Normal3b, nx, ny, nz);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexsv(const GLshort *c)
-{
- GLCALLV(Indexsv, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexs(GLshort c)
-{
- GLCALLV(Indexs, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexiv(const GLint *c)
-{
- GLCALLV(Indexiv, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexi(GLint c)
-{
- GLCALLV(Indexi, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexfv(const GLfloat *c)
-{
- GLCALLV(Indexfv, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexf(GLfloat c)
-{
- GLCALLV(Indexf, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexdv(const GLdouble *c)
-{
- GLCALLV(Indexdv, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexd(GLdouble c)
-{
- GLCALLV(Indexd, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glEnd()
-{
- GLCALLV(End);
-}
-
-Q_DECL_EXPORT void APIENTRY glEdgeFlagv(const GLboolean *flag)
-{
- GLCALLV(EdgeFlagv, flag);
-}
-
-Q_DECL_EXPORT void APIENTRY glEdgeFlag(GLboolean flag)
-{
- GLCALLV(EdgeFlag, flag);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4usv(const GLushort *v)
-{
- GLCALLV(Color4usv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
-{
- GLCALLV(Color4us, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4uiv(const GLuint *v)
-{
- GLCALLV(Color4uiv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
-{
- GLCALLV(Color4ui, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4ubv(const GLubyte *v)
-{
- GLCALLV(Color4ubv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
-{
- GLCALLV(Color4ub, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4sv(const GLshort *v)
-{
- GLCALLV(Color4sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
-{
- GLCALLV(Color4s, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4iv(const GLint *v)
-{
- GLCALLV(Color4iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
-{
- GLCALLV(Color4i, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4fv(const GLfloat *v)
-{
- GLCALLV(Color4fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- GLCALLV(Color4f, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4dv(const GLdouble *v)
-{
- GLCALLV(Color4dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
-{
- GLCALLV(Color4d, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4bv(const GLbyte *v)
-{
- GLCALLV(Color4bv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
-{
- GLCALLV(Color4b, red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3usv(const GLushort *v)
-{
- GLCALLV(Color3usv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3us(GLushort red, GLushort green, GLushort blue)
-{
- GLCALLV(Color3us, red, green, blue);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3uiv(const GLuint *v)
-{
- GLCALLV(Color3uiv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3ui(GLuint red, GLuint green, GLuint blue)
-{
- GLCALLV(Color3ui, red, green, blue);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3ubv(const GLubyte *v)
-{
- GLCALLV(Color3ubv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
-{
- GLCALLV(Color3ub, red, green, blue);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3sv(const GLshort *v)
-{
- GLCALLV(Color3sv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3s(GLshort red, GLshort green, GLshort blue)
-{
- GLCALLV(Color3s, red, green, blue);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3iv(const GLint *v)
-{
- GLCALLV(Color3iv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3i(GLint red, GLint green, GLint blue)
-{
- GLCALLV(Color3i, red, green, blue);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3fv(const GLfloat *v)
-{
- GLCALLV(Color3fv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3f(GLfloat red, GLfloat green, GLfloat blue)
-{
- GLCALLV(Color3f, red, green, blue);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3dv(const GLdouble *v)
-{
- GLCALLV(Color3dv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3d(GLdouble red, GLdouble green, GLdouble blue)
-{
- GLCALLV(Color3d, red, green, blue);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3bv(const GLbyte *v)
-{
- GLCALLV(Color3bv, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glColor3b(GLbyte red, GLbyte green, GLbyte blue)
-{
- GLCALLV(Color3b, red, green, blue);
-}
-
-Q_DECL_EXPORT void APIENTRY glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
-{
- GLCALLV(Bitmap, width, height, xorig, yorig, xmove, ymove, bitmap);
-}
-
-Q_DECL_EXPORT void APIENTRY glBegin(GLenum mode)
-{
- GLCALLV(Begin, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glListBase(GLuint base)
-{
- GLCALLV(ListBase, base);
-}
-
-Q_DECL_EXPORT GLuint APIENTRY glGenLists(GLsizei range)
-{
- GLCALL(GenLists, range);
-}
-
-Q_DECL_EXPORT void APIENTRY glDeleteLists(GLuint list, GLsizei range)
-{
- GLCALLV(DeleteLists, list, range);
-}
-
-Q_DECL_EXPORT void APIENTRY glCallLists(GLsizei n, GLenum type, const GLvoid *lists)
-{
- GLCALLV(CallLists, n, type, lists);
-}
-
-Q_DECL_EXPORT void APIENTRY glCallList(GLuint list)
-{
- GLCALLV(CallList, list);
-}
-
-Q_DECL_EXPORT void APIENTRY glEndList()
-{
- GLCALLV(EndList);
-}
-
-Q_DECL_EXPORT void APIENTRY glNewList(GLuint list, GLenum mode)
-{
- GLCALLV(NewList, list, mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexubv(const GLubyte *c)
-{
- GLCALLV(Indexubv, c);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexub(GLubyte c)
-{
- GLCALLV(Indexub, c);
-}
-
-Q_DECL_EXPORT GLboolean APIENTRY glIsTexture(GLuint texture)
-{
- GLCALL(IsTexture, texture);
-}
-
-Q_DECL_EXPORT void APIENTRY glGenTextures(GLsizei n, GLuint *textures)
-{
- GLCALLV(GenTextures, n, textures);
-}
-
-Q_DECL_EXPORT void APIENTRY glDeleteTextures(GLsizei n, const GLuint *textures)
-{
- GLCALLV(DeleteTextures, n, textures);
-}
-
-Q_DECL_EXPORT void APIENTRY glBindTexture(GLenum target, GLuint texture)
-{
- GLCALLV(BindTexture, target, texture);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
-{
- GLCALLV(TexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)
-{
- GLCALLV(TexSubImage1D, target, level, xoffset, width, format, type, pixels);
-}
-
-Q_DECL_EXPORT void APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- GLCALLV(CopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height);
-}
-
-Q_DECL_EXPORT void APIENTRY glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
-{
- GLCALLV(CopyTexSubImage1D, target, level, xoffset, x, y, width);
-}
-
-Q_DECL_EXPORT void APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
-{
- GLCALLV(CopyTexImage2D, target, level, internalformat, x, y, width, height, border);
-}
-
-Q_DECL_EXPORT void APIENTRY glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
-{
- GLCALLV(CopyTexImage1D, target, level, internalformat, x, y, width, border);
-}
-
-Q_DECL_EXPORT void APIENTRY glPolygonOffset(GLfloat factor, GLfloat units)
-{
- GLCALLV(PolygonOffset, factor, units);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetPointerv(GLenum pname, GLvoid* *params)
-{
- GLCALLV(GetPointerv, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
-{
- GLCALLV(DrawElements, mode, count, type, indices);
-}
-
-Q_DECL_EXPORT void APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
-{
- GLCALLV(DrawArrays, mode, first, count);
-}
-
-Q_DECL_EXPORT void APIENTRY glPushClientAttrib(GLbitfield mask)
-{
- GLCALLV(PushClientAttrib, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glPopClientAttrib()
-{
- GLCALLV(PopClientAttrib);
-}
-
-Q_DECL_EXPORT void APIENTRY glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLfloat *priorities)
-{
- GLCALLV(PrioritizeTextures, n, textures, priorities);
-}
-
-Q_DECL_EXPORT GLboolean APIENTRY glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
-{
- GLCALL(AreTexturesResident, n, textures, residences);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-{
- GLCALLV(VertexPointer, size, type, stride, pointer);
-}
-
-Q_DECL_EXPORT void APIENTRY glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-{
- GLCALLV(TexCoordPointer, size, type, stride, pointer);
-}
-
-Q_DECL_EXPORT void APIENTRY glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
-{
- GLCALLV(NormalPointer, type, stride, pointer);
-}
-
-Q_DECL_EXPORT void APIENTRY glInterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer)
-{
- GLCALLV(InterleavedArrays, format, stride, pointer);
-}
-
-Q_DECL_EXPORT void APIENTRY glIndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
-{
- GLCALLV(IndexPointer, type, stride, pointer);
-}
-
-Q_DECL_EXPORT void APIENTRY glEnableClientState(GLenum array)
-{
- GLCALLV(EnableClientState, array);
-}
-
-Q_DECL_EXPORT void APIENTRY glEdgeFlagPointer(GLsizei stride, const GLvoid *pointer)
-{
- GLCALLV(EdgeFlagPointer, stride, pointer);
-}
-
-Q_DECL_EXPORT void APIENTRY glDisableClientState(GLenum array)
-{
- GLCALLV(DisableClientState, array);
-}
-
-Q_DECL_EXPORT void APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-{
- GLCALLV(ColorPointer, size, type, stride, pointer);
-}
-
-Q_DECL_EXPORT void APIENTRY glArrayElement(GLint i)
-{
- GLCALLV(ArrayElement, i);
-}
-
-// OpenGL ES 2.0
-
-Q_DECL_EXPORT void APIENTRY glActiveTexture(GLenum texture)
-{
- GLCALLV(ActiveTexture,texture);
-}
-
-Q_DECL_EXPORT void APIENTRY glAttachShader(GLuint program, GLuint shader)
-{
- GLCALLV(AttachShader,program, shader);
-}
-
-Q_DECL_EXPORT void APIENTRY glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
-{
- GLCALLV(BindAttribLocation,program, index, name);
-}
-
-Q_DECL_EXPORT void APIENTRY glBindBuffer(GLenum target, GLuint buffer)
-{
- GLCALLV(BindBuffer,target, buffer);
-}
-
-Q_DECL_EXPORT void APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
-{
- GLCALLV(BindFramebuffer,target, framebuffer);
-}
-
-Q_DECL_EXPORT void APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer)
-{
- GLCALLV(BindRenderbuffer,target, renderbuffer);
-}
-
-Q_DECL_EXPORT void APIENTRY glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- GLCALLV(BlendColor,red, green, blue, alpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glBlendEquation(GLenum mode)
-{
- GLCALLV(BlendEquation,mode);
-}
-
-Q_DECL_EXPORT void APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
-{
- GLCALLV(BlendEquationSeparate,modeRGB, modeAlpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
-{
- GLCALLV(BlendFuncSeparate,srcRGB, dstRGB, srcAlpha, dstAlpha);
-}
-
-Q_DECL_EXPORT void APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
-{
- GLCALLV(BufferData,target, size, data, usage);
-}
-
-Q_DECL_EXPORT void APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
-{
- GLCALLV(BufferSubData,target, offset, size, data);
-}
-
-Q_DECL_EXPORT GLenum APIENTRY glCheckFramebufferStatus(GLenum target)
-{
- GLCALL(CheckFramebufferStatus,target);
-}
-
-Q_DECL_EXPORT void APIENTRY glClearDepthf(GLclampf depth)
-{
- glClearDepth(depth);
-}
-
-Q_DECL_EXPORT void APIENTRY glCompileShader(GLuint shader)
-{
- GLCALLV(CompileShader,shader);
-}
-
-Q_DECL_EXPORT void APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
-{
- GLCALLV(CompressedTexImage2D,target, level, internalformat, width, height, border, imageSize, data);
-}
-
-Q_DECL_EXPORT void APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
-{
- GLCALLV(CompressedTexSubImage2D,target, level, xoffset, yoffset, width, height, format, imageSize, data);
-}
-
-Q_DECL_EXPORT GLuint APIENTRY glCreateProgram(void)
-{
- GLCALL(CreateProgram);
-}
-
-Q_DECL_EXPORT GLuint glCreateShader(GLenum type)
-{
- GLCALL(CreateShader,type);
-}
-
-Q_DECL_EXPORT void APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers)
-{
- GLCALLV(DeleteBuffers,n, buffers);
-}
-
-Q_DECL_EXPORT void APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
-{
- GLCALLV(DeleteFramebuffers,n, framebuffers);
-}
-
-Q_DECL_EXPORT void APIENTRY glDeleteProgram(GLuint program)
-{
- GLCALLV(DeleteProgram,program);
-}
-
-Q_DECL_EXPORT void APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
-{
- GLCALLV(DeleteRenderbuffers,n, renderbuffers);
-}
-
-Q_DECL_EXPORT void APIENTRY glDeleteShader(GLuint shader)
-{
- GLCALLV(DeleteShader,shader);
-}
-
-Q_DECL_EXPORT void APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar)
-{
- glDepthRange(zNear, zFar);
-}
-
-Q_DECL_EXPORT void APIENTRY glDetachShader(GLuint program, GLuint shader)
-{
- GLCALLV(DetachShader,program, shader);
-}
-
-Q_DECL_EXPORT void APIENTRY glDisableVertexAttribArray(GLuint index)
-{
- GLCALLV(DisableVertexAttribArray,index);
-}
-
-Q_DECL_EXPORT void APIENTRY glEnableVertexAttribArray(GLuint index)
-{
- GLCALLV(EnableVertexAttribArray,index);
-}
-
-Q_DECL_EXPORT void APIENTRY glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
-{
- GLCALLV(FramebufferRenderbuffer,target, attachment, renderbuffertarget, renderbuffer);
-}
-
-Q_DECL_EXPORT void APIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
-{
- GLCALLV(FramebufferTexture2D,target, attachment, textarget, texture, level);
-}
-
-Q_DECL_EXPORT void APIENTRY glGenBuffers(GLsizei n, GLuint* buffers)
-{
- GLCALLV(GenBuffers,n, buffers);
-}
-
-Q_DECL_EXPORT void APIENTRY glGenerateMipmap(GLenum target)
-{
- GLCALLV(GenerateMipmap,target);
-}
-
-Q_DECL_EXPORT void APIENTRY glGenFramebuffers(GLsizei n, GLuint* framebuffers)
-{
- GLCALLV(GenFramebuffers,n, framebuffers);
-}
-
-Q_DECL_EXPORT void APIENTRY glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
-{
- GLCALLV(GenRenderbuffers,n, renderbuffers);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
-{
- GLCALLV(GetActiveAttrib,program, index, bufsize, length, size, type, name);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
-{
- GLCALLV(GetActiveUniform,program, index, bufsize, length, size, type, name);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
-{
- GLCALLV(GetAttachedShaders,program, maxcount, count, shaders);
-}
-
-Q_DECL_EXPORT int APIENTRY glGetAttribLocation(GLuint program, const GLchar* name)
-{
- GLCALL(GetAttribLocation,program, name);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
-{
- GLCALLV(GetBufferParameteriv,target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
-{
- GLCALLV(GetFramebufferAttachmentParameteriv,target, attachment, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params)
-{
- GLCALLV(GetProgramiv,program, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-{
- GLCALLV(GetProgramInfoLog,program, bufsize, length, infolog);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
-{
- GLCALLV(GetRenderbufferParameteriv,target, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
-{
- GLCALLV(GetShaderiv,shader, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-{
- GLCALLV(GetShaderInfoLog,shader, bufsize, length, infolog);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
-{
- GLCALLV(GetShaderPrecisionFormat,shadertype, precisiontype, range, precision);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
-{
- GLCALLV(GetShaderSource,shader, bufsize, length, source);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat* params)
-{
- GLCALLV(GetUniformfv, program, location, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params)
-{
- GLCALLV(GetUniformiv, program, location, params);
-}
-
-Q_DECL_EXPORT int APIENTRY glGetUniformLocation(GLuint program, const GLchar* name)
-{
- GLCALL(GetUniformLocation,program, name);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
-{
- GLCALLV(GetVertexAttribfv,index, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
-{
- GLCALLV(GetVertexAttribiv,index, pname, params);
-}
-
-Q_DECL_EXPORT void APIENTRY glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
-{
- GLCALLV(GetVertexAttribPointerv,index, pname, pointer);
-}
-
-Q_DECL_EXPORT GLboolean APIENTRY glIsBuffer(GLuint buffer)
-{
- GLCALL(IsBuffer,buffer);
-}
-
-Q_DECL_EXPORT GLboolean APIENTRY glIsFramebuffer(GLuint framebuffer)
-{
- GLCALL(IsFramebuffer,framebuffer);
-}
-
-Q_DECL_EXPORT GLboolean APIENTRY glIsProgram(GLuint program)
-{
- GLCALL(IsProgram,program);
-}
-
-Q_DECL_EXPORT GLboolean APIENTRY glIsRenderbuffer(GLuint renderbuffer)
-{
- GLCALL(IsRenderbuffer,renderbuffer);
-}
-
-Q_DECL_EXPORT GLboolean APIENTRY glIsShader(GLuint shader)
-{
- GLCALL(IsShader,shader);
-}
-
-Q_DECL_EXPORT void APIENTRY glLinkProgram(GLuint program)
-{
- GLCALLV(LinkProgram,program);
-}
-
-Q_DECL_EXPORT void APIENTRY glReleaseShaderCompiler(void)
-{
- GLCALLV(ReleaseShaderCompiler,);
-}
-
-Q_DECL_EXPORT void APIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
-{
- GLCALLV(RenderbufferStorage,target, internalformat, width, height);
-}
-
-Q_DECL_EXPORT void APIENTRY glSampleCoverage(GLclampf value, GLboolean invert)
-{
- GLCALLV(SampleCoverage,value, invert);
-}
-
-Q_DECL_EXPORT void APIENTRY glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
-{
- GLCALLV(ShaderBinary,n, shaders, binaryformat, binary, length);
-}
-
-Q_DECL_EXPORT void APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar* *string, const GLint* length)
-{
- GLCALLV(ShaderSource,shader, count, string, length);
-}
-
-Q_DECL_EXPORT void APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
-{
- GLCALLV(StencilFuncSeparate,face, func, ref, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask)
-{
- GLCALLV(StencilMaskSeparate,face, mask);
-}
-
-Q_DECL_EXPORT void APIENTRY glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
-{
- GLCALLV(StencilOpSeparate,face, fail, zfail, zpass);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform1f(GLint location, GLfloat x)
-{
- GLCALLV(Uniform1f,location, x);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
-{
- GLCALLV(Uniform1fv,location, count, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform1i(GLint location, GLint x)
-{
- GLCALLV(Uniform1i,location, x);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint* v)
-{
- GLCALLV(Uniform1iv,location, count, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y)
-{
- GLCALLV(Uniform2f,location, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
-{
- GLCALLV(Uniform2fv,location, count, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform2i(GLint location, GLint x, GLint y)
-{
- GLCALLV(Uniform2i,location, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint* v)
-{
- GLCALLV(Uniform2iv,location, count, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
-{
- GLCALLV(Uniform3f,location, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
-{
- GLCALLV(Uniform3fv,location, count, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform3i(GLint location, GLint x, GLint y, GLint z)
-{
- GLCALLV(Uniform3i,location, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v)
-{
- GLCALLV(Uniform3iv,location, count, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- GLCALLV(Uniform4f,location, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
-{
- GLCALLV(Uniform4fv,location, count, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
-{
- GLCALLV(Uniform4i,location, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v)
-{
- GLCALLV(Uniform4iv,location, count, v);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-{
- GLCALLV(UniformMatrix2fv,location, count, transpose, value);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-{
- GLCALLV(UniformMatrix3fv,location, count, transpose, value);
-}
-
-Q_DECL_EXPORT void APIENTRY glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-{
- GLCALLV(UniformMatrix4fv,location, count, transpose, value);
-}
-
-Q_DECL_EXPORT void APIENTRY glUseProgram(GLuint program)
-{
- GLCALLV(UseProgram,program);
-}
-
-Q_DECL_EXPORT void APIENTRY glValidateProgram(GLuint program)
-{
- GLCALLV(ValidateProgram,program);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexAttrib1f(GLuint indx, GLfloat x)
-{
- GLCALLV(VertexAttrib1f,indx, x);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexAttrib1fv(GLuint indx, const GLfloat* values)
-{
- GLCALLV(VertexAttrib1fv,indx, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
-{
- GLCALLV(VertexAttrib2f,indx, x, y);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexAttrib2fv(GLuint indx, const GLfloat* values)
-{
- GLCALLV(VertexAttrib2fv,indx, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
-{
- GLCALLV(VertexAttrib3f,indx, x, y, z);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexAttrib3fv(GLuint indx, const GLfloat* values)
-{
- GLCALLV(VertexAttrib3fv,indx, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- GLCALLV(VertexAttrib4f,indx, x, y, z, w);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexAttrib4fv(GLuint indx, const GLfloat* values)
-{
- GLCALLV(VertexAttrib4fv,indx, values);
-}
-
-Q_DECL_EXPORT void APIENTRY glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
-{
- GLCALLV(VertexAttribPointer,indx, size, type, normalized, stride, ptr);
-}
-
-// EGL
-
-Q_DECL_EXPORT __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname)
-{
- // This is a bit more complicated since the GLES2 functions (that are not in OpenGL 1)
- // must be made queriable in order to allow classes like QOpenGLFunctions to operate
- // on the same code path for desktop GL and proxied ES.
- typedef __eglMustCastToProperFunctionPointerType FuncType;
- FuncType f = 0;
- f = qgl_choose()->EGL_GetProcAddress(procname);
- if (!f) {
- static struct Tab {
- const char *name;
- FuncType func;
- } tab[] = {
- { "glActiveTexture", (FuncType) glActiveTexture },
- { "glAttachShader", (FuncType) glAttachShader },
- { "glBindAttribLocation", (FuncType) glBindAttribLocation },
- { "glBindBuffer", (FuncType) glBindBuffer },
- { "glBindFramebuffer", (FuncType) glBindFramebuffer },
- { "glBindRenderbuffer", (FuncType) glBindRenderbuffer },
- { "glBlendColor", (FuncType) glBlendColor },
- { "glBlendEquation", (FuncType) glBlendEquation },
- { "glBlendEquationSeparate", (FuncType) glBlendEquationSeparate },
- { "glBlendFuncSeparate", (FuncType) glBlendFuncSeparate },
- { "glBufferData", (FuncType) glBufferData },
- { "glBufferSubData", (FuncType) glBufferSubData },
- { "glCheckFramebufferStatus", (FuncType) glCheckFramebufferStatus },
- { "glCompileShader", (FuncType) glCompileShader },
- { "glCompressedTexImage2D", (FuncType) glCompressedTexImage2D },
- { "glCompressedTexSubImage2D", (FuncType) glCompressedTexSubImage2D },
- { "glCreateProgram", (FuncType) glCreateProgram },
- { "glCreateShader", (FuncType) glCreateShader },
- { "glDeleteBuffers", (FuncType) glDeleteBuffers },
- { "glDeleteFramebuffers", (FuncType) glDeleteFramebuffers },
- { "glDeleteProgram", (FuncType) glDeleteProgram },
- { "glDeleteRenderbuffers", (FuncType) glDeleteRenderbuffers },
- { "glDeleteShader", (FuncType) glDeleteShader },
- { "glDetachShader", (FuncType) glDetachShader },
- { "glDisableVertexAttribArray", (FuncType) glDisableVertexAttribArray },
- { "glEnableVertexAttribArray", (FuncType) glEnableVertexAttribArray },
- { "glFramebufferRenderbuffer", (FuncType) glFramebufferRenderbuffer },
- { "glFramebufferTexture2D", (FuncType) glFramebufferTexture2D },
- { "glGenBuffers", (FuncType) glGenBuffers },
- { "glGenerateMipmap", (FuncType) glGenerateMipmap },
- { "glGenFramebuffers", (FuncType) glGenFramebuffers },
- { "glGenRenderbuffers", (FuncType) glGenRenderbuffers },
- { "glGetActiveAttrib", (FuncType) glGetActiveAttrib },
- { "glGetActiveUniform", (FuncType) glGetActiveUniform },
- { "glGetAttachedShaders", (FuncType) glGetAttachedShaders },
- { "glGetAttribLocation", (FuncType) glGetAttribLocation },
- { "glGetBufferParameteriv", (FuncType) glGetBufferParameteriv },
- { "glGetFramebufferAttachmentParameteriv", (FuncType) glGetFramebufferAttachmentParameteriv },
- { "glGetProgramiv", (FuncType) glGetProgramiv },
- { "glGetProgramInfoLog", (FuncType) glGetProgramInfoLog },
- { "glGetRenderbufferParameteriv", (FuncType) glGetRenderbufferParameteriv },
- { "glGetShaderiv", (FuncType) glGetShaderiv },
- { "glGetShaderInfoLog", (FuncType) glGetShaderInfoLog },
- { "glGetShaderPrecisionFormat", (FuncType) glGetShaderPrecisionFormat },
- { "glGetShaderSource", (FuncType) glGetShaderSource },
- { "glGetUniformfv", (FuncType) glGetUniformfv },
- { "glGetUniformiv", (FuncType) glGetUniformiv },
- { "glGetUniformLocation", (FuncType) glGetUniformLocation },
- { "glGetVertexAttribfv", (FuncType) glGetVertexAttribfv },
- { "glGetVertexAttribiv", (FuncType) glGetVertexAttribiv },
- { "glGetVertexAttribPointerv", (FuncType) glGetVertexAttribPointerv },
- { "glIsBuffer", (FuncType) glIsBuffer },
- { "glIsFramebuffer", (FuncType) glIsFramebuffer },
- { "glIsProgram", (FuncType) glIsProgram },
- { "glIsRenderbuffer", (FuncType) glIsRenderbuffer },
- { "glIsShader", (FuncType) glIsShader },
- { "glLinkProgram", (FuncType) glLinkProgram },
- { "glReleaseShaderCompiler", (FuncType) glReleaseShaderCompiler },
- { "glRenderbufferStorage", (FuncType) glRenderbufferStorage },
- { "glSampleCoverage", (FuncType) glSampleCoverage },
- { "glShaderBinary", (FuncType) glShaderBinary },
- { "glShaderSource", (FuncType) glShaderSource },
- { "glStencilFuncSeparate", (FuncType) glStencilFuncSeparate },
- { "glStencilMaskSeparate", (FuncType) glStencilMaskSeparate },
- { "glStencilOpSeparate", (FuncType) glStencilOpSeparate },
- { "glUniform1f", (FuncType) glUniform1f },
- { "glUniform1fv", (FuncType) glUniform1fv },
- { "glUniform1i", (FuncType) glUniform1i },
- { "glUniform1iv", (FuncType) glUniform1iv },
- { "glUniform2f", (FuncType) glUniform2f },
- { "glUniform2fv", (FuncType) glUniform2fv },
- { "glUniform2i", (FuncType) glUniform2i },
- { "glUniform2iv", (FuncType) glUniform2iv },
- { "glUniform3f", (FuncType) glUniform3f },
- { "glUniform3fv", (FuncType) glUniform3fv },
- { "glUniform3i", (FuncType) glUniform3i },
- { "glUniform3iv", (FuncType) glUniform3iv },
- { "glUniform4f", (FuncType) glUniform4f },
- { "glUniform4fv", (FuncType) glUniform4fv },
- { "glUniform4i", (FuncType) glUniform4i },
- { "glUniform4iv", (FuncType) glUniform4iv },
- { "glUniformMatrix2fv", (FuncType) glUniformMatrix2fv },
- { "glUniformMatrix3fv", (FuncType) glUniformMatrix3fv },
- { "glUniformMatrix4fv", (FuncType) glUniformMatrix4fv },
- { "glUseProgram", (FuncType) glUseProgram },
- { "glValidateProgram", (FuncType) glValidateProgram },
- { "glVertexAttrib1f", (FuncType) glVertexAttrib1f },
- { "glVertexAttrib1fv", (FuncType) glVertexAttrib1fv },
- { "glVertexAttrib2f", (FuncType) glVertexAttrib2f },
- { "glVertexAttrib2fv", (FuncType) glVertexAttrib2fv },
- { "glVertexAttrib3f", (FuncType) glVertexAttrib3f },
- { "glVertexAttrib3fv", (FuncType) glVertexAttrib3fv },
- { "glVertexAttrib4f", (FuncType) glVertexAttrib4f },
- { "glVertexAttrib4fv", (FuncType) glVertexAttrib4fv },
- { "glVertexAttribPointer", (FuncType) glVertexAttribPointer }
- };
- for (size_t i = 0; i < sizeof(tab) / sizeof(Tab); ++i) {
- uint len = qstrlen(tab[i].name);
- if (!qstrncmp(tab[i].name, procname, len)
- && procname[len] == '\0') {
- f = tab[i].func;
- break;
- }
- }
- if (!f)
- qCDebug(qglLc, "eglGetProcAddress failed for %s", procname);
- }
-
- return f;
-}
-
-} // extern "C"
-
-// For QOpenGLFunctions
-int qgl_proxyLibraryType(void)
-{
- return qgl_choose()->libraryType();
-}
-
-HMODULE qgl_glHandle(void)
-{
- return qgl_choose()->libraryHandle();
-}
-
-QAbstractWindowsOpenGL::QAbstractWindowsOpenGL()
- :
- CopyContext(0),
- CreateContext(0),
- CreateLayerContext(0),
- DeleteContext(0),
- GetCurrentContext(0),
- GetCurrentDC(0),
- GetProcAddress(0),
- MakeCurrent(0),
- ShareLists(0),
- UseFontBitmapsW(0),
- UseFontOutlinesW(0),
- DescribeLayerPlane(0),
- SetLayerPaletteEntries(0),
- GetLayerPaletteEntries(0),
- RealizeLayerPalette(0),
- SwapLayerBuffers(0),
- SwapMultipleBuffers(0),
-
- EGL_GetError(0),
- EGL_GetDisplay(0),
- EGL_Initialize(0),
- EGL_Terminate(0),
- EGL_QueryString(0),
- EGL_GetConfigs(0),
- EGL_ChooseConfig(0),
- EGL_GetConfigAttrib(0),
- EGL_CreateWindowSurface(0),
- EGL_CreatePbufferSurface(0),
- EGL_CreatePixmapSurface(0),
- EGL_DestroySurface(0),
- EGL_QuerySurface(0),
- EGL_BindAPI(0),
- EGL_QueryAPI(0),
- EGL_WaitClient(0),
- EGL_ReleaseThread(0),
- EGL_CreatePbufferFromClientBuffer(0),
- EGL_SurfaceAttrib(0),
- EGL_BindTexImage(0),
- EGL_ReleaseTexImage(0),
- EGL_SwapInterval(0),
- EGL_CreateContext(0),
- EGL_DestroyContext(0),
- EGL_MakeCurrent (0),
- EGL_GetCurrentContext(0),
- EGL_GetCurrentSurface(0),
- EGL_GetCurrentDisplay(0),
- EGL_QueryContext(0),
- EGL_WaitGL(0),
- EGL_WaitNative(0),
- EGL_SwapBuffers(0),
- EGL_CopyBuffers(0),
- EGL_GetProcAddress(0),
-
- Viewport(0),
- DepthRange(0),
- IsEnabled(0),
- GetTexLevelParameteriv(0),
- GetTexLevelParameterfv(0),
- GetTexParameteriv(0),
- GetTexParameterfv(0),
- GetTexImage(0),
- GetString(0),
- GetIntegerv(0),
- GetFloatv(0),
- GetError(0),
- GetDoublev(0),
- GetBooleanv(0),
- ReadPixels(0),
- ReadBuffer(0),
- PixelStorei(0),
- PixelStoref(0),
- DepthFunc(0),
- StencilOp(0),
- StencilFunc(0),
- LogicOp(0),
- BlendFunc(0),
- Flush(0),
- Finish(0),
- Enable(0),
- Disable(0),
- DepthMask(0),
- ColorMask(0),
- StencilMask(0),
- ClearDepth(0),
- ClearStencil(0),
- ClearColor(0),
- Clear(0),
- DrawBuffer(0),
- TexImage2D(0),
- TexImage1D(0),
- TexParameteriv(0),
- TexParameteri(0),
- TexParameterfv(0),
- TexParameterf(0),
- Scissor(0),
- PolygonMode(0),
- PointSize(0),
- LineWidth(0),
- Hint(0),
- FrontFace(0),
- CullFace(0),
-
- Translatef(0),
- Translated(0),
- Scalef(0),
- Scaled(0),
- Rotatef(0),
- Rotated(0),
- PushMatrix(0),
- PopMatrix(0),
- Ortho(0),
- MultMatrixd(0),
- MultMatrixf(0),
- MatrixMode(0),
- LoadMatrixd(0),
- LoadMatrixf(0),
- LoadIdentity(0),
- Frustum(0),
- IsList(0),
- GetTexGeniv(0),
- GetTexGenfv(0),
- GetTexGendv(0),
- GetTexEnviv(0),
- GetTexEnvfv(0),
- GetPolygonStipple(0),
- GetPixelMapusv(0),
- GetPixelMapuiv(0),
- GetPixelMapfv(0),
- GetMaterialiv(0),
- GetMaterialfv(0),
- GetMapiv(0),
- GetMapfv(0),
- GetMapdv(0),
- GetLightiv(0),
- GetLightfv(0),
- GetClipPlane(0),
- DrawPixels(0),
- CopyPixels(0),
- PixelMapusv(0),
- PixelMapuiv(0),
- PixelMapfv(0),
- PixelTransferi(0),
- PixelTransferf(0),
- PixelZoom(0),
- AlphaFunc(0),
- EvalPoint2(0),
- EvalMesh2(0),
- EvalPoint1(0),
- EvalMesh1(0),
- EvalCoord2fv(0),
- EvalCoord2f(0),
- EvalCoord2dv(0),
- EvalCoord2d(0),
- EvalCoord1fv(0),
- EvalCoord1f(0),
- EvalCoord1dv(0),
- EvalCoord1d(0),
- MapGrid2f(0),
- MapGrid2d(0),
- MapGrid1f(0),
- MapGrid1d(0),
- Map2f(0),
- Map2d(0),
- Map1f(0),
- Map1d(0),
- PushAttrib(0),
- PopAttrib(0),
- Accum(0),
- IndexMask(0),
- ClearIndex(0),
- ClearAccum(0),
- PushName(0),
- PopName(0),
- PassThrough(0),
- LoadName(0),
- InitNames(0),
- RenderMode(0),
- SelectBuffer(0),
- FeedbackBuffer(0),
- TexGeniv(0),
- TexGeni(0),
- TexGenfv(0),
- TexGenf(0),
- TexGendv(0),
- TexGend(0),
- TexEnviv(0),
- TexEnvi(0),
- TexEnvfv(0),
- TexEnvf(0),
- ShadeModel(0),
- PolygonStipple(0),
- Materialiv(0),
- Materiali(0),
- Materialfv(0),
- Materialf(0),
- LineStipple(0),
- LightModeliv(0),
- LightModeli(0),
- LightModelfv(0),
- LightModelf(0),
- Lightiv(0),
- Lighti(0),
- Lightfv(0),
- Lightf(0),
- Fogiv(0),
- Fogi(0),
- Fogfv(0),
- Fogf(0),
- ColorMaterial(0),
- ClipPlane(0),
- Vertex4sv(0),
- Vertex4s(0),
- Vertex4iv(0),
- Vertex4i(0),
- Vertex4fv(0),
- Vertex4f(0),
- Vertex4dv(0),
- Vertex4d(0),
- Vertex3sv(0),
- Vertex3s(0),
- Vertex3iv(0),
- Vertex3i(0),
- Vertex3fv(0),
- Vertex3f(0),
- Vertex3dv(0),
- Vertex3d(0),
- Vertex2sv(0),
- Vertex2s(0),
- Vertex2iv(0),
- Vertex2i(0),
- Vertex2fv(0),
- Vertex2f(0),
- Vertex2dv(0),
- Vertex2d(0),
- TexCoord4sv(0),
- TexCoord4s(0),
- TexCoord4iv(0),
- TexCoord4i(0),
- TexCoord4fv(0),
- TexCoord4f(0),
- TexCoord4dv(0),
- TexCoord4d(0),
- TexCoord3sv(0),
- TexCoord3s(0),
- TexCoord3iv(0),
- TexCoord3i(0),
- TexCoord3fv(0),
- TexCoord3f(0),
- TexCoord3dv(0),
- TexCoord3d(0),
- TexCoord2sv(0),
- TexCoord2s(0),
- TexCoord2iv(0),
- TexCoord2i(0),
- TexCoord2fv(0),
- TexCoord2f(0),
- TexCoord2dv(0),
- TexCoord2d(0),
- TexCoord1sv(0),
- TexCoord1s(0),
- TexCoord1iv(0),
- TexCoord1i(0),
- TexCoord1fv(0),
- TexCoord1f(0),
- TexCoord1dv(0),
- TexCoord1d(0),
- Rectsv(0),
- Rects(0),
- Rectiv(0),
- Recti(0),
- Rectfv(0),
- Rectf(0),
- Rectdv(0),
- Rectd(0),
- RasterPos4sv(0),
- RasterPos4s(0),
- RasterPos4iv(0),
- RasterPos4i(0),
- RasterPos4fv(0),
- RasterPos4f(0),
- RasterPos4dv(0),
- RasterPos4d(0),
- RasterPos3sv(0),
- RasterPos3s(0),
- RasterPos3iv(0),
- RasterPos3i(0),
- RasterPos3fv(0),
- RasterPos3f(0),
- RasterPos3dv(0),
- RasterPos3d(0),
- RasterPos2sv(0),
- RasterPos2s(0),
- RasterPos2iv(0),
- RasterPos2i(0),
- RasterPos2fv(0),
- RasterPos2f(0),
- RasterPos2dv(0),
- RasterPos2d(0),
- Normal3sv(0),
- Normal3s(0),
- Normal3iv(0),
- Normal3i(0),
- Normal3fv(0),
- Normal3f(0),
- Normal3dv(0),
- Normal3d(0),
- Normal3bv(0),
- Normal3b(0),
- Indexsv(0),
- Indexs(0),
- Indexiv(0),
- Indexi(0),
- Indexfv(0),
- Indexf(0),
- Indexdv(0),
- Indexd(0),
- End(0),
- EdgeFlagv(0),
- EdgeFlag(0),
- Color4usv(0),
- Color4us(0),
- Color4uiv(0),
- Color4ui(0),
- Color4ubv(0),
- Color4ub(0),
- Color4sv(0),
- Color4s(0),
- Color4iv(0),
- Color4i(0),
- Color4fv(0),
- Color4f(0),
- Color4dv(0),
- Color4d(0),
- Color4bv(0),
- Color4b(0),
- Color3usv(0),
- Color3us(0),
- Color3uiv(0),
- Color3ui(0),
- Color3ubv(0),
- Color3ub(0),
- Color3sv(0),
- Color3s(0),
- Color3iv(0),
- Color3i(0),
- Color3fv(0),
- Color3f(0),
- Color3dv(0),
- Color3d(0),
- Color3bv(0),
- Color3b(0),
- Bitmap(0),
- Begin(0),
- ListBase(0),
- GenLists(0),
- DeleteLists(0),
- CallLists(0),
- CallList(0),
- EndList(0),
- NewList(0),
-
- Indexubv(0),
- Indexub(0),
- IsTexture(0),
- GenTextures(0),
- DeleteTextures(0),
- BindTexture(0),
- TexSubImage2D(0),
- TexSubImage1D(0),
- CopyTexSubImage2D(0),
- CopyTexSubImage1D(0),
- CopyTexImage2D(0),
- CopyTexImage1D(0),
- PolygonOffset(0),
- GetPointerv(0),
- DrawElements(0),
- DrawArrays(0),
-
- PushClientAttrib(0),
- PopClientAttrib(0),
- PrioritizeTextures(0),
- AreTexturesResident(0),
- VertexPointer(0),
- TexCoordPointer(0),
- NormalPointer(0),
- InterleavedArrays(0),
- IndexPointer(0),
- EnableClientState(0),
- EdgeFlagPointer(0),
- DisableClientState(0),
- ColorPointer(0),
- ArrayElement(0),
-
- ActiveTexture(0),
- AttachShader(0),
- BindAttribLocation(0),
- BindBuffer(0),
- BindFramebuffer(0),
- BindRenderbuffer(0),
- BlendColor(0),
- BlendEquation(0),
- BlendEquationSeparate(0),
- BlendFuncSeparate(0),
- BufferData(0),
- BufferSubData(0),
- CheckFramebufferStatus(0),
- ClearDepthf(0),
- CompileShader(0),
- CompressedTexImage2D(0),
- CompressedTexSubImage2D(0),
- CreateProgram(0),
- CreateShader(0),
- DeleteBuffers(0),
- DeleteFramebuffers(0),
- DeleteProgram(0),
- DeleteRenderbuffers(0),
- DeleteShader(0),
- DepthRangef(0),
- DetachShader(0),
- DisableVertexAttribArray(0),
- EnableVertexAttribArray(0),
- FramebufferRenderbuffer(0),
- FramebufferTexture2D(0),
- GenBuffers(0),
- GenerateMipmap(0),
- GenFramebuffers(0),
- GenRenderbuffers(0),
- GetActiveAttrib(0),
- GetActiveUniform(0),
- GetAttachedShaders(0),
- GetAttribLocation(0),
- GetBufferParameteriv(0),
- GetFramebufferAttachmentParameteriv(0),
- GetProgramiv(0),
- GetProgramInfoLog(0),
- GetRenderbufferParameteriv(0),
- GetShaderiv(0),
- GetShaderInfoLog(0),
- GetShaderPrecisionFormat(0),
- GetShaderSource(0),
- GetUniformfv(0),
- GetUniformiv(0),
- GetUniformLocation(0),
- GetVertexAttribfv(0),
- GetVertexAttribiv(0),
- GetVertexAttribPointerv(0),
- IsBuffer(0),
- IsFramebuffer(0),
- IsProgram(0),
- IsRenderbuffer(0),
- IsShader(0),
- LinkProgram(0),
- ReleaseShaderCompiler(0),
- RenderbufferStorage(0),
- SampleCoverage(0),
- ShaderBinary(0),
- ShaderSource(0),
- StencilFuncSeparate(0),
- StencilMaskSeparate(0),
- StencilOpSeparate(0),
- Uniform1f(0),
- Uniform1fv(0),
- Uniform1i(0),
- Uniform1iv(0),
- Uniform2f(0),
- Uniform2fv(0),
- Uniform2i(0),
- Uniform2iv(0),
- Uniform3f(0),
- Uniform3fv(0),
- Uniform3i(0),
- Uniform3iv(0),
- Uniform4f(0),
- Uniform4fv(0),
- Uniform4i(0),
- Uniform4iv(0),
- UniformMatrix2fv(0),
- UniformMatrix3fv(0),
- UniformMatrix4fv(0),
- UseProgram(0),
- ValidateProgram(0),
- VertexAttrib1f(0),
- VertexAttrib1fv(0),
- VertexAttrib2f(0),
- VertexAttrib2fv(0),
- VertexAttrib3f(0),
- VertexAttrib3fv(0),
- VertexAttrib4f(0),
- VertexAttrib4fv(0),
- VertexAttribPointer(0),
-
- m_lib(0),
- m_libraryType(DesktopGL),
- m_loaded(false)
-{
-}
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index 164e5e6925..d2429cdd23 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -176,7 +176,7 @@ public:
#endif
{
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!ctx->isES()) {
QSurfaceFormat f = ctx->format();
// Geometry shaders require OpenGL >= 3.2
@@ -445,7 +445,7 @@ bool QOpenGLShader::compileSourceCode(const char *source)
#ifdef QOpenGL_REDEFINE_HIGHP
if (d->shaderType == Fragment && !ctx_d->workaround_missingPrecisionQualifiers
- && QOpenGLFunctions::isES()) {
+ && QOpenGLContext::currentContext()->isES()) {
src.append(redefineHighp);
srclen.append(GLint(sizeof(redefineHighp) - 1));
}
@@ -674,7 +674,7 @@ bool QOpenGLShaderProgram::init()
#ifndef QT_OPENGL_ES_2
// Resolve OpenGL 4 functions for tessellation shader support
QSurfaceFormat format = context->format();
- if (!QOpenGLFunctions::isES()
+ if (!context->isES()
&& format.version() >= qMakePair<int, int>(4, 0)) {
d->tessellationFuncs = context->versionFunctions<QOpenGLFunctions_4_0_Core>();
d->tessellationFuncs->initializeOpenGLFunctions();
@@ -3035,7 +3035,8 @@ int QOpenGLShaderProgram::maxGeometryOutputVertices() const
{
GLint n = 0;
#if defined(QT_OPENGL_3_2)
- glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES, &n);
+ Q_D(const QOpenGLShaderProgram);
+ d->glfuncs->glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES, &n);
#endif
return n;
}
@@ -3273,7 +3274,7 @@ bool QOpenGLShader::hasOpenGLShaders(ShaderType type, QOpenGLContext *context)
#ifndef QT_OPENGL_ES_2
// Geometry shaders require OpenGL 3.2 or newer
QSurfaceFormat format = context->format();
- return (!QOpenGLFunctions::isES())
+ return (!context->isES())
&& (format.version() >= qMakePair<int, int>(3, 2));
#else
// No geometry shader support in OpenGL ES2
@@ -3281,7 +3282,7 @@ bool QOpenGLShader::hasOpenGLShaders(ShaderType type, QOpenGLContext *context)
#endif
} else if (type == TessellationControl || type == TessellationEvaluation) {
#if !defined(QT_OPENGL_ES_2)
- return (!QOpenGLFunctions::isES())
+ return (!context->isES())
&& (format.version() >= qMakePair<int, int>(4, 0));
#else
// No tessellation shader support in OpenGL ES2
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index 8bdbdba6f7..983496230d 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -1461,7 +1461,7 @@ QOpenGLTexture::QOpenGLTexture(Target target)
/*!
Creates a QOpenGLTexture object that can later be bound to the 2D texture
target and contains the pixel data contained in \a image. If you wish
- to have a chain of mipmaps generated then set \a useMipMaps to true (this
+ to have a chain of mipmaps generated then set \a genMipMaps to \c true (this
is the default).
This does create the underlying OpenGL texture object. Therefore,
@@ -1491,6 +1491,8 @@ QOpenGLTexture::~QOpenGLTexture()
functions that set properties of the texture object implicitly call create()
on your behalf.
+ Returns \c true if the creation succeeded, otherwise returns \c false.
+
\sa destroy(), isCreated(), textureId()
*/
bool QOpenGLTexture::create()
@@ -1557,9 +1559,8 @@ void QOpenGLTexture::bind()
EXT_direct_state_access extension where available and simulates it
where it is not.
- If \a restoreTextureUnit is true then this function
- will restore the active unit to the texture unit that was active
- upon entry.
+ If parameter \a reset is \c true then this function will restore
+ the active unit to the texture unit that was active upon entry.
\sa release()
*/
@@ -1584,7 +1585,7 @@ void QOpenGLTexture::release()
/*!
Unbinds this texture from texture unit \a unit.
- If \a restoreTextureUnit is true then this function
+ If parameter \a reset is \c true then this function
will restore the active unit to the texture unit that was active
upon entry.
*/
@@ -1633,7 +1634,7 @@ GLuint QOpenGLTexture::boundTextureId(BindingTarget target)
}
GLint textureId = 0;
- glGetIntegerv(target, &textureId);
+ ctx->functions()->glGetIntegerv(target, &textureId);
return static_cast<GLuint>(textureId);
}
@@ -1653,11 +1654,11 @@ GLuint QOpenGLTexture::boundTextureId(uint unit, BindingTarget target)
funcs->initializeOpenGLFunctions();
GLint oldTextureUnit = 0;
- glGetIntegerv(GL_ACTIVE_TEXTURE, &oldTextureUnit);
+ funcs->glGetIntegerv(GL_ACTIVE_TEXTURE, &oldTextureUnit);
funcs->glActiveTexture(unit);
GLint textureId = 0;
- glGetIntegerv(target, &textureId);
+ funcs->glGetIntegerv(target, &textureId);
funcs->glActiveTexture(oldTextureUnit);
return static_cast<GLuint>(textureId);
@@ -1838,11 +1839,11 @@ QOpenGLTexture::TextureFormat QOpenGLTexture::format() const
}
/*!
- Sets the dimensions of this texture object. The default
- for each dimension is 1. The maximum allowable texture size
- is dependent upon your OpenGL implementation. Allocating
- storage for a texture less than the maximum size can still
- fail if your system is low on resources.
+ Sets the dimensions of this texture object to \a width,
+ \a height, and \a depth. The default for each dimension is 1.
+ The maximum allowable texture size is dependent upon your OpenGL
+ implementation. Allocating storage for a texture less than the
+ maximum size can still fail if your system is low on resources.
\sa width(), height(), depth()
*/
@@ -1925,8 +1926,8 @@ int QOpenGLTexture::depth() const
}
/*!
- For texture targets that support mipmaps this function
- sets the requested number of mipmap levels to allocate storage
+ For texture targets that support mipmaps, this function
+ sets the requested number of mipmap \a levels to allocate storage
for. This function should be called before storage is allocated
for the texture.
@@ -1991,11 +1992,10 @@ int QOpenGLTexture::maximumMipLevels() const
}
/*!
- For those texture targets that support array layers this function
- sets the number of array layers to allocate storage for. This
- function should be called before storage is allocated for the tecture.
+ Sets the number of array \a layers to allocate storage for. This
+ function should be called before storage is allocated for the texture.
- For tarets that do not support array layers this function has
+ For targets that do not support array layers this function has
no effect.
\sa layers(), isStorageAllocated()
@@ -2116,13 +2116,13 @@ bool QOpenGLTexture::isStorageAllocated() const
Simpliar constraints apply for the \a viewFormat. See the above link
and the specification for more details.
- The \a minimumMipmapLevel, \a maximumMipmapLevel, \a mimimumLayer,
+ The \a minimumMipmapLevel, \a maximumMipmapLevel, \a minimumLayer,
and \a maximumLayer arguments serve to restrict the parts of the
texture accessible by the texture view.
If creation of the texture view fails this function will return
0. If the function succeeds it will return a pointer to a new
- QOpenGLTexture object that will return true from its isTextureView()
+ QOpenGLTexture object that will return \c true from its isTextureView()
function.
\sa isTextureView()
@@ -2158,7 +2158,7 @@ bool QOpenGLTexture::isTextureView() const
}
/*!
- Uploads pixel \a data for this texture object \a mipLevel, array \a layer and \acubeFace.
+ Uploads pixel \a data for this texture object \a mipLevel, array \a layer, and \a cubeFace.
Storage must have been allocated before uploading pixel data. Some overloads of setData()
will set appropriate dimensions, mipmap levels, and array layers and then allocate storage
for you if they have enough information to do so. This will be noted in the function
@@ -2285,6 +2285,8 @@ void QOpenGLTexture::setData(PixelFormat sourceFormat, PixelType sourceType,
/*!
This overload of setData() will allocate storage for you.
+ The pixel data is contained in \a image. Mipmaps are generated by default.
+ Set \a genMipMaps to \l DontGenerateMipMaps to turn off mipmap generation.
\overload
*/
@@ -2303,7 +2305,7 @@ void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps)
}
/*!
- Uploads compressed pixel \a data to \a mipLevel, array \a layer and \a cubeFace.
+ Uploads compressed pixel \a data to \a mipLevel, array \a layer, and \a cubeFace.
The pixel transfer can optionally be controlled with \a options. The \a dataSize
argument should specify the size of the data pointed to by \a data.
@@ -2430,7 +2432,7 @@ bool QOpenGLTexture::hasFeature(Feature feature)
bool supported = false;
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!ctx->isES()) {
switch (feature) {
case ImmutableMultisampleStorage:
case TextureBuffer:
@@ -2487,7 +2489,7 @@ bool QOpenGLTexture::hasFeature(Feature feature)
}
}
- if (QOpenGLFunctions::isES())
+ if (ctx->isES())
#endif
{
switch (feature) {
@@ -2522,7 +2524,7 @@ bool QOpenGLTexture::hasFeature(Feature feature)
void QOpenGLTexture::setMipBaseLevel(int baseLevel)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->textureId);
@@ -2559,7 +2561,7 @@ int QOpenGLTexture::mipBaseLevel() const
void QOpenGLTexture::setMipMaxLevel(int maxLevel)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->textureId);
@@ -2596,7 +2598,7 @@ int QOpenGLTexture::mipMaxLevel() const
void QOpenGLTexture::setMipLevelRange(int baseLevel, int maxLevel)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->textureId);
@@ -2625,7 +2627,7 @@ QPair<int, int> QOpenGLTexture::mipLevelRange() const
}
/*!
- If \a enabled is true, enables automatic mipmap generation for this texture object
+ If \a enabled is \c true, enables automatic mipmap generation for this texture object
to occur whenever the level 0 mipmap data is set via setData().
The automatic mipmap generation is enabled by default.
@@ -2673,7 +2675,7 @@ void QOpenGLTexture::generateMipMaps()
The generation of mipmaps to above \baseLevel is achieved by setting the mipmap
base level to \a baseLevel and then generating the mipmap chain. If \a resetBaseLevel
- is true, then the baseLevel of the texture will be reset to its previous value.
+ is \c true, then the baseLevel of the texture will be reset to its previous value.
\sa setAutoMipMapGenerationEnabled(), setMipLevels(), mipLevels()
*/
@@ -2706,7 +2708,7 @@ void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel)
void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue value)
{
#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -2727,13 +2729,15 @@ void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue val
}
/*!
+ Parameters \a {r}, \a {g}, \a {b}, and \a {a} are values used for setting
+ the colors red, green, blue, and the alpha value.
\overload
*/
void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,
SwizzleValue b, SwizzleValue a)
{
#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -2782,7 +2786,7 @@ QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent compon
void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode)
{
#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -2941,6 +2945,7 @@ void QOpenGLTexture::setWrapMode(QOpenGLTexture::WrapMode mode)
}
/*!
+ Holds the texture dimension \a direction.
\overload
*/
void QOpenGLTexture::setWrapMode(QOpenGLTexture::CoordinateDirection direction, QOpenGLTexture::WrapMode mode)
@@ -2972,7 +2977,7 @@ QOpenGLTexture::WrapMode QOpenGLTexture::wrapMode(QOpenGLTexture::CoordinateDire
void QOpenGLTexture::setBorderColor(QColor color)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -2995,12 +3000,14 @@ void QOpenGLTexture::setBorderColor(QColor color)
}
/*!
+ Sets the color red to \a {r}, green to \a {g}, blue to \{b}, and \a {a} to the
+ alpha value.
\overload
*/
void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3026,12 +3033,14 @@ void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
}
/*!
+ Sets the color red to \a {r}, green to \a {g}, blue to \a {b}, and \a the alpha
+ value to {a}.
\overload
*/
void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3059,12 +3068,14 @@ void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
}
/*!
+ Sets the color red to \a {r}, green to \a {g}, blue to \a {b}, and \a the alpha
+ value to {a}.
\overload
*/
void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3110,7 +3121,7 @@ QColor QOpenGLTexture::borderColor() const
}
/*!
- Writes the texture border color into the first 4 elements
+ Writes the texture border color into the first four elements
of the array pointed to by \a border.
\sa setBorderColor()
@@ -3129,6 +3140,9 @@ void QOpenGLTexture::borderColor(float *border) const
}
/*!
+ Writes the texture border color into the first four elements
+ of the array pointed to by \a border.
+
\overload
*/
void QOpenGLTexture::borderColor(int *border) const
@@ -3145,6 +3159,9 @@ void QOpenGLTexture::borderColor(int *border) const
}
/*!
+ Writes the texture border color into the first four elements
+ of the array pointed to by \a border.
+
\overload
*/
void QOpenGLTexture::borderColor(unsigned int *border) const
@@ -3170,7 +3187,7 @@ void QOpenGLTexture::borderColor(unsigned int *border) const
void QOpenGLTexture::setMinimumLevelOfDetail(float value)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3207,7 +3224,7 @@ float QOpenGLTexture::minimumLevelOfDetail() const
void QOpenGLTexture::setMaximumLevelOfDetail(float value)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3235,15 +3252,15 @@ float QOpenGLTexture::maximumLevelOfDetail() const
}
/*!
- Sets the minimum and maximum level of detail parameters.
-
+ Sets the minimum level of detail parameters to \a min and the maximum level
+ to \a max.
\note This function has no effect on Qt built for OpenGL ES 2.
\sa levelOfDetailRange(), setMinimumLevelOfDetail(), setMaximumLevelOfDetail()
*/
void QOpenGLTexture::setLevelOfDetailRange(float min, float max)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3274,7 +3291,10 @@ QPair<float, float> QOpenGLTexture::levelOfDetailRange() const
}
/*!
- Sets the level of detail bias parameter.
+ Sets the level of detail bias to \a bias.
+ Level of detail bias affects the point at which mipmapping levels change.
+ Increasing values for level of detail bias makes the overall images blurrier
+ or smoother. Decreasing values make the overall images sharper.
\note This function has no effect on Qt built for OpenGL ES 2.
\sa levelofDetailBias()
@@ -3282,7 +3302,7 @@ QPair<float, float> QOpenGLTexture::levelOfDetailRange() const
void QOpenGLTexture::setLevelofDetailBias(float bias)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
diff --git a/src/gui/opengl/qopengltextureblitter.cpp b/src/gui/opengl/qopengltextureblitter.cpp
index b776444347..d52517add2 100644
--- a/src/gui/opengl/qopengltextureblitter.cpp
+++ b/src/gui/opengl/qopengltextureblitter.cpp
@@ -45,6 +45,7 @@
#include <QtGui/QOpenGLShaderProgram>
#include <QtGui/QOpenGLVertexArrayObject>
#include <QtGui/QOpenGLContext>
+#include <QtGui/QOpenGLFunctions>
QT_BEGIN_NAMESPACE
@@ -120,11 +121,11 @@ class TextureBinder
public:
TextureBinder(GLuint textureId)
{
- glBindTexture(GL_TEXTURE_2D, textureId);
+ QOpenGLContext::currentContext()->functions()->glBindTexture(GL_TEXTURE_2D, textureId);
}
~TextureBinder()
{
- glBindTexture(GL_TEXTURE_2D, 0);
+ QOpenGLContext::currentContext()->functions()->glBindTexture(GL_TEXTURE_2D, 0);
}
};
@@ -196,7 +197,7 @@ void QOpenGLTextureBlitterPrivate::blit(GLuint texture,
program->setUniformValue(textureTransformUniformPos, textureTransform);
textureMatrixUniformState = User;
- glDrawArrays(GL_TRIANGLES, 0, 6);
+ QOpenGLContext::currentContext()->functions()->glDrawArrays(GL_TRIANGLES, 0, 6);
}
void QOpenGLTextureBlitterPrivate::blit(GLuint texture,
@@ -219,7 +220,7 @@ void QOpenGLTextureBlitterPrivate::blit(GLuint texture,
textureMatrixUniformState = Identity;
}
- glDrawArrays(GL_TRIANGLES, 0, 6);
+ QOpenGLContext::currentContext()->functions()->glDrawArrays(GL_TRIANGLES, 0, 6);
}
QOpenGLTextureBlitter::QOpenGLTextureBlitter()
diff --git a/src/gui/opengl/qopengltexturecache.cpp b/src/gui/opengl/qopengltexturecache.cpp
index 750264935b..f4aa29ac0f 100644
--- a/src/gui/opengl/qopengltexturecache.cpp
+++ b/src/gui/opengl/qopengltexturecache.cpp
@@ -117,7 +117,7 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QPixmap &
if (!pixmap.paintingActive()) {
QOpenGLCachedTexture *entry = m_cache.object(key);
if (entry) {
- glBindTexture(GL_TEXTURE_2D, entry->id());
+ context->functions()->glBindTexture(GL_TEXTURE_2D, entry->id());
return entry->id();
}
}
@@ -154,7 +154,7 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &i
if (!image.paintingActive()) {
QOpenGLCachedTexture *entry = m_cache.object(key);
if (entry) {
- glBindTexture(GL_TEXTURE_2D, entry->id());
+ context->functions()->glBindTexture(GL_TEXTURE_2D, entry->id());
return entry->id();
}
}
@@ -181,12 +181,13 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &i
GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, qint64 key, const QImage &image)
{
GLuint id;
- glGenTextures(1, &id);
- glBindTexture(GL_TEXTURE_2D, id);
+ QOpenGLFunctions *funcs = context->functions();
+ funcs->glGenTextures(1, &id);
+ funcs->glBindTexture(GL_TEXTURE_2D, id);
QImage tx = image.convertToFormat(QImage::Format_RGBA8888_Premultiplied);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tx.width(), tx.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, const_cast<const QImage &>(tx).bits());
+ funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tx.width(), tx.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, const_cast<const QImage &>(tx).bits());
int cost = tx.width() * tx.height() * 4 / 1024;
m_cache.insert(key, new QOpenGLCachedTexture(id, context), cost);
@@ -210,9 +211,9 @@ void QOpenGLTextureCache::freeResource(QOpenGLContext *)
Q_ASSERT(false); // the texture cache lives until the context group disappears
}
-static void freeTexture(QOpenGLFunctions *, GLuint id)
+static void freeTexture(QOpenGLFunctions *funcs, GLuint id)
{
- glDeleteTextures(1, &id);
+ funcs->glDeleteTextures(1, &id);
}
QOpenGLCachedTexture::QOpenGLCachedTexture(GLuint id, QOpenGLContext *context)
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp
index 3524c1cb1a..5844bf639c 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/gui/opengl/qopengltextureglyphcache.cpp
@@ -122,8 +122,9 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height)
if (!m_textureResource)
m_textureResource = new QOpenGLGlyphTexture(ctx);
- glGenTextures(1, &m_textureResource->m_texture);
- glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
+ QOpenGLFunctions *funcs = ctx->functions();
+ funcs->glGenTextures(1, &m_textureResource->m_texture);
+ funcs->glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
m_textureResource->m_width = width;
m_textureResource->m_height = height;
@@ -132,7 +133,7 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height)
QVarLengthArray<uchar> data(width * height * 4);
for (int i = 0; i < data.size(); ++i)
data[i] = 0;
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]);
+ funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]);
} else {
QVarLengthArray<uchar> data(width * height);
for (int i = 0; i < data.size(); ++i)
@@ -144,13 +145,13 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height)
const GLint internalFormat = GL_ALPHA;
const GLenum format = GL_ALPHA;
#endif
- glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, width, height, 0, format, GL_UNSIGNED_BYTE, &data[0]);
+ funcs->glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, width, height, 0, format, GL_UNSIGNED_BYTE, &data[0]);
}
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
m_filterMode = Nearest;
if (!m_buffer.isCreated()) {
@@ -187,8 +188,9 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
return;
}
+ QOpenGLFunctions *funcs = ctx->functions();
GLint oldFbo;
- glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldFbo);
+ funcs->glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldFbo);
int oldWidth = m_textureResource->m_width;
int oldHeight = m_textureResource->m_height;
@@ -205,54 +207,53 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
if (ctx->d_func()->workaround_brokenFBOReadBack) {
QImageTextureGlyphCache::resizeTextureData(width, height);
Q_ASSERT(image().depth() == 8);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, oldHeight, GL_ALPHA, GL_UNSIGNED_BYTE, image().constBits());
- glDeleteTextures(1, &oldTexture);
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, oldHeight, GL_ALPHA, GL_UNSIGNED_BYTE, image().constBits());
+ funcs->glDeleteTextures(1, &oldTexture);
return;
}
// ### the QTextureGlyphCache API needs to be reworked to allow
// ### resizeTextureData to fail
- QOpenGLFunctions funcs(ctx);
-
- funcs.glBindFramebuffer(GL_FRAMEBUFFER, m_textureResource->m_fbo);
+ funcs->glBindFramebuffer(GL_FRAMEBUFFER, m_textureResource->m_fbo);
GLuint tmp_texture;
- glGenTextures(1, &tmp_texture);
- glBindTexture(GL_TEXTURE_2D, tmp_texture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, oldWidth, oldHeight, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ funcs->glGenTextures(1, &tmp_texture);
+ funcs->glBindTexture(GL_TEXTURE_2D, tmp_texture);
+ funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, oldWidth, oldHeight, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
m_filterMode = Nearest;
- glBindTexture(GL_TEXTURE_2D, 0);
- funcs.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D, tmp_texture, 0);
+ funcs->glBindTexture(GL_TEXTURE_2D, 0);
+ funcs->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+ GL_TEXTURE_2D, tmp_texture, 0);
- funcs.glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
- glBindTexture(GL_TEXTURE_2D, oldTexture);
+ funcs->glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
+ funcs->glBindTexture(GL_TEXTURE_2D, oldTexture);
if (pex != 0)
pex->transferMode(BrushDrawingMode);
- glDisable(GL_STENCIL_TEST);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_SCISSOR_TEST);
- glDisable(GL_BLEND);
+ funcs->glDisable(GL_STENCIL_TEST);
+ funcs->glDisable(GL_DEPTH_TEST);
+ funcs->glDisable(GL_SCISSOR_TEST);
+ funcs->glDisable(GL_BLEND);
- glViewport(0, 0, oldWidth, oldHeight);
+ funcs->glViewport(0, 0, oldWidth, oldHeight);
QOpenGLShaderProgram *blitProgram = 0;
if (pex == 0) {
if (m_blitProgram == 0) {
m_blitProgram = new QOpenGLShaderProgram(ctx);
+ const bool isCoreProfile = ctx->format().profile() == QSurfaceFormat::CoreProfile;
{
QString source;
- source.append(QLatin1String(qopenglslMainWithTexCoordsVertexShader));
- source.append(QLatin1String(qopenglslUntransformedPositionVertexShader));
+ source.append(QLatin1String(isCoreProfile ? qopenglslMainWithTexCoordsVertexShader_core : qopenglslMainWithTexCoordsVertexShader));
+ source.append(QLatin1String(isCoreProfile ? qopenglslUntransformedPositionVertexShader_core : qopenglslUntransformedPositionVertexShader));
QOpenGLShader *vertexShader = new QOpenGLShader(QOpenGLShader::Vertex, m_blitProgram);
vertexShader->compileSourceCode(source);
@@ -262,8 +263,8 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
{
QString source;
- source.append(QLatin1String(qopenglslMainFragmentShader));
- source.append(QLatin1String(qopenglslImageSrcFragmentShader));
+ source.append(QLatin1String(isCoreProfile ? qopenglslMainFragmentShader_core : qopenglslMainFragmentShader));
+ source.append(QLatin1String(isCoreProfile ? qopenglslImageSrcFragmentShader_core : qopenglslImageSrcFragmentShader));
QOpenGLShader *fragmentShader = new QOpenGLShader(QOpenGLShader::Fragment, m_blitProgram);
fragmentShader->compileSourceCode(source);
@@ -300,21 +301,21 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
blitProgram->setUniformValue("imageTexture", QT_IMAGE_TEXTURE_UNIT);
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ funcs->glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
- glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
+ funcs->glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, oldWidth, oldHeight);
+ funcs->glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, oldWidth, oldHeight);
- funcs.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_RENDERBUFFER, 0);
- glDeleteTextures(1, &tmp_texture);
- glDeleteTextures(1, &oldTexture);
+ funcs->glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+ GL_RENDERBUFFER, 0);
+ funcs->glDeleteTextures(1, &tmp_texture);
+ funcs->glDeleteTextures(1, &oldTexture);
- funcs.glBindFramebuffer(GL_FRAMEBUFFER, (GLuint)oldFbo);
+ funcs->glBindFramebuffer(GL_FRAMEBUFFER, (GLuint)oldFbo);
if (pex != 0) {
- glViewport(0, 0, pex->width, pex->height);
+ funcs->glViewport(0, 0, pex->width, pex->height);
pex->updateClipScissorTest();
} else {
if (m_vao.isCreated()) {
@@ -334,15 +335,16 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
return;
}
+ QOpenGLFunctions *funcs = ctx->functions();
if (ctx->d_func()->workaround_brokenFBOReadBack) {
QImageTextureGlyphCache::fillTexture(c, glyph, subPixelPosition);
- glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
+ funcs->glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
const QImage &texture = image();
const uchar *bits = texture.constBits();
bits += c.y * texture.bytesPerLine() + c.x;
for (int i=0; i<c.h; ++i) {
- glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, c.w, 1, GL_ALPHA, GL_UNSIGNED_BYTE, bits);
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, c.w, 1, GL_ALPHA, GL_UNSIGNED_BYTE, bits);
bits += texture.bytesPerLine();
}
return;
@@ -377,7 +379,7 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
|| mask.format() == QImage::Format_ARGB32_Premultiplied
#else
|| (mask.format() == QImage::Format_ARGB32_Premultiplied
- && QOpenGLFunctions::isES())
+ && ctx->isES())
#endif
) {
for (int y = 0; y < maskHeight; ++y) {
@@ -395,7 +397,7 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
src[x] = qRgba(r, g, b, avg);
// swizzle the bits to accommodate for the GL_RGBA upload.
#if Q_BYTE_ORDER != Q_BIG_ENDIAN
- if (QOpenGLFunctions::isES())
+ if (ctx->isES())
#endif
src[x] = ARGB2RGBA(src[x]);
}
@@ -403,18 +405,18 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
}
}
- glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
+ funcs->glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
if (mask.depth() == 32) {
#ifdef QT_OPENGL_ES_2
GLenum fmt = GL_RGBA;
#else
- GLenum fmt = QOpenGLFunctions::isES() ? GL_RGBA : GL_BGRA;
+ GLenum fmt = ctx->isES() ? GL_RGBA : GL_BGRA;
#endif // QT_OPENGL_ES_2
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
fmt = GL_RGBA;
#endif
- glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, fmt, GL_UNSIGNED_BYTE, mask.bits());
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, fmt, GL_UNSIGNED_BYTE, mask.bits());
} else {
// glTexSubImage2D() might cause some garbage to appear in the texture if the mask width is
// not a multiple of four bytes. The bug appeared on a computer with 32-bit Windows Vista
@@ -437,7 +439,7 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
#if 0
if (ctx->d_func()->workaround_brokenAlphaTexSubImage) {
for (int i = 0; i < maskHeight; ++i)
- glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, maskWidth, 1, GL_ALPHA, GL_UNSIGNED_BYTE, mask.scanLine(i));
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, maskWidth, 1, GL_ALPHA, GL_UNSIGNED_BYTE, mask.scanLine(i));
} else {
#endif
@@ -446,7 +448,7 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
#else
const GLenum format = GL_ALPHA;
#endif
- glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, format, GL_UNSIGNED_BYTE, mask.bits());
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, format, GL_UNSIGNED_BYTE, mask.bits());
#if 0
}
diff --git a/src/gui/opengl/qopengltextureglyphcache_p.h b/src/gui/opengl/qopengltextureglyphcache_p.h
index 1e2c031018..5a4a4e4c92 100644
--- a/src/gui/opengl/qopengltextureglyphcache_p.h
+++ b/src/gui/opengl/qopengltextureglyphcache_p.h
@@ -89,9 +89,9 @@ public:
qDebug("~QOpenGLGlyphTexture() %p for context %p.", this, ctx);
#endif
if (!ctx->d_func()->workaround_brokenFBOReadBack)
- QOpenGLFunctions(ctx).glDeleteFramebuffers(1, &m_fbo);
+ ctx->functions()->glDeleteFramebuffers(1, &m_fbo);
if (m_width || m_height)
- glDeleteTextures(1, &m_texture);
+ ctx->functions()->glDeleteTextures(1, &m_texture);
}
void invalidateResource()
diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/gui/opengl/qopengltexturehelper.cpp
index 1f44a81276..1d31fb5605 100644
--- a/src/gui/opengl/qopengltexturehelper.cpp
+++ b/src/gui/opengl/qopengltexturehelper.cpp
@@ -42,14 +42,13 @@
#include "qopengltexturehelper_p.h"
#include <QOpenGLContext>
-#include <QOpenGLFunctions>
QT_BEGIN_NAMESPACE
QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
{
// Resolve EXT_direct_state_access entry points if present
- if (!QOpenGLFunctions::isES()
+ if (!context->isES()
&& context->hasExtension(QByteArrayLiteral("GL_EXT_direct_state_access"))) {
TextureParameteriEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , GLint )>(context->getProcAddress(QByteArrayLiteral("glTextureParameteriEXT")));
TextureParameterivEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , const GLint *)>(context->getProcAddress(QByteArrayLiteral("glTextureParameterivEXT")));
@@ -122,7 +121,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
}
// Some DSA functions are part of NV_texture_multisample instead
- if (!QOpenGLFunctions::isES()
+ if (!context->isES()
&& context->hasExtension(QByteArrayLiteral("GL_NV_texture_multisample"))) {
TextureImage3DMultisampleNV = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLint , GLsizei , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTextureImage3DMultisampleNV")));
TextureImage2DMultisampleNV = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLint , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTextureImage2DMultisampleNV")));
@@ -138,7 +137,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
// Hence, we resolve them "the hard way"
#if defined(Q_OS_WIN) && !defined(QT_OPENGL_ES_2)
- HMODULE handle = static_cast<HMODULE>(QOpenGLFunctions::platformGLHandle());
+ HMODULE handle = static_cast<HMODULE>(QOpenGLContext::openGLModuleHandle());
if (!handle)
handle = GetModuleHandleA("opengl32.dll");
@@ -191,7 +190,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
TexSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTexSubImage1D")));
#endif
- if (QOpenGLFunctions::isES() && context->hasExtension(QByteArrayLiteral("GL_OES_texture_3D"))) {
+ if (context->isES() && context->hasExtension(QByteArrayLiteral("GL_OES_texture_3D"))) {
TexImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)>(context->getProcAddress(QByteArrayLiteral("glTexImage3DOES")));
TexSubImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*)>(context->getProcAddress(QByteArrayLiteral("glTexSubImage3DOES")));
CompressedTexImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*)>(context->getProcAddress(QByteArrayLiteral("glCompressedTexImage3DOES")));
diff --git a/src/gui/opengl/qopengltimerquery.cpp b/src/gui/opengl/qopengltimerquery.cpp
index deb88b7778..908a9cee07 100644
--- a/src/gui/opengl/qopengltimerquery.cpp
+++ b/src/gui/opengl/qopengltimerquery.cpp
@@ -124,11 +124,6 @@ public:
bool QOpenGLTimerQueryPrivate::create()
{
- if (QOpenGLFunctions::isES()) {
- qWarning("QOpenGLTimerQuery: Not supported on dynamic GL ES");
- return false;
- }
-
QOpenGLContext *ctx = QOpenGLContext::currentContext();
if (timer && context == ctx)
@@ -140,6 +135,11 @@ bool QOpenGLTimerQueryPrivate::create()
return false;
}
+ if (context->isES()) {
+ qWarning("QOpenGLTimerQuery: Not supported on OpenGL ES");
+ return false;
+ }
+
// Resolve the functions provided by OpenGL 1.5 and OpenGL 3.3 or ARB_timer_query
core = new QOpenGLQueryHelper(context);
@@ -283,7 +283,7 @@ GLuint64 QOpenGLTimerQueryPrivate::result() const
As this function's name implies, it blocks CPU execution until OpenGL notifies
that the timer query result is available. To avoid blocking, you can check
if the query result is available by calling isResultAvailable(). Note that
- modern GPUs are deeply pipelined and query results may not become availble for
+ modern GPUs are deeply pipelined and query results may not become available for
between 1-5 frames after they were issued.
Note that OpenGL does not permit nesting or interleaving of multiple timer queries
diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp
index 52fd482b53..b1fd4ffdfe 100644
--- a/src/gui/opengl/qopenglvertexarrayobject.cpp
+++ b/src/gui/opengl/qopenglvertexarrayobject.cpp
@@ -59,7 +59,7 @@ public:
QVertexArrayObjectHelper(QOpenGLContext *context)
{
Q_ASSERT(context);
- if (QOpenGLFunctions::isES()) {
+ if (context->isES()) {
GenVertexArrays = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress(QByteArrayLiteral("glGenVertexArraysOES")));
DeleteVertexArrays = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , const GLuint *)>(context->getProcAddress(QByteArrayLiteral("glDeleteVertexArraysOES")));
BindVertexArray = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint )>(context->getProcAddress(QByteArrayLiteral("glBindVertexArrayOES")));
@@ -160,7 +160,7 @@ bool QOpenGLVertexArrayObjectPrivate::create()
context = ctx;
QObject::connect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed()));
- if (QOpenGLFunctions::isES()) {
+ if (ctx->isES()) {
if (ctx->hasExtension(QByteArrayLiteral("GL_OES_vertex_array_object"))) {
vaoFuncs.helper = new QVertexArrayObjectHelper(ctx);
vaoFuncsType = OES;
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 66481d4287..3f598cd3a7 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -39,20 +39,6 @@
**
****************************************************************************/
-#if defined(__OPTIMIZE__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) \
- && (__GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__ >= 440)
-// GCC 4.4 supports #pragma GCC optimize and #pragma GCC target
-
-# if (__GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__ < 473)
-// From GCC 4.7.3 onwards, GCC optimize can result in gcc bailing out with OOM
-# pragma GCC optimize "O3"
-# endif
-
-# if defined(__i386__) && defined(__SSE2__) && !defined(__SSE2_MATH__)
-# pragma GCC target "fpmath=sse"
-# endif
-#endif
-
#include <qglobal.h>
#ifdef Q_OS_IOS
// We don't build the NEON drawhelpers as they are implemented partly
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp
index 76b6084d0e..e356a3a36a 100644
--- a/src/gui/painting/qpaintengine_blitter.cpp
+++ b/src/gui/painting/qpaintengine_blitter.cpp
@@ -690,7 +690,7 @@ void QBlitterPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const Q
}
}
-// Overriden methods to lock the graphics memory
+// Overridden methods to lock the graphics memory
void QBlitterPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
{
Q_D(QBlitterPaintEngine);
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index 15459dd748..4843e93858 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -204,7 +204,8 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
Q_UNUSED(offset);
context->makeCurrent(window);
- glViewport(0, 0, window->width(), window->height());
+ QOpenGLFunctions *funcs = context->functions();
+ funcs->glViewport(0, 0, window->width(), window->height());
if (!d_ptr->blitter) {
d_ptr->blitter = new QOpenGLTextureBlitter;
@@ -216,7 +217,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
QRect windowRect(QPoint(), window->size());
for (int i = 0; i < textures->count(); ++i) {
GLuint textureId = textures->textureId(i);
- glBindTexture(GL_TEXTURE_2D, textureId);
+ funcs->glBindTexture(GL_TEXTURE_2D, textureId);
QMatrix4x4 target = QOpenGLTextureBlitter::targetTransform(textures->geometry(i), windowRect);
d_ptr->blitter->blit(textureId, target, QOpenGLTextureBlitter::OriginBottomLeft);
@@ -226,15 +227,15 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
if (!textureId)
return;
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ funcs->glEnable(GL_BLEND);
+ funcs->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
QMatrix4x4 target = QOpenGLTextureBlitter::targetTransform(windowRect, windowRect);
d_ptr->blitter->setSwizzleRB(true);
d_ptr->blitter->blit(textureId, target, QOpenGLTextureBlitter::OriginTopLeft);
d_ptr->blitter->setSwizzleRB(false);
- glDisable(GL_BLEND);
+ funcs->glDisable(GL_BLEND);
d_ptr->blitter->release();
context->swapBuffers(window);
}
@@ -280,27 +281,29 @@ GLuint QPlatformBackingStore::toTexture(const QRegion &dirtyRegion) const
if (image.format() != QImage::Format_RGB32 && image.format() != QImage::Format_RGBA8888)
image = image.convertToFormat(QImage::Format_RGBA8888);
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
+
if (resized) {
if (d_ptr->textureId)
- glDeleteTextures(1, &d_ptr->textureId);
- glGenTextures(1, &d_ptr->textureId);
- glBindTexture(GL_TEXTURE_2D, d_ptr->textureId);
+ funcs->glDeleteTextures(1, &d_ptr->textureId);
+ funcs->glGenTextures(1, &d_ptr->textureId);
+ funcs->glBindTexture(GL_TEXTURE_2D, d_ptr->textureId);
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
+ if (!QOpenGLContext::currentContext()->isES()) {
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
}
#endif
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, imageSize.width(), imageSize.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE,
- const_cast<uchar*>(image.constBits()));
+ funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, imageSize.width(), imageSize.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE,
+ const_cast<uchar*>(image.constBits()));
d_ptr->textureSize = imageSize;
} else {
- glBindTexture(GL_TEXTURE_2D, d_ptr->textureId);
+ funcs->glBindTexture(GL_TEXTURE_2D, d_ptr->textureId);
QRect imageRect = image.rect();
QRect rect = dirtyRegion.boundingRect() & imageRect;
// if the rect is wide enough it's cheaper to just
@@ -314,11 +317,11 @@ GLuint QPlatformBackingStore::toTexture(const QRegion &dirtyRegion) const
// OpenGL instead of copying, since there's no gap between scanlines
if (rect.width() == imageRect.width()) {
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE,
- image.constScanLine(rect.y()));
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, 0, rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE,
+ image.constScanLine(rect.y()));
} else {
- glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE,
- image.copy(rect).constBits());
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE,
+ image.copy(rect).constBits());
}
}
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index f58cd1c428..beeac6bd43 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -3528,7 +3528,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
QPoint *pts; /* output buffer */
EdgeTableEntry *pPrevAET; /* ptr to previous AET */
EdgeTable ET; /* header node for ET */
- EdgeTableEntry AET; /* header node for AET */
+ EdgeTableEntry *AET; /* header node for AET */
EdgeTableEntry *pETEs; /* EdgeTableEntries pool */
ScanLineListBlock SLLBlock; /* header for scanlinelist */
int fixWAET = false;
@@ -3567,8 +3567,9 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
region->vectorize();
+ AET = new EdgeTableEntry;
pts = FirstPtBlock.pts;
- CreateETandAET(Count, Pts, &ET, &AET, pETEs, &SLLBlock);
+ CreateETandAET(Count, Pts, &ET, AET, pETEs, &SLLBlock);
pSLL = ET.scanlines.next;
curPtBlock = &FirstPtBlock;
@@ -3579,6 +3580,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
#ifndef QT_NO_DEBUG
qWarning("QRegion: creating region from big polygon failed...!");
#endif
+ delete AET;
delete region;
return 0;
}
@@ -3596,11 +3598,11 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
* get to the next edge.
*/
if (pSLL && y == pSLL->scanline) {
- loadAET(&AET, pSLL->edgelist);
+ loadAET(AET, pSLL->edgelist);
pSLL = pSLL->next;
}
- pPrevAET = &AET;
- pAET = AET.next;
+ pPrevAET = AET;
+ pAET = AET->next;
/*
* for each active edge
@@ -3626,7 +3628,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
}
EVALUATEEDGEEVENODD(pAET, pPrevAET, y)
}
- InsertionSort(&AET);
+ InsertionSort(AET);
}
} else {
/*
@@ -3638,12 +3640,12 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
* get to the next edge.
*/
if (pSLL && y == pSLL->scanline) {
- loadAET(&AET, pSLL->edgelist);
- computeWAET(&AET);
+ loadAET(AET, pSLL->edgelist);
+ computeWAET(AET);
pSLL = pSLL->next;
}
- pPrevAET = &AET;
- pAET = AET.next;
+ pPrevAET = AET;
+ pAET = AET->next;
pWETE = pAET;
/*
@@ -3681,8 +3683,8 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
* recompute the winding active edge table if
* we just resorted or have exited an edge.
*/
- if (InsertionSort(&AET) || fixWAET) {
- computeWAET(&AET);
+ if (InsertionSort(AET) || fixWAET) {
+ computeWAET(AET);
fixWAET = false;
}
}
@@ -3706,6 +3708,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
free(curPtBlock);
curPtBlock = tmpPtBlock;
}
+ delete AET;
free(pETEs);
return region;
}
diff --git a/src/gui/text/qdistancefield.cpp b/src/gui/text/qdistancefield.cpp
index f2b88c4692..17116ee2d0 100644
--- a/src/gui/text/qdistancefield.cpp
+++ b/src/gui/text/qdistancefield.cpp
@@ -739,20 +739,11 @@ bool qt_fontHasNarrowOutlines(QFontEngine *fontEngine)
if (!fe)
return false;
- const QChar uc(QLatin1Char('O'));
+ QImage im;
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &glyph;
- int numGlyphs = 1;
-
- if (!fe->stringToCMap(&uc, 1, &glyphs, &numGlyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(numGlyphs == 1);
-
- QImage im = fe->alphaMapForGlyph(glyph, QFixed(), QTransform());
+ const glyph_t glyph = fe->glyphIndex('O');
+ if (glyph != 0)
+ im = fe->alphaMapForGlyph(glyph, QFixed(), QTransform());
Q_ASSERT(fe->ref.load() == 0);
delete fe;
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 83f2d7190b..2e21a81187 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -2770,10 +2770,10 @@ void QFontCache::updateHitCountAndTimeStamp(Engine &value)
value.timestamp = ++current_timestamp;
FC_DEBUG("QFontCache: found font engine\n"
- " %p: timestamp %4u hits %3u ref %2d/%2d, type '%s'",
+ " %p: timestamp %4u hits %3u ref %2d/%2d, type %d",
value.data, value.timestamp, value.hits,
value.data->ref.load(), engineCacheCount.value(value.data),
- value.data->name());
+ value.data->type());
}
void QFontCache::insertEngine(const Key &key, QFontEngine *engine, bool insertMulti)
@@ -2969,10 +2969,10 @@ void QFontCache::timerEvent(QTimerEvent *)
it = jt;
if (it != end) {
- FC_DEBUG(" %p: timestamp %4u hits %2u ref %2d/%2d, type '%s'",
+ FC_DEBUG(" %p: timestamp %4u hits %2u ref %2d/%2d, type %d",
it.value().data, it.value().timestamp, it.value().hits,
it.value().data->ref.load(), engineCacheCount.value(it.value().data),
- it.value().data->name());
+ it.value().data->type());
QFontEngine *fontEngine = it.value().data;
// get rid of all occurrences
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index 6165554388..b78d6692b4 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -228,22 +228,32 @@ public:
void clear();
struct Key {
- Key() : script(0), screen(0) { }
- Key(const QFontDef &d, int c, int s = 0)
- : def(d), script(c), screen(s) { }
+ Key() : script(0), multi(0), screen(0) { }
+ Key(const QFontDef &d, uchar c, bool m = 0, uchar s = 0)
+ : def(d), script(c), multi(m), screen(s) { }
QFontDef def;
- int script;
- int screen;
+ uchar script;
+ uchar multi: 1;
+ uchar screen: 7;
inline bool operator<(const Key &other) const
{
if (script != other.script) return script < other.script;
if (screen != other.screen) return screen < other.screen;
+ if (multi != other.multi) return multi < other.multi;
+ if (multi && def.fallBackFamilies.size() != other.def.fallBackFamilies.size())
+ return def.fallBackFamilies.size() < other.def.fallBackFamilies.size();
return def < other.def;
}
inline bool operator==(const Key &other) const
- { return def == other.def && script == other.script && screen == other.screen; }
+ {
+ return script == other.script
+ && screen == other.screen
+ && multi == other.multi
+ && (!multi || def.fallBackFamilies.size() == other.def.fallBackFamilies.size())
+ && def == other.def;
+ }
};
// QFontEngineData cache
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 61c93dc2ac..02b9e6d25c 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -55,6 +55,8 @@
#include <qpa/qplatformfontdatabase.h>
#include <qpa/qplatformtheme.h>
+#include <QtCore/qmath.h>
+
#include <stdlib.h>
#include <limits.h>
#include <algorithm>
@@ -418,6 +420,7 @@ void QFontDatabasePrivate::invalidate()
{
QFontCache::instance()->clear();
free();
+ QGuiApplicationPrivate::platformIntegration()->fontDatabase()->invalidate();
emit static_cast<QGuiApplication *>(QCoreApplication::instance())->fontDatabaseChanged();
}
@@ -654,9 +657,201 @@ QMutex *qt_fontdatabase_mutex()
return fontDatabaseMutex();
}
-QT_BEGIN_INCLUDE_NAMESPACE
-# include "qfontdatabase_qpa.cpp"
-QT_END_INCLUDE_NAMESPACE
+
+void qt_registerFont(const QString &familyName, const QString &stylename,
+ const QString &foundryname, int weight,
+ QFont::Style style, int stretch, bool antialiased,
+ bool scalable, int pixelSize, bool fixedPitch,
+ const QSupportedWritingSystems &writingSystems, void *handle)
+{
+ QFontDatabasePrivate *d = privateDb();
+// qDebug() << "Adding font" << familyName << weight << style << pixelSize << antialiased;
+ QtFontStyle::Key styleKey;
+ styleKey.style = style;
+ styleKey.weight = weight;
+ styleKey.stretch = stretch;
+ QtFontFamily *f = d->family(familyName, true);
+ f->fixedPitch = fixedPitch;
+
+ for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) {
+ if (writingSystems.supported(QFontDatabase::WritingSystem(i)))
+ f->writingSystems[i] = QtFontFamily::Supported;
+ }
+
+ QtFontFoundry *foundry = f->foundry(foundryname, true);
+ QtFontStyle *fontStyle = foundry->style(styleKey, stylename, true);
+ fontStyle->smoothScalable = scalable;
+ fontStyle->antialiased = antialiased;
+ QtFontSize *size = fontStyle->pixelSize(pixelSize ? pixelSize : SMOOTH_SCALABLE, true);
+ if (size->handle) {
+ QPlatformIntegration *integration = QGuiApplicationPrivate::platformIntegration();
+ if (integration)
+ integration->fontDatabase()->releaseHandle(size->handle);
+ }
+ size->handle = handle;
+}
+
+void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias)
+{
+ if (alias.isEmpty())
+ return;
+
+ QFontDatabasePrivate *d = privateDb();
+ QtFontFamily *f = d->family(familyName, false);
+ if (!f)
+ return;
+
+ if (f->aliases.contains(alias, Qt::CaseInsensitive))
+ return;
+
+ f->aliases.push_back(alias);
+}
+
+QString qt_resolveFontFamilyAlias(const QString &alias)
+{
+ if (!alias.isEmpty()) {
+ const QFontDatabasePrivate *d = privateDb();
+ for (int i = 0; i < d->count; ++i)
+ if (d->families[i]->matchesFamilyName(alias))
+ return d->families[i]->name;
+ }
+ return alias;
+}
+
+static QStringList fallbackFamilies(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
+{
+ QStringList retList = QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(family,style,styleHint,script);
+ QFontDatabasePrivate *db = privateDb();
+
+ QStringList::iterator i;
+ for (i = retList.begin(); i != retList.end(); ++i) {
+ bool contains = false;
+ for (int j = 0; j < db->count; j++) {
+ if (db->families[j]->matchesFamilyName(*i)) {
+ contains = true;
+ break;
+ }
+ }
+ if (!contains) {
+ i = retList.erase(i);
+ i--;
+ }
+ }
+ return retList;
+}
+
+static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt);
+
+static void initializeDb()
+{
+ QFontDatabasePrivate *db = privateDb();
+
+ // init by asking for the platformfontdb for the first time or after invalidation
+ if (!db->count)
+ QGuiApplicationPrivate::platformIntegration()->fontDatabase()->populateFontDatabase();
+
+ if (db->reregisterAppFonts) {
+ for (int i = 0; i < db->applicationFonts.count(); i++) {
+ if (!db->applicationFonts.at(i).families.isEmpty())
+ registerFont(&db->applicationFonts[i]);
+ }
+ db->reregisterAppFonts = false;
+ }
+}
+
+static inline void load(const QString & = QString(), int = -1)
+{
+ // Only initialize the database if it has been cleared or not initialized yet
+ if (!privateDb()->count)
+ initializeDb();
+}
+
+static
+QFontEngine *loadSingleEngine(int script,
+ const QFontDef &request,
+ QtFontFoundry *foundry,
+ QtFontStyle *style, QtFontSize *size)
+{
+ Q_UNUSED(foundry);
+
+ Q_ASSERT(size);
+ QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
+ int pixelSize = size->pixelSize;
+ if (!pixelSize || (style->smoothScalable && pixelSize == SMOOTH_SCALABLE)
+ || pfdb->fontsAlwaysScalable()) {
+ pixelSize = request.pixelSize;
+ }
+
+ QFontDef def = request;
+ def.pixelSize = pixelSize;
+
+ QFontCache::Key key(def,script);
+ QFontEngine *engine = QFontCache::instance()->findEngine(key);
+ if (!engine) {
+ engine = pfdb->fontEngine(def, size->handle);
+ if (engine) {
+ Q_ASSERT(engine->type() != QFontEngine::Multi);
+ // Also check for OpenType tables when using complex scripts
+ if (!engine->supportsScript(QChar::Script(script))) {
+ qWarning(" OpenType support missing for script %d", script);
+ if (engine->ref.load() == 0)
+ delete engine;
+ return 0;
+ }
+
+ QFontCache::instance()->insertEngine(key, engine);
+ }
+ }
+ return engine;
+}
+
+static
+QFontEngine *loadEngine(int script, const QFontDef &request,
+ QtFontFamily *family, QtFontFoundry *foundry,
+ QtFontStyle *style, QtFontSize *size)
+{
+ QFontEngine *engine = loadSingleEngine(script, request, foundry, style, size);
+ Q_ASSERT(!engine || engine->type() != QFontEngine::Multi);
+ if (engine && !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol) {
+ // make sure that the db has all fallback families
+ if (family && !family->askedForFallback) {
+ QFont::Style fontStyle = QFont::Style(style->key.style);
+ QFont::StyleHint styleHint = QFont::StyleHint(request.styleHint);
+ if (styleHint == QFont::AnyStyle && request.fixedPitch)
+ styleHint = QFont::TypeWriter;
+ family->fallbackFamilies = fallbackFamilies(family->name, fontStyle, styleHint, QChar::Script(script));
+
+ family->askedForFallback = true;
+ }
+
+ QStringList fallbacks = request.fallBackFamilies;
+ if (family && !family->fallbackFamilies.isEmpty())
+ fallbacks += family->fallbackFamilies;
+ else
+ fallbacks += privateDb()->fallbackFamilies;
+
+ QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
+ QFontEngineMulti *pfMultiEngine = pfdb->fontEngineMulti(engine, QChar::Script(script));
+ pfMultiEngine->setFallbackFamiliesList(fallbacks);
+ engine = pfMultiEngine;
+
+ // Cache Multi font engine as well in case we got the single
+ // font engine when we are actually looking for a Multi one
+ QFontCache::Key key(request, script, 1);
+ QFontCache::instance()->insertEngine(key, engine);
+ }
+
+ return engine;
+}
+
+static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
+{
+ QFontDatabasePrivate *db = privateDb();
+
+ fnt->families = QGuiApplicationPrivate::platformIntegration()->fontDatabase()->addApplicationFont(fnt->data,fnt->fileName);
+
+ db->reregisterAppFonts = true;
+}
static QtFontStyle *bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &styleKey,
const QString &styleName = QString())
@@ -1032,6 +1227,9 @@ QString QFontDatabase::styleString(const QFontInfo &fontInfo)
*/
QFontDatabase::QFontDatabase()
{
+ if (!qApp || !QGuiApplicationPrivate::platformIntegration())
+ qFatal("QFontDatabase: Must construct a QGuiApplication before accessing QFontDatabase");
+
QMutexLocker locker(fontDatabaseMutex());
createDatabase();
d = privateDb();
@@ -2146,6 +2344,20 @@ QFont QFontDatabase::systemFont(QFontDatabase::SystemFont type)
\sa removeAllApplicationFonts(), addApplicationFont(),
addApplicationFontFromData()
*/
+bool QFontDatabase::removeApplicationFont(int handle)
+{
+ QMutexLocker locker(fontDatabaseMutex());
+
+ QFontDatabasePrivate *db = privateDb();
+ if (handle < 0 || handle >= db->applicationFonts.count())
+ return false;
+
+ db->applicationFonts[handle] = QFontDatabasePrivate::ApplicationFont();
+
+ db->reregisterAppFonts = true;
+ db->invalidate();
+ return true;
+}
/*!
\fn bool QFontDatabase::removeAllApplicationFonts()
@@ -2159,6 +2371,18 @@ QFont QFontDatabase::systemFont(QFontDatabase::SystemFont type)
\sa removeApplicationFont(), addApplicationFont(), addApplicationFontFromData()
*/
+bool QFontDatabase::removeAllApplicationFonts()
+{
+ QMutexLocker locker(fontDatabaseMutex());
+
+ QFontDatabasePrivate *db = privateDb();
+ if (db->applicationFonts.isEmpty())
+ return false;
+
+ db->applicationFonts.clear();
+ db->invalidate();
+ return true;
+}
/*!
\fn bool QFontDatabase::supportsThreadedFontRendering()
@@ -2174,6 +2398,200 @@ QFont QFontDatabase::systemFont(QFontDatabase::SystemFont type)
\sa {Thread-Support in Qt Modules#Painting In Threads}{Painting In Threads}
*/
+// QT_DEPRECATED_SINCE(5, 2)
+bool QFontDatabase::supportsThreadedFontRendering()
+{
+ return true;
+}
+
+/*!
+ \internal
+*/
+QFontEngine *
+QFontDatabase::findFont(int script, const QFontPrivate *fp,
+ const QFontDef &request, bool multi)
+{
+ QMutexLocker locker(fontDatabaseMutex());
+
+ const int force_encoding_id = -1;
+
+ if (!privateDb()->count)
+ initializeDb();
+
+ QFontEngine *engine;
+ QFontCache::Key key(request, script, multi ? 1 : 0);
+ engine = QFontCache::instance()->findEngine(key);
+ if (engine) {
+ FM_DEBUG("Cache hit level 1");
+ return engine;
+ }
+
+ QString family_name, foundry_name;
+
+ parseFontName(request.family, foundry_name, family_name);
+
+ if (qt_enable_test_font && request.family == QLatin1String("__Qt__Box__Engine__")) {
+ engine =new QTestFontEngine(request.pixelSize);
+ engine->fontDef = request;
+ }
+
+ QtFontDesc desc;
+ QList<int> blackListed;
+ int index = match(script, request, family_name, foundry_name, force_encoding_id, &desc, blackListed);
+ if (index >= 0) {
+ engine = loadEngine(script, request, desc.family, desc.foundry, desc.style, desc.size);
+ if (!engine)
+ blackListed.append(index);
+ } else {
+ FM_DEBUG(" NO MATCH FOUND\n");
+ }
+
+ if (engine && engine->type() != QFontEngine::TestFontEngine) {
+ initFontDef(desc, request, &engine->fontDef, engine->type() == QFontEngine::Multi);
+
+ if (fp) {
+ QFontDef def = request;
+ if (def.family.isEmpty()) {
+ def.family = fp->request.family;
+ def.family = def.family.left(def.family.indexOf(QLatin1Char(',')));
+ }
+ }
+ }
+
+ if (!engine) {
+ if (!request.family.isEmpty()) {
+ QStringList fallbacks = request.fallBackFamilies
+ + fallbackFamilies(request.family,
+ QFont::Style(request.style),
+ QFont::StyleHint(request.styleHint),
+ QChar::Script(script));
+ if (script > QChar::Script_Common)
+ fallbacks += QString(); // Find the first font matching the specified script.
+
+ for (int i = 0; !engine && i < fallbacks.size(); i++) {
+ QFontDef def = request;
+ def.family = fallbacks.at(i);
+ QFontCache::Key key(def, script, multi ? 1 : 0);
+ engine = QFontCache::instance()->findEngine(key);
+ if (!engine) {
+ QtFontDesc desc;
+ do {
+ index = match(script, def, def.family, QLatin1String(""), 0, &desc, blackListed);
+ if (index >= 0) {
+ QFontDef loadDef = def;
+ if (loadDef.family.isEmpty())
+ loadDef.family = desc.family->name;
+ engine = loadEngine(script, loadDef, desc.family, desc.foundry, desc.style, desc.size);
+ if (engine)
+ initFontDef(desc, loadDef, &engine->fontDef, engine->type() == QFontEngine::Multi);
+ else
+ blackListed.append(index);
+ }
+ } while (index >= 0 && !engine);
+ }
+ }
+ }
+
+ if (!engine)
+ engine = new QFontEngineBox(request.pixelSize);
+
+ FM_DEBUG("returning box engine");
+ }
+
+ if (fp && fp->dpi > 0) {
+ engine->fontDef.pointSize = qreal(double((engine->fontDef.pixelSize * 72) / fp->dpi));
+ } else {
+ engine->fontDef.pointSize = request.pointSize;
+ }
+
+ return engine;
+}
+
+void QFontDatabase::load(const QFontPrivate *d, int script)
+{
+ QFontDef req = d->request;
+
+ if (req.pixelSize == -1) {
+ req.pixelSize = floor(((req.pointSize * d->dpi) / 72) * 100 + 0.5) / 100;
+ req.pixelSize = qRound(req.pixelSize);
+ }
+ if (req.pointSize < 0)
+ req.pointSize = req.pixelSize*72.0/d->dpi;
+ if (req.weight == 0)
+ req.weight = QFont::Normal;
+ if (req.stretch == 0)
+ req.stretch = 100;
+
+ // Until we specifically asked not to, try looking for Multi font engine
+ // first, the last '1' indicates that we want Multi font engine instead
+ // of single ones
+ bool multi = !(req.styleStrategy & QFont::NoFontMerging);
+ QFontCache::Key key(req, script, multi ? 1 : 0);
+
+ if (!d->engineData)
+ getEngineData(d, req);
+
+ // the cached engineData could have already loaded the engine we want
+ if (d->engineData->engines[script])
+ return;
+
+ QFontEngine *fe = QFontCache::instance()->findEngine(key);
+
+ // list of families to try
+ QStringList family_list;
+
+ if (!req.family.isEmpty()) {
+ QStringList familiesForRequest = familyList(req);
+
+ // Add primary selection
+ family_list << familiesForRequest.takeFirst();
+
+ // Fallbacks requested in font request
+ req.fallBackFamilies = familiesForRequest;
+
+ // add the default family
+ QString defaultFamily = QGuiApplication::font().family();
+ if (! family_list.contains(defaultFamily))
+ family_list << defaultFamily;
+
+ }
+
+ // null family means find the first font matching the specified script
+ family_list << QString();
+
+ QStringList::ConstIterator it = family_list.constBegin(), end = family_list.constEnd();
+ for (; !fe && it != end; ++it) {
+ req.family = *it;
+
+ fe = QFontDatabase::findFont(script, d, req, multi);
+ if (fe && (fe->type()==QFontEngine::Box) && !req.family.isEmpty()) {
+ if (fe->ref.load() == 0)
+ delete fe;
+
+ fe = 0;
+ }
+
+ // No need to check requested fallback families again
+ req.fallBackFamilies.clear();
+ }
+
+ if (fe->symbol || (d->request.styleStrategy & QFont::NoFontMerging)) {
+ for (int i = 0; i < QChar::ScriptCount; ++i) {
+ if (!d->engineData->engines[i]) {
+ d->engineData->engines[i] = fe;
+ fe->ref.ref();
+ }
+ }
+ } else {
+ d->engineData->engines[script] = fe;
+ fe->ref.ref();
+ }
+}
+
+QString QFontDatabase::resolveFontFamilyAlias(const QString &family)
+{
+ return QGuiApplicationPrivate::platformIntegration()->fontDatabase()->resolveFontFamilyAlias(family);
+}
QT_END_NAMESPACE
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
deleted file mode 100644
index 1972f5d58c..0000000000
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ /dev/null
@@ -1,472 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtGui module 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 "qlibraryinfo.h"
-#include <QtCore/qsettings.h>
-
-#include "qfontengine_qpa_p.h"
-#include "qplatformdefs.h"
-
-#include <QtGui/private/qguiapplication_p.h>
-#include <qpa/qplatformfontdatabase.h>
-
-#include <QtCore/qmath.h>
-
-QT_BEGIN_NAMESPACE
-
-void qt_registerFont(const QString &familyName, const QString &stylename,
- const QString &foundryname, int weight,
- QFont::Style style, int stretch, bool antialiased,
- bool scalable, int pixelSize, bool fixedPitch,
- const QSupportedWritingSystems &writingSystems, void *handle)
-{
- QFontDatabasePrivate *d = privateDb();
-// qDebug() << "Adding font" << familyName << weight << style << pixelSize << antialiased;
- QtFontStyle::Key styleKey;
- styleKey.style = style;
- styleKey.weight = weight;
- styleKey.stretch = stretch;
- QtFontFamily *f = d->family(familyName, true);
- f->fixedPitch = fixedPitch;
-
- for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) {
- if (writingSystems.supported(QFontDatabase::WritingSystem(i)))
- f->writingSystems[i] = QtFontFamily::Supported;
- }
-
- QtFontFoundry *foundry = f->foundry(foundryname, true);
- QtFontStyle *fontStyle = foundry->style(styleKey, stylename, true);
- fontStyle->smoothScalable = scalable;
- fontStyle->antialiased = antialiased;
- QtFontSize *size = fontStyle->pixelSize(pixelSize ? pixelSize : SMOOTH_SCALABLE, true);
- if (size->handle) {
- QPlatformIntegration *integration = QGuiApplicationPrivate::platformIntegration();
- if (integration)
- integration->fontDatabase()->releaseHandle(size->handle);
- }
- size->handle = handle;
-}
-
-void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias)
-{
- if (alias.isEmpty())
- return;
-
- QFontDatabasePrivate *d = privateDb();
- QtFontFamily *f = d->family(familyName, false);
- if (!f)
- return;
-
- if (f->aliases.contains(alias, Qt::CaseInsensitive))
- return;
-
- f->aliases.push_back(alias);
-}
-
-QString qt_resolveFontFamilyAlias(const QString &alias)
-{
- if (!alias.isEmpty()) {
- const QFontDatabasePrivate *d = privateDb();
- for (int i = 0; i < d->count; ++i)
- if (d->families[i]->matchesFamilyName(alias))
- return d->families[i]->name;
- }
- return alias;
-}
-
-static QStringList fallbackFamilies(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
-{
- QStringList retList = QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(family,style,styleHint,script);
- QFontDatabasePrivate *db = privateDb();
-
- QStringList::iterator i;
- for (i = retList.begin(); i != retList.end(); ++i) {
- bool contains = false;
- for (int j = 0; j < db->count; j++) {
- if (db->families[j]->matchesFamilyName(*i)) {
- contains = true;
- break;
- }
- }
- if (!contains) {
- i = retList.erase(i);
- i--;
- }
- }
- return retList;
-}
-
-static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt);
-
-static void initializeDb()
-{
- QFontDatabasePrivate *db = privateDb();
-
- // init by asking for the platformfontdb for the first time or after invalidation
- if (!db->count)
- QGuiApplicationPrivate::platformIntegration()->fontDatabase()->populateFontDatabase();
-
- if (db->reregisterAppFonts) {
- for (int i = 0; i < db->applicationFonts.count(); i++) {
- if (!db->applicationFonts.at(i).families.isEmpty())
- registerFont(&db->applicationFonts[i]);
- }
- db->reregisterAppFonts = false;
- }
-}
-
-static inline void load(const QString & = QString(), int = -1)
-{
- // Only initialize the database if it has been cleared or not initialized yet
- if (!privateDb()->count)
- initializeDb();
-}
-
-static
-QFontEngine *loadSingleEngine(int script,
- const QFontDef &request,
- QtFontFoundry *foundry,
- QtFontStyle *style, QtFontSize *size)
-{
- Q_UNUSED(foundry);
-
- Q_ASSERT(size);
- QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
- int pixelSize = size->pixelSize;
- if (!pixelSize || (style->smoothScalable && pixelSize == SMOOTH_SCALABLE)
- || pfdb->fontsAlwaysScalable()) {
- pixelSize = request.pixelSize;
- }
-
- QFontDef def = request;
- def.pixelSize = pixelSize;
-
- QFontCache::Key key(def,script);
- QFontEngine *engine = QFontCache::instance()->findEngine(key);
- if (!engine) {
- engine = pfdb->fontEngine(def, size->handle);
- if (engine) {
- // Also check for OpenType tables when using complex scripts
- if (!engine->supportsScript(QChar::Script(script))) {
- qWarning(" OpenType support missing for script %d", script);
- if (engine->ref.load() == 0)
- delete engine;
- return 0;
- }
-
- QFontCache::instance()->insertEngine(key, engine);
- }
- }
- return engine;
-}
-
-static
-QFontEngine *loadEngine(int script, const QFontDef &request,
- QtFontFamily *family, QtFontFoundry *foundry,
- QtFontStyle *style, QtFontSize *size)
-{
-
- QFontEngine *engine = loadSingleEngine(script, request, foundry, style, size);
- //make sure that the db has all fallback families
- if (engine && engine->type() != QFontEngine::Multi
- && !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol ) {
-
- if (family && !family->askedForFallback) {
- QFont::Style fontStyle = QFont::Style(style->key.style);
- QFont::StyleHint styleHint = QFont::StyleHint(request.styleHint);
- if (styleHint == QFont::AnyStyle && request.fixedPitch)
- styleHint = QFont::TypeWriter;
- family->fallbackFamilies = fallbackFamilies(family->name, fontStyle, styleHint, QChar::Script(script));
-
- family->askedForFallback = true;
- }
-
- QStringList fallbacks = privateDb()->fallbackFamilies;
- if (family && !family->fallbackFamilies.isEmpty())
- fallbacks = family->fallbackFamilies;
-
- QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
- QFontEngineMulti *pfMultiEngine = pfdb->fontEngineMulti(engine, QChar::Script(script));
- pfMultiEngine->setFallbackFamiliesList(fallbacks);
- engine = pfMultiEngine;
-
- // Cache Multi font engine as well in case we got the single
- // font engine when we are actually looking for a Multi one
- QFontCache::Key key(request, script, 1);
- QFontCache::instance()->insertEngine(key, engine);
- }
-
- return engine;
-}
-
-static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
-{
- QFontDatabasePrivate *db = privateDb();
-
- fnt->families = QGuiApplicationPrivate::platformIntegration()->fontDatabase()->addApplicationFont(fnt->data,fnt->fileName);
-
- db->reregisterAppFonts = true;
-}
-
-bool QFontDatabase::removeApplicationFont(int handle)
-{
- QMutexLocker locker(fontDatabaseMutex());
-
- QFontDatabasePrivate *db = privateDb();
- if (handle < 0 || handle >= db->applicationFonts.count())
- return false;
-
- db->applicationFonts[handle] = QFontDatabasePrivate::ApplicationFont();
-
- db->reregisterAppFonts = true;
- db->invalidate();
- return true;
-}
-
-bool QFontDatabase::removeAllApplicationFonts()
-{
- QMutexLocker locker(fontDatabaseMutex());
-
- QFontDatabasePrivate *db = privateDb();
- if (db->applicationFonts.isEmpty())
- return false;
-
- db->applicationFonts.clear();
- db->invalidate();
- return true;
-}
-
-// QT_DEPRECATED_SINCE(5, 2)
-bool QFontDatabase::supportsThreadedFontRendering()
-{
- return true;
-}
-
-/*!
- \internal
-*/
-QFontEngine *
-QFontDatabase::findFont(int script, const QFontPrivate *fp,
- const QFontDef &request, bool multi)
-{
- QMutexLocker locker(fontDatabaseMutex());
-
- const int force_encoding_id = -1;
-
- if (!privateDb()->count)
- initializeDb();
-
- QFontEngine *engine;
- QFontCache::Key key(request, script, multi ? 1 : 0);
- engine = QFontCache::instance()->findEngine(key);
- if (engine) {
- FM_DEBUG("Cache hit level 1");
- return engine;
- }
-
- QString family_name, foundry_name;
-
- parseFontName(request.family, foundry_name, family_name);
-
- if (qt_enable_test_font && request.family == QLatin1String("__Qt__Box__Engine__")) {
- engine =new QTestFontEngine(request.pixelSize);
- engine->fontDef = request;
- }
-
- QtFontDesc desc;
- QList<int> blackListed;
- int index = match(script, request, family_name, foundry_name, force_encoding_id, &desc, blackListed);
- if (index >= 0) {
- engine = loadEngine(script, request, desc.family, desc.foundry, desc.style, desc.size);
- if (!engine)
- blackListed.append(index);
- } else {
- FM_DEBUG(" NO MATCH FOUND\n");
- }
-
- if (engine && engine->type() != QFontEngine::TestFontEngine) {
- initFontDef(desc, request, &engine->fontDef, engine->type() == QFontEngine::Multi);
-
- if (fp) {
- QFontDef def = request;
- if (def.family.isEmpty()) {
- def.family = fp->request.family;
- def.family = def.family.left(def.family.indexOf(QLatin1Char(',')));
- }
- }
- }
-
- if (!engine) {
- if (!request.family.isEmpty()) {
- QStringList fallbacks = request.fallBackFamilies
- + fallbackFamilies(request.family,
- QFont::Style(request.style),
- QFont::StyleHint(request.styleHint),
- QChar::Script(script));
- if (script > QChar::Script_Common)
- fallbacks += QString(); // Find the first font matching the specified script.
-
- for (int i = 0; !engine && i < fallbacks.size(); i++) {
- QFontDef def = request;
- def.family = fallbacks.at(i);
- QFontCache::Key key(def, script, multi ? 1 : 0);
- engine = QFontCache::instance()->findEngine(key);
- if (!engine) {
- QtFontDesc desc;
- do {
- index = match(script, def, def.family, QLatin1String(""), 0, &desc, blackListed);
- if (index >= 0) {
- QFontDef loadDef = def;
- if (loadDef.family.isEmpty())
- loadDef.family = desc.family->name;
- engine = loadEngine(script, loadDef, desc.family, desc.foundry, desc.style, desc.size);
- if (engine)
- initFontDef(desc, loadDef, &engine->fontDef, engine->type() == QFontEngine::Multi);
- else
- blackListed.append(index);
- }
- } while (index >= 0 && !engine);
- }
- }
- }
-
- if (!engine)
- engine = new QFontEngineBox(request.pixelSize);
-
- FM_DEBUG("returning box engine");
- }
-
- if (fp && fp->dpi > 0) {
- engine->fontDef.pointSize = qreal(double((engine->fontDef.pixelSize * 72) / fp->dpi));
- } else {
- engine->fontDef.pointSize = request.pointSize;
- }
-
- return engine;
-}
-
-void QFontDatabase::load(const QFontPrivate *d, int script)
-{
- QFontDef req = d->request;
-
- if (req.pixelSize == -1) {
- req.pixelSize = floor(((req.pointSize * d->dpi) / 72) * 100 + 0.5) / 100;
- req.pixelSize = qRound(req.pixelSize);
- }
- if (req.pointSize < 0)
- req.pointSize = req.pixelSize*72.0/d->dpi;
- if (req.weight == 0)
- req.weight = QFont::Normal;
- if (req.stretch == 0)
- req.stretch = 100;
-
- // Until we specifically asked not to, try looking for Multi font engine
- // first, the last '1' indicates that we want Multi font engine instead
- // of single ones
- bool multi = !(req.styleStrategy & QFont::NoFontMerging);
- QFontCache::Key key(req, script, multi ? 1 : 0);
-
- if (!d->engineData)
- getEngineData(d, req);
-
- // the cached engineData could have already loaded the engine we want
- if (d->engineData->engines[script])
- return;
-
- QFontEngine *fe = QFontCache::instance()->findEngine(key);
-
- // list of families to try
- QStringList family_list;
-
- if (!req.family.isEmpty()) {
- QStringList familiesForRequest = familyList(req);
-
- // Add primary selection
- family_list << familiesForRequest.takeFirst();
-
- // Fallbacks requested in font request
- req.fallBackFamilies = familiesForRequest;
-
- // add the default family
- QString defaultFamily = QGuiApplication::font().family();
- if (! family_list.contains(defaultFamily))
- family_list << defaultFamily;
-
- }
-
- // null family means find the first font matching the specified script
- family_list << QString();
-
- QStringList::ConstIterator it = family_list.constBegin(), end = family_list.constEnd();
- for (; !fe && it != end; ++it) {
- req.family = *it;
-
- fe = QFontDatabase::findFont(script, d, req, multi);
- if (fe && (fe->type()==QFontEngine::Box) && !req.family.isEmpty()) {
- if (fe->ref.load() == 0)
- delete fe;
-
- fe = 0;
- }
-
- // No need to check requested fallback families again
- req.fallBackFamilies.clear();
- }
-
- if (fe->symbol || (d->request.styleStrategy & QFont::NoFontMerging)) {
- for (int i = 0; i < QChar::ScriptCount; ++i) {
- if (!d->engineData->engines[i]) {
- d->engineData->engines[i] = fe;
- fe->ref.ref();
- }
- }
- } else {
- d->engineData->engines[script] = fe;
- fe->ref.ref();
- }
-}
-
-QString QFontDatabase::resolveFontFamilyAlias(const QString &family)
-{
- return QGuiApplicationPrivate::platformIntegration()->fontDatabase()->resolveFontFamilyAlias(family);
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 83e64a51a6..a72ac23418 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -101,35 +101,13 @@ static HB_Bool hb_stringToGlyphs(HB_Font font, const HB_UChar16 *string, hb_uint
*numGlyphs = nGlyphs;
if (rightToLeft && result && !fe->symbol) {
- uint glyph_pos = 0;
- for (uint i = 0; i < length; ++i, ++glyph_pos) {
- uint ucs4 = str[i].unicode();
- if (Q_UNLIKELY(QChar::isHighSurrogate(ucs4) && i + 1 < length)) {
- uint low = str[i + 1].unicode();
- if (Q_LIKELY(QChar::isLowSurrogate(low))) {
- ucs4 = QChar::surrogateToUcs4(ucs4, low);
- ++i;
- }
- }
-
- uint mirrored = QChar::mirroredChar(ucs4);
- if (Q_UNLIKELY(mirrored != ucs4)) {
- QChar chars[2];
- uint numChars = 0;
- if (Q_UNLIKELY(QChar::requiresSurrogates(mirrored))) {
- chars[numChars++] = QChar(QChar::highSurrogate(mirrored));
- chars[numChars++] = QChar(QChar::lowSurrogate(mirrored));
- } else {
- chars[numChars++] = QChar(mirrored);
- }
-
- qglyphs.numGlyphs = numChars;
- qglyphs.glyphs = glyphs + glyph_pos;
- nGlyphs = numChars;
- if (!fe->stringToCMap(chars, numChars, &qglyphs, &nGlyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nGlyphs == 1);
- }
+ QStringIterator it(str, str + length);
+ while (it.hasNext()) {
+ const uint ucs4 = it.next();
+ const uint mirrored = QChar::mirroredChar(ucs4);
+ if (Q_UNLIKELY(mirrored != ucs4))
+ *glyphs = fe->glyphIndex(mirrored);
+ ++glyphs;
}
}
@@ -242,8 +220,8 @@ Q_AUTOTEST_EXPORT QList<QFontEngine *> QFontEngine_stopCollectingEngines()
// QFontEngine
-QFontEngine::QFontEngine()
- : ref(0),
+QFontEngine::QFontEngine(Type type)
+ : m_type(type), ref(0),
font_(0), font_destroy_func(0),
face_(0), face_destroy_func(0)
{
@@ -359,6 +337,15 @@ bool QFontEngine::supportsScript(QChar::Script script) const
return true;
}
+#ifdef Q_OS_MAC
+ {
+ // in AAT fonts, 'gsub' table is effectively replaced by 'mort'/'morx' table
+ uint len;
+ if (getSfntTableData(MAKE_TAG('m','o','r','t'), 0, &len) || getSfntTableData(MAKE_TAG('m','o','r','x'), 0, &len))
+ return true;
+ }
+#endif
+
#ifdef QT_ENABLE_HARFBUZZ_NG
if (useHarfbuzzNG) {
bool ret = false;
@@ -385,6 +372,17 @@ bool QFontEngine::supportsScript(QChar::Script script) const
return hbFace->supported_scripts[script_to_hbscript(script)];
}
+bool QFontEngine::canRender(const QChar *str, int len) const
+{
+ QStringIterator it(str, str + len);
+ while (it.hasNext()) {
+ if (glyphIndex(it.next()) == 0)
+ return false;
+ }
+
+ return true;
+}
+
glyph_metrics_t QFontEngine::boundingBox(glyph_t glyph, const QTransform &matrix)
{
glyph_metrics_t metrics = boundingBox(glyph);
@@ -397,38 +395,14 @@ glyph_metrics_t QFontEngine::boundingBox(glyph_t glyph, const QTransform &matrix
QFixed QFontEngine::xHeight() const
{
- QChar x((ushort)'x');
-
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &glyph;
-
- int nglyphs = 1;
- if (!stringToCMap(&x, 1, &glyphs, &nglyphs, GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
-
+ const glyph_t glyph = glyphIndex('x');
glyph_metrics_t bb = const_cast<QFontEngine *>(this)->boundingBox(glyph);
return bb.height;
}
QFixed QFontEngine::averageCharWidth() const
{
- QChar x((ushort)'x');
-
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &glyph;
-
- int nglyphs = 1;
- if (!stringToCMap(&x, 1, &glyphs, &nglyphs, GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
-
+ const glyph_t glyph = glyphIndex('x');
glyph_metrics_t bb = const_cast<QFontEngine *>(this)->boundingBox(glyph);
return bb.xoff;
}
@@ -489,18 +463,14 @@ void QFontEngine::getGlyphPositions(const QGlyphLayout &glyphs, const QTransform
if (glyphs.justifications[i].nKashidas) {
QChar ch(0x640); // Kashida character
- glyph_t kashidaGlyph;
+ glyph_t kashidaGlyph = glyphIndex(ch.unicode());
QFixed kashidaWidth;
QGlyphLayout g;
g.numGlyphs = 1;
g.glyphs = &kashidaGlyph;
g.advances = &kashidaWidth;
-
- int nglyphs = 1;
- if (!stringToCMap(&ch, 1, &g, &nglyphs, 0))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ recalcAdvances(&g, 0);
for (uint k = 0; k < glyphs.justifications[i].nKashidas; ++k) {
xpos -= kashidaWidth;
@@ -937,14 +907,31 @@ void QFontEngine::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metr
addGlyphsToPath(&glyph, &p, 1, path, QFlag(0));
}
+/*!
+ Returns \c true if the font table idetified by \a tag exists in the font;
+ returns \c false otherwise.
+
+ If \a buffer is NULL, stores the size of the buffer required for the font table data,
+ in bytes, in \a length. If \a buffer is not NULL and the capacity
+ of the buffer, passed in \a length, is sufficient to store the font table data,
+ also copies the font table data to \a buffer.
+
+ Note: returning \c false when the font table exists could lead to an undefined behavior.
+*/
+bool QFontEngine::getSfntTableData(uint tag, uchar *buffer, uint *length) const
+{
+ Q_UNUSED(tag)
+ Q_UNUSED(buffer)
+ Q_UNUSED(length)
+ return false;
+}
+
QByteArray QFontEngine::getSfntTable(uint tag) const
{
QByteArray table;
uint len = 0;
if (!getSfntTableData(tag, 0, &len))
return table;
- if (!len)
- return table;
table.resize(len);
if (!getSfntTableData(tag, reinterpret_cast<uchar *>(table.data()), &len))
return QByteArray();
@@ -1382,7 +1369,15 @@ QFontEngine::GlyphCacheEntry &QFontEngine::GlyphCacheEntry::operator=(const Glyp
// ------------------------------------------------------------------
QFontEngineBox::QFontEngineBox(int size)
- : _size(size)
+ : QFontEngine(Box),
+ _size(size)
+{
+ cache_cost = sizeof(QFontEngineBox);
+}
+
+QFontEngineBox::QFontEngineBox(Type type, int size)
+ : QFontEngine(type),
+ _size(size)
{
cache_cost = sizeof(QFontEngineBox);
}
@@ -1391,8 +1386,15 @@ QFontEngineBox::~QFontEngineBox()
{
}
+glyph_t QFontEngineBox::glyphIndex(uint ucs4) const
+{
+ Q_UNUSED(ucs4)
+ return 0;
+}
+
bool QFontEngineBox::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QFontEngine::ShaperFlags flags) const
{
+ Q_ASSERT(glyphs->numGlyphs >= *nglyphs);
if (*nglyphs < len) {
*nglyphs = len;
return false;
@@ -1503,22 +1505,11 @@ qreal QFontEngineBox::maxCharWidth() const
return _size;
}
-
-const char *QFontEngineBox::name() const
-{
- return "null";
-}
-
-bool QFontEngineBox::canRender(const QChar *, int)
+bool QFontEngineBox::canRender(const QChar *, int) const
{
return true;
}
-QFontEngine::Type QFontEngineBox::type() const
-{
- return Box;
-}
-
QImage QFontEngineBox::alphaMapForGlyph(glyph_t)
{
QImage image(_size, _size, QImage::Format_Indexed8);
@@ -1550,6 +1541,7 @@ static inline glyph_t stripped(glyph_t glyph)
{ return glyph & 0x00ffffff; }
QFontEngineMulti::QFontEngineMulti(int engineCount)
+ : QFontEngine(Multi)
{
engines.fill(0, engineCount);
cache_cost = 0;
@@ -1564,6 +1556,35 @@ QFontEngineMulti::~QFontEngineMulti()
}
}
+glyph_t QFontEngineMulti::glyphIndex(uint ucs4) const
+{
+ glyph_t glyph = engine(0)->glyphIndex(ucs4);
+ if (glyph == 0 && ucs4 != QChar::LineSeparator) {
+ const_cast<QFontEngineMulti *>(this)->ensureFallbackFamiliesQueried();
+ for (int x = 1, n = qMin(engines.size(), 256); x < n; ++x) {
+ QFontEngine *engine = engines.at(x);
+ if (!engine) {
+ if (!shouldLoadFontEngineForCharacter(x, ucs4))
+ continue;
+ const_cast<QFontEngineMulti *>(this)->loadEngine(x);
+ engine = engines.at(x);
+ }
+ Q_ASSERT(engine != 0);
+ if (engine->type() == Box)
+ continue;
+
+ glyph = engine->glyphIndex(ucs4);
+ if (glyph != 0) {
+ // set the high byte to indicate which engine the glyph came from
+ glyph |= (x << 24);
+ break;
+ }
+ }
+ }
+
+ return glyph;
+}
+
bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
QGlyphLayout *glyphs, int *nglyphs,
QFontEngine::ShaperFlags flags) const
@@ -1573,13 +1594,10 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
const_cast<QFontEngineMulti *>(this)->ensureFallbackFamiliesQueried();
int glyph_pos = 0;
- for (int i = 0; i < len; ++i) {
- bool surrogate = (str[i].isHighSurrogate() && i < len-1 && str[i+1].isLowSurrogate());
- uint ucs4 = surrogate ? QChar::surrogateToUcs4(str[i], str[i+1]) : str[i].unicode();
- if (glyphs->glyphs[glyph_pos] == 0 && str[i].category() != QChar::Separator_Line) {
- QFixed tmpAdvance;
- if (!(flags & GlyphIndicesOnly))
- tmpAdvance = glyphs->advances[glyph_pos];
+ QStringIterator it(str, str + len);
+ while (it.hasNext()) {
+ const uint ucs4 = it.peekNext();
+ if (glyphs->glyphs[glyph_pos] == 0 && ucs4 != QChar::LineSeparator) {
for (int x = 1, n = qMin(engines.size(), 256); x < n; ++x) {
if (engines.at(x) == 0 && !shouldLoadFontEngineForCharacter(x, ucs4))
continue;
@@ -1593,27 +1611,21 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
if (engine->type() == Box)
continue;
- if (!(flags & GlyphIndicesOnly))
- glyphs->advances[glyph_pos] = QFixed();
- int num = 2;
- QGlyphLayout g = glyphs->mid(glyph_pos, num);
- if (!engine->stringToCMap(str + i, surrogate ? 2 : 1, &g, &num, flags))
- Q_UNREACHABLE();
- Q_ASSERT(num == 1);
- if (glyphs->glyphs[glyph_pos]) {
+ glyph_t glyph = engine->glyphIndex(ucs4);
+ if (glyph != 0) {
+ glyphs->glyphs[glyph_pos] = glyph;
+ if (!(flags & GlyphIndicesOnly)) {
+ QGlyphLayout g = glyphs->mid(glyph_pos, 1);
+ engine->recalcAdvances(&g, flags);
+ }
// set the high byte to indicate which engine the glyph came from
glyphs->glyphs[glyph_pos] |= (x << 24);
break;
}
}
-
- // ensure we use metrics from the 1st font when we use the fallback image.
- if (!(flags & GlyphIndicesOnly) && glyphs->glyphs[glyph_pos] == 0)
- glyphs->advances[glyph_pos] = tmpAdvance;
}
- if (surrogate)
- ++i;
+ it.advance();
++glyph_pos;
}
@@ -1898,7 +1910,7 @@ qreal QFontEngineMulti::minRightBearing() const
return engine(0)->minRightBearing();
}
-bool QFontEngineMulti::canRender(const QChar *string, int len)
+bool QFontEngineMulti::canRender(const QChar *string, int len) const
{
if (engine(0)->canRender(string, len))
return true;
@@ -1959,13 +1971,4 @@ QImage QFontEngineMulti::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPosit
return engine(which)->alphaRGBMapForGlyph(stripped(glyph), subPixelPosition, t);
}
-QTestFontEngine::QTestFontEngine(int size)
- : QFontEngineBox(size)
-{}
-
-QFontEngine::Type QTestFontEngine::type() const
-{
- return TestFontEngine;
-}
-
QT_END_NAMESPACE
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index c13f60ff69..11e9ce6c02 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -45,6 +45,7 @@
#include "qvariant.h"
#include "qfontengine_ft_p.h"
#include "private/qimage_p.h"
+#include <private/qstringiterator_p.h>
#ifndef QT_NO_FREETYPE
@@ -125,6 +126,7 @@ static bool ft_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *leng
FT_ULong len = *length;
result = FT_Load_Sfnt_Table(face, tag, 0, buffer, &len) == FT_Err_Ok;
*length = len;
+ Q_ASSERT(!result || int(*length) > 0);
}
return result;
@@ -634,6 +636,7 @@ static void convoluteBitmap(const uchar *src, uchar *dst, int width, int height,
}
QFontEngineFT::QFontEngineFT(const QFontDef &fd)
+ : QFontEngine(Freetype)
{
fontDef = fd;
matrix.xx = 0x10000;
@@ -1281,22 +1284,10 @@ qreal QFontEngineFT::minRightBearing() const
{
if (rbearing == SHRT_MIN) {
lbearing = rbearing = 0;
-
- const QChar *ch = reinterpret_cast<const QChar *>(char_table);
-
- glyph_t glyphs[char_table_entries];
-
- QGlyphLayout g;
- g.glyphs = glyphs;
- g.numGlyphs = char_table_entries;
- int ng = char_table_entries;
- if (!stringToCMap(ch, char_table_entries, &g, &ng, GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(ng == char_table_entries);
-
- while (--ng) {
- if (glyphs[ng]) {
- glyph_metrics_t gi = const_cast<QFontEngineFT *>(this)->boundingBox(glyphs[ng]);
+ for (int i = 0; i < char_table_entries; ++i) {
+ const glyph_t glyph = glyphIndex(char_table[i]);
+ if (glyph != 0) {
+ glyph_metrics_t gi = const_cast<QFontEngineFT *>(this)->boundingBox(glyph);
lbearing = qMin(lbearing, gi.x);
rbearing = qMin(rbearing, (gi.xoff - gi.x - gi.width));
}
@@ -1457,29 +1448,6 @@ bool QFontEngineFT::supportsTransformation(const QTransform &transform) const
return transform.type() <= QTransform::TxTranslate;
}
-static inline unsigned int getChar(const QChar *str, int &i, const int len)
-{
- uint ucs4 = str[i].unicode();
- if (str[i].isHighSurrogate() && i < len-1 && str[i+1].isLowSurrogate()) {
- ++i;
- ucs4 = QChar::surrogateToUcs4(ucs4, str[i].unicode());
- }
- return ucs4;
-}
-
-bool QFontEngineFT::canRender(const QChar *string, int len)
-{
- FT_Face face = freetype->face;
- {
- for ( int i = 0; i < len; i++ ) {
- unsigned int uc = getChar(string, i, len);
- if (!FT_Get_Char_Index(face, uc))
- return false;
- }
- }
- return true;
-}
-
void QFontEngineFT::addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags)
{
if (!glyphs.numGlyphs)
@@ -1524,9 +1492,40 @@ void QFontEngineFT::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int
unlockFace();
}
+glyph_t QFontEngineFT::glyphIndex(uint ucs4) const
+{
+ glyph_t glyph = ucs4 < QFreetypeFace::cmapCacheSize ? freetype->cmapCache[ucs4] : 0;
+ if (glyph == 0) {
+ FT_Face face = freetype->face;
+ glyph = FT_Get_Char_Index(face, ucs4);
+ if (glyph == 0) {
+ // Certain fonts don't have no-break space and tab,
+ // while we usually want to render them as space
+ if (ucs4 == QChar::Nbsp || ucs4 == QChar::Tabulation) {
+ glyph = FT_Get_Char_Index(face, QChar::Space);
+ } else if (freetype->symbol_map) {
+ // Symbol fonts can have more than one CMAPs, FreeType should take the
+ // correct one for us by default, so we always try FT_Get_Char_Index
+ // first. If it didn't work (returns 0), we will explicitly set the
+ // CMAP to symbol font one and try again. symbol_map is not always the
+ // correct one because in certain fonts like Wingdings symbol_map only
+ // contains PUA codepoints instead of the common ones.
+ FT_Set_Charmap(face, freetype->symbol_map);
+ glyph = FT_Get_Char_Index(face, ucs4);
+ FT_Set_Charmap(face, freetype->unicode_map);
+ }
+ }
+ if (ucs4 < QFreetypeFace::cmapCacheSize)
+ freetype->cmapCache[ucs4] = glyph;
+ }
+
+ return glyph;
+}
+
bool QFontEngineFT::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs,
QFontEngine::ShaperFlags flags) const
{
+ Q_ASSERT(glyphs->numGlyphs >= *nglyphs);
if (*nglyphs < len) {
*nglyphs = len;
return false;
@@ -1535,8 +1534,9 @@ bool QFontEngineFT::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs
int glyph_pos = 0;
if (freetype->symbol_map) {
FT_Face face = freetype->face;
- for ( int i = 0; i < len; ++i ) {
- unsigned int uc = getChar(str, i, len);
+ QStringIterator it(str, str + len);
+ while (it.hasNext()) {
+ uint uc = it.next();
glyphs->glyphs[glyph_pos] = uc < QFreetypeFace::cmapCacheSize ? freetype->cmapCache[uc] : 0;
if ( !glyphs->glyphs[glyph_pos] ) {
// Symbol fonts can have more than one CMAPs, FreeType should take the
@@ -1565,8 +1565,9 @@ bool QFontEngineFT::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs
}
} else {
FT_Face face = freetype->face;
- for (int i = 0; i < len; ++i) {
- unsigned int uc = getChar(str, i, len);
+ QStringIterator it(str, str + len);
+ while (it.hasNext()) {
+ uint uc = it.next();
glyphs->glyphs[glyph_pos] = uc < QFreetypeFace::cmapCacheSize ? freetype->cmapCache[uc] : 0;
if (!glyphs->glyphs[glyph_pos]) {
{
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index ad1598ba6d..8bdf991174 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -225,19 +225,13 @@ private:
virtual QFixed lineThickness() const;
virtual QFixed underlinePosition() const;
+ virtual glyph_t glyphIndex(uint ucs4) const;
void doKerning(QGlyphLayout *, ShaperFlags) const;
- inline virtual Type type() const
- { return QFontEngine::Freetype; }
- inline virtual const char *name() const
- { return "freetype"; }
-
virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics);
virtual bool supportsTransformation(const QTransform &transform) const;
- virtual bool canRender(const QChar *string, int len);
-
virtual void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs,
QPainterPath *path, QTextItem::RenderFlags flags);
virtual void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs,
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 0bfb9e70e2..5e40abbda6 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -125,9 +125,10 @@ public:
};
Q_DECLARE_FLAGS(ShaperFlags, ShaperFlag)
- QFontEngine();
virtual ~QFontEngine();
+ inline Type type() const { return m_type; }
+
// all of these are in unscaled metrics if the engine supports uncsaled metrics,
// otherwise in design metrics
struct Properties {
@@ -144,8 +145,8 @@ public:
};
virtual Properties properties() const;
virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics);
- QByteArray getSfntTable(uint /*tag*/) const;
- virtual bool getSfntTableData(uint /*tag*/, uchar * /*buffer*/, uint * /*length*/) const { return false; }
+ QByteArray getSfntTable(uint tag) const;
+ virtual bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
struct FaceId {
FaceId() : index(0), encoding(0) {}
@@ -167,6 +168,7 @@ public:
virtual QFixed emSquareSize() const { return ascent(); }
/* returns 0 as glyph index for non existent glyphs */
+ virtual glyph_t glyphIndex(uint ucs4) const = 0;
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const = 0;
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const {}
virtual void doKerning(QGlyphLayout *, ShaperFlags) const;
@@ -224,26 +226,11 @@ public:
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
- virtual const char *name() const = 0;
-
- virtual bool canRender(const QChar *string, int len) = 0;
- inline bool canRender(uint ucs4) {
- QChar utf16[2];
- int utf16len = 1;
- if (QChar::requiresSurrogates(ucs4)) {
- utf16[0] = QChar::highSurrogate(ucs4);
- utf16[1] = QChar::lowSurrogate(ucs4);
- ++utf16len;
- } else {
- utf16[0] = QChar(ucs4);
- }
- return canRender(utf16, utf16len);
- }
+ inline bool canRender(uint ucs4) const { return glyphIndex(ucs4) != 0; }
+ virtual bool canRender(const QChar *str, int len) const;
virtual bool supportsTransformation(const QTransform &transform) const;
- virtual Type type() const = 0;
-
virtual int glyphCount() const;
virtual int glyphMargin(GlyphFormat format) { return format == Format_A32 ? 2 : 0; }
@@ -272,6 +259,10 @@ public:
};
virtual void setDefaultHintStyle(HintStyle) { }
+private:
+ const Type m_type;
+
+public:
QAtomicInt ref;
QFontDef fontDef;
@@ -306,6 +297,8 @@ public:
inline QVariant userData() const { return m_userData; }
protected:
+ explicit QFontEngine(Type type);
+
QFixed lastRightBearing(const QGlyphLayout &glyphs, bool round = false);
inline void setUserData(const QVariant &userData) { m_userData = userData; }
@@ -352,6 +345,7 @@ public:
QFontEngineBox(int size);
~QFontEngineBox();
+ virtual glyph_t glyphIndex(uint ucs4) const;
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const;
@@ -370,13 +364,13 @@ public:
virtual qreal minRightBearing() const { return 0; }
virtual QImage alphaMapForGlyph(glyph_t);
- virtual const char *name() const;
-
- virtual bool canRender(const QChar *string, int len);
+ virtual bool canRender(const QChar *string, int len) const;
- virtual Type type() const;
inline int size() const { return _size; }
+protected:
+ explicit QFontEngineBox(Type type, int size);
+
private:
friend class QFontPrivate;
int _size;
@@ -388,6 +382,7 @@ public:
explicit QFontEngineMulti(int engineCount);
~QFontEngineMulti();
+ virtual glyph_t glyphIndex(uint ucs4) const;
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs);
@@ -415,12 +410,7 @@ public:
virtual qreal minLeftBearing() const;
virtual qreal minRightBearing() const;
- virtual inline Type type() const
- { return QFontEngine::Multi; }
-
- virtual bool canRender(const QChar *string, int len);
- inline virtual const char *name() const
- { return "Multi"; }
+ virtual bool canRender(const QChar *string, int len) const;
QFontEngine *engine(int at) const
{Q_ASSERT(at < engines.size()); return engines.at(at); }
@@ -444,8 +434,7 @@ protected:
class QTestFontEngine : public QFontEngineBox
{
public:
- QTestFontEngine(int size);
- virtual Type type() const;
+ inline QTestFontEngine(int size) : QFontEngineBox(TestFontEngine, size) {}
};
QT_END_NAMESPACE
diff --git a/src/gui/text/qfontengine_qpa.cpp b/src/gui/text/qfontengine_qpa.cpp
index cb40a5388a..f9ed3c38c1 100644
--- a/src/gui/text/qfontengine_qpa.cpp
+++ b/src/gui/text/qfontengine_qpa.cpp
@@ -45,6 +45,7 @@
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtCore/QBuffer>
+#include <QtCore/private/qstringiterator_p.h>
#include <QtGui/private/qpaintengine_raster_p.h>
#include <QtGui/private/qguiapplication_p.h>
@@ -225,23 +226,13 @@ QVariant QFontEngineQPA::extractHeaderField(const uchar *data, HeaderTag request
}
-
-static inline unsigned int getChar(const QChar *str, int &i, const int len)
-{
- uint ucs4 = str[i].unicode();
- if (str[i].isHighSurrogate() && i < len-1 && str[i+1].isLowSurrogate()) {
- ++i;
- ucs4 = QChar::surrogateToUcs4(ucs4, str[i].unicode());
- }
- return ucs4;
-}
-
QFontEngineQPA::QFontEngineQPA(const QFontDef &def, const QByteArray &data)
- : fontData(reinterpret_cast<const uchar *>(data.constData())), dataSize(data.size())
+ : QFontEngine(QPF2),
+ fontData(reinterpret_cast<const uchar *>(data.constData())), dataSize(data.size())
{
fontDef = def;
cache_cost = 100;
- externalCMap = 0;
+ cmap = 0;
cmapOffset = 0;
cmapSize = 0;
glyphMapOffset = 0;
@@ -292,15 +283,8 @@ QFontEngineQPA::QFontEngineQPA(const QFontDef &def, const QByteArray &data)
// get the real cmap
if (cmapOffset) {
- int tableSize = cmapSize;
- const uchar *cmapPtr = getCMap(fontData + cmapOffset, tableSize, &symbol, &cmapSize);
- if (cmapPtr)
- cmapOffset = cmapPtr - fontData;
- else
- cmapOffset = 0;
- } else if (externalCMap) {
- int tableSize = cmapSize;
- externalCMap = getCMap(externalCMap, tableSize, &symbol, &cmapSize);
+ cmap = QFontEngine::getCMap(fontData + cmapOffset, cmapSize, &symbol, &cmapSize);
+ cmapOffset = cmap ? cmap - fontData : 0;
}
// verify all the positions in the glyphMap
@@ -322,7 +306,7 @@ QFontEngineQPA::QFontEngineQPA(const QFontDef &def, const QByteArray &data)
#if defined(DEBUG_FONTENGINE)
if (!isValid())
qDebug() << "fontData" << fontData << "dataSize" << dataSize
- << "externalCMap" << externalCMap << "cmapOffset" << cmapOffset
+ << "cmap" << cmap << "cmapOffset" << cmapOffset
<< "glyphMapOffset" << glyphMapOffset << "glyphDataOffset" << glyphDataOffset
<< "fd" << fd << "glyphDataSize" << glyphDataSize;
#endif
@@ -334,14 +318,30 @@ QFontEngineQPA::~QFontEngineQPA()
bool QFontEngineQPA::getSfntTableData(uint tag, uchar *buffer, uint *length) const
{
- Q_UNUSED(tag);
- Q_UNUSED(buffer);
- *length = 0;
- return false;
+ if (tag != MAKE_TAG('c', 'm', 'a', 'p') || !cmap)
+ return false;
+
+ if (buffer && int(*length) >= cmapSize)
+ memcpy(buffer, cmap, cmapSize);
+ *length = cmapSize;
+ Q_ASSERT(int(*length) > 0);
+ return true;
+}
+
+glyph_t QFontEngineQPA::glyphIndex(uint ucs4) const
+{
+ glyph_t glyph = getTrueTypeGlyphIndex(cmap, ucs4);
+ if (glyph == 0 && symbol && ucs4 < 0x100)
+ glyph = getTrueTypeGlyphIndex(cmap, ucs4 + 0xf000);
+ if (!findGlyph(glyph))
+ glyph = 0;
+
+ return glyph;
}
bool QFontEngineQPA::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QFontEngine::ShaperFlags flags) const
{
+ Q_ASSERT(glyphs->numGlyphs >= *nglyphs);
if (*nglyphs < len) {
*nglyphs = len;
return false;
@@ -351,20 +351,20 @@ bool QFontEngineQPA::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph
QSet<QChar> seenGlyphs;
#endif
- const uchar *cmap = externalCMap ? externalCMap : (fontData + cmapOffset);
-
int glyph_pos = 0;
if (symbol) {
- for (int i = 0; i < len; ++i) {
- unsigned int uc = getChar(str, i, len);
+ QStringIterator it(str, str + len);
+ while (it.hasNext()) {
+ const uint uc = it.next();
glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc);
if(!glyphs->glyphs[glyph_pos] && uc < 0x100)
glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc + 0xf000);
++glyph_pos;
}
} else {
- for (int i = 0; i < len; ++i) {
- unsigned int uc = getChar(str, i, len);
+ QStringIterator it(str, str + len);
+ while (it.hasNext()) {
+ const uint uc = it.next();
glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc);
#if 0 && defined(DEBUG_FONTENGINE)
QChar c(uc);
@@ -390,10 +390,8 @@ void QFontEngineQPA::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::ShaperFla
{
for (int i = 0; i < glyphs->numGlyphs; ++i) {
const Glyph *g = findGlyph(glyphs->glyphs[i]);
- if (!g) {
- glyphs->glyphs[i] = 0;
+ if (!g)
continue;
- }
glyphs->advances[i] = g->advance;
}
}
@@ -498,37 +496,9 @@ QFixed QFontEngineQPA::lineThickness() const
return QFixed::fromReal(extractHeaderField(fontData, Tag_LineThickness).value<qreal>());
}
-QFontEngine::Type QFontEngineQPA::type() const
-{
- return QFontEngine::QPF2;
-}
-
-bool QFontEngineQPA::canRender(const QChar *string, int len)
-{
- const uchar *cmap = externalCMap ? externalCMap : (fontData + cmapOffset);
-
- if (symbol) {
- for (int i = 0; i < len; ++i) {
- unsigned int uc = getChar(string, i, len);
- glyph_t g = getTrueTypeGlyphIndex(cmap, uc);
- if(!g && uc < 0x100)
- g = getTrueTypeGlyphIndex(cmap, uc + 0xf000);
- if (!g)
- return false;
- }
- } else {
- for (int i = 0; i < len; ++i) {
- unsigned int uc = getChar(string, i, len);
- if (!getTrueTypeGlyphIndex(cmap, uc))
- return false;
- }
- }
- return true;
-}
-
bool QFontEngineQPA::isValid() const
{
- return fontData && dataSize && (cmapOffset || externalCMap)
+ return fontData && dataSize && cmapOffset
&& glyphMapOffset && glyphDataOffset && glyphDataSize > 0;
}
@@ -563,11 +533,9 @@ void QPAGenerator::writeHeader()
writeTaggedUInt32(QFontEngineQPA::Tag_FileIndex, face.index);
{
- uchar data[4];
- uint len = 4;
- bool ok = fe->getSfntTableData(MAKE_TAG('h', 'e', 'a', 'd'), data, &len);
- if (ok) {
- const quint32 revision = qFromBigEndian<quint32>(data);
+ const QByteArray head = fe->getSfntTable(MAKE_TAG('h', 'e', 'a', 'd'));
+ if (head.size() >= 4) {
+ const quint32 revision = qFromBigEndian<quint32>(reinterpret_cast<const uchar *>(head.constData()));
writeTaggedUInt32(QFontEngineQPA::Tag_FontRevision, revision);
}
}
@@ -748,10 +716,9 @@ QFontEngine* QFontEngineMultiQPA::createMultiFontEngine(QFontEngine *fe, int scr
QFontCache::EngineCache::Iterator it = fc->engineCache.find(key),
end = fc->engineCache.end();
while (it != end && it.key() == key) {
- QFontEngineMulti *cachedEngine = 0;
- if (it.value().data->type() == QFontEngine::Multi)
- cachedEngine = static_cast<QFontEngineMulti *>(it.value().data);
- if (faceIsLocal || (cachedEngine && fe == cachedEngine->engine(0))) {
+ Q_ASSERT(it.value().data->type() == QFontEngine::Multi);
+ QFontEngineMulti *cachedEngine = static_cast<QFontEngineMulti *>(it.value().data);
+ if (faceIsLocal || fe == cachedEngine->engine(0)) {
engine = cachedEngine;
fc->updateHitCountAndTimeStamp(it.value());
break;
diff --git a/src/gui/text/qfontengine_qpa_p.h b/src/gui/text/qfontengine_qpa_p.h
index c8b40abd7f..e84b067c68 100644
--- a/src/gui/text/qfontengine_qpa_p.h
+++ b/src/gui/text/qfontengine_qpa_p.h
@@ -163,6 +163,7 @@ public:
FaceId faceId() const { return face_id; }
bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
+ virtual glyph_t glyphIndex(uint ucs4) const;
bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
void recalcAdvances(QGlyphLayout *, ShaperFlags) const;
@@ -181,11 +182,6 @@ public:
QFixed underlinePosition() const;
QFixed lineThickness() const;
- Type type() const;
-
- bool canRender(const QChar *string, int len);
- inline const char *name() const { return "QPF2"; }
-
virtual int glyphCount() const { return glyphMapEntries; }
bool isValid() const;
@@ -199,7 +195,7 @@ private:
const uchar *fontData;
int dataSize;
- const uchar *externalCMap;
+ const uchar *cmap;
quint32 cmapOffset;
int cmapSize;
quint32 glyphMapOffset;
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index 2f4709afe4..7868fd23d1 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -410,12 +410,7 @@ int QFontMetrics::averageCharWidth() const
*/
bool QFontMetrics::inFont(QChar ch) const
{
- const int script = ch.script();
- QFontEngine *engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
- if (engine->type() == QFontEngine::Box)
- return false;
- return engine->canRender(&ch, 1);
+ return inFontUcs4(ch.unicode());
}
/*!
@@ -458,16 +453,7 @@ int QFontMetrics::leftBearing(QChar ch) const
d->alterCharForCapitalization(ch);
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &glyph;
-
- int nglyphs = 1;
- if (!engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ glyph_t glyph = engine->glyphIndex(ch.unicode());
qreal lb;
engine->getGlyphBearings(glyph, &lb);
@@ -500,16 +486,7 @@ int QFontMetrics::rightBearing(QChar ch) const
d->alterCharForCapitalization(ch);
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &glyph;
-
- int nglyphs = 1;
- if (!engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ glyph_t glyph = engine->glyphIndex(ch.unicode());
qreal rb;
engine->getGlyphBearings(glyph, 0, &rb);
@@ -605,18 +582,14 @@ int QFontMetrics::width(QChar ch) const
d->alterCharForCapitalization(ch);
+ glyph_t glyph = engine->glyphIndex(ch.unicode());
QFixed advance;
QGlyphLayout glyphs;
glyphs.numGlyphs = 1;
- glyph_t glyph;
glyphs.glyphs = &glyph;
glyphs.advances = &advance;
-
- int nglyphs = 1;
- if (!engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, 0))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ engine->recalcAdvances(&glyphs, 0);
return qRound(advance);
}
@@ -660,18 +633,14 @@ int QFontMetrics::charWidth(const QString &text, int pos) const
d->alterCharForCapitalization(ch);
+ glyph_t glyph = engine->glyphIndex(ch.unicode());
QFixed advance;
QGlyphLayout glyphs;
glyphs.numGlyphs = 1;
- glyph_t glyph;
glyphs.glyphs = &glyph;
glyphs.advances = &advance;
-
- int nglyphs = 1;
- if (!engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, 0))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ engine->recalcAdvances(&glyphs, 0);
width = qRound(advance);
}
@@ -739,16 +708,7 @@ QRect QFontMetrics::boundingRect(QChar ch) const
d->alterCharForCapitalization(ch);
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &glyph;
-
- int nglyphs = 1;
- if (!engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ glyph_t glyph = engine->glyphIndex(ch.unicode());
glyph_metrics_t gm = engine->boundingBox(glyph);
return QRect(qRound(gm.x), qRound(gm.y), qRound(gm.width), qRound(gm.height));
@@ -1315,12 +1275,7 @@ qreal QFontMetricsF::averageCharWidth() const
*/
bool QFontMetricsF::inFont(QChar ch) const
{
- const int script = ch.script();
- QFontEngine *engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
- if (engine->type() == QFontEngine::Box)
- return false;
- return engine->canRender(&ch, 1);
+ return inFontUcs4(ch.unicode());
}
/*!
@@ -1365,16 +1320,7 @@ qreal QFontMetricsF::leftBearing(QChar ch) const
d->alterCharForCapitalization(ch);
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &glyph;
-
- int nglyphs = 1;
- if (!engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ glyph_t glyph = engine->glyphIndex(ch.unicode());
qreal lb;
engine->getGlyphBearings(glyph, &lb);
@@ -1407,16 +1353,7 @@ qreal QFontMetricsF::rightBearing(QChar ch) const
d->alterCharForCapitalization(ch);
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &glyph;
-
- int nglyphs = 1;
- if (!engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ glyph_t glyph = engine->glyphIndex(ch.unicode());
qreal rb;
engine->getGlyphBearings(glyph, 0, &rb);
@@ -1484,18 +1421,14 @@ qreal QFontMetricsF::width(QChar ch) const
d->alterCharForCapitalization(ch);
+ glyph_t glyph = engine->glyphIndex(ch.unicode());
QFixed advance;
QGlyphLayout glyphs;
glyphs.numGlyphs = 1;
- glyph_t glyph;
glyphs.glyphs = &glyph;
glyphs.advances = &advance;
-
- int nglyphs = 1;
- if (!engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, 0))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ engine->recalcAdvances(&glyphs, 0);
return advance.toReal();
}
@@ -1559,16 +1492,7 @@ QRectF QFontMetricsF::boundingRect(QChar ch) const
d->alterCharForCapitalization(ch);
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &glyph;
-
- int nglyphs = 1;
- if (!engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ glyph_t glyph = engine->glyphIndex(ch.unicode());
glyph_metrics_t gm = engine->boundingBox(glyph);
return QRectF(gm.x.toReal(), gm.y.toReal(), gm.width.toReal(), gm.height.toReal());
diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp
index 2109b16bb5..4bb29da2af 100644
--- a/src/gui/text/qfontsubset.cpp
+++ b/src/gui/text/qfontsubset.cpp
@@ -201,22 +201,8 @@ static void checkRanges(QPdf::ByteStream &ts, QByteArray &ranges, int &nranges)
QVector<int> QFontSubset::getReverseMap() const
{
QVector<int> reverseMap(0x10000, 0);
-
- glyph_t glyph;
-
- QGlyphLayout glyphs;
- glyphs.glyphs = &glyph;
- glyphs.numGlyphs = 1;
-
for (uint uc = 0; uc < 0x10000; ++uc) {
- QChar ch(uc);
-
- int nglyphs = 1;
- if (!fontEngine->stringToCMap(&ch, 1, &glyphs, &nglyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
-
- int idx = glyph_indices.indexOf(glyph);
+ int idx = glyph_indices.indexOf(fontEngine->glyphIndex(uc));
if (idx >= 0 && !reverseMap.at(idx))
reverseMap[idx] = uc;
}
diff --git a/src/gui/text/qharfbuzzng.cpp b/src/gui/text/qharfbuzzng.cpp
index c09f27b665..1258ea9a78 100644
--- a/src/gui/text/qharfbuzzng.cpp
+++ b/src/gui/text/qharfbuzzng.cpp
@@ -45,6 +45,8 @@
#include <qstring.h>
#include <qvector.h>
+#include <private/qstringiterator_p.h>
+
#include "qfontengine_p.h"
QT_BEGIN_NAMESPACE
@@ -341,16 +343,10 @@ _hb_qt_unicode_decompose_compatibility(hb_unicode_funcs_t * /*ufuncs*/,
const QString normalized = QChar::decomposition(u);
uint outlen = 0;
-
- // ### replace with QCharIterator
- const ushort *p = reinterpret_cast<const ushort *>(normalized.unicode());
- const ushort *const e = p + normalized.size();
- for ( ; p != e; ++p) {
- uint ucs4 = *p;
- if (QChar::isHighSurrogate(ucs4) && p + 1 != e && QChar::isLowSurrogate(p[1]))
- ucs4 = QChar::surrogateToUcs4(ucs4, *++p);
+ QStringIterator it(normalized);
+ while (it.hasNext()) {
Q_ASSERT(outlen < HB_UNICODE_MAX_DECOMPOSITION_LEN);
- decomposed[outlen++] = ucs4;
+ decomposed[outlen++] = it.next();
}
return outlen;
@@ -397,33 +393,7 @@ _hb_qt_font_get_glyph(hb_font_t * /*font*/, void *font_data,
QFontEngine *fe = (QFontEngine *)font_data;
Q_ASSERT(fe);
- QChar chars[2];
- int numChars = 0;
- if (Q_UNLIKELY(QChar::requiresSurrogates(unicode))) {
- chars[numChars++] = QChar(QChar::highSurrogate(unicode));
- chars[numChars++] = QChar(QChar::lowSurrogate(unicode));
- } else {
- chars[numChars++] = QChar(unicode);
- }
-#if 0
- if (Q_UNLIKELY(variation_selector != 0)) {
- if (Q_UNLIKELY(QChar::requiresSurrogates(variation_selector))) {
- chars[numChars++] = QChar(QChar::highSurrogate(variation_selector));
- chars[numChars++] = QChar(QChar::lowSurrogate(variation_selector));
- } else {
- chars[numChars++] = QChar(variation_selector);
- }
- }
-#endif
-
- QGlyphLayout g;
- g.numGlyphs = numChars;
- g.glyphs = glyph;
-
- int numGlyphs = numChars;
- if (!fe->stringToCMap(chars, numChars, &g, &numGlyphs, QFontEngine::GlyphIndicesOnly))
- Q_UNREACHABLE();
- Q_ASSERT(numGlyphs == 1);
+ *glyph = fe->glyphIndex(unicode);
return true;
}
@@ -625,7 +595,7 @@ _hb_qt_reference_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
Q_ASSERT(get_font_table);
uint length = 0;
- if (Q_UNLIKELY(!get_font_table(data->user_data, tag, 0, &length) || length == 0))
+ if (Q_UNLIKELY(!get_font_table(data->user_data, tag, 0, &length)))
return hb_blob_get_empty();
char *buffer = (char *)malloc(length);
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index 3049e0ab5e..5f277c878a 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -276,6 +276,16 @@ void QPlatformFontDatabase::populateFontDatabase()
}
/*!
+ This function is called whenever the font database is invalidated.
+
+ Reimplement this function to clear any internal data structures that
+ will need to be rebuilt at the next call to populateFontDatabase().
+*/
+void QPlatformFontDatabase::invalidate()
+{
+}
+
+/*!
Returns a multi font engine in the specified \a script to encapsulate \a fontEngine with the
option to fall back to the fonts given by \a fallbacks if \a fontEngine does not support
a certain character.
diff --git a/src/gui/text/qplatformfontdatabase.h b/src/gui/text/qplatformfontdatabase.h
index 5f2c9a74ba..870480809b 100644
--- a/src/gui/text/qplatformfontdatabase.h
+++ b/src/gui/text/qplatformfontdatabase.h
@@ -96,6 +96,8 @@ class Q_GUI_EXPORT QPlatformFontDatabase
public:
virtual ~QPlatformFontDatabase();
virtual void populateFontDatabase();
+ virtual void invalidate();
+
virtual QFontEngineMulti *fontEngineMulti(QFontEngine *fontEngine, QChar::Script script);
virtual QFontEngine *fontEngine(const QFontDef &fontDef, void *handle);
virtual QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const;
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index 449278df06..2ba350fb67 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -665,7 +665,7 @@ QList<QFontDatabase::WritingSystem> QRawFont::supportedWritingSystems() const
*/
bool QRawFont::supportsCharacter(QChar character) const
{
- return d->isValid() && d->fontEngine->canRender(&character, 1);
+ return supportsCharacter(character.unicode());
}
/*!
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 63e2af8d15..0298adde7a 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -839,6 +839,22 @@ void QTextEngine::bidiReorder(int numItems, const quint8 *levels, int *visualOrd
#endif
}
+
+enum JustificationClass {
+ Justification_Prohibited = 0, // Justification can not be applied after this glyph
+ Justification_Arabic_Space = 1, // This glyph represents a space inside arabic text
+ Justification_Character = 2, // Inter-character justification point follows this glyph
+ Justification_Space = 4, // This glyph represents a blank outside an Arabic run
+ Justification_Arabic_Normal = 7, // Normal Middle-Of-Word glyph that connects to the right (begin)
+ Justification_Arabic_Waw = 8, // Next character is final form of Waw/Ain/Qaf/Feh
+ Justification_Arabic_BaRa = 9, // Next two characters are Ba + Ra/Ya/AlefMaksura
+ Justification_Arabic_Alef = 10, // Next character is final form of Alef/Tah/Lam/Kaf/Gaf
+ Justification_Arabic_HahDal = 11, // Next character is final form of Hah/Dal/Teh Marbuta
+ Justification_Arabic_Seen = 12, // Initial or medial form of Seen/Sad
+ Justification_Arabic_Kashida = 13 // User-inserted Kashida(U+0640)
+};
+
+
// shape all the items that intersect with the line, taking tab widths into account to find out what text actually fits in the line.
void QTextEngine::shapeLine(const QScriptLine &line)
{
@@ -1018,12 +1034,12 @@ void QTextEngine::shapeText(int item) const
}
if (wordSpacing != 0) {
for (int i = 0; i < si.num_glyphs; ++i) {
- if (glyphs.attributes[i].justification == QGlyphAttributes::Space
- || glyphs.attributes[i].justification == QGlyphAttributes::Arabic_Space) {
+ if (glyphs.attributes[i].justification == Justification_Space
+ || glyphs.attributes[i].justification == Justification_Arabic_Space) {
// word spacing only gets added once to a consecutive run of spaces (see CSS spec)
if (i + 1 == si.num_glyphs
- ||(glyphs.attributes[i+1].justification != QGlyphAttributes::Space
- && glyphs.attributes[i+1].justification != QGlyphAttributes::Arabic_Space))
+ ||(glyphs.attributes[i+1].justification != Justification_Space
+ && glyphs.attributes[i+1].justification != Justification_Arabic_Space))
glyphs.advances[i] += wordSpacing;
}
}
@@ -1190,7 +1206,6 @@ QT_BEGIN_INCLUDE_NAMESPACE
QT_END_INCLUDE_NAMESPACE
Q_STATIC_ASSERT(sizeof(HB_Glyph) == sizeof(glyph_t));
-Q_STATIC_ASSERT(sizeof(HB_GlyphAttributes) == sizeof(QGlyphAttributes));
Q_STATIC_ASSERT(sizeof(HB_Fixed) == sizeof(QFixed));
Q_STATIC_ASSERT(sizeof(HB_FixedPoint) == sizeof(QFixedPoint));
@@ -1256,18 +1271,23 @@ int QTextEngine::shapeTextWithHarfbuzz(const QScriptItem &si, const ushort *stri
remaining_glyphs -= shaper_item.initialGlyphCount;
+ QVarLengthArray<HB_GlyphAttributes, 128> hbGlyphAttributes;
do {
if (!ensureSpace(glyph_pos + shaper_item.num_glyphs + remaining_glyphs))
return 0;
+ if (hbGlyphAttributes.size() < int(shaper_item.num_glyphs)) {
+ hbGlyphAttributes.resize(shaper_item.num_glyphs);
+ memset(hbGlyphAttributes.data(), 0, hbGlyphAttributes.size() * sizeof(HB_GlyphAttributes));
+ }
const QGlyphLayout g = availableGlyphs(&si).mid(glyph_pos);
if (fontEngine->type() == QFontEngine::Multi && shaper_item.num_glyphs > shaper_item.item.length)
moveGlyphData(g.mid(shaper_item.num_glyphs), g.mid(shaper_item.initialGlyphCount), remaining_glyphs);
shaper_item.glyphs = reinterpret_cast<HB_Glyph *>(g.glyphs);
- shaper_item.attributes = reinterpret_cast<HB_GlyphAttributes *>(g.attributes);
shaper_item.advances = reinterpret_cast<HB_Fixed *>(g.advances);
shaper_item.offsets = reinterpret_cast<HB_FixedPoint *>(g.offsets);
+ shaper_item.attributes = hbGlyphAttributes.data();
if (engineIdx != 0 && shaper_item.glyphIndicesPresent) {
for (quint32 i = 0; i < shaper_item.initialGlyphCount; ++i)
@@ -1281,6 +1301,14 @@ int QTextEngine::shapeTextWithHarfbuzz(const QScriptItem &si, const ushort *stri
if (fontEngine->type() == QFontEngine::Multi)
moveGlyphData(g.mid(shaper_item.num_glyphs), g.mid(shaper_item.initialGlyphCount), remaining_glyphs);
+ for (quint32 i = 0; i < shaper_item.num_glyphs; ++i) {
+ HB_GlyphAttributes hbAttrs = hbGlyphAttributes.at(i);
+ QGlyphAttributes &attrs = g.attributes[i];
+ attrs.clusterStart = hbAttrs.clusterStart;
+ attrs.dontPrint = hbAttrs.dontPrint;
+ attrs.justification = hbAttrs.justification;
+ }
+
for (quint32 i = 0; i < shaper_item.item.length; ++i)
shaper_item.log_clusters[i] += glyph_pos;
@@ -1478,18 +1506,8 @@ void QTextEngine::itemize() const
{
QVarLengthArray<uchar> scripts(length);
QUnicodeTools::initScripts(string, length, scripts.data());
- for (int i = 0; i < length; ++i) {
- ushort script = scripts.at(i);
- switch (script) {
- case QChar::Script_Hiragana:
- case QChar::Script_Katakana:
- script = QChar::Script_Han;
- break;
- default:
- break;
- }
- analysis[i].script = script;
- }
+ for (int i = 0; i < length; ++i)
+ analysis[i].script = scripts.at(i);
}
const ushort *uc = string;
@@ -1536,8 +1554,21 @@ void QTextEngine::itemize() const
(analysis-1)->flags = QScriptAnalysis::LineOrParagraphSeparator; // to exclude it from width
}
#ifdef QT_ENABLE_HARFBUZZ_NG
- if (!useHarfbuzzNG) {
- analysis = scriptAnalysis.data();
+ analysis = scriptAnalysis.data();
+ if (useHarfbuzzNG) {
+ for (int i = 0; i < length; ++i) {
+ switch (analysis[i].script) {
+ case QChar::Script_Han:
+ case QChar::Script_Hiragana:
+ case QChar::Script_Katakana:
+ case QChar::Script_Bopomofo:
+ analysis[i].script = QChar::Script_Common;
+ break;
+ default:
+ break;
+ }
+ }
+ } else {
for (int i = 0; i < length; ++i)
analysis[i].script = hbscript_to_script(script_to_hbscript(analysis[i].script));
}
@@ -1980,26 +2011,21 @@ static void set(QJustificationPoint *point, int type, const QGlyphLayout &glyph,
point->type = type;
point->glyph = glyph;
- if (type >= QGlyphAttributes::Arabic_Normal) {
+ if (type >= Justification_Arabic_Normal) {
QChar ch(0x640); // Kashida character
- glyph_t kashidaGlyph;
- QFixed kashidaWidth;
-
- QGlyphLayout glyphs;
- glyphs.numGlyphs = 1;
- glyphs.glyphs = &kashidaGlyph;
- glyphs.advances = &kashidaWidth;
-
- int nglyphs = 1;
- if (!fe->stringToCMap(&ch, 1, &glyphs, &nglyphs, 0))
- Q_UNREACHABLE();
- Q_ASSERT(nglyphs == 1);
+ glyph_t kashidaGlyph = fe->glyphIndex(ch.unicode());
+ if (kashidaGlyph != 0) {
+ QGlyphLayout g;
+ g.numGlyphs = 1;
+ g.glyphs = &kashidaGlyph;
+ g.advances = &point->kashidaWidth;
+ fe->recalcAdvances(&g, 0);
- if (kashidaGlyph != 0 && kashidaWidth != 0) {
- point->kashidaWidth = kashidaWidth;
+ if (point->kashidaWidth == 0)
+ point->type = Justification_Prohibited;
} else {
- point->type = QGlyphAttributes::NoJustification;
+ point->type = Justification_Prohibited;
point->kashidaWidth = 0;
}
}
@@ -2067,7 +2093,7 @@ void QTextEngine::justify(const QScriptLine &line)
for (int i = 0; i < nItems; ++i) {
QScriptItem &si = layoutData->items[firstItem + i];
- int kashida_type = QGlyphAttributes::Arabic_Normal;
+ int kashida_type = Justification_Arabic_Normal;
int kashida_pos = -1;
int start = qMax(line.from - si.position, 0);
@@ -2091,11 +2117,11 @@ void QTextEngine::justify(const QScriptLine &line)
int justification = g.attributes[i].justification;
switch(justification) {
- case QGlyphAttributes::NoJustification:
+ case Justification_Prohibited:
break;
- case QGlyphAttributes::Space :
+ case Justification_Space:
// fall through
- case QGlyphAttributes::Arabic_Space :
+ case Justification_Arabic_Space:
if (kashida_pos >= 0) {
// qDebug("kashida position at %d in word", kashida_pos);
set(&justificationPoints[nPoints], kashida_type, g.mid(kashida_pos), fontEngine(si));
@@ -2106,19 +2132,19 @@ void QTextEngine::justify(const QScriptLine &line)
}
}
kashida_pos = -1;
- kashida_type = QGlyphAttributes::Arabic_Normal;
+ kashida_type = Justification_Arabic_Normal;
// fall through
- case QGlyphAttributes::Character :
+ case Justification_Character:
set(&justificationPoints[nPoints++], justification, g.mid(i), fontEngine(si));
maxJustify = qMax(maxJustify, justification);
break;
- case QGlyphAttributes::Arabic_Normal :
- case QGlyphAttributes::Arabic_Waw :
- case QGlyphAttributes::Arabic_BaRa :
- case QGlyphAttributes::Arabic_Alef :
- case QGlyphAttributes::Arabic_HaaDal :
- case QGlyphAttributes::Arabic_Seen :
- case QGlyphAttributes::Arabic_Kashida :
+ case Justification_Arabic_Normal:
+ case Justification_Arabic_Waw:
+ case Justification_Arabic_BaRa:
+ case Justification_Arabic_Alef:
+ case Justification_Arabic_HahDal:
+ case Justification_Arabic_Seen:
+ case Justification_Arabic_Kashida:
if (justification >= kashida_type) {
kashida_pos = i;
kashida_type = justification;
@@ -2147,9 +2173,9 @@ void QTextEngine::justify(const QScriptLine &line)
// qDebug(" minKashida=%f, need=%f", minKashida.toReal(), need.toReal());
// distribute in priority order
- if (maxJustify >= QGlyphAttributes::Arabic_Normal) {
+ if (maxJustify >= Justification_Arabic_Normal) {
while (need >= minKashida) {
- for (int type = maxJustify; need >= minKashida && type >= QGlyphAttributes::Arabic_Normal; --type) {
+ for (int type = maxJustify; need >= minKashida && type >= Justification_Arabic_Normal; --type) {
for (int i = 0; need >= minKashida && i < nPoints; ++i) {
if (justificationPoints[i].type == type && justificationPoints[i].kashidaWidth <= need) {
justificationPoints[i].glyph.justifications->nKashidas++;
@@ -2166,7 +2192,7 @@ void QTextEngine::justify(const QScriptLine &line)
if (!need)
goto end;
- maxJustify = qMin(maxJustify, int(QGlyphAttributes::Space));
+ maxJustify = qMin(maxJustify, int(Justification_Space));
for (int type = maxJustify; need != 0 && type > 0; --type) {
int n = 0;
for (int i = 0; i < nPoints; ++i) {
@@ -2616,40 +2642,30 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int
QFixed ellipsisWidth;
QString ellipsisText;
{
- QChar ellipsisChar(0x2026);
-
QFontEngine *fe = fnt.d->engineForScript(QChar::Script_Common);
+ QFontEngine *engine = fe->type() == QFontEngine::Multi ? static_cast<QFontEngineMulti *>(fe)->engine(0) : fe;
- QGlyphLayoutArray<1> ellipsisGlyph;
- {
- QFontEngine *feForEllipsis = (fe->type() == QFontEngine::Multi)
- ? static_cast<QFontEngineMulti *>(fe)->engine(0)
- : fe;
+ QChar ellipsisChar(0x2026);
- if (feForEllipsis->type() == QFontEngine::Mac)
- feForEllipsis = fe;
+ glyph_t glyph = engine->glyphIndex(ellipsisChar.unicode());
- int nGlyphs = 1;
- if (!feForEllipsis->stringToCMap(&ellipsisChar, 1, &ellipsisGlyph, &nGlyphs, 0))
- Q_UNREACHABLE();
- Q_ASSERT(nGlyphs == 1);
- }
+ QGlyphLayout glyphs;
+ glyphs.numGlyphs = 1;
+ glyphs.glyphs = &glyph;
+ glyphs.advances = &ellipsisWidth;
+
+ if (glyph != 0) {
+ engine->recalcAdvances(&glyphs, 0);
- if (ellipsisGlyph.glyphs[0]) {
- ellipsisWidth = ellipsisGlyph.advances[0];
ellipsisText = ellipsisChar;
} else {
- QString dotDotDot(QLatin1String("..."));
+ glyph = engine->glyphIndex('.');
+ if (glyph != 0) {
+ engine->recalcAdvances(&glyphs, 0);
- QGlyphLayoutArray<3> glyphs;
- int nGlyphs = 3;
- if (!fe->stringToCMap(dotDotDot.constData(), 3, &glyphs, &nGlyphs, 0))
- Q_UNREACHABLE();
- Q_ASSERT(nGlyphs == 3);
-
- for (int i = 0; i < nGlyphs; ++i)
- ellipsisWidth += glyphs.advances[i];
- ellipsisText = dotDotDot;
+ ellipsisWidth *= 3;
+ ellipsisText = QStringLiteral("...");
+ }
}
}
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index 1616a78937..342a94de66 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -89,35 +89,6 @@ class QAbstractTextDocumentLayout;
typedef quint32 glyph_t;
-#ifdef __xlC__
-typedef unsigned q_hb_bitfield;
-#else
-typedef quint8 q_hb_bitfield;
-#endif
-
-typedef struct {
- typedef enum {
- NoJustification= 0, /* Justification can't be applied after this glyph */
- Arabic_Space = 1, /* This glyph represents a space inside arabic text */
- Character = 2, /* Inter-character justification point follows this glyph */
- Space = 4, /* This glyph represents a blank outside an Arabic run */
- Arabic_Normal = 7, /* Normal Middle-Of-Word glyph that connects to the right (begin) */
- Arabic_Waw = 8, /* Next character is final form of Waw/Ain/Qaf/Fa */
- Arabic_BaRa = 9, /* Next two chars are Ba + Ra/Ya/AlefMaksura */
- Arabic_Alef = 10, /* Next character is final form of Alef/Tah/Lam/Kaf/Gaf */
- Arabic_HaaDal = 11, /* Next character is final form of Haa/Dal/Taa Marbutah */
- Arabic_Seen = 12, /* Initial or Medial form Of Seen/Sad */
- Arabic_Kashida = 13 /* Kashida(U+640) in middle of word */
- } JustificationClass;
-
- q_hb_bitfield justification :4; /* Justification class */
- q_hb_bitfield clusterStart :1; /* First glyph of representation of cluster */
- q_hb_bitfield mark :1; /* needs to be positioned around base char */
- q_hb_bitfield zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */
- q_hb_bitfield dontPrint :1;
- q_hb_bitfield combiningClass :8;
-} QGlyphAttributes;
-
// this uses the same coordinate system as Qt, but a different one to freetype.
// * y is usually negative, and is equal to the ascent.
// * negative yoff means the following stuff is drawn higher up.
@@ -188,6 +159,14 @@ struct QGlyphJustification
};
Q_DECLARE_TYPEINFO(QGlyphJustification, Q_PRIMITIVE_TYPE);
+struct QGlyphAttributes {
+ uchar clusterStart : 1;
+ uchar dontPrint : 1;
+ uchar justification : 4;
+ uchar reserved : 2;
+};
+Q_STATIC_ASSERT(sizeof(QGlyphAttributes) == 1);
+
struct QGlyphLayout
{
enum {
@@ -200,7 +179,7 @@ struct QGlyphLayout
glyph_t *glyphs; // 4 bytes per element
QFixed *advances; // 4 bytes per element
QGlyphJustification *justifications; // 4 bytes per element
- QGlyphAttributes *attributes; // 2 bytes per element
+ QGlyphAttributes *attributes; // 1 byte per element
int numGlyphs;
diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp
index 20860b0fc9..e8dfa636cd 100644
--- a/src/network/access/qhttpmultipart.cpp
+++ b/src/network/access/qhttpmultipart.cpp
@@ -169,7 +169,7 @@ void QHttpPart::setHeader(QNetworkRequest::KnownHeaders header, const QVariant &
QNetworkRequest::KnownHeaders), the raw format will be parsed and
the corresponding "cooked" header will be set as well.
- Note: setting the same header twice overrides the previous
+ \note Setting the same header twice overrides the previous
setting. To accomplish the behaviour of multiple HTTP headers of
the same name, you should concatenate the two values, separating
them with a comma (",") and set one single raw header.
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 2421de3f0c..cf786e37c6 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -864,6 +864,19 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
return;
}
}
+#ifndef QT_NO_SSL
+ // is the reply inside the SPDY pipeline of this channel already?
+ QMultiMap<int, HttpMessagePair>::iterator it = channels[i].spdyRequestsToSend.begin();
+ QMultiMap<int, HttpMessagePair>::iterator end = channels[i].spdyRequestsToSend.end();
+ for (; it != end; ++it) {
+ if (it.value().second == reply) {
+ channels[i].spdyRequestsToSend.remove(it.key());
+
+ QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
+ return;
+ }
+ }
+#endif
}
// remove from the high priority queue
if (!highPriorityQueue.isEmpty()) {
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index 2f2d1ab9a9..a1cbd9364e 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -518,7 +518,7 @@ void QNetworkDiskCache::setMaximumCacheSize(qint64 size)
knows about that QNetworkDiskCache does not, for example the number of times
a cache is accessed.
- Note: cacheSize() calls expire if the current cache size is unknown.
+ \note cacheSize() calls expire if the current cache size is unknown.
\sa maximumCacheSize(), fileMetaData()
*/
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index faa8464463..bfe870c783 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -753,7 +753,7 @@ qint64 QNetworkReply::writeData(const char *, qint64)
Sets the associated operation for this object to be \a
operation. This value will be returned by operation().
- Note: the operation should be set when this object is created and
+ \note The operation should be set when this object is created and
not changed again.
\sa operation(), setRequest()
@@ -768,7 +768,7 @@ void QNetworkReply::setOperation(QNetworkAccessManager::Operation operation)
Sets the associated request for this object to be \a request. This
value will be returned by request().
- Note: the request should be set when this object is created and
+ \note The request should be set when this object is created and
not changed again.
\sa request(), setOperation()
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index aa1102f9bf..850f5bc7e7 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -512,7 +512,7 @@ QList<QByteArray> QNetworkRequest::rawHeaderList() const
will also set the known header LastModifiedHeader to be the
QDateTime object of the parsed date.
- Note: setting the same header twice overrides the previous
+ \note Setting the same header twice overrides the previous
setting. To accomplish the behaviour of multiple HTTP headers of
the same name, you should concatenate the two values, separating
them with a comma (",") and set one single raw header.
@@ -528,7 +528,7 @@ void QNetworkRequest::setRawHeader(const QByteArray &headerName, const QByteArra
Returns the attribute associated with the code \a code. If the
attribute has not been set, it returns \a defaultValue.
- Note: this function does not apply the defaults listed in
+ \note This function does not apply the defaults listed in
QNetworkRequest::Attribute.
\sa setAttribute(), QNetworkRequest::Attribute
diff --git a/src/network/access/qspdyprotocolhandler.cpp b/src/network/access/qspdyprotocolhandler.cpp
index 098b3e9ab0..6d22ebeb35 100644
--- a/src/network/access/qspdyprotocolhandler.cpp
+++ b/src/network/access/qspdyprotocolhandler.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtNetwork module of the Qt Toolkit.
@@ -275,6 +276,7 @@ QSpdyProtocolHandler::QSpdyProtocolHandler(QHttpNetworkConnectionChannel *channe
// when sending the headers because of the CRIME attack
zlibRet = deflateInit(&m_deflateStream, /* compression level = */ 0);
Q_ASSERT(zlibRet == Z_OK);
+ Q_UNUSED(zlibRet); // silence -Wunused-variable
}
QSpdyProtocolHandler::~QSpdyProtocolHandler()
@@ -307,11 +309,13 @@ bool QSpdyProtocolHandler::sendRequest()
currentReply->setSpdyWasUsed(true);
qint32 streamID = generateNextStreamID();
+ currentReply->setProperty("SPDYStreamID", streamID);
currentReply->setRequest(currentRequest);
currentReply->d_func()->connection = m_connection;
currentReply->d_func()->connectionChannel = m_channel;
m_inFlightStreams.insert(streamID, currentPair);
+ connect(currentReply, SIGNAL(destroyed(QObject*)), this, SLOT(_q_replyDestroyed(QObject*)));
sendSYN_STREAM(currentPair, streamID, /* associatedToStreamID = */ 0);
int requestsRemoved = m_channel->spdyRequestsToSend.remove(
@@ -323,6 +327,13 @@ bool QSpdyProtocolHandler::sendRequest()
return true;
}
+void QSpdyProtocolHandler::_q_replyDestroyed(QObject* reply)
+{
+ qint32 streamID = reply->property("SPDYStreamID").toInt();
+ if (m_inFlightStreams.remove(streamID))
+ sendRST_STREAM(streamID, RST_STREAM_CANCEL);
+}
+
void QSpdyProtocolHandler::_q_receiveReply()
{
Q_ASSERT(m_socket);
@@ -618,6 +629,7 @@ void QSpdyProtocolHandler::sendControlFrame(FrameType type,
Q_ASSERT(written == 8);
written = m_socket->write(data, length);
Q_ASSERT(written == length);
+ Q_UNUSED(written); // silence -Wunused-variable
}
void QSpdyProtocolHandler::sendSYN_STREAM(HttpMessagePair messagePair,
@@ -694,6 +706,10 @@ void QSpdyProtocolHandler::sendPING(quint32 pingID)
bool QSpdyProtocolHandler::uploadData(qint32 streamID)
{
// we only rely on SPDY flow control here and don't care about TCP buffers
+ if (!m_inFlightStreams.contains(streamID)) {
+ sendRST_STREAM(streamID, RST_STREAM_INVALID_STREAM);
+ return false;
+ }
HttpMessagePair messagePair = m_inFlightStreams.value(streamID);
QHttpNetworkRequest request = messagePair.first;
@@ -702,6 +718,11 @@ bool QSpdyProtocolHandler::uploadData(qint32 streamID)
QHttpNetworkReplyPrivate *replyPrivate = reply->d_func();
Q_ASSERT(replyPrivate);
+ if (reply->d_func()->state == QHttpNetworkReplyPrivate::SPDYHalfClosed || reply->d_func()->state == QHttpNetworkReplyPrivate::SPDYClosed) {
+ qWarning() << Q_FUNC_INFO << "Trying to upload to closed stream";
+ return false;
+ }
+
qint32 dataLeftInWindow = replyPrivate->windowSizeUpload
- replyPrivate->currentlyUploadedDataInWindow;
@@ -747,6 +768,8 @@ bool QSpdyProtocolHandler::uploadData(qint32 streamID)
Q_ASSERT(writeSize == 0);
Q_UNUSED(writeSize); // silence -Wunused-variable
replyPrivate->state = QHttpNetworkReplyPrivate::SPDYHalfClosed;
+ if (reply->request().uploadByteDevice())
+ reply->request().uploadByteDevice()->disconnect(this);
// ### this will not work if the content length is not known, but
// then again many servers will fail in this case anyhow according
// to the SPDY RFC
@@ -874,6 +897,10 @@ void QSpdyProtocolHandler::handleSYN_REPLY(char flags, quint32 /*length*/, const
void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameData)
{
qint32 streamID = getStreamID(frameData.constData());
+ if (!m_inFlightStreams.contains(streamID)) {
+ sendRST_STREAM(streamID, RST_STREAM_INVALID_STREAM);
+ return;
+ }
flags &= 0x3f;
bool flag_fin = flags & 0x01;
@@ -884,6 +911,11 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
QHttpNetworkReply *httpReply = pair.second;
Q_ASSERT(httpReply != 0);
+ if (httpReply->d_func()->state == QHttpNetworkReplyPrivate::SPDYClosed) {
+ sendRST_STREAM(streamID, RST_STREAM_STREAM_ALREADY_CLOSED);
+ return;
+ }
+
QByteArray uncompressedHeader;
if (!uncompressHeader(headerValuePairs, &uncompressedHeader)) {
qWarning() << Q_FUNC_INFO << "error reading header from SYN_REPLY message";
@@ -891,16 +923,31 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
}
qint32 headerCount = fourBytesToInt(uncompressedHeader.constData());
+ if (headerCount * 8 > uncompressedHeader.size()) {
+ qWarning() << Q_FUNC_INFO << "error parsing header from SYN_REPLY message";
+ sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
+ return;
+ }
qint32 readPointer = 4;
for (qint32 a = 0; a < headerCount; ++a) {
qint32 count = fourBytesToInt(uncompressedHeader.constData() + readPointer);
readPointer += 4;
QByteArray name = uncompressedHeader.mid(readPointer, count);
readPointer += count;
+ if (readPointer > uncompressedHeader.size()) {
+ qWarning() << Q_FUNC_INFO << "error parsing header from SYN_REPLY message";
+ sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
+ return;
+ }
count = fourBytesToInt(uncompressedHeader.constData() + readPointer);
readPointer += 4;
QByteArray value = uncompressedHeader.mid(readPointer, count);
readPointer += count;
+ if (readPointer > uncompressedHeader.size()) {
+ qWarning() << Q_FUNC_INFO << "error parsing header from SYN_REPLY message";
+ sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
+ return;
+ }
if (name == ":status") {
httpReply->setStatusCode(value.left(3).toInt());
httpReply->d_func()->reasonPhrase = QString::fromLatin1(value.mid(4));
@@ -931,22 +978,9 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
emit httpReply->headerChanged();
if (flag_fin) {
- switch (httpReply->d_func()->state) {
- case QHttpNetworkReplyPrivate::SPDYSYNSent:
- httpReply->d_func()->state = QHttpNetworkReplyPrivate::SPDYHalfClosed;
- break;
- case QHttpNetworkReplyPrivate::SPDYHalfClosed:
- replyFinished(httpReply, streamID);
- break;
- case QHttpNetworkReplyPrivate::SPDYClosed: {
- sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
- replyFinishedWithError(httpReply, streamID, QNetworkReply::ProtocolFailure,
- "server sent SYN_REPLY on an already closed stream");
- break;
- }
- default:
- qWarning() << Q_FUNC_INFO << "got data frame in unknown state";
- }
+ if (httpReply->d_func()->state != QHttpNetworkReplyPrivate::SPDYHalfClosed)
+ sendDataFrame(streamID, DataFrame_FLAG_FIN, 0, 0);
+ replyFinished(httpReply, streamID);
}
}
@@ -1143,11 +1177,20 @@ void QSpdyProtocolHandler::handleWINDOW_UPDATE(char /*flags*/, quint32 /*length*
qint32 streamID = getStreamID(frameData.constData());
qint32 deltaWindowSize = fourBytesToInt(frameData.constData() + 4);
+ if (!m_inFlightStreams.contains(streamID)) {
+ sendRST_STREAM(streamID, RST_STREAM_INVALID_STREAM);
+ return;
+ }
+
QHttpNetworkReply *reply = m_inFlightStreams.value(streamID).second;
Q_ASSERT(reply);
QHttpNetworkReplyPrivate *replyPrivate = reply->d_func();
Q_ASSERT(replyPrivate);
+ // Ignore WINDOW_UPDATE if we are already done.
+ if (replyPrivate->state == QHttpNetworkReplyPrivate::SPDYHalfClosed || replyPrivate->state == QHttpNetworkReplyPrivate::SPDYClosed)
+ return;
+
replyPrivate->currentlyUploadedDataInWindow = replyPrivate->windowSizeUpload - deltaWindowSize;
uploadData(streamID); // we hopefully can continue to upload
}
@@ -1158,6 +1201,11 @@ void QSpdyProtocolHandler::handleDataFrame(const QByteArray &frameHeaders)
Q_ASSERT(frameHeaders.count() >= 8);
qint32 streamID = getStreamID(frameHeaders.constData());
+ if (!m_inFlightStreams.contains(streamID)) {
+ sendRST_STREAM(streamID, RST_STREAM_INVALID_STREAM);
+ return;
+ }
+
unsigned char flags = static_cast<unsigned char>(frameHeaders.at(4));
flags &= 0x3f;
bool flag_fin = flags & 0x01;
@@ -1182,6 +1230,11 @@ void QSpdyProtocolHandler::handleDataFrame(const QByteArray &frameHeaders)
QHttpNetworkReplyPrivate *replyPrivate = httpReply->d_func();
+ if (replyPrivate->state == QHttpNetworkReplyPrivate::SPDYClosed) {
+ sendRST_STREAM(streamID, RST_STREAM_STREAM_ALREADY_CLOSED);
+ return;
+ }
+
// check whether we need to send WINDOW_UPDATE (i.e. tell the sender it can send more)
replyPrivate->currentlyReceivedDataInWindow += length;
qint32 dataLeftInWindow = replyPrivate->windowSizeDownload - replyPrivate->currentlyReceivedDataInWindow;
@@ -1234,29 +1287,18 @@ void QSpdyProtocolHandler::handleDataFrame(const QByteArray &frameHeaders)
}
if (flag_fin) {
- switch (httpReply->d_func()->state) {
- case QHttpNetworkReplyPrivate::SPDYSYNSent:
- httpReply->d_func()->state = QHttpNetworkReplyPrivate::SPDYHalfClosed;
- // ### send FIN ourselves?
- break;
- case QHttpNetworkReplyPrivate::SPDYHalfClosed:
- replyFinished(httpReply, streamID);
- break;
- case QHttpNetworkReplyPrivate::SPDYClosed: {
- sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
- replyFinishedWithError(httpReply, streamID, QNetworkReply::ProtocolFailure,
- "server sent data on an already closed stream");
- break;
- }
- default:
- qWarning() << Q_FUNC_INFO << "got data frame in unknown state";
- }
+ if (httpReply->d_func()->state != QHttpNetworkReplyPrivate::SPDYHalfClosed)
+ sendDataFrame(streamID, DataFrame_FLAG_FIN, 0, 0);
+ replyFinished(httpReply, streamID);
}
}
void QSpdyProtocolHandler::replyFinished(QHttpNetworkReply *httpReply, qint32 streamID)
{
httpReply->d_func()->state = QHttpNetworkReplyPrivate::SPDYClosed;
+ httpReply->disconnect(this);
+ if (httpReply->request().uploadByteDevice())
+ httpReply->request().uploadByteDevice()->disconnect(this);
int streamsRemoved = m_inFlightStreams.remove(streamID);
Q_ASSERT(streamsRemoved == 1);
Q_UNUSED(streamsRemoved); // silence -Wunused-variable
@@ -1268,6 +1310,9 @@ void QSpdyProtocolHandler::replyFinishedWithError(QHttpNetworkReply *httpReply,
{
Q_ASSERT(httpReply);
httpReply->d_func()->state = QHttpNetworkReplyPrivate::SPDYClosed;
+ httpReply->disconnect(this);
+ if (httpReply->request().uploadByteDevice())
+ httpReply->request().uploadByteDevice()->disconnect(this);
int streamsRemoved = m_inFlightStreams.remove(streamID);
Q_ASSERT(streamsRemoved == 1);
Q_UNUSED(streamsRemoved); // silence -Wunused-variable
diff --git a/src/network/access/qspdyprotocolhandler_p.h b/src/network/access/qspdyprotocolhandler_p.h
index 8cbfbdda86..50c5ed52a1 100644
--- a/src/network/access/qspdyprotocolhandler_p.h
+++ b/src/network/access/qspdyprotocolhandler_p.h
@@ -108,6 +108,7 @@ public:
private slots:
void _q_uploadDataReadyRead();
+ void _q_replyDestroyed(QObject*);
private:
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 025e3f3e00..cafb09b181 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -433,7 +433,7 @@ void QHostInfo::setErrorString(const QString &str)
Returns the DNS domain of this machine.
- Note: DNS domains are not related to domain names found in
+ \note DNS domains are not related to domain names found in
Windows networks.
\sa hostName()
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 5cc41392b5..e797eaaed4 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -841,7 +841,7 @@ QList<QByteArray> QNetworkProxy::rawHeaderList() const
will also set the known header LastModifiedHeader to be the
QDateTime object of the parsed date.
- Note: setting the same header twice overrides the previous
+ \note Setting the same header twice overrides the previous
setting. To accomplish the behaviour of multiple HTTP headers of
the same name, you should concatenate the two values, separating
them with a comma (",") and set one single raw header.
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 0345537d1c..1ceec717c6 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1552,7 +1552,7 @@ bool QAbstractSocket::bind(quint16 port, BindMode mode)
Returns \c true if the socket is valid and ready for use; otherwise
returns \c false.
- \b{Note:} The socket's state must be ConnectedState before reading and
+ \note The socket's state must be ConnectedState before reading and
writing can occur.
\sa state()
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp
index 791227002d..d268a238e0 100644
--- a/src/network/socket/qlocalserver.cpp
+++ b/src/network/socket/qlocalserver.cpp
@@ -278,8 +278,7 @@ bool QLocalServer::isListening() const
could also be a path such as "/tmp/foo" and on Windows this could
be a pipe path such as "\\\\.\\pipe\\foo"
- Note:
- On Unix if the server crashes without closing listen will fail
+ \note On Unix if the server crashes without closing listen will fail
with AddressInUseError. To create a new server the file should be removed.
On Windows two local servers can listen to the same pipe at the same
time, but any connections will go to one of the server.
diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp
index d4251672db..f7033893bc 100644
--- a/src/network/socket/qlocalsocket.cpp
+++ b/src/network/socket/qlocalsocket.cpp
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
waitForReadyRead(), waitForBytesWritten(), and waitForDisconnected()
which blocks until the operation is complete or the timeout expires.
- Note that this feature is not supported on versions of Windows earlier than
+ \note This feature is not supported on versions of Windows earlier than
Windows XP.
\sa QLocalServer
diff --git a/src/network/socket/qtcpsocket.cpp b/src/network/socket/qtcpsocket.cpp
index ce37401a89..e6f5887095 100644
--- a/src/network/socket/qtcpsocket.cpp
+++ b/src/network/socket/qtcpsocket.cpp
@@ -58,7 +58,7 @@
allows you to establish a TCP connection and transfer streams of
data. See the QAbstractSocket documentation for details.
- \b{Note:} TCP sockets cannot be opened in QIODevice::Unbuffered mode.
+ \note TCP sockets cannot be opened in QIODevice::Unbuffered mode.
\sa QTcpServer, QUdpSocket, QNetworkAccessManager,
{Fortune Server Example}, {Fortune Client Example},
diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp
index 5b7274e3e6..b555c885b1 100644
--- a/src/network/ssl/qssl.cpp
+++ b/src/network/ssl/qssl.cpp
@@ -129,7 +129,7 @@ QT_BEGIN_NAMESPACE
\value SecureProtocols The default option, using protocols known to be secure;
currently behaves like TlsV1SslV3.
- Note: most servers using SSL understand both versions (2 and 3),
+ \note most servers using SSL understand both versions (2 and 3),
but it is recommended to use the latest version only for security
reasons. However, SSL and TLS are not compatible with each other:
if you get unexpected handshake failures, verify that you chose
@@ -176,7 +176,7 @@ QT_BEGIN_NAMESPACE
SslOptionDisableSessionPersistence is turned on to optimize memory usage.
The other options are turned off.
- Note: Availability of above options depends on the version of the SSL
+ \note Availability of above options depends on the version of the SSL
backend in use.
*/
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index 3b59b0e3ce..64b75f98ec 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -657,7 +657,7 @@ bool QSslConfiguration::testSslOption(QSsl::SslOption option) const
used or QSsl::SslOptionDisableSessionPersistence was not turned off,
this function returns an empty QByteArray.
- \b{Note:} When persisting the session ticket to disk or similar, be
+ \note When persisting the session ticket to disk or similar, be
careful not to expose the session to a potential attacker, as
knowledge of the session allows for eavesdropping on data
encrypted with the session parameters.
diff --git a/src/network/ssl/qsslcontext.cpp b/src/network/ssl/qsslcontext.cpp
index 551804ec79..1634ba0649 100644
--- a/src/network/ssl/qsslcontext.cpp
+++ b/src/network/ssl/qsslcontext.cpp
@@ -349,7 +349,7 @@ SSL* QSslContext::createSsl()
// We cache exactly one session here
bool QSslContext::cacheSession(SSL* ssl)
{
- // dont cache the same session again
+ // don't cache the same session again
if (session && session == q_SSL_get_session(ssl))
return true;
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 419bf0bf30..04c0fb0487 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -283,7 +283,7 @@
\a errors contains one or more errors that prevent QSslSocket from
verifying the identity of the peer.
- Note: You cannot use Qt::QueuedConnection when connecting to this signal,
+ \note You cannot use Qt::QueuedConnection when connecting to this signal,
or calling QSslSocket::ignoreSslErrors() will have no effect.
\sa peerVerifyError()
@@ -400,7 +400,7 @@ void QSslSocket::resume()
\snippet code/src_network_ssl_qsslsocket.cpp 3
- \b{Note:} The example above shows that text can be written to
+ \note The example above shows that text can be written to
the socket immediately after requesting the encrypted connection,
before the encrypted() signal has been emitted. In such cases, the
text is queued in the object and written to the socket \e after
@@ -470,7 +470,7 @@ void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port,
The socket is opened in the mode specified by \a openMode, and
enters the socket state specified by \a state.
- \b{Note:} It is not possible to initialize two sockets with the same
+ \note It is not possible to initialize two sockets with the same
native socket descriptor.
\sa socketDescriptor()
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index 394eb99307..56f3f5ad0a 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -163,7 +163,7 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context)
code[NonPremultipliedImageSrcFragmentShader] = qglslNonPremultipliedImageSrcFragmentShader;
code[CustomImageSrcFragmentShader] = qglslCustomSrcFragmentShader; // Calls "customShader", which must be appended
code[SolidBrushSrcFragmentShader] = qglslSolidBrushSrcFragmentShader;
- if (!QOpenGLFunctions::isES())
+ if (!context->contextHandle()->isES())
code[TextureBrushSrcFragmentShader] = qglslTextureBrushSrcFragmentShader_desktop;
else
code[TextureBrushSrcFragmentShader] = qglslTextureBrushSrcFragmentShader_ES;
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index eff33d6da0..bbd9d86773 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -90,7 +90,7 @@
qglslMainVertexShader
qglslMainWithTexCoordsVertexShader
- And the the following position vertex shaders:
+ And the following position vertex shaders:
qglslPositionOnlyVertexShader
qglslPositionWithTextureBrushVertexShader
qglslPositionWithPatternBrushVertexShader
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index b8c039d0e2..fd64a4a71f 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -539,7 +539,7 @@ void QGL2PaintEngineEx::beginNativePainting()
d->funcs.glDisableVertexAttribArray(i);
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!d->ctx->contextHandle()->isES()) {
const QGLContext *ctx = d->ctx;
const QGLFormat &fmt = d->device->format();
if (fmt.majorVersion() < 3 || (fmt.majorVersion() == 3 && fmt.minorVersion() < 1)
@@ -597,7 +597,7 @@ void QGL2PaintEngineExPrivate::resetGLState()
ctx->d_func()->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false);
ctx->d_func()->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!ctx->contextHandle()->isES()) {
// gl_Color, corresponding to vertex attribute 3, may have been changed
float color[] = { 1.0f, 1.0f, 1.0f, 1.0f };
funcs.glVertexAttrib4fv(3, color);
@@ -1353,10 +1353,11 @@ void QGL2PaintEngineEx::compositionModeChanged()
void QGL2PaintEngineEx::renderHintsChanged()
{
+ Q_D(QGL2PaintEngineEx);
state()->renderHintsChanged = true;
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!d->ctx->contextHandle()->isES()) {
if ((state()->renderHints & QPainter::Antialiasing)
|| (state()->renderHints & QPainter::HighQualityAntialiasing))
glEnable(GL_MULTISAMPLE);
@@ -1365,7 +1366,6 @@ void QGL2PaintEngineEx::renderHintsChanged()
}
#endif
- Q_D(QGL2PaintEngineEx);
d->lastTextureUsed = GLuint(-1);
d->brushTextureDirty = true;
// qDebug("QGL2PaintEngineEx::renderHintsChanged() not implemented!");
@@ -2032,14 +2032,14 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
glDisable(GL_SCISSOR_TEST);
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES())
+ if (!d->ctx->contextHandle()->isES())
glDisable(GL_MULTISAMPLE);
#endif
d->glyphCacheFormat = QFontEngine::Format_A8;
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!d->ctx->contextHandle()->isES()) {
d->glyphCacheFormat = QFontEngine::Format_A32;
d->multisamplingAlwaysEnabled = false;
} else {
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index f9f2670375..b1e289254f 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -319,7 +319,7 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed sub
uchar g = src[x] >> 8;
uchar b = src[x];
quint32 avg = (quint32(r) + quint32(g) + quint32(b) + 1) / 3; // "+1" for rounding.
- if (QOpenGLFunctions::isES()) {
+ if (ctx->contextHandle()->isES()) {
// swizzle the bits to accommodate for the GL_RGBA upload.
src[x] = (avg << 24) | (quint32(r) << 0) | (quint32(g) << 8) | (quint32(b) << 16);
} else {
@@ -333,7 +333,7 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed sub
if (mask.format() == QImage::Format_RGB32) {
GLenum format = GL_RGBA;
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES())
+ if (!ctx->contextHandle()->isES())
format = GL_BGRA;
#endif
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, format, GL_UNSIGNED_BYTE, mask.bits());
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index e027de02e0..1fbff0f0fe 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1700,7 +1700,7 @@ QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alp
int w = size.width();
int h = size.height();
#ifndef QT_OPENGL_ES
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
//### glGetTexImage not in GL ES 2.0, need to do something else here!
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
}
@@ -2284,7 +2284,8 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
glBindTexture(target, tx_id);
glTexParameteri(target, GL_TEXTURE_MAG_FILTER, filtering);
- bool genMipmap = !QOpenGLFunctions::isES();
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ bool genMipmap = !ctx->isES();
if (glFormat.directRendering()
&& (qgl_extensions()->hasOpenGLExtension(QOpenGLExtensions::GenerateMipmap))
&& target == GL_TEXTURE_2D
@@ -2426,7 +2427,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
printf(" - did byte swapping (%d ms)\n", time.elapsed());
#endif
}
- if (QOpenGLFunctions::isES()) {
+ if (ctx->isES()) {
// OpenGL/ES requires that the internal and external formats be
// identical.
internalFormat = externalFormat;
@@ -2439,7 +2440,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
const QImage &constRef = img; // to avoid detach in bits()...
glTexImage2D(target, 0, internalFormat, img.width(), img.height(), 0, externalFormat,
pixel_type, constRef.bits());
- if (genMipmap && QOpenGLFunctions::isES())
+ if (genMipmap && ctx->isES())
functions->glGenerateMipmap(target);
#ifndef QT_NO_DEBUG
GLenum error = glGetError();
@@ -2522,7 +2523,8 @@ int QGLContextPrivate::maxTextureSize()
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
#ifndef QT_OPENGL_ES
- if (!QOpenGLFunctions::isES()) {
+ Q_Q(QGLContext);
+ if (!q->contextHandle()->isES()) {
GLenum proxy = GL_PROXY_TEXTURE_2D;
GLint size;
@@ -2700,7 +2702,7 @@ static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint tex
Q_UNUSED(textureHeight);
Q_UNUSED(textureTarget);
#else
- if (textureTarget != GL_TEXTURE_2D && !QOpenGLFunctions::isES()) {
+ if (textureTarget != GL_TEXTURE_2D && !QOpenGLContext::currentContext()->isES()) {
if (textureWidth == -1 || textureHeight == -1) {
glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_WIDTH, &textureWidth);
glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_HEIGHT, &textureHeight);
@@ -2767,7 +2769,7 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text
#endif
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!contextHandle()->isES()) {
#ifdef QT_OPENGL_ES
if (textureTarget != GL_TEXTURE_2D) {
qWarning("QGLContext::drawTexture(): texture target must be GL_TEXTURE_2D on OpenGL ES");
@@ -2829,7 +2831,7 @@ void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum text
Q_UNUSED(textureId);
Q_UNUSED(textureTarget);
#else
- if (!QOpenGLFunctions::isES()) {
+ if (!contextHandle()->isES()) {
const bool wasEnabled = glIsEnabled(GL_TEXTURE_2D);
GLint oldTexture;
glGetIntegerv(GL_TEXTURE_BINDING_2D, &oldTexture);
@@ -4172,7 +4174,7 @@ void QGLWidget::glDraw()
return;
makeCurrent();
#ifndef QT_OPENGL_ES
- if (d->glcx->deviceIsPixmap() && !QOpenGLFunctions::isES())
+ if (d->glcx->deviceIsPixmap() && !d->glcx->contextHandle()->isES())
glDrawBuffer(GL_FRONT);
#endif
QSize readback_target_size = d->glcx->d_ptr->readback_target_size;
@@ -4215,20 +4217,18 @@ void QGLWidget::qglColor(const QColor& c) const
#ifdef QT_OPENGL_ES
glColor4f(c.redF(), c.greenF(), c.blueF(), c.alphaF());
#else
- if (!QOpenGLFunctions::isES()) {
- Q_D(const QGLWidget);
- const QGLContext *ctx = QGLContext::currentContext();
- if (ctx) {
- if (ctx->format().rgba())
- glColor4f(c.redF(), c.greenF(), c.blueF(), c.alphaF());
- else if (!d->cmap.isEmpty()) { // QGLColormap in use?
- int i = d->cmap.find(c.rgb());
- if (i < 0)
- i = d->cmap.findNearest(c.rgb());
- glIndexi(i);
- } else
- glIndexi(ctx->colorIndex(c));
- }
+ Q_D(const QGLWidget);
+ const QGLContext *ctx = QGLContext::currentContext();
+ if (ctx && !ctx->contextHandle()->isES()) {
+ if (ctx->format().rgba())
+ glColor4f(c.redF(), c.greenF(), c.blueF(), c.alphaF());
+ else if (!d->cmap.isEmpty()) { // QGLColormap in use?
+ int i = d->cmap.find(c.rgb());
+ if (i < 0)
+ i = d->cmap.findNearest(c.rgb());
+ glIndexi(i);
+ } else
+ glIndexi(ctx->colorIndex(c));
}
#endif //QT_OPENGL_ES
#else
@@ -4249,20 +4249,18 @@ void QGLWidget::qglClearColor(const QColor& c) const
#ifdef QT_OPENGL_ES
glClearColor(c.redF(), c.greenF(), c.blueF(), c.alphaF());
#else
- if (!QOpenGLFunctions::isES()) {
- Q_D(const QGLWidget);
- const QGLContext *ctx = QGLContext::currentContext();
- if (ctx) {
- if (ctx->format().rgba())
- glClearColor(c.redF(), c.greenF(), c.blueF(), c.alphaF());
- else if (!d->cmap.isEmpty()) { // QGLColormap in use?
- int i = d->cmap.find(c.rgb());
- if (i < 0)
- i = d->cmap.findNearest(c.rgb());
- glClearIndex(i);
- } else {
- glClearIndex(ctx->colorIndex(c));
- }
+ Q_D(const QGLWidget);
+ const QGLContext *ctx = QGLContext::currentContext();
+ if (ctx && !ctx->contextHandle()->isES()) {
+ if (ctx->format().rgba())
+ glClearColor(c.redF(), c.greenF(), c.blueF(), c.alphaF());
+ else if (!d->cmap.isEmpty()) { // QGLColormap in use?
+ int i = d->cmap.find(c.rgb());
+ if (i < 0)
+ i = d->cmap.findNearest(c.rgb());
+ glClearIndex(i);
+ } else {
+ glClearIndex(ctx->colorIndex(c));
}
} else {
glClearColor(c.redF(), c.greenF(), c.blueF(), c.alphaF());
@@ -4427,7 +4425,8 @@ static void qt_gl_draw_text(QPainter *p, int x, int y, const QString &str,
void QGLWidget::renderText(int x, int y, const QString &str, const QFont &font)
{
#ifndef QT_OPENGL_ES
- if (!QOpenGLFunctions::isES()) {
+ Q_D(QGLWidget);
+ if (!d->glcx->contextHandle()->isES()) {
Q_D(QGLWidget);
if (str.isEmpty() || !isValid())
return;
@@ -4522,7 +4521,8 @@ void QGLWidget::renderText(int x, int y, const QString &str, const QFont &font)
void QGLWidget::renderText(double x, double y, double z, const QString &str, const QFont &font)
{
#ifndef QT_OPENGL_ES
- if (!QOpenGLFunctions::isES()) {
+ Q_D(QGLWidget);
+ if (!d->glcx->contextHandle()->isES()) {
Q_D(QGLWidget);
if (str.isEmpty() || !isValid())
return;
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp
index 4f4df8d2e4..fe4d1c363c 100644
--- a/src/opengl/qgl_qpa.cpp
+++ b/src/opengl/qgl_qpa.cpp
@@ -321,7 +321,7 @@ QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
d->context = new QOpenGLContext;
#if !defined(QT_OPENGL_ES)
- if (!QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL) {
// On desktop, request latest released version
QSurfaceFormat format;
#if defined(Q_OS_MAC)
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index 5491bad628..0bcb9d4f1f 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -344,7 +344,7 @@ void QGLBuffer::destroy()
bool QGLBuffer::read(int offset, void *data, int count)
{
#if !defined(QT_OPENGL_ES)
- if (QOpenGLFunctions::platformGLType() != QOpenGLFunctions::GLES1) {
+ if (QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) {
Q_D(QGLBuffer);
if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id())
return false;
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index b4821ccf61..d636da91b5 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -595,7 +595,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
GL_DEPTH_COMPONENT16, size.width(), size.height());
}
#else
- if (QOpenGLFunctions::isES()) {
+ if (ctx->contextHandle()->isES()) {
if (funcs.hasOpenGLExtension(QOpenGLExtensions::Depth24))
funcs.glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples,
GL_DEPTH_COMPONENT24, size.width(), size.height());
@@ -617,7 +617,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
size.width(), size.height());
}
#else
- if (QOpenGLFunctions::isES()) {
+ if (ctx->contextHandle()->isES()) {
if (funcs.hasOpenGLExtension(QOpenGLExtensions::Depth24)) {
funcs.glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24,
size.width(), size.height());
@@ -647,7 +647,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
#ifdef QT_OPENGL_ES
GLenum storage = GL_STENCIL_INDEX8;
#else
- GLenum storage = QOpenGLFunctions::isES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
+ GLenum storage = ctx->contextHandle()->isES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
#endif
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample))
@@ -849,7 +849,7 @@ QGLFramebufferObject::QGLFramebufferObject(const QSize &size, GLenum target)
Q_D(QGLFramebufferObject);
d->init(this, size, NoAttachment, target,
#ifndef QT_OPENGL_ES_2
- QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8
+ QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8
#else
GL_RGBA
#endif
@@ -869,7 +869,7 @@ QGLFramebufferObject::QGLFramebufferObject(int width, int height, GLenum target)
Q_D(QGLFramebufferObject);
d->init(this, QSize(width, height), NoAttachment, target,
#ifndef QT_OPENGL_ES_2
- QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8
+ QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8
#else
GL_RGBA
#endif
@@ -926,7 +926,7 @@ QGLFramebufferObject::QGLFramebufferObject(int width, int height, Attachment att
#ifdef QT_OPENGL_ES_2
internal_format = GL_RGBA;
#else
- internal_format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ internal_format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8;
#endif
d->init(this, QSize(width, height), attachment, target, internal_format);
}
@@ -953,7 +953,7 @@ QGLFramebufferObject::QGLFramebufferObject(const QSize &size, Attachment attachm
#ifdef QT_OPENGL_ES_2
internal_format = GL_RGBA;
#else
- internal_format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ internal_format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8;
#endif
d->init(this, size, attachment, target, internal_format);
}
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index 3b36c5c2b6..0edce5da2f 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -71,7 +71,9 @@ public:
mipmap(false)
{
#ifndef QT_OPENGL_ES_2
- internal_format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ const bool isES = ctx ? ctx->isES() : QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL;
+ internal_format = isES ? GL_RGBA : GL_RGBA8;
#else
internal_format = GL_RGBA;
#endif
diff --git a/src/opengl/qglfunctions.cpp b/src/opengl/qglfunctions.cpp
index e75f9cf915..d82e55eba1 100644
--- a/src/opengl/qglfunctions.cpp
+++ b/src/opengl/qglfunctions.cpp
@@ -150,7 +150,16 @@ struct QGLFunctionsPrivateEx : public QGLFunctionsPrivate, public QOpenGLSharedR
QGLFunctionsPrivateEx(QOpenGLContext *context)
: QGLFunctionsPrivate(QGLContext::fromOpenGLContext(context))
, QOpenGLSharedResource(context->shareGroup())
- , m_features(-1) {}
+ , m_features(-1)
+ {
+ funcs = new QOpenGLFunctions(context);
+ funcs->initializeOpenGLFunctions();
+ }
+
+ ~QGLFunctionsPrivateEx()
+ {
+ delete funcs;
+ }
void invalidateResource()
{
@@ -213,7 +222,9 @@ QGLFunctions::QGLFunctions(const QGLContext *context)
static int qt_gl_resolve_features()
{
- if (QOpenGLFunctions::platformGLType() == QOpenGLFunctions::GLES2) {
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ if (ctx->isES() && QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) {
+ // OpenGL ES 2
int features = QGLFunctions::Multitexture |
QGLFunctions::Shaders |
QGLFunctions::Buffers |
@@ -232,7 +243,8 @@ static int qt_gl_resolve_features()
if (extensions.match("GL_IMG_texture_npot"))
features |= QGLFunctions::NPOTTextures;
return features;
- } if (QOpenGLFunctions::platformGLType() == QOpenGLFunctions::GLES1) {
+ } else if (ctx->isES()) {
+ // OpenGL ES 1
int features = QGLFunctions::Multitexture |
QGLFunctions::Buffers |
QGLFunctions::CompressedTextures |
@@ -252,6 +264,7 @@ static int qt_gl_resolve_features()
features |= QGLFunctions::NPOTTextures;
return features;
} else {
+ // OpenGL
int features = 0;
QGLFormat::OpenGLVersionFlags versions = QGLFormat::openGLVersionFlags();
QOpenGLExtensionMatcher extensions;
@@ -1359,2360 +1372,9 @@ void QGLFunctions::initializeGLFunctions(const QGLContext *context)
This convenience function will do nothing on OpenGL/ES 1.x systems.
*/
-#ifndef QT_OPENGL_ES_2
-
-static void QGLF_APIENTRY qglfResolveActiveTexture(GLenum texture)
-{
- typedef void (QGLF_APIENTRYP type_glActiveTexture)(GLenum texture);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->activeTexture = (type_glActiveTexture)
- context->getProcAddress(QLatin1String("glActiveTexture"));
- if (!funcs->activeTexture) {
- funcs->activeTexture = (type_glActiveTexture)
- context->getProcAddress(QLatin1String("glActiveTextureARB"));
- }
-
- if (funcs->activeTexture)
- funcs->activeTexture(texture);
- else
- funcs->activeTexture = qglfResolveActiveTexture;
-}
-
-static void QGLF_APIENTRY qglfResolveAttachShader(GLuint program, GLuint shader)
-{
- typedef void (QGLF_APIENTRYP type_glAttachShader)(GLuint program, GLuint shader);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->attachShader = (type_glAttachShader)
- context->getProcAddress(QLatin1String("glAttachShader"));
- if (!funcs->attachShader) {
- funcs->attachShader = (type_glAttachShader)
- context->getProcAddress(QLatin1String("glAttachObjectARB"));
- }
-
- if (funcs->attachShader)
- funcs->attachShader(program, shader);
- else
- funcs->attachShader = qglfResolveAttachShader;
-}
-
-static void QGLF_APIENTRY qglfResolveBindAttribLocation(GLuint program, GLuint index, const char* name)
-{
- typedef void (QGLF_APIENTRYP type_glBindAttribLocation)(GLuint program, GLuint index, const char* name);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->bindAttribLocation = (type_glBindAttribLocation)
- context->getProcAddress(QLatin1String("glBindAttribLocation"));
- if (!funcs->bindAttribLocation) {
- funcs->bindAttribLocation = (type_glBindAttribLocation)
- context->getProcAddress(QLatin1String("glBindAttribLocationARB"));
- }
-
- if (funcs->bindAttribLocation)
- funcs->bindAttribLocation(program, index, name);
- else
- funcs->bindAttribLocation = qglfResolveBindAttribLocation;
-}
-
-static void QGLF_APIENTRY qglfResolveBindBuffer(GLenum target, GLuint buffer)
-{
- typedef void (QGLF_APIENTRYP type_glBindBuffer)(GLenum target, GLuint buffer);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->bindBuffer = (type_glBindBuffer)
- context->getProcAddress(QLatin1String("glBindBuffer"));
-#ifdef QT_OPENGL_ES
- if (!funcs->bindBuffer) {
- funcs->bindBuffer = (type_glBindBuffer)
- context->getProcAddress(QLatin1String("glBindBufferOES"));
- }
-#endif
- if (!funcs->bindBuffer) {
- funcs->bindBuffer = (type_glBindBuffer)
- context->getProcAddress(QLatin1String("glBindBufferEXT"));
- }
- if (!funcs->bindBuffer) {
- funcs->bindBuffer = (type_glBindBuffer)
- context->getProcAddress(QLatin1String("glBindBufferARB"));
- }
-
- if (funcs->bindBuffer)
- funcs->bindBuffer(target, buffer);
- else
- funcs->bindBuffer = qglfResolveBindBuffer;
-}
-
-static void QGLF_APIENTRY qglfResolveBindFramebuffer(GLenum target, GLuint framebuffer)
-{
- typedef void (QGLF_APIENTRYP type_glBindFramebuffer)(GLenum target, GLuint framebuffer);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->bindFramebuffer = (type_glBindFramebuffer)
- context->getProcAddress(QLatin1String("glBindFramebuffer"));
-#ifdef QT_OPENGL_ES
- if (!funcs->bindFramebuffer) {
- funcs->bindFramebuffer = (type_glBindFramebuffer)
- context->getProcAddress(QLatin1String("glBindFramebufferOES"));
- }
-#endif
- if (!funcs->bindFramebuffer) {
- funcs->bindFramebuffer = (type_glBindFramebuffer)
- context->getProcAddress(QLatin1String("glBindFramebufferEXT"));
- }
- if (!funcs->bindFramebuffer) {
- funcs->bindFramebuffer = (type_glBindFramebuffer)
- context->getProcAddress(QLatin1String("glBindFramebufferARB"));
- }
-
- if (funcs->bindFramebuffer)
- funcs->bindFramebuffer(target, framebuffer);
- else
- funcs->bindFramebuffer = qglfResolveBindFramebuffer;
-}
-
-static void QGLF_APIENTRY qglfResolveBindRenderbuffer(GLenum target, GLuint renderbuffer)
-{
- typedef void (QGLF_APIENTRYP type_glBindRenderbuffer)(GLenum target, GLuint renderbuffer);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->bindRenderbuffer = (type_glBindRenderbuffer)
- context->getProcAddress(QLatin1String("glBindRenderbuffer"));
-#ifdef QT_OPENGL_ES
- if (!funcs->bindRenderbuffer) {
- funcs->bindRenderbuffer = (type_glBindRenderbuffer)
- context->getProcAddress(QLatin1String("glBindRenderbufferOES"));
- }
-#endif
- if (!funcs->bindRenderbuffer) {
- funcs->bindRenderbuffer = (type_glBindRenderbuffer)
- context->getProcAddress(QLatin1String("glBindRenderbufferEXT"));
- }
- if (!funcs->bindRenderbuffer) {
- funcs->bindRenderbuffer = (type_glBindRenderbuffer)
- context->getProcAddress(QLatin1String("glBindRenderbufferARB"));
- }
-
- if (funcs->bindRenderbuffer)
- funcs->bindRenderbuffer(target, renderbuffer);
- else
- funcs->bindRenderbuffer = qglfResolveBindRenderbuffer;
-}
-
-static void QGLF_APIENTRY qglfResolveBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- typedef void (QGLF_APIENTRYP type_glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->blendColor = (type_glBlendColor)
- context->getProcAddress(QLatin1String("glBlendColor"));
-#ifdef QT_OPENGL_ES
- if (!funcs->blendColor) {
- funcs->blendColor = (type_glBlendColor)
- context->getProcAddress(QLatin1String("glBlendColorOES"));
- }
-#endif
- if (!funcs->blendColor) {
- funcs->blendColor = (type_glBlendColor)
- context->getProcAddress(QLatin1String("glBlendColorEXT"));
- }
- if (!funcs->blendColor) {
- funcs->blendColor = (type_glBlendColor)
- context->getProcAddress(QLatin1String("glBlendColorARB"));
- }
-
- if (funcs->blendColor)
- funcs->blendColor(red, green, blue, alpha);
- else
- funcs->blendColor = qglfResolveBlendColor;
-}
-
-static void QGLF_APIENTRY qglfResolveBlendEquation(GLenum mode)
-{
- typedef void (QGLF_APIENTRYP type_glBlendEquation)(GLenum mode);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->blendEquation = (type_glBlendEquation)
- context->getProcAddress(QLatin1String("glBlendEquation"));
-#ifdef QT_OPENGL_ES
- if (!funcs->blendEquation) {
- funcs->blendEquation = (type_glBlendEquation)
- context->getProcAddress(QLatin1String("glBlendEquationOES"));
- }
-#endif
- if (!funcs->blendEquation) {
- funcs->blendEquation = (type_glBlendEquation)
- context->getProcAddress(QLatin1String("glBlendEquationEXT"));
- }
- if (!funcs->blendEquation) {
- funcs->blendEquation = (type_glBlendEquation)
- context->getProcAddress(QLatin1String("glBlendEquationARB"));
- }
-
- if (funcs->blendEquation)
- funcs->blendEquation(mode);
- else
- funcs->blendEquation = qglfResolveBlendEquation;
-}
-
-static void QGLF_APIENTRY qglfResolveBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
-{
- typedef void (QGLF_APIENTRYP type_glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->blendEquationSeparate = (type_glBlendEquationSeparate)
- context->getProcAddress(QLatin1String("glBlendEquationSeparate"));
-#ifdef QT_OPENGL_ES
- if (!funcs->blendEquationSeparate) {
- funcs->blendEquationSeparate = (type_glBlendEquationSeparate)
- context->getProcAddress(QLatin1String("glBlendEquationSeparateOES"));
- }
-#endif
- if (!funcs->blendEquationSeparate) {
- funcs->blendEquationSeparate = (type_glBlendEquationSeparate)
- context->getProcAddress(QLatin1String("glBlendEquationSeparateEXT"));
- }
- if (!funcs->blendEquationSeparate) {
- funcs->blendEquationSeparate = (type_glBlendEquationSeparate)
- context->getProcAddress(QLatin1String("glBlendEquationSeparateARB"));
- }
-
- if (funcs->blendEquationSeparate)
- funcs->blendEquationSeparate(modeRGB, modeAlpha);
- else
- funcs->blendEquationSeparate = qglfResolveBlendEquationSeparate;
-}
-
-static void QGLF_APIENTRY qglfResolveBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
-{
- typedef void (QGLF_APIENTRYP type_glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->blendFuncSeparate = (type_glBlendFuncSeparate)
- context->getProcAddress(QLatin1String("glBlendFuncSeparate"));
-#ifdef QT_OPENGL_ES
- if (!funcs->blendFuncSeparate) {
- funcs->blendFuncSeparate = (type_glBlendFuncSeparate)
- context->getProcAddress(QLatin1String("glBlendFuncSeparateOES"));
- }
-#endif
- if (!funcs->blendFuncSeparate) {
- funcs->blendFuncSeparate = (type_glBlendFuncSeparate)
- context->getProcAddress(QLatin1String("glBlendFuncSeparateEXT"));
- }
- if (!funcs->blendFuncSeparate) {
- funcs->blendFuncSeparate = (type_glBlendFuncSeparate)
- context->getProcAddress(QLatin1String("glBlendFuncSeparateARB"));
- }
-
- if (funcs->blendFuncSeparate)
- funcs->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
- else
- funcs->blendFuncSeparate = qglfResolveBlendFuncSeparate;
-}
-
-static void QGLF_APIENTRY qglfResolveBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage)
-{
- typedef void (QGLF_APIENTRYP type_glBufferData)(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->bufferData = (type_glBufferData)
- context->getProcAddress(QLatin1String("glBufferData"));
-#ifdef QT_OPENGL_ES
- if (!funcs->bufferData) {
- funcs->bufferData = (type_glBufferData)
- context->getProcAddress(QLatin1String("glBufferDataOES"));
- }
-#endif
- if (!funcs->bufferData) {
- funcs->bufferData = (type_glBufferData)
- context->getProcAddress(QLatin1String("glBufferDataEXT"));
- }
- if (!funcs->bufferData) {
- funcs->bufferData = (type_glBufferData)
- context->getProcAddress(QLatin1String("glBufferDataARB"));
- }
-
- if (funcs->bufferData)
- funcs->bufferData(target, size, data, usage);
- else
- funcs->bufferData = qglfResolveBufferData;
-}
-
-static void QGLF_APIENTRY qglfResolveBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data)
-{
- typedef void (QGLF_APIENTRYP type_glBufferSubData)(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->bufferSubData = (type_glBufferSubData)
- context->getProcAddress(QLatin1String("glBufferSubData"));
-#ifdef QT_OPENGL_ES
- if (!funcs->bufferSubData) {
- funcs->bufferSubData = (type_glBufferSubData)
- context->getProcAddress(QLatin1String("glBufferSubDataOES"));
- }
-#endif
- if (!funcs->bufferSubData) {
- funcs->bufferSubData = (type_glBufferSubData)
- context->getProcAddress(QLatin1String("glBufferSubDataEXT"));
- }
- if (!funcs->bufferSubData) {
- funcs->bufferSubData = (type_glBufferSubData)
- context->getProcAddress(QLatin1String("glBufferSubDataARB"));
- }
-
- if (funcs->bufferSubData)
- funcs->bufferSubData(target, offset, size, data);
- else
- funcs->bufferSubData = qglfResolveBufferSubData;
-}
-
-static GLenum QGLF_APIENTRY qglfResolveCheckFramebufferStatus(GLenum target)
-{
- typedef GLenum (QGLF_APIENTRYP type_glCheckFramebufferStatus)(GLenum target);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->checkFramebufferStatus = (type_glCheckFramebufferStatus)
- context->getProcAddress(QLatin1String("glCheckFramebufferStatus"));
-#ifdef QT_OPENGL_ES
- if (!funcs->checkFramebufferStatus) {
- funcs->checkFramebufferStatus = (type_glCheckFramebufferStatus)
- context->getProcAddress(QLatin1String("glCheckFramebufferStatusOES"));
- }
-#endif
- if (!funcs->checkFramebufferStatus) {
- funcs->checkFramebufferStatus = (type_glCheckFramebufferStatus)
- context->getProcAddress(QLatin1String("glCheckFramebufferStatusEXT"));
- }
- if (!funcs->checkFramebufferStatus) {
- funcs->checkFramebufferStatus = (type_glCheckFramebufferStatus)
- context->getProcAddress(QLatin1String("glCheckFramebufferStatusARB"));
- }
-
- if (funcs->checkFramebufferStatus)
- return funcs->checkFramebufferStatus(target);
- funcs->checkFramebufferStatus = qglfResolveCheckFramebufferStatus;
- return GLenum(0);
-}
-
-static void QGLF_APIENTRY qglfResolveCompileShader(GLuint shader)
-{
- typedef void (QGLF_APIENTRYP type_glCompileShader)(GLuint shader);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->compileShader = (type_glCompileShader)
- context->getProcAddress(QLatin1String("glCompileShader"));
- if (!funcs->compileShader) {
- funcs->compileShader = (type_glCompileShader)
- context->getProcAddress(QLatin1String("glCompileShader"));
- }
-
- if (funcs->compileShader)
- funcs->compileShader(shader);
- else
- funcs->compileShader = qglfResolveCompileShader;
-}
-
-static void QGLF_APIENTRY qglfResolveCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
-{
- typedef void (QGLF_APIENTRYP type_glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->compressedTexImage2D = (type_glCompressedTexImage2D)
- context->getProcAddress(QLatin1String("glCompressedTexImage2D"));
-#ifdef QT_OPENGL_ES
- if (!funcs->compressedTexImage2D) {
- funcs->compressedTexImage2D = (type_glCompressedTexImage2D)
- context->getProcAddress(QLatin1String("glCompressedTexImage2DOES"));
- }
-#endif
- if (!funcs->compressedTexImage2D) {
- funcs->compressedTexImage2D = (type_glCompressedTexImage2D)
- context->getProcAddress(QLatin1String("glCompressedTexImage2DEXT"));
- }
- if (!funcs->compressedTexImage2D) {
- funcs->compressedTexImage2D = (type_glCompressedTexImage2D)
- context->getProcAddress(QLatin1String("glCompressedTexImage2DARB"));
- }
-
- if (funcs->compressedTexImage2D)
- funcs->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
- else
- funcs->compressedTexImage2D = qglfResolveCompressedTexImage2D;
-}
-
-static void QGLF_APIENTRY qglfResolveCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
-{
- typedef void (QGLF_APIENTRYP type_glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->compressedTexSubImage2D = (type_glCompressedTexSubImage2D)
- context->getProcAddress(QLatin1String("glCompressedTexSubImage2D"));
-#ifdef QT_OPENGL_ES
- if (!funcs->compressedTexSubImage2D) {
- funcs->compressedTexSubImage2D = (type_glCompressedTexSubImage2D)
- context->getProcAddress(QLatin1String("glCompressedTexSubImage2DOES"));
- }
-#endif
- if (!funcs->compressedTexSubImage2D) {
- funcs->compressedTexSubImage2D = (type_glCompressedTexSubImage2D)
- context->getProcAddress(QLatin1String("glCompressedTexSubImage2DEXT"));
- }
- if (!funcs->compressedTexSubImage2D) {
- funcs->compressedTexSubImage2D = (type_glCompressedTexSubImage2D)
- context->getProcAddress(QLatin1String("glCompressedTexSubImage2DARB"));
- }
-
- if (funcs->compressedTexSubImage2D)
- funcs->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
- else
- funcs->compressedTexSubImage2D = qglfResolveCompressedTexSubImage2D;
-}
-
-static GLuint QGLF_APIENTRY qglfResolveCreateProgram()
-{
- typedef GLuint (QGLF_APIENTRYP type_glCreateProgram)();
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->createProgram = (type_glCreateProgram)
- context->getProcAddress(QLatin1String("glCreateProgram"));
- if (!funcs->createProgram) {
- funcs->createProgram = (type_glCreateProgram)
- context->getProcAddress(QLatin1String("glCreateProgramObjectARB"));
- }
-
- if (funcs->createProgram)
- return funcs->createProgram();
- funcs->createProgram = qglfResolveCreateProgram;
- return GLuint(0);
-}
-
-static GLuint QGLF_APIENTRY qglfResolveCreateShader(GLenum type)
-{
- typedef GLuint (QGLF_APIENTRYP type_glCreateShader)(GLenum type);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->createShader = (type_glCreateShader)
- context->getProcAddress(QLatin1String("glCreateShader"));
- if (!funcs->createShader) {
- funcs->createShader = (type_glCreateShader)
- context->getProcAddress(QLatin1String("glCreateShaderObjectARB"));
- }
-
- if (funcs->createShader)
- return funcs->createShader(type);
- funcs->createShader = qglfResolveCreateShader;
- return GLuint(0);
-}
-
-static void QGLF_APIENTRY qglfResolveDeleteBuffers(GLsizei n, const GLuint* buffers)
-{
- typedef void (QGLF_APIENTRYP type_glDeleteBuffers)(GLsizei n, const GLuint* buffers);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->deleteBuffers = (type_glDeleteBuffers)
- context->getProcAddress(QLatin1String("glDeleteBuffers"));
-#ifdef QT_OPENGL_ES
- if (!funcs->deleteBuffers) {
- funcs->deleteBuffers = (type_glDeleteBuffers)
- context->getProcAddress(QLatin1String("glDeleteBuffersOES"));
- }
-#endif
- if (!funcs->deleteBuffers) {
- funcs->deleteBuffers = (type_glDeleteBuffers)
- context->getProcAddress(QLatin1String("glDeleteBuffersEXT"));
- }
- if (!funcs->deleteBuffers) {
- funcs->deleteBuffers = (type_glDeleteBuffers)
- context->getProcAddress(QLatin1String("glDeleteBuffersARB"));
- }
-
- if (funcs->deleteBuffers)
- funcs->deleteBuffers(n, buffers);
- else
- funcs->deleteBuffers = qglfResolveDeleteBuffers;
-}
-
-static void QGLF_APIENTRY qglfResolveDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
-{
- typedef void (QGLF_APIENTRYP type_glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->deleteFramebuffers = (type_glDeleteFramebuffers)
- context->getProcAddress(QLatin1String("glDeleteFramebuffers"));
-#ifdef QT_OPENGL_ES
- if (!funcs->deleteFramebuffers) {
- funcs->deleteFramebuffers = (type_glDeleteFramebuffers)
- context->getProcAddress(QLatin1String("glDeleteFramebuffersOES"));
- }
-#endif
- if (!funcs->deleteFramebuffers) {
- funcs->deleteFramebuffers = (type_glDeleteFramebuffers)
- context->getProcAddress(QLatin1String("glDeleteFramebuffersEXT"));
- }
- if (!funcs->deleteFramebuffers) {
- funcs->deleteFramebuffers = (type_glDeleteFramebuffers)
- context->getProcAddress(QLatin1String("glDeleteFramebuffersARB"));
- }
-
- if (funcs->deleteFramebuffers)
- funcs->deleteFramebuffers(n, framebuffers);
- else
- funcs->deleteFramebuffers = qglfResolveDeleteFramebuffers;
-}
-
-static void QGLF_APIENTRY qglfResolveDeleteProgram(GLuint program)
-{
- typedef void (QGLF_APIENTRYP type_glDeleteProgram)(GLuint program);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->deleteProgram = (type_glDeleteProgram)
- context->getProcAddress(QLatin1String("glDeleteProgram"));
- if (!funcs->deleteProgram) {
- funcs->deleteProgram = (type_glDeleteProgram)
- context->getProcAddress(QLatin1String("glDeleteObjectARB"));
- }
-
- if (funcs->deleteProgram)
- funcs->deleteProgram(program);
- else
- funcs->deleteProgram = qglfResolveDeleteProgram;
-}
-
-static void QGLF_APIENTRY qglfResolveDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
-{
- typedef void (QGLF_APIENTRYP type_glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->deleteRenderbuffers = (type_glDeleteRenderbuffers)
- context->getProcAddress(QLatin1String("glDeleteRenderbuffers"));
-#ifdef QT_OPENGL_ES
- if (!funcs->deleteRenderbuffers) {
- funcs->deleteRenderbuffers = (type_glDeleteRenderbuffers)
- context->getProcAddress(QLatin1String("glDeleteRenderbuffersOES"));
- }
-#endif
- if (!funcs->deleteRenderbuffers) {
- funcs->deleteRenderbuffers = (type_glDeleteRenderbuffers)
- context->getProcAddress(QLatin1String("glDeleteRenderbuffersEXT"));
- }
- if (!funcs->deleteRenderbuffers) {
- funcs->deleteRenderbuffers = (type_glDeleteRenderbuffers)
- context->getProcAddress(QLatin1String("glDeleteRenderbuffersARB"));
- }
-
- if (funcs->deleteRenderbuffers)
- funcs->deleteRenderbuffers(n, renderbuffers);
- else
- funcs->deleteRenderbuffers = qglfResolveDeleteRenderbuffers;
-}
-
-static void QGLF_APIENTRY qglfResolveDeleteShader(GLuint shader)
-{
- typedef void (QGLF_APIENTRYP type_glDeleteShader)(GLuint shader);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->deleteShader = (type_glDeleteShader)
- context->getProcAddress(QLatin1String("glDeleteShader"));
- if (!funcs->deleteShader) {
- funcs->deleteShader = (type_glDeleteShader)
- context->getProcAddress(QLatin1String("glDeleteObjectARB"));
- }
-
- if (funcs->deleteShader)
- funcs->deleteShader(shader);
- else
- funcs->deleteShader = qglfResolveDeleteShader;
-}
-
-static void QGLF_APIENTRY qglfResolveDetachShader(GLuint program, GLuint shader)
-{
- typedef void (QGLF_APIENTRYP type_glDetachShader)(GLuint program, GLuint shader);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->detachShader = (type_glDetachShader)
- context->getProcAddress(QLatin1String("glDetachShader"));
- if (!funcs->detachShader) {
- funcs->detachShader = (type_glDetachShader)
- context->getProcAddress(QLatin1String("glDetachObjectARB"));
- }
-
- if (funcs->detachShader)
- funcs->detachShader(program, shader);
- else
- funcs->detachShader = qglfResolveDetachShader;
-}
-
-static void QGLF_APIENTRY qglfResolveDisableVertexAttribArray(GLuint index)
-{
- typedef void (QGLF_APIENTRYP type_glDisableVertexAttribArray)(GLuint index);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->disableVertexAttribArray = (type_glDisableVertexAttribArray)
- context->getProcAddress(QLatin1String("glDisableVertexAttribArray"));
- if (!funcs->disableVertexAttribArray) {
- funcs->disableVertexAttribArray = (type_glDisableVertexAttribArray)
- context->getProcAddress(QLatin1String("glDisableVertexAttribArrayARB"));
- }
-
- if (funcs->disableVertexAttribArray)
- funcs->disableVertexAttribArray(index);
- else
- funcs->disableVertexAttribArray = qglfResolveDisableVertexAttribArray;
-}
-
-static void QGLF_APIENTRY qglfResolveEnableVertexAttribArray(GLuint index)
-{
- typedef void (QGLF_APIENTRYP type_glEnableVertexAttribArray)(GLuint index);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->enableVertexAttribArray = (type_glEnableVertexAttribArray)
- context->getProcAddress(QLatin1String("glEnableVertexAttribArray"));
- if (!funcs->enableVertexAttribArray) {
- funcs->enableVertexAttribArray = (type_glEnableVertexAttribArray)
- context->getProcAddress(QLatin1String("glEnableVertexAttribArrayARB"));
- }
-
- if (funcs->enableVertexAttribArray)
- funcs->enableVertexAttribArray(index);
- else
- funcs->enableVertexAttribArray = qglfResolveEnableVertexAttribArray;
-}
-
-static void QGLF_APIENTRY qglfResolveFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
-{
- typedef void (QGLF_APIENTRYP type_glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->framebufferRenderbuffer = (type_glFramebufferRenderbuffer)
- context->getProcAddress(QLatin1String("glFramebufferRenderbuffer"));
-#ifdef QT_OPENGL_ES
- if (!funcs->framebufferRenderbuffer) {
- funcs->framebufferRenderbuffer = (type_glFramebufferRenderbuffer)
- context->getProcAddress(QLatin1String("glFramebufferRenderbufferOES"));
- }
-#endif
- if (!funcs->framebufferRenderbuffer) {
- funcs->framebufferRenderbuffer = (type_glFramebufferRenderbuffer)
- context->getProcAddress(QLatin1String("glFramebufferRenderbufferEXT"));
- }
- if (!funcs->framebufferRenderbuffer) {
- funcs->framebufferRenderbuffer = (type_glFramebufferRenderbuffer)
- context->getProcAddress(QLatin1String("glFramebufferRenderbufferARB"));
- }
-
- if (funcs->framebufferRenderbuffer)
- funcs->framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
- else
- funcs->framebufferRenderbuffer = qglfResolveFramebufferRenderbuffer;
-}
-
-static void QGLF_APIENTRY qglfResolveFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
-{
- typedef void (QGLF_APIENTRYP type_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->framebufferTexture2D = (type_glFramebufferTexture2D)
- context->getProcAddress(QLatin1String("glFramebufferTexture2D"));
-#ifdef QT_OPENGL_ES
- if (!funcs->framebufferTexture2D) {
- funcs->framebufferTexture2D = (type_glFramebufferTexture2D)
- context->getProcAddress(QLatin1String("glFramebufferTexture2DOES"));
- }
-#endif
- if (!funcs->framebufferTexture2D) {
- funcs->framebufferTexture2D = (type_glFramebufferTexture2D)
- context->getProcAddress(QLatin1String("glFramebufferTexture2DEXT"));
- }
- if (!funcs->framebufferTexture2D) {
- funcs->framebufferTexture2D = (type_glFramebufferTexture2D)
- context->getProcAddress(QLatin1String("glFramebufferTexture2DARB"));
- }
-
- if (funcs->framebufferTexture2D)
- funcs->framebufferTexture2D(target, attachment, textarget, texture, level);
- else
- funcs->framebufferTexture2D = qglfResolveFramebufferTexture2D;
-}
-
-static void QGLF_APIENTRY qglfResolveGenBuffers(GLsizei n, GLuint* buffers)
-{
- typedef void (QGLF_APIENTRYP type_glGenBuffers)(GLsizei n, GLuint* buffers);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->genBuffers = (type_glGenBuffers)
- context->getProcAddress(QLatin1String("glGenBuffers"));
-#ifdef QT_OPENGL_ES
- if (!funcs->genBuffers) {
- funcs->genBuffers = (type_glGenBuffers)
- context->getProcAddress(QLatin1String("glGenBuffersOES"));
- }
-#endif
- if (!funcs->genBuffers) {
- funcs->genBuffers = (type_glGenBuffers)
- context->getProcAddress(QLatin1String("glGenBuffersEXT"));
- }
- if (!funcs->genBuffers) {
- funcs->genBuffers = (type_glGenBuffers)
- context->getProcAddress(QLatin1String("glGenBuffersARB"));
- }
-
- if (funcs->genBuffers)
- funcs->genBuffers(n, buffers);
- else
- funcs->genBuffers = qglfResolveGenBuffers;
-}
-
-static void QGLF_APIENTRY qglfResolveGenerateMipmap(GLenum target)
-{
- typedef void (QGLF_APIENTRYP type_glGenerateMipmap)(GLenum target);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->generateMipmap = (type_glGenerateMipmap)
- context->getProcAddress(QLatin1String("glGenerateMipmap"));
-#ifdef QT_OPENGL_ES
- if (!funcs->generateMipmap) {
- funcs->generateMipmap = (type_glGenerateMipmap)
- context->getProcAddress(QLatin1String("glGenerateMipmapOES"));
- }
-#endif
- if (!funcs->generateMipmap) {
- funcs->generateMipmap = (type_glGenerateMipmap)
- context->getProcAddress(QLatin1String("glGenerateMipmapEXT"));
- }
- if (!funcs->generateMipmap) {
- funcs->generateMipmap = (type_glGenerateMipmap)
- context->getProcAddress(QLatin1String("glGenerateMipmapARB"));
- }
-
- if (funcs->generateMipmap)
- funcs->generateMipmap(target);
- else
- funcs->generateMipmap = qglfResolveGenerateMipmap;
-}
-
-static void QGLF_APIENTRY qglfResolveGenFramebuffers(GLsizei n, GLuint* framebuffers)
-{
- typedef void (QGLF_APIENTRYP type_glGenFramebuffers)(GLsizei n, GLuint* framebuffers);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->genFramebuffers = (type_glGenFramebuffers)
- context->getProcAddress(QLatin1String("glGenFramebuffers"));
-#ifdef QT_OPENGL_ES
- if (!funcs->genFramebuffers) {
- funcs->genFramebuffers = (type_glGenFramebuffers)
- context->getProcAddress(QLatin1String("glGenFramebuffersOES"));
- }
-#endif
- if (!funcs->genFramebuffers) {
- funcs->genFramebuffers = (type_glGenFramebuffers)
- context->getProcAddress(QLatin1String("glGenFramebuffersEXT"));
- }
- if (!funcs->genFramebuffers) {
- funcs->genFramebuffers = (type_glGenFramebuffers)
- context->getProcAddress(QLatin1String("glGenFramebuffersARB"));
- }
-
- if (funcs->genFramebuffers)
- funcs->genFramebuffers(n, framebuffers);
- else
- funcs->genFramebuffers = qglfResolveGenFramebuffers;
-}
-
-static void QGLF_APIENTRY qglfResolveGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
-{
- typedef void (QGLF_APIENTRYP type_glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->genRenderbuffers = (type_glGenRenderbuffers)
- context->getProcAddress(QLatin1String("glGenRenderbuffers"));
-#ifdef QT_OPENGL_ES
- if (!funcs->genRenderbuffers) {
- funcs->genRenderbuffers = (type_glGenRenderbuffers)
- context->getProcAddress(QLatin1String("glGenRenderbuffersOES"));
- }
-#endif
- if (!funcs->genRenderbuffers) {
- funcs->genRenderbuffers = (type_glGenRenderbuffers)
- context->getProcAddress(QLatin1String("glGenRenderbuffersEXT"));
- }
- if (!funcs->genRenderbuffers) {
- funcs->genRenderbuffers = (type_glGenRenderbuffers)
- context->getProcAddress(QLatin1String("glGenRenderbuffersARB"));
- }
-
- if (funcs->genRenderbuffers)
- funcs->genRenderbuffers(n, renderbuffers);
- else
- funcs->genRenderbuffers = qglfResolveGenRenderbuffers;
-}
-
-static void QGLF_APIENTRY qglfResolveGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
-{
- typedef void (QGLF_APIENTRYP type_glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getActiveAttrib = (type_glGetActiveAttrib)
- context->getProcAddress(QLatin1String("glGetActiveAttrib"));
- if (!funcs->getActiveAttrib) {
- funcs->getActiveAttrib = (type_glGetActiveAttrib)
- context->getProcAddress(QLatin1String("glGetActiveAttribARB"));
- }
-
- if (funcs->getActiveAttrib)
- funcs->getActiveAttrib(program, index, bufsize, length, size, type, name);
- else
- funcs->getActiveAttrib = qglfResolveGetActiveAttrib;
-}
-
-static void QGLF_APIENTRY qglfResolveGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
-{
- typedef void (QGLF_APIENTRYP type_glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getActiveUniform = (type_glGetActiveUniform)
- context->getProcAddress(QLatin1String("glGetActiveUniform"));
- if (!funcs->getActiveUniform) {
- funcs->getActiveUniform = (type_glGetActiveUniform)
- context->getProcAddress(QLatin1String("glGetActiveUniformARB"));
- }
-
- if (funcs->getActiveUniform)
- funcs->getActiveUniform(program, index, bufsize, length, size, type, name);
- else
- funcs->getActiveUniform = qglfResolveGetActiveUniform;
-}
-
-static void QGLF_APIENTRY qglfResolveGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
-{
- typedef void (QGLF_APIENTRYP type_glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getAttachedShaders = (type_glGetAttachedShaders)
- context->getProcAddress(QLatin1String("glGetAttachedShaders"));
- if (!funcs->getAttachedShaders) {
- funcs->getAttachedShaders = (type_glGetAttachedShaders)
- context->getProcAddress(QLatin1String("glGetAttachedObjectsARB"));
- }
-
- if (funcs->getAttachedShaders)
- funcs->getAttachedShaders(program, maxcount, count, shaders);
- else
- funcs->getAttachedShaders = qglfResolveGetAttachedShaders;
-}
-
-static int QGLF_APIENTRY qglfResolveGetAttribLocation(GLuint program, const char* name)
-{
- typedef int (QGLF_APIENTRYP type_glGetAttribLocation)(GLuint program, const char* name);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getAttribLocation = (type_glGetAttribLocation)
- context->getProcAddress(QLatin1String("glGetAttribLocation"));
- if (!funcs->getAttribLocation) {
- funcs->getAttribLocation = (type_glGetAttribLocation)
- context->getProcAddress(QLatin1String("glGetAttribLocationARB"));
- }
-
- if (funcs->getAttribLocation)
- return funcs->getAttribLocation(program, name);
- funcs->getAttribLocation = qglfResolveGetAttribLocation;
- return int(0);
-}
-
-static void QGLF_APIENTRY qglfResolveGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
-{
- typedef void (QGLF_APIENTRYP type_glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getBufferParameteriv = (type_glGetBufferParameteriv)
- context->getProcAddress(QLatin1String("glGetBufferParameteriv"));
-#ifdef QT_OPENGL_ES
- if (!funcs->getBufferParameteriv) {
- funcs->getBufferParameteriv = (type_glGetBufferParameteriv)
- context->getProcAddress(QLatin1String("glGetBufferParameterivOES"));
- }
-#endif
- if (!funcs->getBufferParameteriv) {
- funcs->getBufferParameteriv = (type_glGetBufferParameteriv)
- context->getProcAddress(QLatin1String("glGetBufferParameterivEXT"));
- }
- if (!funcs->getBufferParameteriv) {
- funcs->getBufferParameteriv = (type_glGetBufferParameteriv)
- context->getProcAddress(QLatin1String("glGetBufferParameterivARB"));
- }
-
- if (funcs->getBufferParameteriv)
- funcs->getBufferParameteriv(target, pname, params);
- else
- funcs->getBufferParameteriv = qglfResolveGetBufferParameteriv;
-}
-
-static void QGLF_APIENTRY qglfResolveGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
-{
- typedef void (QGLF_APIENTRYP type_glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getFramebufferAttachmentParameteriv = (type_glGetFramebufferAttachmentParameteriv)
- context->getProcAddress(QLatin1String("glGetFramebufferAttachmentParameteriv"));
-#ifdef QT_OPENGL_ES
- if (!funcs->getFramebufferAttachmentParameteriv) {
- funcs->getFramebufferAttachmentParameteriv = (type_glGetFramebufferAttachmentParameteriv)
- context->getProcAddress(QLatin1String("glGetFramebufferAttachmentParameterivOES"));
- }
-#endif
- if (!funcs->getFramebufferAttachmentParameteriv) {
- funcs->getFramebufferAttachmentParameteriv = (type_glGetFramebufferAttachmentParameteriv)
- context->getProcAddress(QLatin1String("glGetFramebufferAttachmentParameterivEXT"));
- }
- if (!funcs->getFramebufferAttachmentParameteriv) {
- funcs->getFramebufferAttachmentParameteriv = (type_glGetFramebufferAttachmentParameteriv)
- context->getProcAddress(QLatin1String("glGetFramebufferAttachmentParameterivARB"));
- }
-
- if (funcs->getFramebufferAttachmentParameteriv)
- funcs->getFramebufferAttachmentParameteriv(target, attachment, pname, params);
- else
- funcs->getFramebufferAttachmentParameteriv = qglfResolveGetFramebufferAttachmentParameteriv;
-}
-
-static void QGLF_APIENTRY qglfResolveGetProgramiv(GLuint program, GLenum pname, GLint* params)
-{
- typedef void (QGLF_APIENTRYP type_glGetProgramiv)(GLuint program, GLenum pname, GLint* params);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getProgramiv = (type_glGetProgramiv)
- context->getProcAddress(QLatin1String("glGetProgramiv"));
- if (!funcs->getProgramiv) {
- funcs->getProgramiv = (type_glGetProgramiv)
- context->getProcAddress(QLatin1String("glGetObjectParameterivARB"));
- }
-
- if (funcs->getProgramiv)
- funcs->getProgramiv(program, pname, params);
- else
- funcs->getProgramiv = qglfResolveGetProgramiv;
-}
-
-static void QGLF_APIENTRY qglfResolveGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
-{
- typedef void (QGLF_APIENTRYP type_glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getProgramInfoLog = (type_glGetProgramInfoLog)
- context->getProcAddress(QLatin1String("glGetProgramInfoLog"));
- if (!funcs->getProgramInfoLog) {
- funcs->getProgramInfoLog = (type_glGetProgramInfoLog)
- context->getProcAddress(QLatin1String("glGetInfoLogARB"));
- }
-
- if (funcs->getProgramInfoLog)
- funcs->getProgramInfoLog(program, bufsize, length, infolog);
- else
- funcs->getProgramInfoLog = qglfResolveGetProgramInfoLog;
-}
-
-static void QGLF_APIENTRY qglfResolveGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
-{
- typedef void (QGLF_APIENTRYP type_glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getRenderbufferParameteriv = (type_glGetRenderbufferParameteriv)
- context->getProcAddress(QLatin1String("glGetRenderbufferParameteriv"));
-#ifdef QT_OPENGL_ES
- if (!funcs->getRenderbufferParameteriv) {
- funcs->getRenderbufferParameteriv = (type_glGetRenderbufferParameteriv)
- context->getProcAddress(QLatin1String("glGetRenderbufferParameterivOES"));
- }
-#endif
- if (!funcs->getRenderbufferParameteriv) {
- funcs->getRenderbufferParameteriv = (type_glGetRenderbufferParameteriv)
- context->getProcAddress(QLatin1String("glGetRenderbufferParameterivEXT"));
- }
- if (!funcs->getRenderbufferParameteriv) {
- funcs->getRenderbufferParameteriv = (type_glGetRenderbufferParameteriv)
- context->getProcAddress(QLatin1String("glGetRenderbufferParameterivARB"));
- }
-
- if (funcs->getRenderbufferParameteriv)
- funcs->getRenderbufferParameteriv(target, pname, params);
- else
- funcs->getRenderbufferParameteriv = qglfResolveGetRenderbufferParameteriv;
-}
-
-static void QGLF_APIENTRY qglfResolveGetShaderiv(GLuint shader, GLenum pname, GLint* params)
-{
- typedef void (QGLF_APIENTRYP type_glGetShaderiv)(GLuint shader, GLenum pname, GLint* params);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getShaderiv = (type_glGetShaderiv)
- context->getProcAddress(QLatin1String("glGetShaderiv"));
- if (!funcs->getShaderiv) {
- funcs->getShaderiv = (type_glGetShaderiv)
- context->getProcAddress(QLatin1String("glGetObjectParameterivARB"));
- }
-
- if (funcs->getShaderiv)
- funcs->getShaderiv(shader, pname, params);
- else
- funcs->getShaderiv = qglfResolveGetShaderiv;
-}
-
-static void QGLF_APIENTRY qglfResolveGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
-{
- typedef void (QGLF_APIENTRYP type_glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getShaderInfoLog = (type_glGetShaderInfoLog)
- context->getProcAddress(QLatin1String("glGetShaderInfoLog"));
- if (!funcs->getShaderInfoLog) {
- funcs->getShaderInfoLog = (type_glGetShaderInfoLog)
- context->getProcAddress(QLatin1String("glGetInfoLogARB"));
- }
-
- if (funcs->getShaderInfoLog)
- funcs->getShaderInfoLog(shader, bufsize, length, infolog);
- else
- funcs->getShaderInfoLog = qglfResolveGetShaderInfoLog;
-}
-
-static void QGLF_APIENTRY qglfSpecialGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
-{
- Q_UNUSED(shadertype);
- Q_UNUSED(precisiontype);
- range[0] = range[1] = precision[0] = 0;
-}
-
-static void QGLF_APIENTRY qglfResolveGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
-{
- typedef void (QGLF_APIENTRYP type_glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getShaderPrecisionFormat = (type_glGetShaderPrecisionFormat)
- context->getProcAddress(QLatin1String("glGetShaderPrecisionFormat"));
-#ifdef QT_OPENGL_ES
- if (!funcs->getShaderPrecisionFormat) {
- funcs->getShaderPrecisionFormat = (type_glGetShaderPrecisionFormat)
- context->getProcAddress(QLatin1String("glGetShaderPrecisionFormatOES"));
- }
-#endif
- if (!funcs->getShaderPrecisionFormat) {
- funcs->getShaderPrecisionFormat = (type_glGetShaderPrecisionFormat)
- context->getProcAddress(QLatin1String("glGetShaderPrecisionFormatEXT"));
- }
- if (!funcs->getShaderPrecisionFormat) {
- funcs->getShaderPrecisionFormat = (type_glGetShaderPrecisionFormat)
- context->getProcAddress(QLatin1String("glGetShaderPrecisionFormatARB"));
- }
-
- if (!funcs->getShaderPrecisionFormat)
- funcs->getShaderPrecisionFormat = qglfSpecialGetShaderPrecisionFormat;
-
- funcs->getShaderPrecisionFormat(shadertype, precisiontype, range, precision);
-}
-
-static void QGLF_APIENTRY qglfResolveGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
-{
- typedef void (QGLF_APIENTRYP type_glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getShaderSource = (type_glGetShaderSource)
- context->getProcAddress(QLatin1String("glGetShaderSource"));
- if (!funcs->getShaderSource) {
- funcs->getShaderSource = (type_glGetShaderSource)
- context->getProcAddress(QLatin1String("glGetShaderSourceARB"));
- }
-
- if (funcs->getShaderSource)
- funcs->getShaderSource(shader, bufsize, length, source);
- else
- funcs->getShaderSource = qglfResolveGetShaderSource;
-}
-
-static void QGLF_APIENTRY qglfResolveGetUniformfv(GLuint program, GLint location, GLfloat* params)
-{
- typedef void (QGLF_APIENTRYP type_glGetUniformfv)(GLuint program, GLint location, GLfloat* params);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getUniformfv = (type_glGetUniformfv)
- context->getProcAddress(QLatin1String("glGetUniformfv"));
- if (!funcs->getUniformfv) {
- funcs->getUniformfv = (type_glGetUniformfv)
- context->getProcAddress(QLatin1String("glGetUniformfvARB"));
- }
-
- if (funcs->getUniformfv)
- funcs->getUniformfv(program, location, params);
- else
- funcs->getUniformfv = qglfResolveGetUniformfv;
-}
-
-static void QGLF_APIENTRY qglfResolveGetUniformiv(GLuint program, GLint location, GLint* params)
-{
- typedef void (QGLF_APIENTRYP type_glGetUniformiv)(GLuint program, GLint location, GLint* params);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getUniformiv = (type_glGetUniformiv)
- context->getProcAddress(QLatin1String("glGetUniformiv"));
- if (!funcs->getUniformiv) {
- funcs->getUniformiv = (type_glGetUniformiv)
- context->getProcAddress(QLatin1String("glGetUniformivARB"));
- }
-
- if (funcs->getUniformiv)
- funcs->getUniformiv(program, location, params);
- else
- funcs->getUniformiv = qglfResolveGetUniformiv;
-}
-
-static int QGLF_APIENTRY qglfResolveGetUniformLocation(GLuint program, const char* name)
-{
- typedef int (QGLF_APIENTRYP type_glGetUniformLocation)(GLuint program, const char* name);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getUniformLocation = (type_glGetUniformLocation)
- context->getProcAddress(QLatin1String("glGetUniformLocation"));
- if (!funcs->getUniformLocation) {
- funcs->getUniformLocation = (type_glGetUniformLocation)
- context->getProcAddress(QLatin1String("glGetUniformLocationARB"));
- }
-
- if (funcs->getUniformLocation)
- return funcs->getUniformLocation(program, name);
- funcs->getUniformLocation = qglfResolveGetUniformLocation;
- return int(0);
-}
-
-static void QGLF_APIENTRY qglfResolveGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
-{
- typedef void (QGLF_APIENTRYP type_glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getVertexAttribfv = (type_glGetVertexAttribfv)
- context->getProcAddress(QLatin1String("glGetVertexAttribfv"));
- if (!funcs->getVertexAttribfv) {
- funcs->getVertexAttribfv = (type_glGetVertexAttribfv)
- context->getProcAddress(QLatin1String("glGetVertexAttribfvARB"));
- }
-
- if (funcs->getVertexAttribfv)
- funcs->getVertexAttribfv(index, pname, params);
- else
- funcs->getVertexAttribfv = qglfResolveGetVertexAttribfv;
-}
-
-static void QGLF_APIENTRY qglfResolveGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
-{
- typedef void (QGLF_APIENTRYP type_glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getVertexAttribiv = (type_glGetVertexAttribiv)
- context->getProcAddress(QLatin1String("glGetVertexAttribiv"));
- if (!funcs->getVertexAttribiv) {
- funcs->getVertexAttribiv = (type_glGetVertexAttribiv)
- context->getProcAddress(QLatin1String("glGetVertexAttribivARB"));
- }
-
- if (funcs->getVertexAttribiv)
- funcs->getVertexAttribiv(index, pname, params);
- else
- funcs->getVertexAttribiv = qglfResolveGetVertexAttribiv;
-}
-
-static void QGLF_APIENTRY qglfResolveGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
-{
- typedef void (QGLF_APIENTRYP type_glGetVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->getVertexAttribPointerv = (type_glGetVertexAttribPointerv)
- context->getProcAddress(QLatin1String("glGetVertexAttribPointerv"));
- if (!funcs->getVertexAttribPointerv) {
- funcs->getVertexAttribPointerv = (type_glGetVertexAttribPointerv)
- context->getProcAddress(QLatin1String("glGetVertexAttribPointervARB"));
- }
-
- if (funcs->getVertexAttribPointerv)
- funcs->getVertexAttribPointerv(index, pname, pointer);
- else
- funcs->getVertexAttribPointerv = qglfResolveGetVertexAttribPointerv;
-}
-
-static GLboolean QGLF_APIENTRY qglfResolveIsBuffer(GLuint buffer)
-{
- typedef GLboolean (QGLF_APIENTRYP type_glIsBuffer)(GLuint buffer);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->isBuffer = (type_glIsBuffer)
- context->getProcAddress(QLatin1String("glIsBuffer"));
-#ifdef QT_OPENGL_ES
- if (!funcs->isBuffer) {
- funcs->isBuffer = (type_glIsBuffer)
- context->getProcAddress(QLatin1String("glIsBufferOES"));
- }
-#endif
- if (!funcs->isBuffer) {
- funcs->isBuffer = (type_glIsBuffer)
- context->getProcAddress(QLatin1String("glIsBufferEXT"));
- }
- if (!funcs->isBuffer) {
- funcs->isBuffer = (type_glIsBuffer)
- context->getProcAddress(QLatin1String("glIsBufferARB"));
- }
-
- if (funcs->isBuffer)
- return funcs->isBuffer(buffer);
- funcs->isBuffer = qglfResolveIsBuffer;
- return GLboolean(0);
-}
-
-static GLboolean QGLF_APIENTRY qglfResolveIsFramebuffer(GLuint framebuffer)
-{
- typedef GLboolean (QGLF_APIENTRYP type_glIsFramebuffer)(GLuint framebuffer);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->isFramebuffer = (type_glIsFramebuffer)
- context->getProcAddress(QLatin1String("glIsFramebuffer"));
-#ifdef QT_OPENGL_ES
- if (!funcs->isFramebuffer) {
- funcs->isFramebuffer = (type_glIsFramebuffer)
- context->getProcAddress(QLatin1String("glIsFramebufferOES"));
- }
-#endif
- if (!funcs->isFramebuffer) {
- funcs->isFramebuffer = (type_glIsFramebuffer)
- context->getProcAddress(QLatin1String("glIsFramebufferEXT"));
- }
- if (!funcs->isFramebuffer) {
- funcs->isFramebuffer = (type_glIsFramebuffer)
- context->getProcAddress(QLatin1String("glIsFramebufferARB"));
- }
-
- if (funcs->isFramebuffer)
- return funcs->isFramebuffer(framebuffer);
- funcs->isFramebuffer = qglfResolveIsFramebuffer;
- return GLboolean(0);
-}
-
-static GLboolean QGLF_APIENTRY qglfSpecialIsProgram(GLuint program)
-{
- return program != 0;
-}
-
-static GLboolean QGLF_APIENTRY qglfResolveIsProgram(GLuint program)
-{
- typedef GLboolean (QGLF_APIENTRYP type_glIsProgram)(GLuint program);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->isProgram = (type_glIsProgram)
- context->getProcAddress(QLatin1String("glIsProgram"));
- if (!funcs->isProgram) {
- funcs->isProgram = (type_glIsProgram)
- context->getProcAddress(QLatin1String("glIsProgramARB"));
- }
-
- if (!funcs->isProgram)
- funcs->isProgram = qglfSpecialIsProgram;
-
- return funcs->isProgram(program);
-}
-
-static GLboolean QGLF_APIENTRY qglfResolveIsRenderbuffer(GLuint renderbuffer)
-{
- typedef GLboolean (QGLF_APIENTRYP type_glIsRenderbuffer)(GLuint renderbuffer);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->isRenderbuffer = (type_glIsRenderbuffer)
- context->getProcAddress(QLatin1String("glIsRenderbuffer"));
-#ifdef QT_OPENGL_ES
- if (!funcs->isRenderbuffer) {
- funcs->isRenderbuffer = (type_glIsRenderbuffer)
- context->getProcAddress(QLatin1String("glIsRenderbufferOES"));
- }
-#endif
- if (!funcs->isRenderbuffer) {
- funcs->isRenderbuffer = (type_glIsRenderbuffer)
- context->getProcAddress(QLatin1String("glIsRenderbufferEXT"));
- }
- if (!funcs->isRenderbuffer) {
- funcs->isRenderbuffer = (type_glIsRenderbuffer)
- context->getProcAddress(QLatin1String("glIsRenderbufferARB"));
- }
-
- if (funcs->isRenderbuffer)
- return funcs->isRenderbuffer(renderbuffer);
- funcs->isRenderbuffer = qglfResolveIsRenderbuffer;
- return GLboolean(0);
-}
-
-static GLboolean QGLF_APIENTRY qglfSpecialIsShader(GLuint shader)
-{
- return shader != 0;
-}
-
-static GLboolean QGLF_APIENTRY qglfResolveIsShader(GLuint shader)
-{
- typedef GLboolean (QGLF_APIENTRYP type_glIsShader)(GLuint shader);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->isShader = (type_glIsShader)
- context->getProcAddress(QLatin1String("glIsShader"));
- if (!funcs->isShader) {
- funcs->isShader = (type_glIsShader)
- context->getProcAddress(QLatin1String("glIsShaderARB"));
- }
-
- if (!funcs->isShader)
- funcs->isShader = qglfSpecialIsShader;
-
- return funcs->isShader(shader);
-}
-
-static void QGLF_APIENTRY qglfResolveLinkProgram(GLuint program)
-{
- typedef void (QGLF_APIENTRYP type_glLinkProgram)(GLuint program);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->linkProgram = (type_glLinkProgram)
- context->getProcAddress(QLatin1String("glLinkProgram"));
- if (!funcs->linkProgram) {
- funcs->linkProgram = (type_glLinkProgram)
- context->getProcAddress(QLatin1String("glLinkProgramARB"));
- }
-
- if (funcs->linkProgram)
- funcs->linkProgram(program);
- else
- funcs->linkProgram = qglfResolveLinkProgram;
-}
-
-static void QGLF_APIENTRY qglfSpecialReleaseShaderCompiler()
-{
-}
-
-static void QGLF_APIENTRY qglfResolveReleaseShaderCompiler()
-{
- typedef void (QGLF_APIENTRYP type_glReleaseShaderCompiler)();
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->releaseShaderCompiler = (type_glReleaseShaderCompiler)
- context->getProcAddress(QLatin1String("glReleaseShaderCompiler"));
- if (!funcs->releaseShaderCompiler) {
- funcs->releaseShaderCompiler = (type_glReleaseShaderCompiler)
- context->getProcAddress(QLatin1String("glReleaseShaderCompilerARB"));
- }
-
- if (!funcs->releaseShaderCompiler)
- funcs->releaseShaderCompiler = qglfSpecialReleaseShaderCompiler;
-
- funcs->releaseShaderCompiler();
-}
-
-static void QGLF_APIENTRY qglfResolveRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
-{
- typedef void (QGLF_APIENTRYP type_glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->renderbufferStorage = (type_glRenderbufferStorage)
- context->getProcAddress(QLatin1String("glRenderbufferStorage"));
-#ifdef QT_OPENGL_ES
- if (!funcs->renderbufferStorage) {
- funcs->renderbufferStorage = (type_glRenderbufferStorage)
- context->getProcAddress(QLatin1String("glRenderbufferStorageOES"));
- }
-#endif
- if (!funcs->renderbufferStorage) {
- funcs->renderbufferStorage = (type_glRenderbufferStorage)
- context->getProcAddress(QLatin1String("glRenderbufferStorageEXT"));
- }
- if (!funcs->renderbufferStorage) {
- funcs->renderbufferStorage = (type_glRenderbufferStorage)
- context->getProcAddress(QLatin1String("glRenderbufferStorageARB"));
- }
-
- if (funcs->renderbufferStorage)
- funcs->renderbufferStorage(target, internalformat, width, height);
- else
- funcs->renderbufferStorage = qglfResolveRenderbufferStorage;
-}
-
-static void QGLF_APIENTRY qglfResolveSampleCoverage(GLclampf value, GLboolean invert)
-{
- typedef void (QGLF_APIENTRYP type_glSampleCoverage)(GLclampf value, GLboolean invert);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->sampleCoverage = (type_glSampleCoverage)
- context->getProcAddress(QLatin1String("glSampleCoverage"));
-#ifdef QT_OPENGL_ES
- if (!funcs->sampleCoverage) {
- funcs->sampleCoverage = (type_glSampleCoverage)
- context->getProcAddress(QLatin1String("glSampleCoverageOES"));
- }
-#endif
- if (!funcs->sampleCoverage) {
- funcs->sampleCoverage = (type_glSampleCoverage)
- context->getProcAddress(QLatin1String("glSampleCoverageEXT"));
- }
- if (!funcs->sampleCoverage) {
- funcs->sampleCoverage = (type_glSampleCoverage)
- context->getProcAddress(QLatin1String("glSampleCoverageARB"));
- }
-
- if (funcs->sampleCoverage)
- funcs->sampleCoverage(value, invert);
- else
- funcs->sampleCoverage = qglfResolveSampleCoverage;
-}
-
-static void QGLF_APIENTRY qglfResolveShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length)
-{
- typedef void (QGLF_APIENTRYP type_glShaderBinary)(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->shaderBinary = (type_glShaderBinary)
- context->getProcAddress(QLatin1String("glShaderBinary"));
- if (!funcs->shaderBinary) {
- funcs->shaderBinary = (type_glShaderBinary)
- context->getProcAddress(QLatin1String("glShaderBinaryARB"));
- }
-
- if (funcs->shaderBinary)
- funcs->shaderBinary(n, shaders, binaryformat, binary, length);
- else
- funcs->shaderBinary = qglfResolveShaderBinary;
-}
-
-static void QGLF_APIENTRY qglfResolveShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
-{
- typedef void (QGLF_APIENTRYP type_glShaderSource)(GLuint shader, GLsizei count, const char** string, const GLint* length);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->shaderSource = (type_glShaderSource)
- context->getProcAddress(QLatin1String("glShaderSource"));
- if (!funcs->shaderSource) {
- funcs->shaderSource = (type_glShaderSource)
- context->getProcAddress(QLatin1String("glShaderSourceARB"));
- }
-
- if (funcs->shaderSource)
- funcs->shaderSource(shader, count, string, length);
- else
- funcs->shaderSource = qglfResolveShaderSource;
-}
-
-static void QGLF_APIENTRY qglfResolveStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
-{
- typedef void (QGLF_APIENTRYP type_glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->stencilFuncSeparate = (type_glStencilFuncSeparate)
- context->getProcAddress(QLatin1String("glStencilFuncSeparate"));
-#ifdef QT_OPENGL_ES
- if (!funcs->stencilFuncSeparate) {
- funcs->stencilFuncSeparate = (type_glStencilFuncSeparate)
- context->getProcAddress(QLatin1String("glStencilFuncSeparateOES"));
- }
-#endif
- if (!funcs->stencilFuncSeparate) {
- funcs->stencilFuncSeparate = (type_glStencilFuncSeparate)
- context->getProcAddress(QLatin1String("glStencilFuncSeparateEXT"));
- }
- if (!funcs->stencilFuncSeparate) {
- funcs->stencilFuncSeparate = (type_glStencilFuncSeparate)
- context->getProcAddress(QLatin1String("glStencilFuncSeparateARB"));
- }
-
- if (funcs->stencilFuncSeparate)
- funcs->stencilFuncSeparate(face, func, ref, mask);
- else
- funcs->stencilFuncSeparate = qglfResolveStencilFuncSeparate;
-}
-
-static void QGLF_APIENTRY qglfResolveStencilMaskSeparate(GLenum face, GLuint mask)
-{
- typedef void (QGLF_APIENTRYP type_glStencilMaskSeparate)(GLenum face, GLuint mask);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->stencilMaskSeparate = (type_glStencilMaskSeparate)
- context->getProcAddress(QLatin1String("glStencilMaskSeparate"));
-#ifdef QT_OPENGL_ES
- if (!funcs->stencilMaskSeparate) {
- funcs->stencilMaskSeparate = (type_glStencilMaskSeparate)
- context->getProcAddress(QLatin1String("glStencilMaskSeparateOES"));
- }
-#endif
- if (!funcs->stencilMaskSeparate) {
- funcs->stencilMaskSeparate = (type_glStencilMaskSeparate)
- context->getProcAddress(QLatin1String("glStencilMaskSeparateEXT"));
- }
- if (!funcs->stencilMaskSeparate) {
- funcs->stencilMaskSeparate = (type_glStencilMaskSeparate)
- context->getProcAddress(QLatin1String("glStencilMaskSeparateARB"));
- }
-
- if (funcs->stencilMaskSeparate)
- funcs->stencilMaskSeparate(face, mask);
- else
- funcs->stencilMaskSeparate = qglfResolveStencilMaskSeparate;
-}
-
-static void QGLF_APIENTRY qglfResolveStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
-{
- typedef void (QGLF_APIENTRYP type_glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->stencilOpSeparate = (type_glStencilOpSeparate)
- context->getProcAddress(QLatin1String("glStencilOpSeparate"));
-#ifdef QT_OPENGL_ES
- if (!funcs->stencilOpSeparate) {
- funcs->stencilOpSeparate = (type_glStencilOpSeparate)
- context->getProcAddress(QLatin1String("glStencilOpSeparateOES"));
- }
-#endif
- if (!funcs->stencilOpSeparate) {
- funcs->stencilOpSeparate = (type_glStencilOpSeparate)
- context->getProcAddress(QLatin1String("glStencilOpSeparateEXT"));
- }
- if (!funcs->stencilOpSeparate) {
- funcs->stencilOpSeparate = (type_glStencilOpSeparate)
- context->getProcAddress(QLatin1String("glStencilOpSeparateARB"));
- }
-
- if (funcs->stencilOpSeparate)
- funcs->stencilOpSeparate(face, fail, zfail, zpass);
- else
- funcs->stencilOpSeparate = qglfResolveStencilOpSeparate;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform1f(GLint location, GLfloat x)
-{
- typedef void (QGLF_APIENTRYP type_glUniform1f)(GLint location, GLfloat x);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform1f = (type_glUniform1f)
- context->getProcAddress(QLatin1String("glUniform1f"));
- if (!funcs->uniform1f) {
- funcs->uniform1f = (type_glUniform1f)
- context->getProcAddress(QLatin1String("glUniform1fARB"));
- }
-
- if (funcs->uniform1f)
- funcs->uniform1f(location, x);
- else
- funcs->uniform1f = qglfResolveUniform1f;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform1fv(GLint location, GLsizei count, const GLfloat* v)
-{
- typedef void (QGLF_APIENTRYP type_glUniform1fv)(GLint location, GLsizei count, const GLfloat* v);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform1fv = (type_glUniform1fv)
- context->getProcAddress(QLatin1String("glUniform1fv"));
- if (!funcs->uniform1fv) {
- funcs->uniform1fv = (type_glUniform1fv)
- context->getProcAddress(QLatin1String("glUniform1fvARB"));
- }
-
- if (funcs->uniform1fv)
- funcs->uniform1fv(location, count, v);
- else
- funcs->uniform1fv = qglfResolveUniform1fv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform1i(GLint location, GLint x)
-{
- typedef void (QGLF_APIENTRYP type_glUniform1i)(GLint location, GLint x);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform1i = (type_glUniform1i)
- context->getProcAddress(QLatin1String("glUniform1i"));
- if (!funcs->uniform1i) {
- funcs->uniform1i = (type_glUniform1i)
- context->getProcAddress(QLatin1String("glUniform1iARB"));
- }
-
- if (funcs->uniform1i)
- funcs->uniform1i(location, x);
- else
- funcs->uniform1i = qglfResolveUniform1i;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform1iv(GLint location, GLsizei count, const GLint* v)
-{
- typedef void (QGLF_APIENTRYP type_glUniform1iv)(GLint location, GLsizei count, const GLint* v);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform1iv = (type_glUniform1iv)
- context->getProcAddress(QLatin1String("glUniform1iv"));
- if (!funcs->uniform1iv) {
- funcs->uniform1iv = (type_glUniform1iv)
- context->getProcAddress(QLatin1String("glUniform1ivARB"));
- }
-
- if (funcs->uniform1iv)
- funcs->uniform1iv(location, count, v);
- else
- funcs->uniform1iv = qglfResolveUniform1iv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform2f(GLint location, GLfloat x, GLfloat y)
-{
- typedef void (QGLF_APIENTRYP type_glUniform2f)(GLint location, GLfloat x, GLfloat y);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform2f = (type_glUniform2f)
- context->getProcAddress(QLatin1String("glUniform2f"));
- if (!funcs->uniform2f) {
- funcs->uniform2f = (type_glUniform2f)
- context->getProcAddress(QLatin1String("glUniform2fARB"));
- }
-
- if (funcs->uniform2f)
- funcs->uniform2f(location, x, y);
- else
- funcs->uniform2f = qglfResolveUniform2f;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform2fv(GLint location, GLsizei count, const GLfloat* v)
-{
- typedef void (QGLF_APIENTRYP type_glUniform2fv)(GLint location, GLsizei count, const GLfloat* v);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform2fv = (type_glUniform2fv)
- context->getProcAddress(QLatin1String("glUniform2fv"));
- if (!funcs->uniform2fv) {
- funcs->uniform2fv = (type_glUniform2fv)
- context->getProcAddress(QLatin1String("glUniform2fvARB"));
- }
-
- if (funcs->uniform2fv)
- funcs->uniform2fv(location, count, v);
- else
- funcs->uniform2fv = qglfResolveUniform2fv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform2i(GLint location, GLint x, GLint y)
-{
- typedef void (QGLF_APIENTRYP type_glUniform2i)(GLint location, GLint x, GLint y);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform2i = (type_glUniform2i)
- context->getProcAddress(QLatin1String("glUniform2i"));
- if (!funcs->uniform2i) {
- funcs->uniform2i = (type_glUniform2i)
- context->getProcAddress(QLatin1String("glUniform2iARB"));
- }
-
- if (funcs->uniform2i)
- funcs->uniform2i(location, x, y);
- else
- funcs->uniform2i = qglfResolveUniform2i;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform2iv(GLint location, GLsizei count, const GLint* v)
-{
- typedef void (QGLF_APIENTRYP type_glUniform2iv)(GLint location, GLsizei count, const GLint* v);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform2iv = (type_glUniform2iv)
- context->getProcAddress(QLatin1String("glUniform2iv"));
- if (!funcs->uniform2iv) {
- funcs->uniform2iv = (type_glUniform2iv)
- context->getProcAddress(QLatin1String("glUniform2ivARB"));
- }
-
- if (funcs->uniform2iv)
- funcs->uniform2iv(location, count, v);
- else
- funcs->uniform2iv = qglfResolveUniform2iv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
-{
- typedef void (QGLF_APIENTRYP type_glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform3f = (type_glUniform3f)
- context->getProcAddress(QLatin1String("glUniform3f"));
- if (!funcs->uniform3f) {
- funcs->uniform3f = (type_glUniform3f)
- context->getProcAddress(QLatin1String("glUniform3fARB"));
- }
-
- if (funcs->uniform3f)
- funcs->uniform3f(location, x, y, z);
- else
- funcs->uniform3f = qglfResolveUniform3f;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform3fv(GLint location, GLsizei count, const GLfloat* v)
-{
- typedef void (QGLF_APIENTRYP type_glUniform3fv)(GLint location, GLsizei count, const GLfloat* v);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform3fv = (type_glUniform3fv)
- context->getProcAddress(QLatin1String("glUniform3fv"));
- if (!funcs->uniform3fv) {
- funcs->uniform3fv = (type_glUniform3fv)
- context->getProcAddress(QLatin1String("glUniform3fvARB"));
- }
-
- if (funcs->uniform3fv)
- funcs->uniform3fv(location, count, v);
- else
- funcs->uniform3fv = qglfResolveUniform3fv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform3i(GLint location, GLint x, GLint y, GLint z)
-{
- typedef void (QGLF_APIENTRYP type_glUniform3i)(GLint location, GLint x, GLint y, GLint z);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform3i = (type_glUniform3i)
- context->getProcAddress(QLatin1String("glUniform3i"));
- if (!funcs->uniform3i) {
- funcs->uniform3i = (type_glUniform3i)
- context->getProcAddress(QLatin1String("glUniform3iARB"));
- }
-
- if (funcs->uniform3i)
- funcs->uniform3i(location, x, y, z);
- else
- funcs->uniform3i = qglfResolveUniform3i;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform3iv(GLint location, GLsizei count, const GLint* v)
-{
- typedef void (QGLF_APIENTRYP type_glUniform3iv)(GLint location, GLsizei count, const GLint* v);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform3iv = (type_glUniform3iv)
- context->getProcAddress(QLatin1String("glUniform3iv"));
- if (!funcs->uniform3iv) {
- funcs->uniform3iv = (type_glUniform3iv)
- context->getProcAddress(QLatin1String("glUniform3ivARB"));
- }
-
- if (funcs->uniform3iv)
- funcs->uniform3iv(location, count, v);
- else
- funcs->uniform3iv = qglfResolveUniform3iv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- typedef void (QGLF_APIENTRYP type_glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform4f = (type_glUniform4f)
- context->getProcAddress(QLatin1String("glUniform4f"));
- if (!funcs->uniform4f) {
- funcs->uniform4f = (type_glUniform4f)
- context->getProcAddress(QLatin1String("glUniform4fARB"));
- }
-
- if (funcs->uniform4f)
- funcs->uniform4f(location, x, y, z, w);
- else
- funcs->uniform4f = qglfResolveUniform4f;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform4fv(GLint location, GLsizei count, const GLfloat* v)
-{
- typedef void (QGLF_APIENTRYP type_glUniform4fv)(GLint location, GLsizei count, const GLfloat* v);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform4fv = (type_glUniform4fv)
- context->getProcAddress(QLatin1String("glUniform4fv"));
- if (!funcs->uniform4fv) {
- funcs->uniform4fv = (type_glUniform4fv)
- context->getProcAddress(QLatin1String("glUniform4fvARB"));
- }
-
- if (funcs->uniform4fv)
- funcs->uniform4fv(location, count, v);
- else
- funcs->uniform4fv = qglfResolveUniform4fv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
-{
- typedef void (QGLF_APIENTRYP type_glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform4i = (type_glUniform4i)
- context->getProcAddress(QLatin1String("glUniform4i"));
- if (!funcs->uniform4i) {
- funcs->uniform4i = (type_glUniform4i)
- context->getProcAddress(QLatin1String("glUniform4iARB"));
- }
-
- if (funcs->uniform4i)
- funcs->uniform4i(location, x, y, z, w);
- else
- funcs->uniform4i = qglfResolveUniform4i;
-}
-
-static void QGLF_APIENTRY qglfResolveUniform4iv(GLint location, GLsizei count, const GLint* v)
-{
- typedef void (QGLF_APIENTRYP type_glUniform4iv)(GLint location, GLsizei count, const GLint* v);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniform4iv = (type_glUniform4iv)
- context->getProcAddress(QLatin1String("glUniform4iv"));
- if (!funcs->uniform4iv) {
- funcs->uniform4iv = (type_glUniform4iv)
- context->getProcAddress(QLatin1String("glUniform4ivARB"));
- }
-
- if (funcs->uniform4iv)
- funcs->uniform4iv(location, count, v);
- else
- funcs->uniform4iv = qglfResolveUniform4iv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-{
- typedef void (QGLF_APIENTRYP type_glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniformMatrix2fv = (type_glUniformMatrix2fv)
- context->getProcAddress(QLatin1String("glUniformMatrix2fv"));
- if (!funcs->uniformMatrix2fv) {
- funcs->uniformMatrix2fv = (type_glUniformMatrix2fv)
- context->getProcAddress(QLatin1String("glUniformMatrix2fvARB"));
- }
-
- if (funcs->uniformMatrix2fv)
- funcs->uniformMatrix2fv(location, count, transpose, value);
- else
- funcs->uniformMatrix2fv = qglfResolveUniformMatrix2fv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-{
- typedef void (QGLF_APIENTRYP type_glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniformMatrix3fv = (type_glUniformMatrix3fv)
- context->getProcAddress(QLatin1String("glUniformMatrix3fv"));
- if (!funcs->uniformMatrix3fv) {
- funcs->uniformMatrix3fv = (type_glUniformMatrix3fv)
- context->getProcAddress(QLatin1String("glUniformMatrix3fvARB"));
- }
-
- if (funcs->uniformMatrix3fv)
- funcs->uniformMatrix3fv(location, count, transpose, value);
- else
- funcs->uniformMatrix3fv = qglfResolveUniformMatrix3fv;
-}
-
-static void QGLF_APIENTRY qglfResolveUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-{
- typedef void (QGLF_APIENTRYP type_glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->uniformMatrix4fv = (type_glUniformMatrix4fv)
- context->getProcAddress(QLatin1String("glUniformMatrix4fv"));
- if (!funcs->uniformMatrix4fv) {
- funcs->uniformMatrix4fv = (type_glUniformMatrix4fv)
- context->getProcAddress(QLatin1String("glUniformMatrix4fvARB"));
- }
-
- if (funcs->uniformMatrix4fv)
- funcs->uniformMatrix4fv(location, count, transpose, value);
- else
- funcs->uniformMatrix4fv = qglfResolveUniformMatrix4fv;
-}
-
-static void QGLF_APIENTRY qglfResolveUseProgram(GLuint program)
-{
- typedef void (QGLF_APIENTRYP type_glUseProgram)(GLuint program);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->useProgram = (type_glUseProgram)
- context->getProcAddress(QLatin1String("glUseProgram"));
- if (!funcs->useProgram) {
- funcs->useProgram = (type_glUseProgram)
- context->getProcAddress(QLatin1String("glUseProgramObjectARB"));
- }
-
- if (funcs->useProgram)
- funcs->useProgram(program);
- else
- funcs->useProgram = qglfResolveUseProgram;
-}
-
-static void QGLF_APIENTRY qglfResolveValidateProgram(GLuint program)
-{
- typedef void (QGLF_APIENTRYP type_glValidateProgram)(GLuint program);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->validateProgram = (type_glValidateProgram)
- context->getProcAddress(QLatin1String("glValidateProgram"));
- if (!funcs->validateProgram) {
- funcs->validateProgram = (type_glValidateProgram)
- context->getProcAddress(QLatin1String("glValidateProgramARB"));
- }
-
- if (funcs->validateProgram)
- funcs->validateProgram(program);
- else
- funcs->validateProgram = qglfResolveValidateProgram;
-}
-
-static void QGLF_APIENTRY qglfResolveVertexAttrib1f(GLuint indx, GLfloat x)
-{
- typedef void (QGLF_APIENTRYP type_glVertexAttrib1f)(GLuint indx, GLfloat x);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->vertexAttrib1f = (type_glVertexAttrib1f)
- context->getProcAddress(QLatin1String("glVertexAttrib1f"));
- if (!funcs->vertexAttrib1f) {
- funcs->vertexAttrib1f = (type_glVertexAttrib1f)
- context->getProcAddress(QLatin1String("glVertexAttrib1fARB"));
- }
-
- if (funcs->vertexAttrib1f)
- funcs->vertexAttrib1f(indx, x);
- else
- funcs->vertexAttrib1f = qglfResolveVertexAttrib1f;
-}
-
-static void QGLF_APIENTRY qglfResolveVertexAttrib1fv(GLuint indx, const GLfloat* values)
-{
- typedef void (QGLF_APIENTRYP type_glVertexAttrib1fv)(GLuint indx, const GLfloat* values);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->vertexAttrib1fv = (type_glVertexAttrib1fv)
- context->getProcAddress(QLatin1String("glVertexAttrib1fv"));
- if (!funcs->vertexAttrib1fv) {
- funcs->vertexAttrib1fv = (type_glVertexAttrib1fv)
- context->getProcAddress(QLatin1String("glVertexAttrib1fvARB"));
- }
-
- if (funcs->vertexAttrib1fv)
- funcs->vertexAttrib1fv(indx, values);
- else
- funcs->vertexAttrib1fv = qglfResolveVertexAttrib1fv;
-}
-
-static void QGLF_APIENTRY qglfResolveVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
-{
- typedef void (QGLF_APIENTRYP type_glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->vertexAttrib2f = (type_glVertexAttrib2f)
- context->getProcAddress(QLatin1String("glVertexAttrib2f"));
- if (!funcs->vertexAttrib2f) {
- funcs->vertexAttrib2f = (type_glVertexAttrib2f)
- context->getProcAddress(QLatin1String("glVertexAttrib2fARB"));
- }
-
- if (funcs->vertexAttrib2f)
- funcs->vertexAttrib2f(indx, x, y);
- else
- funcs->vertexAttrib2f = qglfResolveVertexAttrib2f;
-}
-
-static void QGLF_APIENTRY qglfResolveVertexAttrib2fv(GLuint indx, const GLfloat* values)
-{
- typedef void (QGLF_APIENTRYP type_glVertexAttrib2fv)(GLuint indx, const GLfloat* values);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->vertexAttrib2fv = (type_glVertexAttrib2fv)
- context->getProcAddress(QLatin1String("glVertexAttrib2fv"));
- if (!funcs->vertexAttrib2fv) {
- funcs->vertexAttrib2fv = (type_glVertexAttrib2fv)
- context->getProcAddress(QLatin1String("glVertexAttrib2fvARB"));
- }
-
- if (funcs->vertexAttrib2fv)
- funcs->vertexAttrib2fv(indx, values);
- else
- funcs->vertexAttrib2fv = qglfResolveVertexAttrib2fv;
-}
-
-static void QGLF_APIENTRY qglfResolveVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
-{
- typedef void (QGLF_APIENTRYP type_glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->vertexAttrib3f = (type_glVertexAttrib3f)
- context->getProcAddress(QLatin1String("glVertexAttrib3f"));
- if (!funcs->vertexAttrib3f) {
- funcs->vertexAttrib3f = (type_glVertexAttrib3f)
- context->getProcAddress(QLatin1String("glVertexAttrib3fARB"));
- }
-
- if (funcs->vertexAttrib3f)
- funcs->vertexAttrib3f(indx, x, y, z);
- else
- funcs->vertexAttrib3f = qglfResolveVertexAttrib3f;
-}
-
-static void QGLF_APIENTRY qglfResolveVertexAttrib3fv(GLuint indx, const GLfloat* values)
-{
- typedef void (QGLF_APIENTRYP type_glVertexAttrib3fv)(GLuint indx, const GLfloat* values);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->vertexAttrib3fv = (type_glVertexAttrib3fv)
- context->getProcAddress(QLatin1String("glVertexAttrib3fv"));
- if (!funcs->vertexAttrib3fv) {
- funcs->vertexAttrib3fv = (type_glVertexAttrib3fv)
- context->getProcAddress(QLatin1String("glVertexAttrib3fvARB"));
- }
-
- if (funcs->vertexAttrib3fv)
- funcs->vertexAttrib3fv(indx, values);
- else
- funcs->vertexAttrib3fv = qglfResolveVertexAttrib3fv;
-}
-
-static void QGLF_APIENTRY qglfResolveVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- typedef void (QGLF_APIENTRYP type_glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->vertexAttrib4f = (type_glVertexAttrib4f)
- context->getProcAddress(QLatin1String("glVertexAttrib4f"));
- if (!funcs->vertexAttrib4f) {
- funcs->vertexAttrib4f = (type_glVertexAttrib4f)
- context->getProcAddress(QLatin1String("glVertexAttrib4fARB"));
- }
-
- if (funcs->vertexAttrib4f)
- funcs->vertexAttrib4f(indx, x, y, z, w);
- else
- funcs->vertexAttrib4f = qglfResolveVertexAttrib4f;
-}
-
-static void QGLF_APIENTRY qglfResolveVertexAttrib4fv(GLuint indx, const GLfloat* values)
-{
- typedef void (QGLF_APIENTRYP type_glVertexAttrib4fv)(GLuint indx, const GLfloat* values);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->vertexAttrib4fv = (type_glVertexAttrib4fv)
- context->getProcAddress(QLatin1String("glVertexAttrib4fv"));
- if (!funcs->vertexAttrib4fv) {
- funcs->vertexAttrib4fv = (type_glVertexAttrib4fv)
- context->getProcAddress(QLatin1String("glVertexAttrib4fvARB"));
- }
-
- if (funcs->vertexAttrib4fv)
- funcs->vertexAttrib4fv(indx, values);
- else
- funcs->vertexAttrib4fv = qglfResolveVertexAttrib4fv;
-}
-
-static void QGLF_APIENTRY qglfResolveVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
-{
- typedef void (QGLF_APIENTRYP type_glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
-
- const QGLContext *context = QGLContext::currentContext();
- QGLFunctionsPrivate *funcs = qt_gl_functions(context);
-
- funcs->vertexAttribPointer = (type_glVertexAttribPointer)
- context->getProcAddress(QLatin1String("glVertexAttribPointer"));
- if (!funcs->vertexAttribPointer) {
- funcs->vertexAttribPointer = (type_glVertexAttribPointer)
- context->getProcAddress(QLatin1String("glVertexAttribPointerARB"));
- }
-
- if (funcs->vertexAttribPointer)
- funcs->vertexAttribPointer(indx, size, type, normalized, stride, ptr);
- else
- funcs->vertexAttribPointer = qglfResolveVertexAttribPointer;
-}
-
-#endif // !QT_OPENGL_ES_2
-
QGLFunctionsPrivate::QGLFunctionsPrivate(const QGLContext *)
+ : funcs(0)
{
-#ifndef QT_OPENGL_ES_2
- activeTexture = qglfResolveActiveTexture;
- attachShader = qglfResolveAttachShader;
- bindAttribLocation = qglfResolveBindAttribLocation;
- bindBuffer = qglfResolveBindBuffer;
- bindFramebuffer = qglfResolveBindFramebuffer;
- bindRenderbuffer = qglfResolveBindRenderbuffer;
- blendColor = qglfResolveBlendColor;
- blendEquation = qglfResolveBlendEquation;
- blendEquationSeparate = qglfResolveBlendEquationSeparate;
- blendFuncSeparate = qglfResolveBlendFuncSeparate;
- bufferData = qglfResolveBufferData;
- bufferSubData = qglfResolveBufferSubData;
- checkFramebufferStatus = qglfResolveCheckFramebufferStatus;
- compileShader = qglfResolveCompileShader;
- compressedTexImage2D = qglfResolveCompressedTexImage2D;
- compressedTexSubImage2D = qglfResolveCompressedTexSubImage2D;
- createProgram = qglfResolveCreateProgram;
- createShader = qglfResolveCreateShader;
- deleteBuffers = qglfResolveDeleteBuffers;
- deleteFramebuffers = qglfResolveDeleteFramebuffers;
- deleteProgram = qglfResolveDeleteProgram;
- deleteRenderbuffers = qglfResolveDeleteRenderbuffers;
- deleteShader = qglfResolveDeleteShader;
- detachShader = qglfResolveDetachShader;
- disableVertexAttribArray = qglfResolveDisableVertexAttribArray;
- enableVertexAttribArray = qglfResolveEnableVertexAttribArray;
- framebufferRenderbuffer = qglfResolveFramebufferRenderbuffer;
- framebufferTexture2D = qglfResolveFramebufferTexture2D;
- genBuffers = qglfResolveGenBuffers;
- generateMipmap = qglfResolveGenerateMipmap;
- genFramebuffers = qglfResolveGenFramebuffers;
- genRenderbuffers = qglfResolveGenRenderbuffers;
- getActiveAttrib = qglfResolveGetActiveAttrib;
- getActiveUniform = qglfResolveGetActiveUniform;
- getAttachedShaders = qglfResolveGetAttachedShaders;
- getAttribLocation = qglfResolveGetAttribLocation;
- getBufferParameteriv = qglfResolveGetBufferParameteriv;
- getFramebufferAttachmentParameteriv = qglfResolveGetFramebufferAttachmentParameteriv;
- getProgramiv = qglfResolveGetProgramiv;
- getProgramInfoLog = qglfResolveGetProgramInfoLog;
- getRenderbufferParameteriv = qglfResolveGetRenderbufferParameteriv;
- getShaderiv = qglfResolveGetShaderiv;
- getShaderInfoLog = qglfResolveGetShaderInfoLog;
- getShaderPrecisionFormat = qglfResolveGetShaderPrecisionFormat;
- getShaderSource = qglfResolveGetShaderSource;
- getUniformfv = qglfResolveGetUniformfv;
- getUniformiv = qglfResolveGetUniformiv;
- getUniformLocation = qglfResolveGetUniformLocation;
- getVertexAttribfv = qglfResolveGetVertexAttribfv;
- getVertexAttribiv = qglfResolveGetVertexAttribiv;
- getVertexAttribPointerv = qglfResolveGetVertexAttribPointerv;
- isBuffer = qglfResolveIsBuffer;
- isFramebuffer = qglfResolveIsFramebuffer;
- isProgram = qglfResolveIsProgram;
- isRenderbuffer = qglfResolveIsRenderbuffer;
- isShader = qglfResolveIsShader;
- linkProgram = qglfResolveLinkProgram;
- releaseShaderCompiler = qglfResolveReleaseShaderCompiler;
- renderbufferStorage = qglfResolveRenderbufferStorage;
- sampleCoverage = qglfResolveSampleCoverage;
- shaderBinary = qglfResolveShaderBinary;
- shaderSource = qglfResolveShaderSource;
- stencilFuncSeparate = qglfResolveStencilFuncSeparate;
- stencilMaskSeparate = qglfResolveStencilMaskSeparate;
- stencilOpSeparate = qglfResolveStencilOpSeparate;
- uniform1f = qglfResolveUniform1f;
- uniform1fv = qglfResolveUniform1fv;
- uniform1i = qglfResolveUniform1i;
- uniform1iv = qglfResolveUniform1iv;
- uniform2f = qglfResolveUniform2f;
- uniform2fv = qglfResolveUniform2fv;
- uniform2i = qglfResolveUniform2i;
- uniform2iv = qglfResolveUniform2iv;
- uniform3f = qglfResolveUniform3f;
- uniform3fv = qglfResolveUniform3fv;
- uniform3i = qglfResolveUniform3i;
- uniform3iv = qglfResolveUniform3iv;
- uniform4f = qglfResolveUniform4f;
- uniform4fv = qglfResolveUniform4fv;
- uniform4i = qglfResolveUniform4i;
- uniform4iv = qglfResolveUniform4iv;
- uniformMatrix2fv = qglfResolveUniformMatrix2fv;
- uniformMatrix3fv = qglfResolveUniformMatrix3fv;
- uniformMatrix4fv = qglfResolveUniformMatrix4fv;
- useProgram = qglfResolveUseProgram;
- validateProgram = qglfResolveValidateProgram;
- vertexAttrib1f = qglfResolveVertexAttrib1f;
- vertexAttrib1fv = qglfResolveVertexAttrib1fv;
- vertexAttrib2f = qglfResolveVertexAttrib2f;
- vertexAttrib2fv = qglfResolveVertexAttrib2fv;
- vertexAttrib3f = qglfResolveVertexAttrib3f;
- vertexAttrib3fv = qglfResolveVertexAttrib3fv;
- vertexAttrib4f = qglfResolveVertexAttrib4f;
- vertexAttrib4fv = qglfResolveVertexAttrib4fv;
- vertexAttribPointer = qglfResolveVertexAttribPointer;
-#endif // !QT_OPENGL_ES_2
}
QT_END_NAMESPACE
diff --git a/src/opengl/qglfunctions.h b/src/opengl/qglfunctions.h
index 7fc7966a09..f822899e47 100644
--- a/src/opengl/qglfunctions.h
+++ b/src/opengl/qglfunctions.h
@@ -42,141 +42,14 @@
#ifndef QGLFUNCTIONS_H
#define QGLFUNCTIONS_H
-#ifdef __GLEW_H__
-#if defined(Q_CC_GNU)
-#warning qglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
-#warning To use GLEW with Qt, do not include <QtOpenGL> or <QGLFunctions> after glew.h
-#endif
-#endif
-
#include <QtOpenGL/qgl.h>
#include <QtGui/qopenglcontext.h>
#include <QtGui/qopenglfunctions.h>
QT_BEGIN_NAMESPACE
-
-// Types that aren't defined in all system's gl.h files.
-typedef ptrdiff_t qgl_GLintptr;
-typedef ptrdiff_t qgl_GLsizeiptr;
-
-#if defined(APIENTRY) && !defined(QGLF_APIENTRY)
-# define QGLF_APIENTRY APIENTRY
-#elif defined(GL_APIENTRY) && !defined(QGLF_APIENTRY)
-# define QGLF_APIENTRY GL_APIENTRY
-#endif
-
-# ifndef QGLF_APIENTRYP
-# ifdef QGLF_APIENTRY
-# define QGLF_APIENTRYP QGLF_APIENTRY *
-# else
-# define QGLF_APIENTRY
-# define QGLF_APIENTRYP *
-# endif
-# endif
-
struct QGLFunctionsPrivate;
-// Undefine any macros from GLEW, qglextensions_p.h, etc that
-// may interfere with the definition of QGLFunctions.
-#undef glActiveTexture
-#undef glAttachShader
-#undef glBindAttribLocation
-#undef glBindBuffer
-#undef glBindFramebuffer
-#undef glBindRenderbuffer
-#undef glBlendColor
-#undef glBlendEquation
-#undef glBlendEquationSeparate
-#undef glBlendFuncSeparate
-#undef glBufferData
-#undef glBufferSubData
-#undef glCheckFramebufferStatus
-#undef glClearDepthf
-#undef glCompileShader
-#undef glCompressedTexImage2D
-#undef glCompressedTexSubImage2D
-#undef glCreateProgram
-#undef glCreateShader
-#undef glDeleteBuffers
-#undef glDeleteFramebuffers
-#undef glDeleteProgram
-#undef glDeleteRenderbuffers
-#undef glDeleteShader
-#undef glDepthRangef
-#undef glDetachShader
-#undef glDisableVertexAttribArray
-#undef glEnableVertexAttribArray
-#undef glFramebufferRenderbuffer
-#undef glFramebufferTexture2D
-#undef glGenBuffers
-#undef glGenerateMipmap
-#undef glGenFramebuffers
-#undef glGenRenderbuffers
-#undef glGetActiveAttrib
-#undef glGetActiveUniform
-#undef glGetAttachedShaders
-#undef glGetAttribLocation
-#undef glGetBufferParameteriv
-#undef glGetFramebufferAttachmentParameteriv
-#undef glGetProgramiv
-#undef glGetProgramInfoLog
-#undef glGetRenderbufferParameteriv
-#undef glGetShaderiv
-#undef glGetShaderInfoLog
-#undef glGetShaderPrecisionFormat
-#undef glGetShaderSource
-#undef glGetUniformfv
-#undef glGetUniformiv
-#undef glGetUniformLocation
-#undef glGetVertexAttribfv
-#undef glGetVertexAttribiv
-#undef glGetVertexAttribPointerv
-#undef glIsBuffer
-#undef glIsFramebuffer
-#undef glIsProgram
-#undef glIsRenderbuffer
-#undef glIsShader
-#undef glLinkProgram
-#undef glReleaseShaderCompiler
-#undef glRenderbufferStorage
-#undef glSampleCoverage
-#undef glShaderBinary
-#undef glShaderSource
-#undef glStencilFuncSeparate
-#undef glStencilMaskSeparate
-#undef glStencilOpSeparate
-#undef glUniform1f
-#undef glUniform1fv
-#undef glUniform1i
-#undef glUniform1iv
-#undef glUniform2f
-#undef glUniform2fv
-#undef glUniform2i
-#undef glUniform2iv
-#undef glUniform3f
-#undef glUniform3fv
-#undef glUniform3i
-#undef glUniform3iv
-#undef glUniform4f
-#undef glUniform4fv
-#undef glUniform4i
-#undef glUniform4iv
-#undef glUniformMatrix2fv
-#undef glUniformMatrix3fv
-#undef glUniformMatrix4fv
-#undef glUseProgram
-#undef glValidateProgram
-#undef glVertexAttrib1f
-#undef glVertexAttrib1fv
-#undef glVertexAttrib2f
-#undef glVertexAttrib2fv
-#undef glVertexAttrib3f
-#undef glVertexAttrib3fv
-#undef glVertexAttrib4f
-#undef glVertexAttrib4fv
-#undef glVertexAttribPointer
-
class Q_OPENGL_EXPORT QGLFunctions
{
public:
@@ -217,8 +90,8 @@ public:
void glBlendEquation(GLenum mode);
void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
- void glBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
- void glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
+ void glBufferData(GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage);
+ void glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void* data);
GLenum glCheckFramebufferStatus(GLenum target);
void glClearDepthf(GLclampf depth);
void glCompileShader(GLuint shader);
@@ -315,1074 +188,591 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QGLFunctions::OpenGLFeatures)
struct QGLFunctionsPrivate
{
QGLFunctionsPrivate(const QGLContext *context = 0);
-
-#ifndef QT_OPENGL_ES_2
- void (QGLF_APIENTRYP activeTexture)(GLenum texture);
- void (QGLF_APIENTRYP attachShader)(GLuint program, GLuint shader);
- void (QGLF_APIENTRYP bindAttribLocation)(GLuint program, GLuint index, const char* name);
- void (QGLF_APIENTRYP bindBuffer)(GLenum target, GLuint buffer);
- void (QGLF_APIENTRYP bindFramebuffer)(GLenum target, GLuint framebuffer);
- void (QGLF_APIENTRYP bindRenderbuffer)(GLenum target, GLuint renderbuffer);
- void (QGLF_APIENTRYP blendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
- void (QGLF_APIENTRYP blendEquation)(GLenum mode);
- void (QGLF_APIENTRYP blendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
- void (QGLF_APIENTRYP blendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
- void (QGLF_APIENTRYP bufferData)(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
- void (QGLF_APIENTRYP bufferSubData)(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
- GLenum (QGLF_APIENTRYP checkFramebufferStatus)(GLenum target);
- void (QGLF_APIENTRYP compileShader)(GLuint shader);
- void (QGLF_APIENTRYP compressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
- void (QGLF_APIENTRYP compressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
- GLuint (QGLF_APIENTRYP createProgram)();
- GLuint (QGLF_APIENTRYP createShader)(GLenum type);
- void (QGLF_APIENTRYP deleteBuffers)(GLsizei n, const GLuint* buffers);
- void (QGLF_APIENTRYP deleteFramebuffers)(GLsizei n, const GLuint* framebuffers);
- void (QGLF_APIENTRYP deleteProgram)(GLuint program);
- void (QGLF_APIENTRYP deleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers);
- void (QGLF_APIENTRYP deleteShader)(GLuint shader);
- void (QGLF_APIENTRYP detachShader)(GLuint program, GLuint shader);
- void (QGLF_APIENTRYP disableVertexAttribArray)(GLuint index);
- void (QGLF_APIENTRYP enableVertexAttribArray)(GLuint index);
- void (QGLF_APIENTRYP framebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
- void (QGLF_APIENTRYP framebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
- void (QGLF_APIENTRYP genBuffers)(GLsizei n, GLuint* buffers);
- void (QGLF_APIENTRYP generateMipmap)(GLenum target);
- void (QGLF_APIENTRYP genFramebuffers)(GLsizei n, GLuint* framebuffers);
- void (QGLF_APIENTRYP genRenderbuffers)(GLsizei n, GLuint* renderbuffers);
- void (QGLF_APIENTRYP getActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
- void (QGLF_APIENTRYP getActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
- void (QGLF_APIENTRYP getAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
- int (QGLF_APIENTRYP getAttribLocation)(GLuint program, const char* name);
- void (QGLF_APIENTRYP getBufferParameteriv)(GLenum target, GLenum pname, GLint* params);
- void (QGLF_APIENTRYP getFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params);
- void (QGLF_APIENTRYP getProgramiv)(GLuint program, GLenum pname, GLint* params);
- void (QGLF_APIENTRYP getProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
- void (QGLF_APIENTRYP getRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params);
- void (QGLF_APIENTRYP getShaderiv)(GLuint shader, GLenum pname, GLint* params);
- void (QGLF_APIENTRYP getShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
- void (QGLF_APIENTRYP getShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
- void (QGLF_APIENTRYP getShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
- void (QGLF_APIENTRYP getUniformfv)(GLuint program, GLint location, GLfloat* params);
- void (QGLF_APIENTRYP getUniformiv)(GLuint program, GLint location, GLint* params);
- int (QGLF_APIENTRYP getUniformLocation)(GLuint program, const char* name);
- void (QGLF_APIENTRYP getVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params);
- void (QGLF_APIENTRYP getVertexAttribiv)(GLuint index, GLenum pname, GLint* params);
- void (QGLF_APIENTRYP getVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer);
- GLboolean (QGLF_APIENTRYP isBuffer)(GLuint buffer);
- GLboolean (QGLF_APIENTRYP isFramebuffer)(GLuint framebuffer);
- GLboolean (QGLF_APIENTRYP isProgram)(GLuint program);
- GLboolean (QGLF_APIENTRYP isRenderbuffer)(GLuint renderbuffer);
- GLboolean (QGLF_APIENTRYP isShader)(GLuint shader);
- void (QGLF_APIENTRYP linkProgram)(GLuint program);
- void (QGLF_APIENTRYP releaseShaderCompiler)();
- void (QGLF_APIENTRYP renderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
- void (QGLF_APIENTRYP sampleCoverage)(GLclampf value, GLboolean invert);
- void (QGLF_APIENTRYP shaderBinary)(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
- void (QGLF_APIENTRYP shaderSource)(GLuint shader, GLsizei count, const char** string, const GLint* length);
- void (QGLF_APIENTRYP stencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask);
- void (QGLF_APIENTRYP stencilMaskSeparate)(GLenum face, GLuint mask);
- void (QGLF_APIENTRYP stencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
- void (QGLF_APIENTRYP uniform1f)(GLint location, GLfloat x);
- void (QGLF_APIENTRYP uniform1fv)(GLint location, GLsizei count, const GLfloat* v);
- void (QGLF_APIENTRYP uniform1i)(GLint location, GLint x);
- void (QGLF_APIENTRYP uniform1iv)(GLint location, GLsizei count, const GLint* v);
- void (QGLF_APIENTRYP uniform2f)(GLint location, GLfloat x, GLfloat y);
- void (QGLF_APIENTRYP uniform2fv)(GLint location, GLsizei count, const GLfloat* v);
- void (QGLF_APIENTRYP uniform2i)(GLint location, GLint x, GLint y);
- void (QGLF_APIENTRYP uniform2iv)(GLint location, GLsizei count, const GLint* v);
- void (QGLF_APIENTRYP uniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z);
- void (QGLF_APIENTRYP uniform3fv)(GLint location, GLsizei count, const GLfloat* v);
- void (QGLF_APIENTRYP uniform3i)(GLint location, GLint x, GLint y, GLint z);
- void (QGLF_APIENTRYP uniform3iv)(GLint location, GLsizei count, const GLint* v);
- void (QGLF_APIENTRYP uniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- void (QGLF_APIENTRYP uniform4fv)(GLint location, GLsizei count, const GLfloat* v);
- void (QGLF_APIENTRYP uniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w);
- void (QGLF_APIENTRYP uniform4iv)(GLint location, GLsizei count, const GLint* v);
- void (QGLF_APIENTRYP uniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
- void (QGLF_APIENTRYP uniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
- void (QGLF_APIENTRYP uniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
- void (QGLF_APIENTRYP useProgram)(GLuint program);
- void (QGLF_APIENTRYP validateProgram)(GLuint program);
- void (QGLF_APIENTRYP vertexAttrib1f)(GLuint indx, GLfloat x);
- void (QGLF_APIENTRYP vertexAttrib1fv)(GLuint indx, const GLfloat* values);
- void (QGLF_APIENTRYP vertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y);
- void (QGLF_APIENTRYP vertexAttrib2fv)(GLuint indx, const GLfloat* values);
- void (QGLF_APIENTRYP vertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
- void (QGLF_APIENTRYP vertexAttrib3fv)(GLuint indx, const GLfloat* values);
- void (QGLF_APIENTRYP vertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- void (QGLF_APIENTRYP vertexAttrib4fv)(GLuint indx, const GLfloat* values);
- void (QGLF_APIENTRYP vertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
-#endif
+ QOpenGLFunctions *funcs;
};
inline void QGLFunctions::glActiveTexture(GLenum texture)
{
-#if defined(QT_OPENGL_ES_2)
- ::glActiveTexture(texture);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->activeTexture(texture);
-#endif
+ d_ptr->funcs->glActiveTexture(texture);
}
inline void QGLFunctions::glAttachShader(GLuint program, GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
- ::glAttachShader(program, shader);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->attachShader(program, shader);
-#endif
+ d_ptr->funcs->glAttachShader(program, shader);
}
inline void QGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name)
{
-#if defined(QT_OPENGL_ES_2)
- ::glBindAttribLocation(program, index, name);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->bindAttribLocation(program, index, name);
-#endif
+ d_ptr->funcs->glBindAttribLocation(program, index, name);
}
inline void QGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
{
-#if defined(QT_OPENGL_ES_2)
- ::glBindBuffer(target, buffer);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->bindBuffer(target, buffer);
-#endif
+ d_ptr->funcs->glBindBuffer(target, buffer);
}
inline void QGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer)
{
if (framebuffer == 0)
framebuffer = QOpenGLContext::currentContext()->defaultFramebufferObject();
-#if defined(QT_OPENGL_ES_2)
- ::glBindFramebuffer(target, framebuffer);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->bindFramebuffer(target, framebuffer);
-#endif
+ d_ptr->funcs->glBindFramebuffer(target, framebuffer);
}
inline void QGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
{
-#if defined(QT_OPENGL_ES_2)
- ::glBindRenderbuffer(target, renderbuffer);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->bindRenderbuffer(target, renderbuffer);
-#endif
+ d_ptr->funcs->glBindRenderbuffer(target, renderbuffer);
}
inline void QGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
-#if defined(QT_OPENGL_ES_2)
- ::glBlendColor(red, green, blue, alpha);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->blendColor(red, green, blue, alpha);
-#endif
+ d_ptr->funcs->glBlendColor(red, green, blue, alpha);
}
inline void QGLFunctions::glBlendEquation(GLenum mode)
{
-#if defined(QT_OPENGL_ES_2)
- ::glBlendEquation(mode);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->blendEquation(mode);
-#endif
+ d_ptr->funcs->glBlendEquation(mode);
}
inline void QGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
{
-#if defined(QT_OPENGL_ES_2)
- ::glBlendEquationSeparate(modeRGB, modeAlpha);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->blendEquationSeparate(modeRGB, modeAlpha);
-#endif
+ d_ptr->funcs->glBlendEquationSeparate(modeRGB, modeAlpha);
}
inline void QGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
{
-#if defined(QT_OPENGL_ES_2)
- ::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
-#endif
+ d_ptr->funcs->glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
}
-inline void QGLFunctions::glBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage)
+inline void QGLFunctions::glBufferData(GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage)
{
-#if defined(QT_OPENGL_ES_2)
- ::glBufferData(target, size, data, usage);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->bufferData(target, size, data, usage);
-#endif
+ d_ptr->funcs->glBufferData(target, size, data, usage);
}
-inline void QGLFunctions::glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data)
+inline void QGLFunctions::glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void* data)
{
-#if defined(QT_OPENGL_ES_2)
- ::glBufferSubData(target, offset, size, data);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->bufferSubData(target, offset, size, data);
-#endif
+ d_ptr->funcs->glBufferSubData(target, offset, size, data);
}
inline GLenum QGLFunctions::glCheckFramebufferStatus(GLenum target)
{
-#if defined(QT_OPENGL_ES_2)
- return ::glCheckFramebufferStatus(target);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->checkFramebufferStatus(target);
-#endif
+ return d_ptr->funcs->glCheckFramebufferStatus(target);
}
inline void QGLFunctions::glClearDepthf(GLclampf depth)
{
-#ifndef QT_OPENGL_ES
- ::glClearDepth(depth);
-#else
- ::glClearDepthf(depth);
-#endif
+ Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
+ return d_ptr->funcs->glClearDepthf(depth);
}
inline void QGLFunctions::glCompileShader(GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
- ::glCompileShader(shader);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->compileShader(shader);
-#endif
+ d_ptr->funcs->glCompileShader(shader);
}
inline void QGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
{
-#if defined(QT_OPENGL_ES_2)
- ::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
-#endif
+ d_ptr->funcs->glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
}
inline void QGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
{
-#if defined(QT_OPENGL_ES_2)
- ::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
-#endif
+ d_ptr->funcs->glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
}
inline GLuint QGLFunctions::glCreateProgram()
{
-#if defined(QT_OPENGL_ES_2)
- return ::glCreateProgram();
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->createProgram();
-#endif
+ return d_ptr->funcs->glCreateProgram();
}
inline GLuint QGLFunctions::glCreateShader(GLenum type)
{
-#if defined(QT_OPENGL_ES_2)
- return ::glCreateShader(type);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->createShader(type);
-#endif
+ return d_ptr->funcs->glCreateShader(type);
}
inline void QGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers)
{
-#if defined(QT_OPENGL_ES_2)
- ::glDeleteBuffers(n, buffers);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->deleteBuffers(n, buffers);
-#endif
+ d_ptr->funcs->glDeleteBuffers(n, buffers);
}
inline void QGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
{
-#if defined(QT_OPENGL_ES_2)
- ::glDeleteFramebuffers(n, framebuffers);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->deleteFramebuffers(n, framebuffers);
-#endif
+ d_ptr->funcs->glDeleteFramebuffers(n, framebuffers);
}
inline void QGLFunctions::glDeleteProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
- ::glDeleteProgram(program);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->deleteProgram(program);
-#endif
+ d_ptr->funcs->glDeleteProgram(program);
}
inline void QGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
{
-#if defined(QT_OPENGL_ES_2)
- ::glDeleteRenderbuffers(n, renderbuffers);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->deleteRenderbuffers(n, renderbuffers);
-#endif
+ d_ptr->funcs->glDeleteRenderbuffers(n, renderbuffers);
}
inline void QGLFunctions::glDeleteShader(GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
- ::glDeleteShader(shader);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->deleteShader(shader);
-#endif
+ d_ptr->funcs->glDeleteShader(shader);
}
inline void QGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
{
-#ifndef QT_OPENGL_ES
- ::glDepthRange(zNear, zFar);
-#else
- ::glDepthRangef(zNear, zFar);
-#endif
+ Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
+ return d_ptr->funcs->glDepthRangef(zNear, zFar);
}
inline void QGLFunctions::glDetachShader(GLuint program, GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
- ::glDetachShader(program, shader);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->detachShader(program, shader);
-#endif
+ d_ptr->funcs->glDetachShader(program, shader);
}
inline void QGLFunctions::glDisableVertexAttribArray(GLuint index)
{
-#if defined(QT_OPENGL_ES_2)
- ::glDisableVertexAttribArray(index);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->disableVertexAttribArray(index);
-#endif
+ d_ptr->funcs->glDisableVertexAttribArray(index);
}
inline void QGLFunctions::glEnableVertexAttribArray(GLuint index)
{
-#if defined(QT_OPENGL_ES_2)
- ::glEnableVertexAttribArray(index);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->enableVertexAttribArray(index);
-#endif
+ d_ptr->funcs->glEnableVertexAttribArray(index);
}
inline void QGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
{
-#if defined(QT_OPENGL_ES_2)
- ::glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
-#endif
+ d_ptr->funcs->glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
}
inline void QGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
{
-#if defined(QT_OPENGL_ES_2)
- ::glFramebufferTexture2D(target, attachment, textarget, texture, level);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->framebufferTexture2D(target, attachment, textarget, texture, level);
-#endif
+ d_ptr->funcs->glFramebufferTexture2D(target, attachment, textarget, texture, level);
}
inline void QGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGenBuffers(n, buffers);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->genBuffers(n, buffers);
-#endif
+ d_ptr->funcs->glGenBuffers(n, buffers);
}
inline void QGLFunctions::glGenerateMipmap(GLenum target)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGenerateMipmap(target);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->generateMipmap(target);
-#endif
+ d_ptr->funcs->glGenerateMipmap(target);
}
inline void QGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGenFramebuffers(n, framebuffers);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->genFramebuffers(n, framebuffers);
-#endif
+ d_ptr->funcs->glGenFramebuffers(n, framebuffers);
}
inline void QGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGenRenderbuffers(n, renderbuffers);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->genRenderbuffers(n, renderbuffers);
-#endif
+ d_ptr->funcs->glGenRenderbuffers(n, renderbuffers);
}
inline void QGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetActiveAttrib(program, index, bufsize, length, size, type, name);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getActiveAttrib(program, index, bufsize, length, size, type, name);
-#endif
+ d_ptr->funcs->glGetActiveAttrib(program, index, bufsize, length, size, type, name);
}
inline void QGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetActiveUniform(program, index, bufsize, length, size, type, name);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getActiveUniform(program, index, bufsize, length, size, type, name);
-#endif
+ d_ptr->funcs->glGetActiveUniform(program, index, bufsize, length, size, type, name);
}
inline void QGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetAttachedShaders(program, maxcount, count, shaders);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getAttachedShaders(program, maxcount, count, shaders);
-#endif
+ d_ptr->funcs->glGetAttachedShaders(program, maxcount, count, shaders);
}
inline int QGLFunctions::glGetAttribLocation(GLuint program, const char* name)
{
-#if defined(QT_OPENGL_ES_2)
- return ::glGetAttribLocation(program, name);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->getAttribLocation(program, name);
-#endif
+ return d_ptr->funcs->glGetAttribLocation(program, name);
}
inline void QGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetBufferParameteriv(target, pname, params);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getBufferParameteriv(target, pname, params);
-#endif
+ d_ptr->funcs->glGetBufferParameteriv(target, pname, params);
}
inline void QGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getFramebufferAttachmentParameteriv(target, attachment, pname, params);
-#endif
+ d_ptr->funcs->glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
}
inline void QGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetProgramiv(program, pname, params);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getProgramiv(program, pname, params);
-#endif
+ d_ptr->funcs->glGetProgramiv(program, pname, params);
}
inline void QGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetProgramInfoLog(program, bufsize, length, infolog);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getProgramInfoLog(program, bufsize, length, infolog);
-#endif
+ d_ptr->funcs->glGetProgramInfoLog(program, bufsize, length, infolog);
}
inline void QGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetRenderbufferParameteriv(target, pname, params);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getRenderbufferParameteriv(target, pname, params);
-#endif
+ d_ptr->funcs->glGetRenderbufferParameteriv(target, pname, params);
}
inline void QGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetShaderiv(shader, pname, params);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getShaderiv(shader, pname, params);
-#endif
+ d_ptr->funcs->glGetShaderiv(shader, pname, params);
}
inline void QGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetShaderInfoLog(shader, bufsize, length, infolog);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getShaderInfoLog(shader, bufsize, length, infolog);
-#endif
+ d_ptr->funcs->glGetShaderInfoLog(shader, bufsize, length, infolog);
}
inline void QGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getShaderPrecisionFormat(shadertype, precisiontype, range, precision);
-#endif
+ d_ptr->funcs->glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
}
inline void QGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetShaderSource(shader, bufsize, length, source);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getShaderSource(shader, bufsize, length, source);
-#endif
+ d_ptr->funcs->glGetShaderSource(shader, bufsize, length, source);
}
inline void QGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat* params)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetUniformfv(program, location, params);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getUniformfv(program, location, params);
-#endif
+ d_ptr->funcs->glGetUniformfv(program, location, params);
}
inline void QGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetUniformiv(program, location, params);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getUniformiv(program, location, params);
-#endif
+ d_ptr->funcs->glGetUniformiv(program, location, params);
}
inline int QGLFunctions::glGetUniformLocation(GLuint program, const char* name)
{
-#if defined(QT_OPENGL_ES_2)
- return ::glGetUniformLocation(program, name);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->getUniformLocation(program, name);
-#endif
+ return d_ptr->funcs->glGetUniformLocation(program, name);
}
inline void QGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetVertexAttribfv(index, pname, params);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getVertexAttribfv(index, pname, params);
-#endif
+ d_ptr->funcs->glGetVertexAttribfv(index, pname, params);
}
inline void QGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetVertexAttribiv(index, pname, params);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getVertexAttribiv(index, pname, params);
-#endif
+ d_ptr->funcs->glGetVertexAttribiv(index, pname, params);
}
inline void QGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
{
-#if defined(QT_OPENGL_ES_2)
- ::glGetVertexAttribPointerv(index, pname, pointer);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->getVertexAttribPointerv(index, pname, pointer);
-#endif
+ d_ptr->funcs->glGetVertexAttribPointerv(index, pname, pointer);
}
inline GLboolean QGLFunctions::glIsBuffer(GLuint buffer)
{
-#if defined(QT_OPENGL_ES_2)
- return ::glIsBuffer(buffer);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->isBuffer(buffer);
-#endif
+ return d_ptr->funcs->glIsBuffer(buffer);
}
inline GLboolean QGLFunctions::glIsFramebuffer(GLuint framebuffer)
{
-#if defined(QT_OPENGL_ES_2)
- return ::glIsFramebuffer(framebuffer);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->isFramebuffer(framebuffer);
-#endif
+ return d_ptr->funcs->glIsFramebuffer(framebuffer);
}
inline GLboolean QGLFunctions::glIsProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
- return ::glIsProgram(program);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->isProgram(program);
-#endif
+ return d_ptr->funcs->glIsProgram(program);
}
inline GLboolean QGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
{
-#if defined(QT_OPENGL_ES_2)
- return ::glIsRenderbuffer(renderbuffer);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->isRenderbuffer(renderbuffer);
-#endif
+ return d_ptr->funcs->glIsRenderbuffer(renderbuffer);
}
inline GLboolean QGLFunctions::glIsShader(GLuint shader)
{
-#if defined(QT_OPENGL_ES_2)
- return ::glIsShader(shader);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- return d_ptr->isShader(shader);
-#endif
+ return d_ptr->funcs->glIsShader(shader);
}
inline void QGLFunctions::glLinkProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
- ::glLinkProgram(program);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->linkProgram(program);
-#endif
+ d_ptr->funcs->glLinkProgram(program);
}
inline void QGLFunctions::glReleaseShaderCompiler()
{
-#if defined(QT_OPENGL_ES_2)
- ::glReleaseShaderCompiler();
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->releaseShaderCompiler();
-#endif
+ d_ptr->funcs->glReleaseShaderCompiler();
}
inline void QGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
{
-#if defined(QT_OPENGL_ES_2)
- ::glRenderbufferStorage(target, internalformat, width, height);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->renderbufferStorage(target, internalformat, width, height);
-#endif
+ d_ptr->funcs->glRenderbufferStorage(target, internalformat, width, height);
}
inline void QGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
{
-#if defined(QT_OPENGL_ES_2)
- ::glSampleCoverage(value, invert);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->sampleCoverage(value, invert);
-#endif
+ d_ptr->funcs->glSampleCoverage(value, invert);
}
inline void QGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length)
{
-#if defined(QT_OPENGL_ES_2)
- ::glShaderBinary(n, shaders, binaryformat, binary, length);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->shaderBinary(n, shaders, binaryformat, binary, length);
-#endif
+ d_ptr->funcs->glShaderBinary(n, shaders, binaryformat, binary, length);
}
inline void QGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
{
-#if defined(QT_OPENGL_ES_2)
- ::glShaderSource(shader, count, string, length);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->shaderSource(shader, count, string, length);
-#endif
+ d_ptr->funcs->glShaderSource(shader, count, string, length);
}
inline void QGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
{
-#if defined(QT_OPENGL_ES_2)
- ::glStencilFuncSeparate(face, func, ref, mask);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->stencilFuncSeparate(face, func, ref, mask);
-#endif
+ d_ptr->funcs->glStencilFuncSeparate(face, func, ref, mask);
}
inline void QGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
{
-#if defined(QT_OPENGL_ES_2)
- ::glStencilMaskSeparate(face, mask);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->stencilMaskSeparate(face, mask);
-#endif
+ d_ptr->funcs->glStencilMaskSeparate(face, mask);
}
inline void QGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
{
-#if defined(QT_OPENGL_ES_2)
- ::glStencilOpSeparate(face, fail, zfail, zpass);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->stencilOpSeparate(face, fail, zfail, zpass);
-#endif
+ d_ptr->funcs->glStencilOpSeparate(face, fail, zfail, zpass);
}
inline void QGLFunctions::glUniform1f(GLint location, GLfloat x)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform1f(location, x);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform1f(location, x);
-#endif
+ d_ptr->funcs->glUniform1f(location, x);
}
inline void QGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform1fv(location, count, v);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform1fv(location, count, v);
-#endif
+ d_ptr->funcs->glUniform1fv(location, count, v);
}
inline void QGLFunctions::glUniform1i(GLint location, GLint x)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform1i(location, x);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform1i(location, x);
-#endif
+ d_ptr->funcs->glUniform1i(location, x);
}
inline void QGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform1iv(location, count, v);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform1iv(location, count, v);
-#endif
+ d_ptr->funcs->glUniform1iv(location, count, v);
}
inline void QGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform2f(location, x, y);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform2f(location, x, y);
-#endif
+ d_ptr->funcs->glUniform2f(location, x, y);
}
inline void QGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform2fv(location, count, v);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform2fv(location, count, v);
-#endif
+ d_ptr->funcs->glUniform2fv(location, count, v);
}
inline void QGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform2i(location, x, y);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform2i(location, x, y);
-#endif
+ d_ptr->funcs->glUniform2i(location, x, y);
}
inline void QGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform2iv(location, count, v);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform2iv(location, count, v);
-#endif
+ d_ptr->funcs->glUniform2iv(location, count, v);
}
inline void QGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform3f(location, x, y, z);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform3f(location, x, y, z);
-#endif
+ d_ptr->funcs->glUniform3f(location, x, y, z);
}
inline void QGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform3fv(location, count, v);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform3fv(location, count, v);
-#endif
+ d_ptr->funcs->glUniform3fv(location, count, v);
}
inline void QGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform3i(location, x, y, z);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform3i(location, x, y, z);
-#endif
+ d_ptr->funcs->glUniform3i(location, x, y, z);
}
inline void QGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform3iv(location, count, v);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform3iv(location, count, v);
-#endif
+ d_ptr->funcs->glUniform3iv(location, count, v);
}
inline void QGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform4f(location, x, y, z, w);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform4f(location, x, y, z, w);
-#endif
+ d_ptr->funcs->glUniform4f(location, x, y, z, w);
}
inline void QGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform4fv(location, count, v);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform4fv(location, count, v);
-#endif
+ d_ptr->funcs->glUniform4fv(location, count, v);
}
inline void QGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform4i(location, x, y, z, w);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform4i(location, x, y, z, w);
-#endif
+ d_ptr->funcs->glUniform4i(location, x, y, z, w);
}
inline void QGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniform4iv(location, count, v);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniform4iv(location, count, v);
-#endif
+ d_ptr->funcs->glUniform4iv(location, count, v);
}
inline void QGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniformMatrix2fv(location, count, transpose, value);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniformMatrix2fv(location, count, transpose, value);
-#endif
+ d_ptr->funcs->glUniformMatrix2fv(location, count, transpose, value);
}
inline void QGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniformMatrix3fv(location, count, transpose, value);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniformMatrix3fv(location, count, transpose, value);
-#endif
+ d_ptr->funcs->glUniformMatrix3fv(location, count, transpose, value);
}
inline void QGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUniformMatrix4fv(location, count, transpose, value);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->uniformMatrix4fv(location, count, transpose, value);
-#endif
+ d_ptr->funcs->glUniformMatrix4fv(location, count, transpose, value);
}
inline void QGLFunctions::glUseProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
- ::glUseProgram(program);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->useProgram(program);
-#endif
+ d_ptr->funcs->glUseProgram(program);
}
inline void QGLFunctions::glValidateProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2)
- ::glValidateProgram(program);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->validateProgram(program);
-#endif
+ d_ptr->funcs->glValidateProgram(program);
}
inline void QGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
{
-#if defined(QT_OPENGL_ES_2)
- ::glVertexAttrib1f(indx, x);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->vertexAttrib1f(indx, x);
-#endif
+ d_ptr->funcs->glVertexAttrib1f(indx, x);
}
inline void QGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2)
- ::glVertexAttrib1fv(indx, values);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->vertexAttrib1fv(indx, values);
-#endif
+ d_ptr->funcs->glVertexAttrib1fv(indx, values);
}
inline void QGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
{
-#if defined(QT_OPENGL_ES_2)
- ::glVertexAttrib2f(indx, x, y);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->vertexAttrib2f(indx, x, y);
-#endif
+ d_ptr->funcs->glVertexAttrib2f(indx, x, y);
}
inline void QGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2)
- ::glVertexAttrib2fv(indx, values);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->vertexAttrib2fv(indx, values);
-#endif
+ d_ptr->funcs->glVertexAttrib2fv(indx, values);
}
inline void QGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
{
-#if defined(QT_OPENGL_ES_2)
- ::glVertexAttrib3f(indx, x, y, z);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->vertexAttrib3f(indx, x, y, z);
-#endif
+ d_ptr->funcs->glVertexAttrib3f(indx, x, y, z);
}
inline void QGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2)
- ::glVertexAttrib3fv(indx, values);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->vertexAttrib3fv(indx, values);
-#endif
+ d_ptr->funcs->glVertexAttrib3fv(indx, values);
}
inline void QGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
-#if defined(QT_OPENGL_ES_2)
- ::glVertexAttrib4f(indx, x, y, z, w);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->vertexAttrib4f(indx, x, y, z, w);
-#endif
+ d_ptr->funcs->glVertexAttrib4f(indx, x, y, z, w);
}
inline void QGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2)
- ::glVertexAttrib4fv(indx, values);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->vertexAttrib4fv(indx, values);
-#endif
+ d_ptr->funcs->glVertexAttrib4fv(indx, values);
}
inline void QGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
{
-#if defined(QT_OPENGL_ES_2)
- ::glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
-#else
Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
- d_ptr->vertexAttribPointer(indx, size, type, normalized, stride, ptr);
-#endif
+ d_ptr->funcs->glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
}
#ifndef GL_ACTIVE_ATTRIBUTE_MAX_LENGTH
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index 51e7648d72..32b18bfda4 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -361,7 +361,7 @@ void QGLPixelBuffer::updateDynamicTexture(GLuint texture_id) const
glBindTexture(GL_TEXTURE_2D, texture_id);
#ifndef QT_OPENGL_ES
- GLenum format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ GLenum format = ctx->isES() ? GL_RGBA : GL_RGBA8;
glCopyTexImage2D(GL_TEXTURE_2D, 0, format, 0, 0, d->req_size.width(), d->req_size.height(), 0);
#else
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, d->req_size.width(), d->req_size.height(), 0);
@@ -488,7 +488,7 @@ GLuint QGLPixelBuffer::bindTexture(const QImage &image, GLenum target)
{
Q_D(QGLPixelBuffer);
#ifndef QT_OPENGL_ES
- GLenum format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ GLenum format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8;
return d->qctx->bindTexture(image, target, GLint(format));
#else
return d->qctx->bindTexture(image, target, GL_RGBA);
@@ -507,7 +507,7 @@ GLuint QGLPixelBuffer::bindTexture(const QPixmap &pixmap, GLenum target)
{
Q_D(QGLPixelBuffer);
#ifndef QT_OPENGL_ES
- GLenum format = QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8;
+ GLenum format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8;
return d->qctx->bindTexture(pixmap, target, GLint(format));
#else
return d->qctx->bindTexture(pixmap, target, GL_RGBA);
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 6b8d38ef42..7261b68a88 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -248,7 +248,7 @@ bool QGLShaderPrivate::create()
shader = glfuncs->glCreateShader(GL_VERTEX_SHADER);
#if !defined(QT_OPENGL_ES_2)
else if (shaderType == QGLShader::Geometry
- && !QOpenGLFunctions::isES())
+ && !context->contextHandle()->isES())
shader = glfuncs->glCreateShader(GL_GEOMETRY_SHADER_EXT);
#endif
else
@@ -430,14 +430,14 @@ bool QGLShader::compileSourceCode(const char *source)
srclen.append(GLint(headerLen));
}
#ifdef QGL_DEFINE_QUALIFIERS
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
src.append(qualifierDefines);
srclen.append(GLint(sizeof(qualifierDefines) - 1));
}
#endif
#ifdef QGL_REDEFINE_HIGHP
if (d->shaderType == Fragment
- && QOpenGLFunctions::isES()) {
+ && QOpenGLContext::currentContext()->isES()) {
src.append(redefineHighp);
srclen.append(GLint(sizeof(redefineHighp) - 1));
}
@@ -567,8 +567,8 @@ public:
void initializeGeometryShaderFunctions()
{
- if (!QOpenGLFunctions::isES()) {
- QOpenGLContext *context = QOpenGLContext::currentContext();
+ QOpenGLContext *context = QOpenGLContext::currentContext();
+ if (!context->isES()) {
glProgramParameteri = (type_glProgramParameteri)
context->getProcAddress("glProgramParameteri");
@@ -936,7 +936,7 @@ bool QGLShaderProgram::link()
#if !defined(QT_OPENGL_ES_2)
// Set up the geometry shader parameters
- if (!QOpenGLFunctions::isES()
+ if (!QOpenGLContext::currentContext()->isES()
&& d->glfuncs->glProgramParameteri) {
foreach (QGLShader *shader, d->shaders) {
if (shader->shaderType() & QGLShader::Geometry) {
@@ -3068,7 +3068,7 @@ int QGLShaderProgram::maxGeometryOutputVertices() const
{
GLint n = 0;
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES())
+ if (!QOpenGLContext::currentContext()->isES())
glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT, &n);
#endif
return n;
diff --git a/src/openglextensions/openglextensions.pro b/src/openglextensions/openglextensions.pro
index 5ab750bee8..e303dea5e8 100644
--- a/src/openglextensions/openglextensions.pro
+++ b/src/openglextensions/openglextensions.pro
@@ -8,7 +8,7 @@ contains(QT_CONFIG, opengles2):CONFIG += opengles2
load(qt_module)
DEFINES += QT_NO_CAST_FROM_ASCII
-PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
+PRECOMPILED_HEADER =
HEADERS = qopenglextensions.h
diff --git a/src/platformsupport/clipboard/clipboard.pri b/src/platformsupport/clipboard/clipboard.pri
new file mode 100644
index 0000000000..2532430f1e
--- /dev/null
+++ b/src/platformsupport/clipboard/clipboard.pri
@@ -0,0 +1,5 @@
+mac {
+ HEADERS += $$PWD/qmacmime_p.h
+ OBJECTIVE_SOURCES += $$PWD/qmacmime.mm
+}
+
diff --git a/src/plugins/platforms/cocoa/qmacmime.mm b/src/platformsupport/clipboard/qmacmime.mm
index 4274e178f7..93d897503b 100644
--- a/src/plugins/platforms/cocoa/qmacmime.mm
+++ b/src/platformsupport/clipboard/qmacmime.mm
@@ -39,29 +39,11 @@
**
****************************************************************************/
-#include "qmacmime.h"
-#include "qcocoahelpers.h"
-#include "qmacclipboard.h"
-
-#include "qdebug.h"
-#include "qpixmap.h"
-#include "qimagewriter.h"
-#include "qimagereader.h"
-#include "qdatastream.h"
-#include "qbuffer.h"
-#include "qdatetime.h"
+#include "qmacmime_p.h"
#include "qguiapplication.h"
-#include "qtextcodec.h"
-#include "qregexp.h"
-#include "qurl.h"
-#include "qmap.h"
-
-#include <Cocoa/Cocoa.h>
QT_BEGIN_NAMESPACE
-extern CGImageRef qt_mac_createCGImageFromQImage(const QImage &img, const QImage **imagePtr = 0); // qpaintengine_mac.cpp
-
typedef QList<QMacInternalPasteboardMime*> MimeList;
Q_GLOBAL_STATIC(MimeList, globalMimeList)
Q_GLOBAL_STATIC(QStringList, globalDraggedTypesList)
@@ -108,13 +90,6 @@ const QStringList& qt_mac_enabledDraggedTypes()
*****************************************************************************/
//#define DEBUG_MIME_MAPS
-//functions
-extern QString qt_mac_from_pascal_string(const Str255); //qglobal.cpp
-extern void qt_mac_from_pascal_string(QString, Str255, TextEncoding encoding=0, int len=-1); //qglobal.cpp
-
-ScrapFlavorType qt_mac_mime_type = 'CUTE';
-CFStringRef qt_mac_mime_typeUTI = CFSTR("com.pasteboard.trolltech.marker");
-
/*!
\class QMacPasteboardMime
\brief The QMacPasteboardMime class converts between a MIME type and a
@@ -303,7 +278,7 @@ QVariant QMacPasteboardMimeTypeName::convertToMime(const QString &, QList<QByteA
QList<QByteArray> QMacPasteboardMimeTypeName::convertFromMime(const QString &, QVariant, QString)
{
QList<QByteArray> ret;
- ret.append(QString("x-qt-mime-type-name").toUtf8());
+ ret.append(QString(QLatin1String("x-qt-mime-type-name")).toUtf8());
return ret;
}
@@ -349,11 +324,10 @@ QVariant QMacPasteboardMimePlainText::convertToMime(const QString &mimetype, QLi
qWarning("QMacPasteboardMimePlainText: Cannot handle multiple member data");
const QByteArray &firstData = data.first();
QVariant ret;
- if (flavor == QCFString(QLatin1String("com.apple.traditional-mac-plain-text"))) {
- QCFString str(CFStringCreateWithBytes(kCFAllocatorDefault,
+ if (flavor == QLatin1String("com.apple.traditional-mac-plain-text")) {
+ return QString::fromCFString(CFStringCreateWithBytes(kCFAllocatorDefault,
reinterpret_cast<const UInt8 *>(firstData.constData()),
firstData.size(), CFStringGetSystemEncoding(), false));
- ret = QString(str);
} else {
qWarning("QMime::convertToMime: unhandled mimetype: %s", qPrintable(mimetype));
}
@@ -364,7 +338,7 @@ QList<QByteArray> QMacPasteboardMimePlainText::convertFromMime(const QString &,
{
QList<QByteArray> ret;
QString string = data.toString();
- if (flavor == QCFString(QLatin1String("com.apple.traditional-mac-plain-text")))
+ if (flavor == QLatin1String("com.apple.traditional-mac-plain-text"))
ret.append(string.toLatin1());
return ret;
}
@@ -414,7 +388,8 @@ QString QMacPasteboardMimeUnicodeText::mimeFor(QString flav)
bool QMacPasteboardMimeUnicodeText::canConvert(const QString &mime, QString flav)
{
- return flavorFor(mime) == flav;
+ return (mime == QLatin1String("text/plain")
+ && (flav == QLatin1String("public.utf8-plain-text") || (flav == QLatin1String("public.utf16-plain-text"))));
}
QVariant QMacPasteboardMimeUnicodeText::convertToMime(const QString &mimetype, QList<QByteArray> data, QString flavor)
@@ -425,10 +400,9 @@ QVariant QMacPasteboardMimeUnicodeText::convertToMime(const QString &mimetype, Q
// I can only handle two types (system and unicode) so deal with them that way
QVariant ret;
if (flavor == QLatin1String("public.utf8-plain-text")) {
- QCFString str(CFStringCreateWithBytes(kCFAllocatorDefault,
+ ret = QString::fromCFString(CFStringCreateWithBytes(kCFAllocatorDefault,
reinterpret_cast<const UInt8 *>(firstData.constData()),
firstData.size(), CFStringGetSystemEncoding(), false));
- ret = QString(str);
} else if (flavor == QLatin1String("public.utf16-plain-text")) {
ret = QString(reinterpret_cast<const QChar *>(firstData.constData()),
firstData.size() / sizeof(QChar));
@@ -503,98 +477,6 @@ QList<QByteArray> QMacPasteboardMimeHTMLText::convertFromMime(const QString &mim
return ret;
}
-class QMacPasteboardMimeTiff : public QMacInternalPasteboardMime {
-public:
- QMacPasteboardMimeTiff() : QMacInternalPasteboardMime(MIME_ALL) { }
- QString convertorName();
-
- QString flavorFor(const QString &mime);
- QString mimeFor(QString flav);
- bool canConvert(const QString &mime, QString flav);
- QVariant convertToMime(const QString &mime, QList<QByteArray> data, QString flav);
- QList<QByteArray> convertFromMime(const QString &mime, QVariant data, QString flav);
-};
-
-QString QMacPasteboardMimeTiff::convertorName()
-{
- return QLatin1String("Tiff");
-}
-
-QString QMacPasteboardMimeTiff::flavorFor(const QString &mime)
-{
- if (mime.startsWith(QLatin1String("application/x-qt-image")))
- return QLatin1String("public.tiff");
- return QString();
-}
-
-QString QMacPasteboardMimeTiff::mimeFor(QString flav)
-{
- if (flav == QLatin1String("public.tiff"))
- return QLatin1String("application/x-qt-image");
- return QString();
-}
-
-bool QMacPasteboardMimeTiff::canConvert(const QString &mime, QString flav)
-{
- return flav == QLatin1String("public.tiff") && mime == QLatin1String("application/x-qt-image");
-}
-
-QVariant QMacPasteboardMimeTiff::convertToMime(const QString &mime, QList<QByteArray> data, QString flav)
-{
- if (data.count() > 1)
- qWarning("QMacPasteboardMimeTiff: Cannot handle multiple member data");
- QVariant ret;
- if (!canConvert(mime, flav))
- return ret;
- const QByteArray &a = data.first();
- QCFType<CGImageRef> image;
- QCFType<CFDataRef> tiffData = CFDataCreateWithBytesNoCopy(0,
- reinterpret_cast<const UInt8 *>(a.constData()),
- a.size(), kCFAllocatorNull);
- QCFType<CGImageSourceRef> imageSource = CGImageSourceCreateWithData(tiffData, 0);
- image = CGImageSourceCreateImageAtIndex(imageSource, 0, 0);
- if (image != 0)
- ret = QVariant(qt_mac_toQImage(image));
- return ret;
-}
-
-QList<QByteArray> QMacPasteboardMimeTiff::convertFromMime(const QString &mime, QVariant variant, QString flav)
-{
- QList<QByteArray> ret;
- if (!canConvert(mime, flav))
- return ret;
-
- QImage img = qvariant_cast<QImage>(variant);
- QCFType<CGImageRef> cgimage = qt_mac_toCGImage(img);
-
- QCFType<CFMutableDataRef> data = CFDataCreateMutable(0, 0);
- QCFType<CGImageDestinationRef> imageDestination = CGImageDestinationCreateWithData(data, kUTTypeTIFF, 1, 0);
- if (imageDestination != 0) {
- CFTypeRef keys[2];
- QCFType<CFTypeRef> values[2];
- QCFType<CFDictionaryRef> options;
- keys[0] = kCGImagePropertyPixelWidth;
- keys[1] = kCGImagePropertyPixelHeight;
- int width = img.width();
- int height = img.height();
- values[0] = CFNumberCreate(0, kCFNumberIntType, &width);
- values[1] = CFNumberCreate(0, kCFNumberIntType, &height);
- options = CFDictionaryCreate(0, reinterpret_cast<const void **>(keys),
- reinterpret_cast<const void **>(values), 2,
- &kCFTypeDictionaryKeyCallBacks,
- &kCFTypeDictionaryValueCallBacks);
- CGImageDestinationAddImage(imageDestination, cgimage, options);
- CGImageDestinationFinalize(imageDestination);
- }
- QByteArray ar(CFDataGetLength(data), 0);
- CFDataGetBytes(data,
- CFRangeMake(0, ar.size()),
- reinterpret_cast<UInt8 *>(ar.data()));
- ret.append(ar);
- return ret;
-}
-
-
class QMacPasteboardMimeFileUri : public QMacInternalPasteboardMime {
public:
QMacPasteboardMimeFileUri() : QMacInternalPasteboardMime(MIME_ALL) { }
@@ -616,21 +498,20 @@ QString QMacPasteboardMimeFileUri::convertorName()
QString QMacPasteboardMimeFileUri::flavorFor(const QString &mime)
{
if (mime == QLatin1String("text/uri-list"))
- return QCFString(UTTypeCreatePreferredIdentifierForTag(kUTTagClassOSType, CFSTR("furl"), 0));
+ return QLatin1String("public.file-url");
return QString();
}
QString QMacPasteboardMimeFileUri::mimeFor(QString flav)
{
- if (flav == QCFString(UTTypeCreatePreferredIdentifierForTag(kUTTagClassOSType, CFSTR("furl"), 0)))
+ if (flav == QLatin1String("public.file-url"))
return QLatin1String("text/uri-list");
return QString();
}
bool QMacPasteboardMimeFileUri::canConvert(const QString &mime, QString flav)
{
- return mime == QLatin1String("text/uri-list")
- && flav == QCFString(UTTypeCreatePreferredIdentifierForTag(kUTTagClassOSType, CFSTR("furl"), 0));
+ return mime == QLatin1String("text/uri-list") && flav == QLatin1String("public.file-url");
}
QVariant QMacPasteboardMimeFileUri::convertToMime(const QString &mime, QList<QByteArray> data, QString flav)
@@ -762,7 +643,7 @@ public:
QString QMacPasteboardMimeVCard::convertorName()
{
- return QString("VCard");
+ return QLatin1String("VCard");
}
bool QMacPasteboardMimeVCard::canConvert(const QString &mime, QString flav)
@@ -802,7 +683,6 @@ QList<QByteArray> QMacPasteboardMimeVCard::convertFromMime(const QString &mime,
return ret;
}
-
/*!
\internal
@@ -816,7 +696,6 @@ void QMacInternalPasteboardMime::initializeMimeTypes()
new QMacPasteboardMimeAny;
//standard types that we wrap
- new QMacPasteboardMimeTiff;
new QMacPasteboardMimeUnicodeText;
new QMacPasteboardMimePlainText;
new QMacPasteboardMimeHTMLText;
diff --git a/src/plugins/platforms/cocoa/qmacmime.h b/src/platformsupport/clipboard/qmacmime_p.h
index 0802987fab..0802987fab 100644
--- a/src/plugins/platforms/cocoa/qmacmime.h
+++ b/src/platformsupport/clipboard/qmacmime_p.h
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp
index a36d0b83d4..7cf1f88b02 100644
--- a/src/platformsupport/eglconvenience/qeglconvenience.cpp
+++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QByteArray>
-#include <QOpenGLFunctions>
+#include <QOpenGLContext>
#ifdef Q_OS_LINUX
#include <sys/ioctl.h>
@@ -50,6 +50,10 @@
#include "qeglconvenience_p.h"
+#ifndef EGL_OPENGL_ES3_BIT_KHR
+#define EGL_OPENGL_ES3_BIT_KHR 0x0040
+#endif
+
QT_BEGIN_NAMESPACE
QVector<EGLint> q_createConfigAttributesFromFormat(const QSurfaceFormat &format)
@@ -239,16 +243,19 @@ EGLConfig QEglConfigChooser::chooseConfig()
configureAttributes.append(surfaceType());
configureAttributes.append(EGL_RENDERABLE_TYPE);
+ bool needsES2Plus = false;
switch (m_format.renderableType()) {
case QSurfaceFormat::OpenVG:
configureAttributes.append(EGL_OPENVG_BIT);
break;
#ifdef EGL_VERSION_1_4
case QSurfaceFormat::DefaultRenderableType:
- if (!QOpenGLFunctions::isES())
+#ifndef QT_NO_OPENGL
+ if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL)
configureAttributes.append(EGL_OPENGL_BIT);
else
- configureAttributes.append(EGL_OPENGL_ES2_BIT);
+#endif // QT_NO_OPENGL
+ needsES2Plus = true;
break;
case QSurfaceFormat::OpenGL:
configureAttributes.append(EGL_OPENGL_BIT);
@@ -261,9 +268,15 @@ EGLConfig QEglConfigChooser::chooseConfig()
}
// fall through
default:
- configureAttributes.append(EGL_OPENGL_ES2_BIT);
+ needsES2Plus = true;
break;
}
+ if (needsES2Plus) {
+ if (m_format.majorVersion() >= 3 && q_hasEglExtension(display(), "EGL_KHR_create_context"))
+ configureAttributes.append(EGL_OPENGL_ES3_BIT_KHR);
+ else
+ configureAttributes.append(EGL_OPENGL_ES2_BIT);
+ }
configureAttributes.append(EGL_NONE);
EGLConfig cfg = 0;
@@ -361,7 +374,9 @@ QSurfaceFormat q_glFormatFromConfig(EGLDisplay display, const EGLConfig config,
&& (renderableType & EGL_OPENGL_BIT))
format.setRenderableType(QSurfaceFormat::OpenGL);
else if (referenceFormat.renderableType() == QSurfaceFormat::DefaultRenderableType
- && !QOpenGLFunctions::isES()
+#ifndef QT_NO_OPENGL
+ && QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL
+#endif
&& (renderableType & EGL_OPENGL_BIT))
format.setRenderableType(QSurfaceFormat::OpenGL);
#endif
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 3a34748fc7..9c3b9b539c 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -41,8 +41,9 @@
#include "qeglplatformcontext_p.h"
#include "qeglconvenience_p.h"
+#include "qeglpbuffer_p.h"
#include <qpa/qplatformwindow.h>
-#include <QtGui/QOpenGLFunctions>
+#include <QOpenGLContext>
QT_BEGIN_NAMESPACE
@@ -63,32 +64,50 @@ QT_BEGIN_NAMESPACE
surface). Other than that, no further customization is necessary.
*/
-static inline void bindApi(const QSurfaceFormat &format)
-{
- switch (format.renderableType()) {
- case QSurfaceFormat::OpenVG:
- eglBindAPI(EGL_OPENVG_API);
- break;
-#ifdef EGL_VERSION_1_4
- case QSurfaceFormat::DefaultRenderableType:
- if (!QOpenGLFunctions::isES())
- eglBindAPI(EGL_OPENGL_API);
- else
- eglBindAPI(EGL_OPENGL_ES_API);
- break;
- case QSurfaceFormat::OpenGL:
- eglBindAPI(EGL_OPENGL_API);
- break;
+// Constants from EGL_KHR_create_context
+#ifndef EGL_CONTEXT_MINOR_VERSION_KHR
+#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
+#endif
+#ifndef EGL_CONTEXT_FLAGS_KHR
+#define EGL_CONTEXT_FLAGS_KHR 0x30FC
+#endif
+#ifndef EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR
+#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
+#endif
+#ifndef EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR
+#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
+#endif
+#ifndef EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR
+#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
+#endif
+#ifndef EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR
+#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
+#endif
+#ifndef EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR
+#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
#endif
- case QSurfaceFormat::OpenGLES:
- default:
- eglBindAPI(EGL_OPENGL_ES_API);
- break;
- }
-}
-QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
- EGLenum eglApi)
+// Constants for OpenGL which are not available in the ES headers.
+#ifndef GL_CONTEXT_FLAGS
+#define GL_CONTEXT_FLAGS 0x821E
+#endif
+#ifndef GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT
+#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
+#endif
+#ifndef GL_CONTEXT_FLAG_DEBUG_BIT
+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
+#endif
+#ifndef GL_CONTEXT_PROFILE_MASK
+#define GL_CONTEXT_PROFILE_MASK 0x9126
+#endif
+#ifndef GL_CONTEXT_CORE_PROFILE_BIT
+#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
+#endif
+#ifndef GL_CONTEXT_COMPATIBILITY_PROFILE_BIT
+#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
+#endif
+
+QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display)
: m_eglDisplay(display)
, m_eglConfig(q_configFromGLFormat(display, format))
, m_swapInterval(-1)
@@ -96,11 +115,10 @@ QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatform
, m_swapIntervalFromEnv(-1)
{
init(format, share);
- Q_UNUSED(eglApi);
}
QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
- EGLConfig config, EGLenum eglApi)
+ EGLConfig config)
: m_eglDisplay(display)
, m_eglConfig(config)
, m_swapInterval(-1)
@@ -108,32 +126,130 @@ QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatform
, m_swapIntervalFromEnv(-1)
{
init(format, share);
- Q_UNUSED(eglApi);
}
void QEGLPlatformContext::init(const QSurfaceFormat &format, QPlatformOpenGLContext *share)
{
m_format = q_glFormatFromConfig(m_eglDisplay, m_eglConfig);
+ // m_format now has the renderableType() resolved (it cannot be Default anymore)
+ // but does not yet contain version, profile, options.
m_shareContext = share ? static_cast<QEGLPlatformContext *>(share)->m_eglContext : 0;
QVector<EGLint> contextAttrs;
contextAttrs.append(EGL_CONTEXT_CLIENT_VERSION);
contextAttrs.append(format.majorVersion());
+ const bool hasKHRCreateContext = q_hasEglExtension(m_eglDisplay, "EGL_KHR_create_context");
+ if (hasKHRCreateContext) {
+ contextAttrs.append(EGL_CONTEXT_MINOR_VERSION_KHR);
+ contextAttrs.append(format.minorVersion());
+ int flags = 0;
+ // The debug bit is supported both for OpenGL and OpenGL ES.
+ if (format.testOption(QSurfaceFormat::DebugContext))
+ flags |= EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR;
+ // The fwdcompat bit is only for OpenGL 3.0+.
+ if (m_format.renderableType() == QSurfaceFormat::OpenGL
+ && format.majorVersion() >= 3
+ && !format.testOption(QSurfaceFormat::DeprecatedFunctions))
+ flags |= EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR;
+ if (flags) {
+ contextAttrs.append(EGL_CONTEXT_FLAGS_KHR);
+ contextAttrs.append(flags);
+ }
+ // Profiles are OpenGL only and mandatory in 3.2+. The value is silently ignored for < 3.2.
+ if (m_format.renderableType() == QSurfaceFormat::OpenGL) {
+ contextAttrs.append(EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR);
+ contextAttrs.append(format.profile() == QSurfaceFormat::CoreProfile
+ ? EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR
+ : EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR);
+ }
+ }
contextAttrs.append(EGL_NONE);
- bindApi(m_format);
+ switch (m_format.renderableType()) {
+ case QSurfaceFormat::OpenVG:
+ m_api = EGL_OPENVG_API;
+ break;
+#ifdef EGL_VERSION_1_4
+ case QSurfaceFormat::OpenGL:
+ m_api = EGL_OPENGL_API;
+ break;
+#endif // EGL_VERSION_1_4
+ default:
+ m_api = EGL_OPENGL_ES_API;
+ break;
+ }
+
+ eglBindAPI(m_api);
m_eglContext = eglCreateContext(m_eglDisplay, m_eglConfig, m_shareContext, contextAttrs.constData());
if (m_eglContext == EGL_NO_CONTEXT && m_shareContext != EGL_NO_CONTEXT) {
m_shareContext = 0;
m_eglContext = eglCreateContext(m_eglDisplay, m_eglConfig, 0, contextAttrs.constData());
}
+
+ if (m_eglContext == EGL_NO_CONTEXT) {
+ qWarning("QEGLPlatformContext::init: eglError: %x, this: %p \n", eglGetError(), this);
+ return;
+ }
+
+#ifndef QT_NO_OPENGL
+ // Make the context current to ensure the GL version query works. This needs a surface too.
+ const EGLint pbufferAttributes[] = {
+ EGL_WIDTH, 1,
+ EGL_HEIGHT, 1,
+ EGL_LARGEST_PBUFFER, EGL_FALSE,
+ EGL_NONE
+ };
+ EGLSurface pbuffer = eglCreatePbufferSurface(m_eglDisplay, m_eglConfig, pbufferAttributes);
+ if (pbuffer == EGL_NO_SURFACE)
+ return;
+
+ if (eglMakeCurrent(m_eglDisplay, pbuffer, pbuffer, m_eglContext)) {
+ if (m_format.renderableType() == QSurfaceFormat::OpenGL
+ || m_format.renderableType() == QSurfaceFormat::OpenGLES) {
+ const GLubyte *s = glGetString(GL_VERSION);
+ if (s) {
+ QByteArray version = QByteArray(reinterpret_cast<const char *>(s));
+ int major, minor;
+ if (QPlatformOpenGLContext::parseOpenGLVersion(version, major, minor)) {
+ m_format.setMajorVersion(major);
+ m_format.setMinorVersion(minor);
+ }
+ }
+ m_format.setProfile(QSurfaceFormat::NoProfile);
+ m_format.setOptions(QSurfaceFormat::FormatOptions());
+ if (m_format.renderableType() == QSurfaceFormat::OpenGL) {
+ // Check profile and options.
+ if (m_format.majorVersion() < 3) {
+ m_format.setOption(QSurfaceFormat::DeprecatedFunctions);
+ } else {
+ GLint value = 0;
+ glGetIntegerv(GL_CONTEXT_FLAGS, &value);
+ if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT))
+ m_format.setOption(QSurfaceFormat::DeprecatedFunctions);
+ if (value & GL_CONTEXT_FLAG_DEBUG_BIT)
+ m_format.setOption(QSurfaceFormat::DebugContext);
+ if (m_format.version() >= qMakePair(3, 2)) {
+ value = 0;
+ glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &value);
+ if (value & GL_CONTEXT_CORE_PROFILE_BIT)
+ m_format.setProfile(QSurfaceFormat::CoreProfile);
+ else if (value & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
+ m_format.setProfile(QSurfaceFormat::CompatibilityProfile);
+ }
+ }
+ }
+ }
+ eglMakeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ }
+ eglDestroySurface(m_eglDisplay, pbuffer);
+#endif // QT_NO_OPENGL
}
bool QEGLPlatformContext::makeCurrent(QPlatformSurface *surface)
{
Q_ASSERT(surface->surface()->supportsOpenGL());
- bindApi(m_format);
+ eglBindAPI(m_api);
EGLSurface eglSurface = eglSurfaceForPlatformSurface(surface);
@@ -201,7 +317,7 @@ QEGLPlatformContext::~QEGLPlatformContext()
void QEGLPlatformContext::doneCurrent()
{
- bindApi(m_format);
+ eglBindAPI(m_api);
bool ok = eglMakeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (!ok)
qWarning("QEGLPlatformContext::doneCurrent(): eglError: %d, this: %p \n", eglGetError(), this);
@@ -209,7 +325,7 @@ void QEGLPlatformContext::doneCurrent()
void QEGLPlatformContext::swapBuffers(QPlatformSurface *surface)
{
- bindApi(m_format);
+ eglBindAPI(m_api);
EGLSurface eglSurface = eglSurfaceForPlatformSurface(surface);
bool ok = eglSwapBuffers(m_eglDisplay, eglSurface);
if (!ok)
@@ -218,7 +334,7 @@ void QEGLPlatformContext::swapBuffers(QPlatformSurface *surface)
void (*QEGLPlatformContext::getProcAddress(const QByteArray &procName)) ()
{
- bindApi(m_format);
+ eglBindAPI(m_api);
return eglGetProcAddress(procName.constData());
}
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
index d62082faa2..714633c3bc 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
@@ -51,10 +51,9 @@ QT_BEGIN_NAMESPACE
class QEGLPlatformContext : public QPlatformOpenGLContext
{
public:
+ QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display);
QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
- EGLenum eglApi = EGL_OPENGL_ES_API);
- QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
- EGLConfig config, EGLenum eglApi = EGL_OPENGL_ES_API);
+ EGLConfig config);
~QEGLPlatformContext();
bool makeCurrent(QPlatformSurface *surface);
@@ -81,6 +80,7 @@ private:
EGLDisplay m_eglDisplay;
EGLConfig m_eglConfig;
QSurfaceFormat m_format;
+ EGLenum m_api;
int m_swapInterval;
bool m_swapIntervalEnvChecked;
int m_swapIntervalFromEnv;
diff --git a/src/platformsupport/eglconvenience/qeglplatformcursor_p.h b/src/platformsupport/eglconvenience/qeglplatformcursor_p.h
index d1402d1457..c9ff9a1198 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcursor_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcursor_p.h
@@ -117,7 +117,7 @@ private:
CursorAtlas() : cursorsPerRow(0), texture(0), cursorWidth(0), cursorHeight(0) { }
int cursorsPerRow;
uint texture;
- int width, height; // width and height of the the atlas
+ int width, height; // width and height of the atlas
int cursorWidth, cursorHeight; // width and height of cursors inside the atlas
QList<QPoint> hotSpots;
QImage image; // valid until it's uploaded
diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
index a961035e22..b48f993436 100644
--- a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
@@ -106,9 +106,6 @@ QEGLPlatformIntegration::~QEGLPlatformIntegration()
void QEGLPlatformIntegration::initialize()
{
- if (!eglBindAPI(EGL_OPENGL_ES_API))
- qFatal("Could not bind GL_ES API");
-
m_display = eglGetDisplay(nativeDisplay());
if (m_display == EGL_NO_DISPLAY)
qFatal("Could not open egl display");
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm b/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm
index 1e15a9f466..5e311c99b1 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm
+++ b/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm
@@ -469,7 +469,7 @@ bool QEventDispatcherCoreFoundation::hasPendingEvents()
// assume that if the run-loop is currently blocking and waiting for a
// source to signal then there are no system-events pending. If this
// function is called from the main thread then the second clause
- // of the condition will always be true, as the the run loop is
+ // of the condition will always be true, as the run loop is
// never waiting in that case. The function would be more aptly named
// 'maybeHasPendingEvents' in our case.
diff --git a/src/platformsupport/fbconvenience/qfbwindow_p.h b/src/platformsupport/fbconvenience/qfbwindow_p.h
index 5ad921b0d7..a2e0785c96 100644
--- a/src/platformsupport/fbconvenience/qfbwindow_p.h
+++ b/src/platformsupport/fbconvenience/qfbwindow_p.h
@@ -55,17 +55,17 @@ public:
QFbWindow(QWindow *window);
~QFbWindow();
- virtual void raise();
- virtual void lower();
+ void raise() Q_DECL_OVERRIDE;
+ void lower() Q_DECL_OVERRIDE;
- virtual void setGeometry(const QRect &rect);
- virtual void setVisible(bool visible);
+ void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
+ void setVisible(bool visible) Q_DECL_OVERRIDE;
- virtual void setWindowState(Qt::WindowState state);
- virtual void setWindowFlags(Qt::WindowFlags type);
- virtual Qt::WindowFlags windowFlags() const;
+ void setWindowState(Qt::WindowState state) Q_DECL_OVERRIDE;
+ void setWindowFlags(Qt::WindowFlags type) Q_DECL_OVERRIDE;
+ Qt::WindowFlags windowFlags() const;
- WId winId() const { return mWindowId; }
+ WId winId() const Q_DECL_OVERRIDE { return mWindowId; }
void setBackingStore(QFbBackingStore *store) { mBackingStore = store; }
QFbBackingStore *backingStore() const { return mBackingStore; }
@@ -74,6 +74,10 @@ public:
virtual void repaint(const QRegion&);
+ void propagateSizeHints() Q_DECL_OVERRIDE { }
+ bool setKeyboardGrabEnabled(bool) Q_DECL_OVERRIDE { return false; }
+ bool setMouseGrabEnabled(bool) Q_DECL_OVERRIDE { return false; }
+
protected:
friend class QFbScreen;
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index 76506d12e9..afee68ebed 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -93,6 +93,7 @@ static const char *languageForWritingSystem[] = {
};
enum { LanguageCount = sizeof(languageForWritingSystem) / sizeof(const char *) };
+#ifdef Q_OS_OSX
static NSInteger languageMapSort(id obj1, id obj2, void *context)
{
NSArray *map1 = (NSArray *) obj1;
@@ -104,6 +105,7 @@ static NSInteger languageMapSort(id obj1, id obj2, void *context)
return [languages indexOfObject: lang1] - [languages indexOfObject: lang2];
}
+#endif
QCoreTextFontDatabase::QCoreTextFontDatabase()
{
@@ -202,8 +204,8 @@ void QCoreTextFontDatabase::populateFontDatabase()
void QCoreTextFontDatabase::populateFromDescriptor(CTFontDescriptorRef font)
{
QString foundryName = QStringLiteral("CoreText");
- QCFString familyName = (CFStringRef) CTFontDescriptorCopyLocalizedAttribute(font, kCTFontFamilyNameAttribute, NULL);
- QCFString styleName = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontStyleNameAttribute, NULL);
+ QCFString familyName = (CFStringRef) CTFontDescriptorCopyAttribute(font, kCTFontFamilyNameAttribute);
+ QCFString styleName = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontStyleNameAttribute);
QCFType<CFDictionaryRef> styles = (CFDictionaryRef) CTFontDescriptorCopyAttribute(font, kCTFontTraitsAttribute);
QFont::Weight weight = QFont::Normal;
QFont::Style style = QFont::StyleNormal;
@@ -265,12 +267,6 @@ void QCoreTextFontDatabase::populateFromDescriptor(CTFontDescriptorRef font)
QPlatformFontDatabase::registerFont(familyName, styleName, foundryName, weight, style, stretch,
true /* antialiased */, true /* scalable */,
pixelSize, fixedPitch, writingSystems, (void *) font);
-
- // We need to map back and forth between PostScript-names and family-names for fallback list construction
- CFStringRef psName = (CFStringRef) CTFontDescriptorCopyAttribute(font, kCTFontNameAttribute);
- psNameToFamily[QCFString::toQString((NSString *) psName)] = familyName;
- familyNameToPsName[familyName] = QCFString::toQString((NSString *) psName);
- CFRelease(psName);
}
void QCoreTextFontDatabase::releaseHandle(void *handle)
@@ -350,26 +346,18 @@ QFont::StyleHint styleHintFromNSString(NSString *style)
return QFont::AnyStyle;
}
-static QString familyNameFromPostScriptName(QHash<QString, QString> &psNameToFamily,
- NSString *psName)
+#ifdef Q_OS_OSX
+static QString familyNameFromPostScriptName(NSString *psName)
{
- QString name = QCFString::toQString(psName);
- if (psNameToFamily.contains(name))
- return psNameToFamily[name];
- else {
- // Some of the font name in DefaultFontFallbacks.plist are hidden fonts like AquaHiraKaku,
- // their family name begins with a dot, like ".AquaHiraKaku" or ".Apple Symbols Fallback",
- // the only way (I've found) to get it are actually creating a CTFont with them. We only
- // need to do it once though.
- QCFType<CTFontRef> font = CTFontCreateWithName((CFStringRef) psName, 12.0, NULL);
- if (font) {
- QCFString family = CTFontCopyFamilyName(font);
- psNameToFamily[name] = family;
- return family;
- }
- return name;
- }
+ QCFType<CTFontDescriptorRef> fontDescriptor = (CTFontDescriptorRef) CTFontDescriptorCreateWithNameAndSize((CFStringRef)psName, 12.0);
+ QCFString familyName = (CFStringRef) CTFontDescriptorCopyAttribute(fontDescriptor, kCTFontFamilyNameAttribute);
+ QString name = QCFString::toQString(familyName);
+ if (name.isEmpty())
+ qWarning() << "QCoreTextFontDatabase: Failed to resolve family name for PostScript name " << QCFString::toQString((CFStringRef)psName);
+
+ return name;
}
+#endif
QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
{
@@ -389,29 +377,29 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
if (fallbackLists.contains(family))
return fallbackLists.value(family);
- if (!familyNameToPsName.contains(family))
- const_cast<QCoreTextFontDatabase*>(this)->populateFontDatabase();
-
- QCFType<CTFontRef> font = CTFontCreateWithName(QCFString(familyNameToPsName[family]), 12.0, NULL);
- if (font) {
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSArray *languages = [defaults stringArrayForKey: @"AppleLanguages"];
-
- QCFType<CFArrayRef> cascadeList = (CFArrayRef) CTFontCopyDefaultCascadeListForLanguages(font, (CFArrayRef) languages);
- if (cascadeList) {
- QStringList fallbackList;
- const int numCascades = CFArrayGetCount(cascadeList);
- for (int i = 0; i < numCascades; ++i) {
- CTFontDescriptorRef fontFallback = (CTFontDescriptorRef) CFArrayGetValueAtIndex(cascadeList, i);
- QCFString fallbackFamilyName = (CFStringRef) CTFontDescriptorCopyLocalizedAttribute(fontFallback, kCTFontFamilyNameAttribute, NULL);
- fallbackList.append(QCFString::toQString(fallbackFamilyName));
+ QCFType<CFMutableDictionaryRef> attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+ CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, QCFString(family));
+ if (QCFType<CTFontDescriptorRef> fontDescriptor = CTFontDescriptorCreateWithAttributes(attributes)) {
+ if (QCFType<CTFontRef> font = CTFontCreateWithFontDescriptor(fontDescriptor, 12.0, 0)) {
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSArray *languages = [defaults stringArrayForKey: @"AppleLanguages"];
+
+ QCFType<CFArrayRef> cascadeList = (CFArrayRef) CTFontCopyDefaultCascadeListForLanguages(font, (CFArrayRef) languages);
+ if (cascadeList) {
+ QStringList fallbackList;
+ const int numCascades = CFArrayGetCount(cascadeList);
+ for (int i = 0; i < numCascades; ++i) {
+ CTFontDescriptorRef fontFallback = (CTFontDescriptorRef) CFArrayGetValueAtIndex(cascadeList, i);
+ QCFString fallbackFamilyName = (CFStringRef) CTFontDescriptorCopyAttribute(fontFallback, kCTFontFamilyNameAttribute);
+ fallbackList.append(QCFString::toQString(fallbackFamilyName));
+ }
+ fallbackLists[family] = fallbackList;
}
- fallbackLists[family] = fallbackList;
}
- }
- if (fallbackLists.contains(family))
- return fallbackLists.value(family);
+ if (fallbackLists.contains(family))
+ return fallbackLists.value(family);
+ }
}
#endif
}
@@ -424,9 +412,6 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
static bool didPopulateStyleFallbacks = false;
if (!didPopulateStyleFallbacks) {
#if defined(Q_OS_MACX)
- // Ensure we have the psNameToFamily mapping set up
- const_cast<QCoreTextFontDatabase*>(this)->populateFontDatabase();
-
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defaults stringArrayForKey: @"AppleLanguages"];
@@ -442,10 +427,10 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
NSArray *langs = [(NSArray *) item sortedArrayUsingFunction: languageMapSort
context: languages];
for (NSArray *map in langs)
- fallbackList.append(familyNameFromPostScriptName(psNameToFamily, [map objectAtIndex: 1]));
+ fallbackList.append(familyNameFromPostScriptName([map objectAtIndex: 1]));
}
else if ([item isKindOfClass: [NSString class]])
- fallbackList.append(familyNameFromPostScriptName(psNameToFamily, item));
+ fallbackList.append(familyNameFromPostScriptName(item));
}
if (QCoreTextFontEngine::supportsColorGlyphs())
@@ -579,7 +564,7 @@ QStringList QCoreTextFontDatabase::addApplicationFont(const QByteArray &fontData
for (int i = 0; i < numFonts; ++i) {
CTFontDescriptorRef fontDescriptor = CTFontDescriptorRef(CFArrayGetValueAtIndex(fonts, i));
populateFromDescriptor(fontDescriptor);
- QCFType<CFStringRef> familyName = CFStringRef(CTFontDescriptorCopyLocalizedAttribute(fontDescriptor, kCTFontFamilyNameAttribute, NULL));
+ QCFType<CFStringRef> familyName = CFStringRef(CTFontDescriptorCopyAttribute(fontDescriptor, kCTFontFamilyNameAttribute));
families.append(QCFString(familyName));
}
}
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
index 1560d36644..c6fc791503 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
@@ -72,6 +72,7 @@ public:
QCoreTextFontDatabase();
~QCoreTextFontDatabase();
void populateFontDatabase();
+
QFontEngine *fontEngine(const QFontDef &fontDef, void *handle);
QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference);
QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const;
@@ -84,8 +85,6 @@ private:
void populateFromDescriptor(CTFontDescriptorRef font);
mutable QString defaultFontName;
- mutable QHash<QString, QString> psNameToFamily;
- mutable QHash<QString, QString> familyNameToPsName;
void removeApplicationFonts();
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index 4fe78cb568..3c30df6efb 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -85,6 +85,7 @@ CGAffineTransform qt_transform_from_fontdef(const QFontDef &fontDef)
}
QCoreTextFontEngine::QCoreTextFontEngine(CTFontRef font, const QFontDef &def)
+ : QFontEngine(Mac)
{
fontDef = def;
transform = qt_transform_from_fontdef(fontDef);
@@ -95,6 +96,7 @@ QCoreTextFontEngine::QCoreTextFontEngine(CTFontRef font, const QFontDef &def)
}
QCoreTextFontEngine::QCoreTextFontEngine(CGFontRef font, const QFontDef &def)
+ : QFontEngine(Mac)
{
fontDef = def;
transform = qt_transform_from_fontdef(fontDef);
@@ -192,10 +194,33 @@ void QCoreTextFontEngine::init()
setUserData(QVariant::fromValue((void *)cgFont));
}
+glyph_t QCoreTextFontEngine::glyphIndex(uint ucs4) const
+{
+ int len = 0;
+
+ QChar str[2];
+ if (Q_UNLIKELY(QChar::requiresSurrogates(ucs4))) {
+ str[len++] = QChar(QChar::highSurrogate(ucs4));
+ str[len++] = QChar(QChar::lowSurrogate(ucs4));
+ } else {
+ str[len++] = QChar(ucs4);
+ }
+
+ CGGlyph glyphIndices[2];
+
+ CTFontGetGlyphsForCharacters(ctfont, (const UniChar *)str, glyphIndices, len);
+
+ return glyphIndices[0];
+}
+
bool QCoreTextFontEngine::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs,
int *nglyphs, QFontEngine::ShaperFlags flags) const
{
- QCFType<CFStringRef> cfstring;
+ Q_ASSERT(glyphs->numGlyphs >= *nglyphs);
+ if (*nglyphs < len) {
+ *nglyphs = len;
+ return false;
+ }
QVarLengthArray<CGGlyph> cgGlyphs(len);
CTFontGetGlyphsForCharacters(ctfont, (const UniChar*)str, cgGlyphs.data(), len);
@@ -650,7 +675,7 @@ QFontEngine::FaceId QCoreTextFontEngine::faceId() const
return QFontEngine::FaceId();
}
-bool QCoreTextFontEngine::canRender(const QChar *string, int len)
+bool QCoreTextFontEngine::canRender(const QChar *string, int len) const
{
QVarLengthArray<CGGlyph> cgGlyphs(len);
return CTFontGetGlyphsForCharacters(ctfont, (const UniChar *) string, cgGlyphs.data(), len);
@@ -659,16 +684,13 @@ bool QCoreTextFontEngine::canRender(const QChar *string, int len)
bool QCoreTextFontEngine::getSfntTableData(uint tag, uchar *buffer, uint *length) const
{
QCFType<CFDataRef> table = CTFontCopyTable(ctfont, tag, 0);
- if (!table || !length)
+ if (!table)
return false;
CFIndex tableLength = CFDataGetLength(table);
- int availableLength = *length;
- *length = tableLength;
- if (buffer) {
- if (tableLength > availableLength)
- return false;
+ if (buffer && int(*length) >= tableLength)
CFDataGetBytes(table, CFRangeMake(0, tableLength), buffer);
- }
+ *length = tableLength;
+ Q_ASSERT(int(*length) > 0);
return true;
}
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
index 1cdac820b6..b9593b983e 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
@@ -62,6 +62,7 @@ public:
QCoreTextFontEngine(CGFontRef font, const QFontDef &def);
~QCoreTextFontEngine();
+ virtual glyph_t glyphIndex(uint ucs4) const;
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const;
@@ -78,15 +79,11 @@ public:
virtual void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int numGlyphs,
QPainterPath *path, QTextItem::RenderFlags);
- virtual const char *name() const { return "QCoreTextFontEngine"; }
-
- virtual bool canRender(const QChar *string, int len);
+ virtual bool canRender(const QChar *string, int len) const;
virtual int synthesized() const { return synthesisFlags; }
virtual bool supportsSubPixelPositions() const { return true; }
- virtual Type type() const { return QFontEngine::Mac; }
-
void draw(CGContextRef ctx, qreal x, qreal y, const QTextItemInt &ti, int paintDeviceHeight);
virtual FaceId faceId() const;
diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro
index f5291ab216..5b4d2b1fb3 100644
--- a/src/platformsupport/platformsupport.pro
+++ b/src/platformsupport/platformsupport.pro
@@ -19,5 +19,6 @@ include(devicediscovery/devicediscovery.pri)
include(services/services.pri)
include(themes/themes.pri)
include(linuxaccessibility/linuxaccessibility.pri)
+include(clipboard/clipboard.pri)
load(qt_module)
diff --git a/src/plugins/generic/tslib/qtslib.cpp b/src/plugins/generic/tslib/qtslib.cpp
index 9905d9cc9e..0dcf5bc6ca 100644
--- a/src/plugins/generic/tslib/qtslib.cpp
+++ b/src/plugins/generic/tslib/qtslib.cpp
@@ -110,12 +110,17 @@ static bool get_sample(struct tsdev *dev, struct ts_sample *sample, bool rawMode
void QTsLibMouseHandler::readMouseData()
{
ts_sample sample;
- while (get_sample(m_dev, &sample, m_rawMode)) {
+ while (get_sample(m_dev, &sample, m_rawMode)) {
bool pressed = sample.pressure;
int x = sample.x;
int y = sample.y;
+ // work around missing coordinates on mouse release
+ if (sample.pressure == 0 && sample.x == 0 && sample.y == 0) {
+ x = m_x;
+ y = m_y;
+ }
if (!m_rawMode) {
//filtering: ignore movements of 2 pixels or less
@@ -123,12 +128,6 @@ void QTsLibMouseHandler::readMouseData()
int dy = y - m_y;
if (dx*dx <= 4 && dy*dy <= 4 && pressed == m_pressed)
continue;
- } else {
- // work around missing coordinates on mouse release in raw mode
- if (sample.pressure == 0 && sample.x == 0 && sample.y == 0) {
- x = m_x;
- y = m_y;
- }
}
QPoint pos(x, y);
diff --git a/src/plugins/platforminputcontexts/compose/compose.pro b/src/plugins/platforminputcontexts/compose/compose.pro
index c206e99e57..546a0a2af7 100644
--- a/src/plugins/platforminputcontexts/compose/compose.pro
+++ b/src/plugins/platforminputcontexts/compose/compose.pro
@@ -8,7 +8,7 @@ QT += gui-private
LIBS += $$QMAKE_LIBS_XKBCOMMON
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XKBCOMMON
-DEFINES += COMPOSE_X11_PREFIX='\\"$$QMAKE_X11_PREFIX\\"'
+DEFINES += X11_PREFIX='\\"$$QMAKE_X11_PREFIX\\"'
SOURCES += $$PWD/main.cpp \
$$PWD/qcomposeplatforminputcontext.cpp \
diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
index e2810c8448..ca61b0e495 100644
--- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
+++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
@@ -73,13 +73,19 @@ TableGenerator::TableGenerator() : m_state(NoErrors),
void TableGenerator::initPossibleLocations()
{
- // To add an extra system path use the QTCOMPOSE environment variable
- if (qEnvironmentVariableIsSet("QTCOMPOSE")) {
- m_possibleLocations.append(QString(qgetenv("QTCOMPOSE")));
- }
-
- m_possibleLocations.append(QStringLiteral(COMPOSE_X11_PREFIX "/share/X11/locale"));
- m_possibleLocations.append(QStringLiteral(COMPOSE_X11_PREFIX "/lib/X11/locale"));
+ // Compose files come as a part of Xlib library. Xlib doesn't provide
+ // a mechanism how to retrieve the location of these files reliably, since it was
+ // never meant for external software to parse compose tables directly. Best we
+ // can do is to hardcode search paths. To add an extra system path use
+ // the QTCOMPOSE environment variable
+ if (qEnvironmentVariableIsSet("QTCOMPOSE"))
+ m_possibleLocations.append(QString::fromLocal8Bit(qgetenv("QTCOMPOSE")));
+ m_possibleLocations.append(QStringLiteral("/usr/share/X11/locale"));
+ m_possibleLocations.append(QStringLiteral("/usr/local/share/X11/locale"));
+ m_possibleLocations.append(QStringLiteral("/usr/lib/X11/locale"));
+ m_possibleLocations.append(QStringLiteral("/usr/local/lib/X11/locale"));
+ m_possibleLocations.append(QStringLiteral(X11_PREFIX "/share/X11/locale"));
+ m_possibleLocations.append(QStringLiteral(X11_PREFIX "/lib/X11/locale"));
}
void TableGenerator::findComposeFile()
diff --git a/src/plugins/platforms/android/qandroidplatformbackingstore.cpp b/src/plugins/platforms/android/qandroidplatformbackingstore.cpp
index 1df7ce3179..b85b1157a8 100644
--- a/src/plugins/platforms/android/qandroidplatformbackingstore.cpp
+++ b/src/plugins/platforms/android/qandroidplatformbackingstore.cpp
@@ -51,7 +51,10 @@ QAndroidPlatformBackingStore::QAndroidPlatformBackingStore(QWindow *window)
: QPlatformBackingStore(window)
{
Q_ASSERT(window->handle());
- (static_cast<QAndroidPlatformRasterWindow *>(window->handle()))->setBackingStore(this);
+ if (window->surfaceType() == QSurface::RasterSurface)
+ (static_cast<QAndroidPlatformRasterWindow *>(window->handle()))->setBackingStore(this);
+ else
+ qWarning("QAndroidPlatformBackingStore does not support GL windows.");
}
QPaintDevice *QAndroidPlatformBackingStore::paintDevice()
diff --git a/src/plugins/platforms/android/qandroidplatformclipboard.cpp b/src/plugins/platforms/android/qandroidplatformclipboard.cpp
index bc48b4935b..0b5e96fa36 100644
--- a/src/plugins/platforms/android/qandroidplatformclipboard.cpp
+++ b/src/plugins/platforms/android/qandroidplatformclipboard.cpp
@@ -42,7 +42,6 @@
#include "qandroidplatformclipboard.h"
#include "androidjniclipboard.h"
#ifndef QT_NO_CLIPBOARD
-#include <QMimeData>
QT_BEGIN_NAMESPACE
@@ -56,9 +55,8 @@ QMimeData *QAndroidPlatformClipboard::mimeData(QClipboard::Mode mode)
if (QClipboard::Clipboard != mode || !QtAndroidClipboard::hasClipboardText())
return 0;
- QMimeData *mimeData = new QMimeData();
- mimeData->setText(QtAndroidClipboard::clipboardText());
- return mimeData;
+ m_mimeData.setText(QtAndroidClipboard::clipboardText());
+ return &m_mimeData;
}
void QAndroidPlatformClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
diff --git a/src/plugins/platforms/android/qandroidplatformclipboard.h b/src/plugins/platforms/android/qandroidplatformclipboard.h
index 644f326934..f67355c358 100644
--- a/src/plugins/platforms/android/qandroidplatformclipboard.h
+++ b/src/plugins/platforms/android/qandroidplatformclipboard.h
@@ -43,6 +43,7 @@
#define QANDROIDPLATFORMCLIPBOARD_H
#include <qpa/qplatformclipboard.h>
+#include <QMimeData>
#ifndef QT_NO_CLIPBOARD
QT_BEGIN_NAMESPACE
@@ -55,6 +56,9 @@ public:
virtual QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard);
virtual void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard);
virtual bool supportsMode(QClipboard::Mode mode) const;
+
+private:
+ QMimeData m_mimeData;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
index 59ca69c004..a0b3ae066c 100644
--- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
+++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
@@ -50,7 +50,7 @@
QT_BEGIN_NAMESPACE
QAndroidPlatformOpenGLContext::QAndroidPlatformOpenGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display)
- :QEGLPlatformContext(format, share, display, EGL_OPENGL_ES_API)
+ :QEGLPlatformContext(format, share, display)
{
}
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp
index 039b19f861..94e58eaeb6 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.cpp
+++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp
@@ -47,6 +47,7 @@
#include <QVariant>
#include <QFileInfo>
#include <QCoreApplication>
+#include <private/qguiapplication_p.h>
#include <qandroidplatformintegration.h>
QAndroidPlatformTheme::QAndroidPlatformTheme(QAndroidPlatformNativeInterface *androidPlatformNativeInterface)
@@ -179,7 +180,30 @@ QVariant QAndroidPlatformTheme::themeHint(ThemeHint hint) const
return QStringList("android");
}
return QStringList("fusion");
- break;
+
+ case MouseDoubleClickDistance:
+ {
+ int minimumDistance = qgetenv("QT_ANDROID_MINIMUM_MOUSE_DOUBLE_CLICK_DISTANCE").toInt();
+ int ret = minimumDistance;
+
+ QAndroidPlatformIntegration *platformIntegration
+ = static_cast<QAndroidPlatformIntegration *>(QGuiApplicationPrivate::platformIntegration());
+ QAndroidPlatformScreen *platformScreen = platformIntegration->screen();
+ if (platformScreen != 0) {
+ QScreen *screen = platformScreen->screen();
+ qreal dotsPerInch = screen->physicalDotsPerInch();
+
+ // Allow 15% of an inch between clicks when double clicking
+ int distance = qRound(dotsPerInch * 0.15);
+ if (distance > minimumDistance)
+ ret = distance;
+ }
+
+ if (ret > 0)
+ return ret;
+
+ // fall through
+ }
default:
return QPlatformTheme::themeHint(hint);
}
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index a2fd8c0613..d8cd32255c 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -33,13 +33,13 @@ OBJECTIVE_SOURCES += main.mm \
qcocoaclipboard.mm \
qcocoadrag.mm \
qmacclipboard.mm \
- qmacmime.mm \
qcocoasystemsettings.mm \
qcocoainputcontext.mm \
qcocoaservices.mm \
qcocoasystemtrayicon.mm \
qcocoaintrospection.mm \
qcocoakeymapper.mm \
+ qcocoamimetypes.mm
SOURCES += messages.cpp
@@ -70,14 +70,14 @@ HEADERS += qcocoaintegration.h \
qcocoaclipboard.h \
qcocoadrag.h \
qmacclipboard.h \
- qmacmime.h \
qcocoasystemsettings.h \
qcocoainputcontext.h \
qcocoaservices.h \
qcocoasystemtrayicon.h \
qcocoaintrospection.h \
qcocoakeymapper.h \
- messages.h
+ messages.h \
+ qcocoamimetypes.h
RESOURCES += qcocoaresources.qrc
diff --git a/src/plugins/platforms/cocoa/qcocoaclipboard.mm b/src/plugins/platforms/cocoa/qcocoaclipboard.mm
index a49ff902a5..f6c424d4fd 100644
--- a/src/plugins/platforms/cocoa/qcocoaclipboard.mm
+++ b/src/plugins/platforms/cocoa/qcocoaclipboard.mm
@@ -40,7 +40,6 @@
****************************************************************************/
#include "qcocoaclipboard.h"
-#include "qmacmime.h"
#include "qmacclipboard.h"
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm
index 5d7f53ee5d..2c8d391d2b 100644
--- a/src/plugins/platforms/cocoa/qcocoadrag.mm
+++ b/src/plugins/platforms/cocoa/qcocoadrag.mm
@@ -40,7 +40,6 @@
****************************************************************************/
#include "qcocoadrag.h"
-#include "qmacmime.h"
#include "qmacclipboard.h"
#include "qcocoahelpers.h"
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
index 29eed73535..91b631bff9 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
@@ -681,7 +681,7 @@ void QCocoaEventDispatcherPrivate::cleanupModalSessions()
{
// Go through the list of modal sessions, and end those
// that no longer has a window assosiated; no window means
- // the the session has logically ended. The reason we wait like
+ // the session has logically ended. The reason we wait like
// this to actually end the sessions for real (rather than at the
// point they were marked as stopped), is that ending a session
// when no other session runs below it on the stack will make cocoa
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index dff7c9bd50..1892a5b6bf 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -52,7 +52,7 @@
#include "qcocoafiledialoghelper.h"
#include "qcocoatheme.h"
#include "qcocoainputcontext.h"
-#include "qmacmime.h"
+#include "qcocoamimetypes.h"
#include "qcocoaaccessibility.h"
#include <qpa/qplatformaccessibility.h>
@@ -274,6 +274,7 @@ QCocoaIntegration::QCocoaIntegration()
updateScreens();
QMacInternalPasteboardMime::initializeMimeTypes();
+ QCocoaMimeTypes::initializeMimeTypes();
}
QCocoaIntegration::~QCocoaIntegration()
diff --git a/src/corelib/doc/snippets/qbytearraylist/main.cpp b/src/plugins/platforms/cocoa/qcocoamimetypes.h
index 59f7af52e2..7b55e38525 100644
--- a/src/corelib/doc/snippets/qbytearraylist/main.cpp
+++ b/src/plugins/platforms/cocoa/qcocoamimetypes.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2013 by Southwest Research Institute (R)
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtCore module of the Qt Toolkit.
+** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -39,13 +39,19 @@
**
****************************************************************************/
+#ifndef QCOCOAMIMETYPES_H
+#define QCOCOAMIMETYPES_H
-#include <QByteArrayList>
+#include <QtCore/QtCore>
-int main(int, char **)
+QT_BEGIN_NAMESPACE
+
+class QCocoaMimeTypes
{
- QByteArray ba1, ba2, ba3;
-//! [0]
- QByteArrayList longerList = (QByteArrayList() << ba1 << ba2 << ba3);
-//! [0]
-}
+public:
+ static void initializeMimeTypes();
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/platforms/cocoa/qcocoamimetypes.mm b/src/plugins/platforms/cocoa/qcocoamimetypes.mm
new file mode 100644
index 0000000000..05d4c19112
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qcocoamimetypes.mm
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** 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 "qcocoamimetypes.h"
+#include <QtPlatformSupport/private/qmacmime_p.h>
+#include "qcocoahelpers.h"
+
+QT_BEGIN_NAMESPACE
+
+class QMacPasteboardMimeTiff : public QMacInternalPasteboardMime {
+public:
+ QMacPasteboardMimeTiff() : QMacInternalPasteboardMime(MIME_ALL) { }
+ QString convertorName();
+
+ QString flavorFor(const QString &mime);
+ QString mimeFor(QString flav);
+ bool canConvert(const QString &mime, QString flav);
+ QVariant convertToMime(const QString &mime, QList<QByteArray> data, QString flav);
+ QList<QByteArray> convertFromMime(const QString &mime, QVariant data, QString flav);
+};
+
+QString QMacPasteboardMimeTiff::convertorName()
+{
+ return QLatin1String("Tiff");
+}
+
+QString QMacPasteboardMimeTiff::flavorFor(const QString &mime)
+{
+ if (mime.startsWith(QLatin1String("application/x-qt-image")))
+ return QLatin1String("public.tiff");
+ return QString();
+}
+
+QString QMacPasteboardMimeTiff::mimeFor(QString flav)
+{
+ if (flav == QLatin1String("public.tiff"))
+ return QLatin1String("application/x-qt-image");
+ return QString();
+}
+
+bool QMacPasteboardMimeTiff::canConvert(const QString &mime, QString flav)
+{
+ return flav == QLatin1String("public.tiff") && mime == QLatin1String("application/x-qt-image");
+}
+
+QVariant QMacPasteboardMimeTiff::convertToMime(const QString &mime, QList<QByteArray> data, QString flav)
+{
+ if (data.count() > 1)
+ qWarning("QMacPasteboardMimeTiff: Cannot handle multiple member data");
+ QVariant ret;
+ if (!canConvert(mime, flav))
+ return ret;
+ const QByteArray &a = data.first();
+ QCFType<CGImageRef> image;
+ QCFType<CFDataRef> tiffData = CFDataCreateWithBytesNoCopy(0,
+ reinterpret_cast<const UInt8 *>(a.constData()),
+ a.size(), kCFAllocatorNull);
+ QCFType<CGImageSourceRef> imageSource = CGImageSourceCreateWithData(tiffData, 0);
+ image = CGImageSourceCreateImageAtIndex(imageSource, 0, 0);
+ if (image != 0)
+ ret = QVariant(qt_mac_toQImage(image));
+ return ret;
+}
+
+QList<QByteArray> QMacPasteboardMimeTiff::convertFromMime(const QString &mime, QVariant variant, QString flav)
+{
+ QList<QByteArray> ret;
+ if (!canConvert(mime, flav))
+ return ret;
+
+ QImage img = qvariant_cast<QImage>(variant);
+ QCFType<CGImageRef> cgimage = qt_mac_toCGImage(img);
+
+ QCFType<CFMutableDataRef> data = CFDataCreateMutable(0, 0);
+ QCFType<CGImageDestinationRef> imageDestination = CGImageDestinationCreateWithData(data, kUTTypeTIFF, 1, 0);
+ if (imageDestination != 0) {
+ CFTypeRef keys[2];
+ QCFType<CFTypeRef> values[2];
+ QCFType<CFDictionaryRef> options;
+ keys[0] = kCGImagePropertyPixelWidth;
+ keys[1] = kCGImagePropertyPixelHeight;
+ int width = img.width();
+ int height = img.height();
+ values[0] = CFNumberCreate(0, kCFNumberIntType, &width);
+ values[1] = CFNumberCreate(0, kCFNumberIntType, &height);
+ options = CFDictionaryCreate(0, reinterpret_cast<const void **>(keys),
+ reinterpret_cast<const void **>(values), 2,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ CGImageDestinationAddImage(imageDestination, cgimage, options);
+ CGImageDestinationFinalize(imageDestination);
+ }
+ QByteArray ar(CFDataGetLength(data), 0);
+ CFDataGetBytes(data,
+ CFRangeMake(0, ar.size()),
+ reinterpret_cast<UInt8 *>(ar.data()));
+ ret.append(ar);
+ return ret;
+}
+
+void QCocoaMimeTypes::initializeMimeTypes()
+{
+ new QMacPasteboardMimeTiff;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
index f4776342de..5e57200ebc 100644
--- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
+++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
@@ -44,7 +44,6 @@
#include "qcocoawindow.h"
#include "qcocoamenu.h"
#include "qcocoamenubar.h"
-#include "qmacmime.h"
#include "qcocoahelpers.h"
#include "qcocoaapplication.h"
#include "qcocoaintegration.h"
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index 748280af6a..67cac41383 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -52,27 +52,61 @@
QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
-@interface QNSWindow : NSWindow
+@class QNSWindowHelper;
+
+@protocol QNSWindowProtocol
+
+@property (nonatomic, readonly) QNSWindowHelper *helper;
+
+- (void)superSendEvent:(NSEvent *)theEvent;
+- (void)closeAndRelease;
+
+@end
+
+typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow;
+
+@interface QNSWindowHelper : NSObject
{
- @public QCocoaWindow *m_cocoaPlatformWindow;
+ QCocoaNSWindow *_window;
+ QCocoaWindow *_platformWindow;
+ BOOL _grabbingMouse;
+ BOOL _releaseOnMouseUp;
}
+
+@property (nonatomic, readonly) QCocoaNSWindow *window;
+@property (nonatomic, readonly) QCocoaWindow *platformWindow;
+@property (nonatomic) BOOL grabbingMouse;
+@property (nonatomic) BOOL releaseOnMouseUp;
+
+- (id)initWithNSWindow:(QCocoaNSWindow *)window platformWindow:(QCocoaWindow *)platformWindow;
+- (void)handleWindowEvent:(NSEvent *)theEvent;
+
+@end
+
+@interface QNSWindow : NSWindow<QNSWindowProtocol>
+{
+ QNSWindowHelper *_helper;
+}
+
+@property (nonatomic, readonly) QNSWindowHelper *helper;
+
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)windowStyle
qPlatformWindow:(QCocoaWindow *)qpw;
-- (void)clearPlatformWindow;
@end
-@interface QNSPanel : NSPanel
+@interface QNSPanel : NSPanel<QNSWindowProtocol>
{
- @public QCocoaWindow *m_cocoaPlatformWindow;
+ QNSWindowHelper *_helper;
}
+@property (nonatomic, readonly) QNSWindowHelper *helper;
+
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)windowStyle
qPlatformWindow:(QCocoaWindow *)qpw;
-- (void)clearPlatformWindow;
@end
@class QNSWindowDelegate;
@@ -183,9 +217,8 @@ public:
QWindow *childWindowAt(QPoint windowPoint);
protected:
void recreateWindow(const QPlatformWindow *parentWindow);
- NSWindow *createNSWindow();
- void setNSWindow(NSWindow *window);
- void clearNSWindow(NSWindow *window);
+ QCocoaNSWindow *createNSWindow();
+ void setNSWindow(QCocoaNSWindow *window);
bool shouldUseNSPanel();
@@ -202,7 +235,7 @@ public: // for QNSView
NSView *m_contentView;
QNSView *m_qtView;
- NSWindow *m_nsWindow;
+ QCocoaNSWindow *m_nsWindow;
QCocoaWindow *m_forwardWindow;
// TODO merge to one variable if possible
@@ -213,7 +246,6 @@ public: // for QNSView
bool m_isNSWindowChild; // this window is a non-top level QWindow with a NSWindow.
QList<QCocoaWindow *> m_childWindows;
- QNSWindowDelegate *m_nsWindowDelegate;
Qt::WindowFlags m_windowFlags;
Qt::WindowState m_synchedWindowState;
Qt::WindowModality m_windowModality;
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index bf41270d12..f1f88a13dd 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -81,15 +81,10 @@ static bool isMouseEvent(NSEvent *ev)
}
@interface NSWindow (CocoaWindowCategory)
-- (void) clearPlatformWindow;
- (NSRect) legacyConvertRectFromScreen:(NSRect) rect;
@end
@implementation NSWindow (CocoaWindowCategory)
-- (void) clearPlatformWindow
-{
-}
-
- (NSRect) legacyConvertRectFromScreen:(NSRect) rect
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
@@ -103,8 +98,100 @@ static bool isMouseEvent(NSEvent *ev)
}
@end
+
+@implementation QNSWindowHelper
+
+@synthesize window = _window;
+@synthesize platformWindow = _platformWindow;
+@synthesize grabbingMouse = _grabbingMouse;
+@synthesize releaseOnMouseUp = _releaseOnMouseUp;
+
+- (id)initWithNSWindow:(QCocoaNSWindow *)window platformWindow:(QCocoaWindow *)platformWindow
+{
+ self = [super init];
+ if (self) {
+ _window = window;
+ _platformWindow = platformWindow;
+
+ _window.delegate = [[QNSWindowDelegate alloc] initWithQCocoaWindow:_platformWindow];
+
+ // Prevent Cocoa from releasing the window on close. Qt
+ // handles the close event asynchronously and we want to
+ // make sure that m_nsWindow stays valid until the
+ // QCocoaWindow is deleted by Qt.
+ [_window setReleasedWhenClosed:NO];
+ }
+
+ return self;
+}
+
+- (void)handleWindowEvent:(NSEvent *)theEvent
+{
+ QCocoaWindow *pw = self.platformWindow;
+ if (pw && pw->m_forwardWindow) {
+ if (theEvent.type == NSLeftMouseUp || theEvent.type == NSLeftMouseDragged) {
+ QNSView *forwardView = pw->m_qtView;
+ if (theEvent.type == NSLeftMouseUp) {
+ [forwardView mouseUp:theEvent];
+ pw->m_forwardWindow = 0;
+ } else {
+ [forwardView mouseDragged:theEvent];
+ }
+ }
+
+ if (!pw->m_isNSWindowChild && theEvent.type == NSLeftMouseDown) {
+ pw->m_forwardWindow = 0;
+ }
+ }
+
+ if (theEvent.type == NSLeftMouseDown) {
+ self.grabbingMouse = YES;
+ } else if (theEvent.type == NSLeftMouseUp) {
+ self.grabbingMouse = NO;
+ if (self.releaseOnMouseUp) {
+ [self detachFromPlatformWindow];
+ [self.window release];
+ return;
+ }
+ }
+
+ [self.window superSendEvent:theEvent];
+
+ if (!self.window.delegate)
+ return; // Already detached, pending NSAppKitDefined event
+
+ if (pw && pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
+ NSPoint loc = [theEvent locationInWindow];
+ NSRect windowFrame = [self.window legacyConvertRectFromScreen:[self.window frame]];
+ NSRect contentFrame = [[self.window contentView] frame];
+ if (NSMouseInRect(loc, windowFrame, NO) &&
+ !NSMouseInRect(loc, contentFrame, NO))
+ {
+ QNSView *contentView = (QNSView *)pw->contentView();
+ [contentView handleFrameStrutMouseEvent: theEvent];
+ }
+ }
+}
+
+- (void)detachFromPlatformWindow
+{
+ [self.window.delegate release];
+ self.window.delegate = nil;
+}
+
+- (void)dealloc
+{
+ _window = nil;
+ _platformWindow = 0;
+ [super dealloc];
+}
+
+@end
+
@implementation QNSWindow
+@synthesize helper = _helper;
+
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)windowStyle
qPlatformWindow:(QCocoaWindow *)qpw
@@ -116,7 +203,7 @@ static bool isMouseEvent(NSEvent *ev)
// set up before the window is shown and needs a proper window)
if (self) {
- m_cocoaPlatformWindow = qpw;
+ _helper = [[QNSWindowHelper alloc] initWithNSWindow:self platformWindow:qpw];
}
return self;
}
@@ -125,7 +212,8 @@ static bool isMouseEvent(NSEvent *ev)
{
// Prevent child NSWindows from becoming the key window in
// order keep the active apperance of the top-level window.
- if (!m_cocoaPlatformWindow || m_cocoaPlatformWindow->m_isNSWindowChild)
+ QCocoaWindow *pw = self.helper.platformWindow;
+ if (!pw || pw->m_isNSWindowChild)
return NO;
// The default implementation returns NO for title-bar less windows,
@@ -140,8 +228,8 @@ 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->m_isNSWindowChild
- || m_cocoaPlatformWindow->window()->transientParent())
+ QCocoaWindow *pw = self.helper.platformWindow;
+ if (!pw || pw->m_isNSWindowChild || pw->window()->transientParent())
canBecomeMain = NO;
return canBecomeMain;
@@ -149,51 +237,39 @@ static bool isMouseEvent(NSEvent *ev)
- (void) sendEvent: (NSEvent*) theEvent
{
- if (m_cocoaPlatformWindow && m_cocoaPlatformWindow->m_forwardWindow) {
- if (theEvent.type == NSLeftMouseUp || theEvent.type == NSLeftMouseDragged) {
- QNSView *forwardView = m_cocoaPlatformWindow->m_qtView;
- if (theEvent.type == NSLeftMouseUp) {
- [forwardView mouseUp:theEvent];
- m_cocoaPlatformWindow->m_forwardWindow = 0;
- } else {
- [forwardView mouseDragged:theEvent];
- }
-
- return;
- }
-
- if (theEvent.type == NSLeftMouseDown) {
- m_cocoaPlatformWindow->m_forwardWindow = 0;
- }
- }
+ [self.helper handleWindowEvent:theEvent];
+}
- [super sendEvent: theEvent];
+- (void)superSendEvent:(NSEvent *)theEvent
+{
+ [super sendEvent:theEvent];
+}
- if (!m_cocoaPlatformWindow)
- return;
+- (void)closeAndRelease
+{
+ [self close];
- if (m_cocoaPlatformWindow->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
- NSPoint loc = [theEvent locationInWindow];
- NSRect windowFrame = [self legacyConvertRectFromScreen:[self frame]];
- NSRect contentFrame = [[self contentView] frame];
- if (NSMouseInRect(loc, windowFrame, NO) &&
- !NSMouseInRect(loc, contentFrame, NO))
- {
- QNSView *contentView = (QNSView *) m_cocoaPlatformWindow->contentView();
- [contentView handleFrameStrutMouseEvent: theEvent];
- }
+ if (self.helper.grabbingMouse) {
+ self.helper.releaseOnMouseUp = YES;
+ } else {
+ [self.helper detachFromPlatformWindow];
+ [self release];
}
}
-- (void)clearPlatformWindow
+- (void)dealloc
{
- m_cocoaPlatformWindow = 0;
+ [_helper release];
+ _helper = nil;
+ [super dealloc];
}
@end
@implementation QNSPanel
+@synthesize helper = _helper;
+
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)windowStyle
qPlatformWindow:(QCocoaWindow *)qpw
@@ -205,47 +281,47 @@ static bool isMouseEvent(NSEvent *ev)
// set up before the window is shown and needs a proper window)
if (self) {
- m_cocoaPlatformWindow = qpw;
+ _helper = [[QNSWindowHelper alloc] initWithNSWindow:self platformWindow:qpw];
}
return self;
}
- (BOOL)canBecomeKeyWindow
{
- if (!m_cocoaPlatformWindow)
+ QCocoaWindow *pw = self.helper.platformWindow;
+ if (!pw)
return NO;
// Only tool or dialog windows should become key:
- if (m_cocoaPlatformWindow
- && (m_cocoaPlatformWindow->window()->type() == Qt::Tool ||
- m_cocoaPlatformWindow->window()->type() == Qt::Dialog))
+ Qt::WindowType type = pw->window()->type();
+ if (type == Qt::Tool || type == Qt::Dialog)
return YES;
+
return NO;
}
- (void) sendEvent: (NSEvent*) theEvent
{
- [super sendEvent: theEvent];
+ [self.helper handleWindowEvent:theEvent];
+}
- if (!m_cocoaPlatformWindow)
- return;
+- (void)superSendEvent:(NSEvent *)theEvent
+{
+ [super sendEvent:theEvent];
+}
- if (m_cocoaPlatformWindow->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
- NSPoint loc = [theEvent locationInWindow];
- NSRect windowFrame = [self legacyConvertRectFromScreen:[self frame]];
- NSRect contentFrame = [[self contentView] frame];
- if (NSMouseInRect(loc, windowFrame, NO) &&
- !NSMouseInRect(loc, contentFrame, NO))
- {
- QNSView *contentView = (QNSView *) m_cocoaPlatformWindow->contentView();
- [contentView handleFrameStrutMouseEvent: theEvent];
- }
- }
+- (void)closeAndRelease
+{
+ [self.helper detachFromPlatformWindow];
+ [self close];
+ [self release];
}
-- (void)clearPlatformWindow
+- (void)dealloc
{
- m_cocoaPlatformWindow = 0;
+ [_helper release];
+ _helper = nil;
+ [super dealloc];
}
@end
@@ -262,7 +338,6 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
, m_contentViewIsToBeEmbedded(false)
, m_parentCocoaWindow(0)
, m_isNSWindowChild(false)
- , m_nsWindowDelegate(0)
, m_synchedWindowState(Qt::WindowActive)
, m_windowModality(Qt::NonModal)
, m_windowUnderMouse(false)
@@ -328,7 +403,8 @@ QCocoaWindow::~QCocoaWindow()
#endif
QCocoaAutoReleasePool pool;
- clearNSWindow(m_nsWindow);
+ [m_nsWindow setContentView:nil];
+ [m_nsWindow.helper detachFromPlatformWindow];
if (m_isNSWindowChild) {
if (m_parentCocoaWindow)
m_parentCocoaWindow->removeChildWindow(this);
@@ -346,7 +422,6 @@ QCocoaWindow::~QCocoaWindow()
[m_contentView release];
[m_nsWindow release];
- [m_nsWindowDelegate release];
[m_windowCursor release];
}
@@ -1090,12 +1165,10 @@ void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow)
// Remove current window (if any)
if ((m_nsWindow && !needsNSWindow) || (usesNSPanel != shouldUseNSPanel())) {
- clearNSWindow(m_nsWindow);
- [m_nsWindow close];
- [m_nsWindow release];
+ [m_nsWindow closeAndRelease];
+ if (wasNSWindowChild && oldParentCocoaWindow)
+ oldParentCocoaWindow->removeChildWindow(this);
m_nsWindow = 0;
- [m_nsWindowDelegate release];
- m_nsWindowDelegate = 0;
}
if (needsNSWindow) {
@@ -1203,7 +1276,7 @@ bool QCocoaWindow::shouldUseNSPanel()
((type & Qt::Popup) == Qt::Popup || (type & Qt::Dialog) == Qt::Dialog);
}
-NSWindow * QCocoaWindow::createNSWindow()
+QCocoaNSWindow * QCocoaWindow::createNSWindow()
{
QCocoaAutoReleasePool pool;
@@ -1219,7 +1292,7 @@ NSWindow * QCocoaWindow::createNSWindow()
} else {
styleMask = windowStyleMask(flags);
}
- NSWindow *createdWindow = 0;
+ QCocoaNSWindow *createdWindow = 0;
// Use NSPanel for popup-type windows. (Popup, Tool, ToolTip, SplashScreen)
// and dialogs
@@ -1270,17 +1343,8 @@ NSWindow * QCocoaWindow::createNSWindow()
return createdWindow;
}
-void QCocoaWindow::setNSWindow(NSWindow *window)
+void QCocoaWindow::setNSWindow(QCocoaNSWindow *window)
{
- m_nsWindowDelegate = [[QNSWindowDelegate alloc] initWithQCocoaWindow:this];
- [window setDelegate:m_nsWindowDelegate];
-
- // Prevent Cocoa from releasing the window on close. Qt
- // handles the close event asynchronously and we want to
- // make sure that m_nsWindow stays valid until the
- // QCocoaWindow is deleted by Qt.
- [window setReleasedWhenClosed : NO];
-
if (window.contentView != m_contentView) {
[m_contentView setPostsFrameChangedNotifications: NO];
[window setContentView:m_contentView];
@@ -1288,17 +1352,6 @@ void QCocoaWindow::setNSWindow(NSWindow *window)
}
}
-void QCocoaWindow::clearNSWindow(NSWindow *window)
-{
- [window setContentView:nil];
- [window setDelegate:nil];
- [window clearPlatformWindow];
-
- if (m_isNSWindowChild) {
- m_parentCocoaWindow->removeChildWindow(this);
- }
-}
-
void QCocoaWindow::removeChildWindow(QCocoaWindow *child)
{
m_childWindows.removeOne(child);
diff --git a/src/plugins/platforms/cocoa/qmacclipboard.h b/src/plugins/platforms/cocoa/qmacclipboard.h
index d8e588e36b..ddaa61a84d 100644
--- a/src/plugins/platforms/cocoa/qmacclipboard.h
+++ b/src/plugins/platforms/cocoa/qmacclipboard.h
@@ -43,7 +43,7 @@
#define QMACCLIPBOARD_H
#include <QtGui>
-#include "qmacmime.h"
+#include <QtPlatformSupport/private/qmacmime_p.h>
#undef slots
diff --git a/src/plugins/platforms/cocoa/qmacclipboard.mm b/src/plugins/platforms/cocoa/qmacclipboard.mm
index 9ccf41fbf4..9368b65866 100644
--- a/src/plugins/platforms/cocoa/qmacclipboard.mm
+++ b/src/plugins/platforms/cocoa/qmacclipboard.mm
@@ -51,7 +51,6 @@
#include <stdlib.h>
#include <string.h>
#include "qcocoahelpers.h"
-#include "qmacmime.h"
#include "qcocoaautoreleasepool.h"
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index fcca96a8a8..90d56bc3f3 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -49,7 +49,6 @@
#include "qcocoaautoreleasepool.h"
#include "qmultitouch_mac_p.h"
#include "qcocoadrag.h"
-#include "qmacmime.h"
#include <qpa/qplatformintegration.h>
#include <qpa/qwindowsysteminterface.h>
diff --git a/src/plugins/platforms/directfb/qdirectfb_egl.cpp b/src/plugins/platforms/directfb/qdirectfb_egl.cpp
index c71f71c6a8..c738c3d027 100644
--- a/src/plugins/platforms/directfb/qdirectfb_egl.cpp
+++ b/src/plugins/platforms/directfb/qdirectfb_egl.cpp
@@ -223,8 +223,7 @@ QSurfaceFormat QDirectFbWindowEGL::format() const
QDirectFbEGLContext::QDirectFbEGLContext(QDirectFbScreenEGL *screen, QOpenGLContext *context)
- : QEGLPlatformContext(context->format(), context->shareHandle(),
- screen->eglDisplay(), EGL_OPENGL_ES_API)
+ : QEGLPlatformContext(context->format(), context->shareHandle(), screen->eglDisplay())
, m_screen(screen)
{}
diff --git a/src/plugins/platforms/eglfs/qeglfscontext.cpp b/src/plugins/platforms/eglfs/qeglfscontext.cpp
index 86ceb0721b..9083abc562 100644
--- a/src/plugins/platforms/eglfs/qeglfscontext.cpp
+++ b/src/plugins/platforms/eglfs/qeglfscontext.cpp
@@ -52,10 +52,9 @@
QT_BEGIN_NAMESPACE
-QEglFSContext::QEglFSContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share,
- EGLDisplay display, EGLenum eglApi)
+QEglFSContext::QEglFSContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display)
: QEGLPlatformContext(QEglFSHooks::hooks()->surfaceFormatFor(format), share, display,
- QEglFSIntegration::chooseConfig(display, QEglFSHooks::hooks()->surfaceFormatFor(format)), eglApi)
+ QEglFSIntegration::chooseConfig(display, QEglFSHooks::hooks()->surfaceFormatFor(format)))
{
}
diff --git a/src/plugins/platforms/eglfs/qeglfscontext.h b/src/plugins/platforms/eglfs/qeglfscontext.h
index 22a7c67e46..5d406f09f1 100644
--- a/src/plugins/platforms/eglfs/qeglfscontext.h
+++ b/src/plugins/platforms/eglfs/qeglfscontext.h
@@ -49,8 +49,7 @@ QT_BEGIN_NAMESPACE
class QEglFSContext : public QEGLPlatformContext
{
public:
- QEglFSContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
- EGLenum eglApi = EGL_OPENGL_ES_API);
+ QEglFSContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display);
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) Q_DECL_OVERRIDE;
void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE;
};
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.h b/src/plugins/platforms/eglfs/qeglfswindow.h
index f93a9d54bc..c8c31816a0 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.h
+++ b/src/plugins/platforms/eglfs/qeglfswindow.h
@@ -65,6 +65,10 @@ public:
void raise() Q_DECL_OVERRIDE;
void lower() Q_DECL_OVERRIDE;
+ void propagateSizeHints() Q_DECL_OVERRIDE { }
+ bool setKeyboardGrabEnabled(bool) Q_DECL_OVERRIDE { return false; }
+ bool setMouseGrabEnabled(bool) Q_DECL_OVERRIDE { return false; }
+
QSurfaceFormat format() const Q_DECL_OVERRIDE;
EGLNativeWindowType eglWindow() const Q_DECL_OVERRIDE;
EGLSurface surface() const;
diff --git a/src/plugins/platforms/ios/ios.pro b/src/plugins/platforms/ios/ios.pro
index 175cc3f8bd..b7e074b95a 100644
--- a/src/plugins/platforms/ios/ios.pro
+++ b/src/plugins/platforms/ios/ios.pro
@@ -21,7 +21,8 @@ OBJECTIVE_SOURCES = \
qiosinputcontext.mm \
qiostheme.mm \
qiosglobal.mm \
- qiosservices.mm
+ qiosservices.mm \
+ qiosclipboard.mm
HEADERS = \
qiosintegration.h \
@@ -37,7 +38,8 @@ HEADERS = \
qiostheme.h \
qiosglobal.h \
qiosservices.h \
- quiview.h
+ quiview.h \
+ qiosclipboard.h
OTHER_FILES = \
quiview_textinput.mm
diff --git a/src/plugins/platforms/ios/qiosclipboard.h b/src/plugins/platforms/ios/qiosclipboard.h
new file mode 100644
index 0000000000..da4226a40d
--- /dev/null
+++ b/src/plugins/platforms/ios/qiosclipboard.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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 QIOSCLIPBOARD_H
+#define QIOSCLIPBOARD_H
+
+#import <UIKit/UIKit.h>
+
+#include <qpa/qplatformclipboard.h>
+
+@class QUIClipboard;
+
+QT_BEGIN_NAMESPACE
+
+class QIOSClipboard : public QPlatformClipboard
+{
+public:
+ QIOSClipboard();
+ QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE;
+ void setMimeData(QMimeData *mimeData, QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE;
+ bool supportsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
+ bool ownsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
+
+private:
+ QUIClipboard *m_clipboard;
+};
+
+QT_END_NAMESPACE
+
+#endif // QIOSCLIPBOARD_H
diff --git a/src/plugins/platforms/ios/qiosclipboard.mm b/src/plugins/platforms/ios/qiosclipboard.mm
new file mode 100644
index 0000000000..0a7b34a216
--- /dev/null
+++ b/src/plugins/platforms/ios/qiosclipboard.mm
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** 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 "qiosclipboard.h"
+
+#include <QtPlatformSupport/private/qmacmime_p.h>
+#include <QtCore/QMimeData>
+#include <QtGui/QGuiApplication>
+
+@interface UIPasteboard (QUIPasteboard)
+ + (UIPasteboard *)pasteboardWithQClipboardMode:(QClipboard::Mode)mode;
+@end
+
+@implementation UIPasteboard (QUIPasteboard)
++ (UIPasteboard *)pasteboardWithQClipboardMode:(QClipboard::Mode)mode
+{
+ NSString *name = (mode == QClipboard::Clipboard) ? UIPasteboardNameGeneral : UIPasteboardNameFind;
+ return [UIPasteboard pasteboardWithName:name create:NO];
+}
+@end
+
+// --------------------------------------------------------------------
+
+@interface QUIClipboard : NSObject
+{
+@public
+ QIOSClipboard *m_qiosClipboard;
+ NSInteger m_changeCountClipboard;
+ NSInteger m_changeCountFindBuffer;
+}
+@end
+
+@implementation QUIClipboard
+
+-(id)initWithQIOSClipboard:(QIOSClipboard *)qiosClipboard
+{
+ self = [super init];
+ if (self) {
+ m_qiosClipboard = qiosClipboard;
+ m_changeCountClipboard = [UIPasteboard pasteboardWithQClipboardMode:QClipboard::Clipboard].changeCount;
+ m_changeCountFindBuffer = [UIPasteboard pasteboardWithQClipboardMode:QClipboard::FindBuffer].changeCount;
+
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(updatePasteboardChanged:)
+ name:UIPasteboardChangedNotification object:nil];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(updatePasteboardChanged:)
+ name:UIPasteboardRemovedNotification object:nil];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(updatePasteboardChanged:)
+ name:UIApplicationDidBecomeActiveNotification
+ object:nil];
+ }
+ return self;
+}
+
+-(void)dealloc
+{
+ [[NSNotificationCenter defaultCenter]
+ removeObserver:self
+ name:UIPasteboardChangedNotification object:nil];
+ [[NSNotificationCenter defaultCenter]
+ removeObserver:self
+ name:UIPasteboardRemovedNotification object:nil];
+ [[NSNotificationCenter defaultCenter]
+ removeObserver:self
+ name:UIApplicationDidBecomeActiveNotification
+ object:nil];
+ [super dealloc];
+}
+
+- (void)updatePasteboardChanged:(NSNotification *)notification
+{
+ Q_UNUSED(notification);
+ NSInteger changeCountClipboard = [UIPasteboard pasteboardWithQClipboardMode:QClipboard::Clipboard].changeCount;
+ NSInteger changeCountFindBuffer = [UIPasteboard pasteboardWithQClipboardMode:QClipboard::FindBuffer].changeCount;
+
+ if (m_changeCountClipboard != changeCountClipboard) {
+ m_changeCountClipboard = changeCountClipboard;
+ m_qiosClipboard->emitChanged(QClipboard::Clipboard);
+ }
+
+ if (m_changeCountFindBuffer != changeCountFindBuffer) {
+ m_changeCountFindBuffer = changeCountFindBuffer;
+ m_qiosClipboard->emitChanged(QClipboard::FindBuffer);
+ }
+}
+
+@end
+
+// --------------------------------------------------------------------
+
+QT_BEGIN_NAMESPACE
+
+class QIOSMimeData : public QMimeData {
+public:
+ QIOSMimeData(QClipboard::Mode mode) : QMimeData(), m_mode(mode) { }
+ ~QIOSMimeData() { }
+
+ QStringList formats() const Q_DECL_OVERRIDE;
+ QVariant retrieveData(const QString &mimeType, QVariant::Type type) const Q_DECL_OVERRIDE;
+
+private:
+ const QClipboard::Mode m_mode;
+};
+
+QStringList QIOSMimeData::formats() const
+{
+ QStringList foundMimeTypes;
+ UIPasteboard *pb = [UIPasteboard pasteboardWithQClipboardMode:m_mode];
+ NSArray *pasteboardTypes = [pb pasteboardTypes];
+
+ for (NSUInteger i = 0; i < [pasteboardTypes count]; ++i) {
+ QString uti = QString::fromNSString([pasteboardTypes objectAtIndex:i]);
+ QString mimeType = QMacInternalPasteboardMime::flavorToMime(QMacInternalPasteboardMime::MIME_ALL, uti);
+ if (!mimeType.isEmpty() && !foundMimeTypes.contains(mimeType))
+ foundMimeTypes << mimeType;
+ }
+
+ return foundMimeTypes;
+}
+
+QVariant QIOSMimeData::retrieveData(const QString &mimeType, QVariant::Type) const
+{
+ UIPasteboard *pb = [UIPasteboard pasteboardWithQClipboardMode:m_mode];
+ NSArray *pasteboardTypes = [pb pasteboardTypes];
+
+ foreach (QMacInternalPasteboardMime *converter,
+ QMacInternalPasteboardMime::all(QMacInternalPasteboardMime::MIME_ALL)) {
+ if (!converter->canConvert(mimeType, converter->flavorFor(mimeType)))
+ continue;
+
+ for (NSUInteger i = 0; i < [pasteboardTypes count]; ++i) {
+ NSString *availableUtiNSString = [pasteboardTypes objectAtIndex:i];
+ QString availableUti = QString::fromNSString(availableUtiNSString);
+ if (!converter->canConvert(mimeType, availableUti))
+ continue;
+
+ NSData *nsData = [pb dataForPasteboardType:availableUtiNSString];
+ QList<QByteArray> dataList;
+ dataList << QByteArray(reinterpret_cast<const char *>([nsData bytes]), [nsData length]);
+ return converter->convertToMime(mimeType, dataList, availableUti);
+ }
+ }
+
+ return QVariant();
+}
+
+// --------------------------------------------------------------------
+
+QIOSClipboard::QIOSClipboard()
+ : m_clipboard([[QUIClipboard alloc] initWithQIOSClipboard:this])
+{
+}
+
+QMimeData *QIOSClipboard::mimeData(QClipboard::Mode mode)
+{
+ Q_ASSERT(supportsMode(mode));
+ return new QIOSMimeData(mode);
+}
+
+void QIOSClipboard::setMimeData(QMimeData *mimeData, QClipboard::Mode mode)
+{
+ Q_ASSERT(supportsMode(mode));
+
+ UIPasteboard *pb = [UIPasteboard pasteboardWithQClipboardMode:mode];
+ NSMutableDictionary *pbItem = [NSMutableDictionary dictionaryWithCapacity:mimeData->formats().size()];
+
+ foreach (const QString &mimeType, mimeData->formats()) {
+ foreach (QMacInternalPasteboardMime *converter,
+ QMacInternalPasteboardMime::all(QMacInternalPasteboardMime::MIME_ALL)) {
+ QString uti = converter->flavorFor(mimeType);
+ if (uti.isEmpty() || !converter->canConvert(mimeType, uti))
+ continue;
+
+ QByteArray byteArray = converter->convertFromMime(mimeType, mimeData->data(mimeType), uti).first();
+ NSData *nsData = [NSData dataWithBytes:byteArray.constData() length:byteArray.size()];
+ [pbItem setValue:nsData forKey:uti.toNSString()];
+ break;
+ }
+ }
+
+ pb.items = [NSArray arrayWithObject:pbItem];
+}
+
+bool QIOSClipboard::supportsMode(QClipboard::Mode mode) const
+{
+ return (mode == QClipboard::Clipboard || mode == QClipboard::FindBuffer);
+}
+
+bool QIOSClipboard::ownsMode(QClipboard::Mode mode) const
+{
+ Q_UNUSED(mode);
+ return false;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm
index d426028c46..4fe2cae15e 100644
--- a/src/plugins/platforms/ios/qiosinputcontext.mm
+++ b/src/plugins/platforms/ios/qiosinputcontext.mm
@@ -120,7 +120,7 @@
// For Qt applications we rotate the keyboard rect to align with the screen
// orientation (which is the interface orientation of the root view controller).
// For hybrid apps we follow native behavior, and return the rect unmodified:
- CGRect keyboardFrame = [[notification userInfo][UIKeyboardFrameEndUserInfoKey] CGRectValue];
+ CGRect keyboardFrame = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
if (isQtApplication()) {
UIView *view = m_viewController.view;
return fromCGRect(CGRectOffset([view convertRect:keyboardFrame fromView:view.window], 0, -view.bounds.origin.y));
@@ -156,8 +156,8 @@
m_keyboardVisibleAndDocked = YES;
m_keyboardEndRect = [self getKeyboardRect:notification];
if (!m_duration) {
- m_duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
- m_curve = UIViewAnimationCurve([notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue] << 16);
+ m_duration = [[notification.userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue];
+ m_curve = UIViewAnimationCurve([[notification.userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] integerValue] << 16);
}
m_context->scrollToCursor();
}
diff --git a/src/plugins/platforms/ios/qiosintegration.h b/src/plugins/platforms/ios/qiosintegration.h
index fdecf70725..a28926ff99 100644
--- a/src/plugins/platforms/ios/qiosintegration.h
+++ b/src/plugins/platforms/ios/qiosintegration.h
@@ -66,6 +66,7 @@ public:
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
QPlatformFontDatabase *fontDatabase() const;
+ QPlatformClipboard *clipboard() const;
QPlatformInputContext *inputContext() const;
QPlatformServices *services() const Q_DECL_OVERRIDE;
@@ -74,8 +75,6 @@ public:
QStringList themeNames() const;
QPlatformTheme *createPlatformTheme(const QString &name) const;
- QPlatformDrag *drag() const Q_DECL_OVERRIDE { return 0; }
-
QAbstractEventDispatcher *createEventDispatcher() const;
QPlatformNativeInterface *nativeInterface() const;
@@ -84,6 +83,7 @@ public:
QTouchDevice *touchDevice();
private:
QPlatformFontDatabase *m_fontDatabase;
+ QPlatformClipboard *m_clipboard;
QPlatformInputContext *m_inputContext;
QPlatformScreen *m_screen;
QTouchDevice *m_touchDevice;
diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm
index 660da6397f..7a40e349c9 100644
--- a/src/plugins/platforms/ios/qiosintegration.mm
+++ b/src/plugins/platforms/ios/qiosintegration.mm
@@ -46,11 +46,13 @@
#include "qiosbackingstore.h"
#include "qiosscreen.h"
#include "qioscontext.h"
+#include "qiosclipboard.h"
#include "qiosinputcontext.h"
#include "qiostheme.h"
#include "qiosservices.h"
#include <QtPlatformSupport/private/qcoretextfontdatabase_p.h>
+#include <QtPlatformSupport/private/qmacmime_p.h>
#include <QDir>
#include <QtDebug>
@@ -59,6 +61,7 @@ QT_BEGIN_NAMESPACE
QIOSIntegration::QIOSIntegration()
: m_fontDatabase(new QCoreTextFontDatabase)
+ , m_clipboard(new QIOSClipboard)
, m_inputContext(new QIOSInputContext)
, m_screen(new QIOSScreen(QIOSScreen::MainScreen))
, m_platformServices(new QIOSServices)
@@ -81,6 +84,7 @@ QIOSIntegration::QIOSIntegration()
m_touchDevice->setType(QTouchDevice::TouchScreen);
m_touchDevice->setCapabilities(QTouchDevice::Position | QTouchDevice::NormalizedPosition);
QWindowSystemInterface::registerTouchDevice(m_touchDevice);
+ QMacInternalPasteboardMime::initializeMimeTypes();
}
QIOSIntegration::~QIOSIntegration()
@@ -88,6 +92,10 @@ QIOSIntegration::~QIOSIntegration()
delete m_fontDatabase;
m_fontDatabase = 0;
+ delete m_clipboard;
+ m_clipboard = 0;
+ QMacInternalPasteboardMime::destroyMimeTypes();
+
delete m_inputContext;
m_inputContext = 0;
@@ -149,6 +157,11 @@ QPlatformFontDatabase * QIOSIntegration::fontDatabase() const
return m_fontDatabase;
}
+QPlatformClipboard *QIOSIntegration::clipboard() const
+{
+ return m_clipboard;
+}
+
QPlatformInputContext *QIOSIntegration::inputContext() const
{
return m_inputContext;
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
index 5af84918d9..aca8d76041 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
@@ -148,7 +148,7 @@ static QSizeF determinePhysicalSize(const fb_var_screeninfo &vinfo, const QSize
mmWidth = vinfo.width;
mmHeight = vinfo.height;
} else {
- const int dpi = 72;
+ const int dpi = 100;
mmWidth = qRound(res.width() * 25.4 / dpi);
mmHeight = qRound(res.height() * 25.4 / dpi);
}
diff --git a/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp b/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp
index d26b20d364..578031807c 100644
--- a/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp
+++ b/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp
@@ -57,9 +57,8 @@ QT_BEGIN_NAMESPACE
class QMinimalEglContext : public QEGLPlatformContext
{
public:
- QMinimalEglContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
- EGLenum eglApi = EGL_OPENGL_ES_API)
- : QEGLPlatformContext(format, share, display, eglApi)
+ QMinimalEglContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display)
+ : QEGLPlatformContext(format, share, display)
{
}
diff --git a/src/plugins/platforms/qnx/qqnxtheme.cpp b/src/plugins/platforms/qnx/qblackberrytheme.cpp
index 37c1079441..a0f334d909 100644
--- a/src/plugins/platforms/qnx/qqnxtheme.cpp
+++ b/src/plugins/platforms/qnx/qblackberrytheme.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qqnxtheme.h"
+#include "qblackberrytheme.h"
#include "qqnxfiledialoghelper.h"
#include "qqnxsystemsettings.h"
@@ -47,16 +47,33 @@
QT_BEGIN_NAMESPACE
-QQnxTheme::QQnxTheme(const QQnxIntegration *integration) : m_integration(integration)
+QBlackberryTheme::QBlackberryTheme(const QQnxIntegration *integration) : m_integration(integration)
{
+ // Set the dark theme as default palette
+ QColor color = QColor(211, 211, 211);
+ m_defaultPalette.setBrush(QPalette::ButtonText, color);
+ m_defaultPalette.setBrush(QPalette::WindowText, color);
+ m_defaultPalette.setBrush(QPalette::Text, color);
+
+ color.setAlpha(179);
+ m_defaultPalette.setBrush(QPalette::Disabled, QPalette::ButtonText, color);
+ m_defaultPalette.setBrush(QPalette::Disabled, QPalette::WindowText, color);
+ m_defaultPalette.setBrush(QPalette::Disabled, QPalette::Text, color);
+
+ m_defaultPalette.setColor(QPalette::Window, QColor(18, 18, 18));
+ m_defaultPalette.setColor(QPalette::Base, QColor(18, 18, 18));
+ m_defaultPalette.setColor(QPalette::AlternateBase, QColor(50, 50, 50));
+
+ m_defaultPalette.setBrush(QPalette::Highlight, QColor(0, 168, 223));
+ m_defaultPalette.setBrush(QPalette::HighlightedText, QColor(250, 250,250));
}
-QQnxTheme::~QQnxTheme()
+QBlackberryTheme::~QBlackberryTheme()
{
qDeleteAll(m_fonts);
}
-bool QQnxTheme::usePlatformNativeDialog(DialogType type) const
+bool QBlackberryTheme::usePlatformNativeDialog(DialogType type) const
{
if (type == QPlatformTheme::FileDialog)
return true;
@@ -71,7 +88,7 @@ bool QQnxTheme::usePlatformNativeDialog(DialogType type) const
return false;
}
-QPlatformDialogHelper *QQnxTheme::createPlatformDialogHelper(DialogType type) const
+QPlatformDialogHelper *QBlackberryTheme::createPlatformDialogHelper(DialogType type) const
{
switch (type) {
case QPlatformTheme::FileDialog:
@@ -87,7 +104,7 @@ QPlatformDialogHelper *QQnxTheme::createPlatformDialogHelper(DialogType type) co
}
}
-const QFont *QQnxTheme::font(Font type) const
+const QFont *QBlackberryTheme::font(Font type) const
{
QPlatformFontDatabase *fontDatabase = m_integration->fontDatabase();
@@ -96,4 +113,13 @@ const QFont *QQnxTheme::font(Font type) const
return m_fonts.value(type, 0);
}
+const QPalette *QBlackberryTheme::palette(Palette type) const
+{
+ // Return the default palette
+ if (type == SystemPalette)
+ return &m_defaultPalette;
+
+ return QPlatformTheme::palette(type);
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qnx/qqnxtheme.h b/src/plugins/platforms/qnx/qblackberrytheme.h
index 17b2eab142..29fa0b8f61 100644
--- a/src/plugins/platforms/qnx/qqnxtheme.h
+++ b/src/plugins/platforms/qnx/qblackberrytheme.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QQNXTHEME_H
-#define QQNXTHEME_H
+#ifndef QBLACKBERRYTHEME_H
+#define QBLACKBERRYTHEME_H
#include <qpa/qplatformtheme.h>
@@ -49,15 +49,17 @@
#include <QtCore/qhash.h>
#include <QtCore/qstring.h>
+#include <QtGui/QPalette>
+
QT_BEGIN_NAMESPACE
class QQnxIntegration;
-class QQnxTheme : public QPlatformTheme
+class QBlackberryTheme : public QPlatformTheme
{
public:
- explicit QQnxTheme(const QQnxIntegration *);
- ~QQnxTheme();
+ explicit QBlackberryTheme(const QQnxIntegration *);
+ ~QBlackberryTheme();
static QString name() { return QStringLiteral("blackberry"); }
@@ -66,11 +68,14 @@ public:
const QFont *font(Font type = SystemFont) const;
+ const QPalette *palette(Palette type = SystemPalette) const;
+
private:
mutable QHash<QPlatformTheme::Font, QFont*> m_fonts;
const QQnxIntegration *m_integration;
+ QPalette m_defaultPalette;
};
QT_END_NAMESPACE
-#endif // QQNXTHEME_H
+#endif // QBLACKBERRYTHEME_H
diff --git a/src/plugins/platforms/qnx/qnx.pro b/src/plugins/platforms/qnx/qnx.pro
index 2399a91c12..04c6087cd1 100644
--- a/src/plugins/platforms/qnx/qnx.pro
+++ b/src/plugins/platforms/qnx/qnx.pro
@@ -91,14 +91,14 @@ CONFIG(blackberry) {
qqnxeventdispatcher_blackberry.cpp \
qqnxbpseventfilter.cpp \
qqnxvirtualkeyboardbps.cpp \
- qqnxtheme.cpp \
+ qblackberrytheme.cpp \
qqnxsystemsettings.cpp
HEADERS += qqnxnavigatorbps.h \
qqnxeventdispatcher_blackberry.h \
qqnxbpseventfilter.h \
qqnxvirtualkeyboardbps.h \
- qqnxtheme.h \
+ qblackberrytheme.h \
qqnxsystemsettings.h \
qqnxfiledialoghelper.h
diff --git a/src/plugins/platforms/qnx/qqnxfilepicker.cpp b/src/plugins/platforms/qnx/qqnxfilepicker.cpp
index 56c804a5b4..830b110f2a 100644
--- a/src/plugins/platforms/qnx/qqnxfilepicker.cpp
+++ b/src/plugins/platforms/qnx/qqnxfilepicker.cpp
@@ -48,7 +48,9 @@
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonParseError>
+#include <QMimeDatabase>
#include <QUrl>
+#include <private/qppsobject_p.h>
#include <bps/navigator.h>
#include <bps/navigator_invoke.h>
@@ -118,7 +120,7 @@ void QQnxFilePicker::open()
}
QVariantMap map;
- map[QStringLiteral("Type")] = QStringLiteral("Other");
+ map[QStringLiteral("Type")] = filePickerType();
map[QStringLiteral("Mode")] = modeToString(m_mode);
map[QStringLiteral("Title")] = m_title;
map[QStringLiteral("ViewMode")] = QStringLiteral("Default");
@@ -132,11 +134,16 @@ void QQnxFilePicker::open()
if (!m_filters.isEmpty())
map[QStringLiteral("Filter")] = m_filters.join(";");
+ QByteArray ppsData;
+#if defined(Q_OS_BLACKBERRY_TABLET)
QJsonDocument document;
document.setObject(QJsonObject::fromVariantMap(map));
- const QByteArray jsonData = document.toJson(QJsonDocument::Compact);
+ ppsData = document.toJson(QJsonDocument::Compact);
+#else
+ ppsData = QPpsObject::encode(map);
+#endif
- errorCode = navigator_invoke_invocation_set_data(m_invocationHandle, jsonData.constData(), jsonData.size());
+ errorCode = navigator_invoke_invocation_set_data(m_invocationHandle, ppsData.constData(), ppsData.size());
if (errorCode != BPS_SUCCESS) {
cleanup();
qWarning() << "QQnxFilePicker: unable to set data:" << strerror(errno);
@@ -275,6 +282,39 @@ void QQnxFilePicker::handleFilePickerResponse(const char *data)
cleanup();
}
+QString QQnxFilePicker::filePickerType() const
+{
+ bool images = false;
+ bool video = false;
+ bool music = false;
+ QMimeDatabase mimeDb;
+ for (int i = 0; i < filters().count(); i++) {
+ QList<QMimeType> mimeTypes = mimeDb.mimeTypesForFileName(filters().at(i));
+ if (mimeTypes.isEmpty())
+ return QStringLiteral("Other");
+
+ if (mimeTypes.first().name().startsWith(QLatin1String("image")))
+ images = true;
+ else if (mimeTypes.first().name().startsWith(QLatin1String("audio")))
+ music = true;
+ else if (mimeTypes.first().name().startsWith(QLatin1String("video")))
+ video = true;
+ else
+ return QStringLiteral("Other");
+ }
+
+ if (!video && !music)
+ return QStringLiteral("Picture");
+
+ if (!images && !music)
+ return QStringLiteral("Video");
+
+ if (!images && !video)
+ return QStringLiteral("Music");
+
+ return QStringLiteral("Other");
+}
+
QString QQnxFilePicker::modeToString(QQnxFilePicker::Mode mode) const
{
switch (mode) {
diff --git a/src/plugins/platforms/qnx/qqnxfilepicker.h b/src/plugins/platforms/qnx/qqnxfilepicker.h
index 5bb8f0969f..e8272900b0 100644
--- a/src/plugins/platforms/qnx/qqnxfilepicker.h
+++ b/src/plugins/platforms/qnx/qqnxfilepicker.h
@@ -92,6 +92,7 @@ public Q_SLOTS:
private:
void cleanup();
void handleFilePickerResponse(const char *data);
+ QString filePickerType() const;
QString modeToString(Mode mode) const;
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp
index 3a365be408..23db7f09f3 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.cpp
+++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp
@@ -124,15 +124,11 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext)
if (m_eglConfig == 0)
qFatal("QQnxGLContext: failed to find EGL config");
- EGLContext shareContext = EGL_NO_CONTEXT;
- if (m_glContext) {
- QQnxGLContext *qshareContext = dynamic_cast<QQnxGLContext*>(m_glContext->shareHandle());
- if (qshareContext) {
- shareContext = qshareContext->m_eglContext;
- }
- }
+ QQnxGLContext *glShareContext = static_cast<QQnxGLContext*>(m_glContext->shareHandle());
+ m_eglShareContext = glShareContext ? glShareContext->m_eglContext : EGL_NO_CONTEXT;
- m_eglContext = eglCreateContext(ms_eglDisplay, m_eglConfig, shareContext, contextAttrs(format));
+ m_eglContext = eglCreateContext(ms_eglDisplay, m_eglConfig, m_eglShareContext,
+ contextAttrs(format));
if (m_eglContext == EGL_NO_CONTEXT) {
checkEGLError("eglCreateContext");
qFatal("QQnxGLContext: failed to create EGL context, err=%d", eglGetError());
@@ -271,6 +267,11 @@ QFunctionPointer QQnxGLContext::getProcAddress(const QByteArray &procName)
return static_cast<QFunctionPointer>(eglGetProcAddress(procName.constData()));
}
+bool QQnxGLContext::isSharing() const
+{
+ return m_eglShareContext != EGL_NO_CONTEXT;
+}
+
EGLDisplay QQnxGLContext::getEglDisplay() {
return ms_eglDisplay;
}
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.h b/src/plugins/platforms/qnx/qqnxglcontext.h
index af89586bd5..d12de7342b 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.h
+++ b/src/plugins/platforms/qnx/qqnxglcontext.h
@@ -72,6 +72,7 @@ public:
QFunctionPointer getProcAddress(const QByteArray &procName);
virtual QSurfaceFormat format() const { return m_windowFormat; }
+ bool isSharing() const;
static EGLDisplay getEglDisplay();
EGLConfig getEglConfig() const { return m_eglConfig;}
@@ -86,6 +87,7 @@ private:
EGLConfig m_eglConfig;
EGLContext m_eglContext;
+ EGLContext m_eglShareContext;
EGLSurface m_currentEglSurface;
static EGLint *contextAttrs(const QSurfaceFormat &format);
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index dd32116360..41ca2b5e18 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -63,7 +63,7 @@
#if defined(Q_OS_BLACKBERRY)
#include "qqnxbpseventfilter.h"
#include "qqnxnavigatorbps.h"
-#include "qqnxtheme.h"
+#include "qblackberrytheme.h"
#include "qqnxvirtualkeyboardbps.h"
#elif defined(QQNX_PPS)
#include "qqnxnavigatorpps.h"
@@ -462,15 +462,15 @@ QPlatformServices * QQnxIntegration::services() const
#if defined(Q_OS_BLACKBERRY)
QStringList QQnxIntegration::themeNames() const
{
- return QStringList(QQnxTheme::name());
+ return QStringList(QBlackberryTheme::name());
}
QPlatformTheme *QQnxIntegration::createPlatformTheme(const QString &name) const
{
qIntegrationDebug() << Q_FUNC_INFO << "name =" << name;
- if (name == QQnxTheme::name())
- return new QQnxTheme(this);
- return QPlatformIntegration::createPlatformTheme(name);
+ if (name == QBlackberryTheme::name())
+ return new QBlackberryTheme(this);
+ return 0;
}
#endif
diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
index b89c103a06..a245a0c43a 100644
--- a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
+++ b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
@@ -109,7 +109,7 @@ void QQnxNativeInterface::setWindowProperty(QPlatformWindow *window, const QStri
if (name == QStringLiteral("mmRendererWindowName")) {
qnxWindow->setMMRendererWindowName(value.toString());
- } else if (name == QStringLiteral("windowGroup")) {
+ } else if (name == QStringLiteral("qnxWindowGroup")) {
if (value.isNull())
qnxWindow->joinWindowGroup(QByteArray());
else if (value.canConvert<QByteArray>())
@@ -124,6 +124,8 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QQnxNativeInterfa
return reinterpret_cast<NativeResourceForIntegrationFunction>(QQnxInputContext::setHighlightColor);
if (resource == "blackberryIMFCheckSpelling")
return reinterpret_cast<NativeResourceForIntegrationFunction>(QQnxInputContext::checkSpelling);
+#else
+ Q_UNUSED(resource)
#endif
return 0;
}
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index f2b57aec9a..9ae2d01ab4 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -73,6 +73,88 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class QQnxWindow
+ \brief The QQnxWindow is the base class of the various classes used as instances of
+ QPlatformWindow in the QNX QPA plugin.
+
+ The standard properties and methods available in Qt are not a perfect match for the
+ features provided by the QNX screen service. While for the majority of applications
+ the default behavior suffices, some circumstances require greater control over the
+ interaction with screen.
+
+ \section1 Window types
+
+ The QNX QPA plugin can operate in two modes, with or without a root window. The
+ selection of mode is made via the \e rootwindow and \e no-rootwindow options to the
+ plugin. The default mode is rootwindow for BlackBerry builds and no-rootwindow for
+ non-BlackBerry builds.
+
+ Windows with parents are always created as child windows, the difference in the modes
+ is in the treatment of parentless windows. In no-rootwindow mode, these windows are
+ created as application windows while in rootwindow mode, the first window on a screen
+ is created as an application window while subsequent windows are created as child
+ windows. The only exception to this is any window of type Qt::Desktop or Qt::CoverWindow;
+ these are created as application windows, but will never become the root window,
+ even if they are the first window created.
+
+ It is also possible to create a parentless child window. These may be useful to
+ create windows that are parented by windows from other processes. To do this, you
+ attach a dynamic property \e qnxInitialWindowGroup to the QWindow though this must be done
+ prior to the platform window class (this class) being created which typically happens
+ when the window is made visible. When the window is created in QML, it is acceptable
+ to have the \e visible property hardcoded to true so long as the qnxInitialWindowGroup
+ is also set.
+
+ \section1 Joining Window Groups
+
+ Window groups may be joined in a number of ways, some are automatic based on
+ predefined rules though an application is also able to provide explicit control.
+
+ A QWindow that has a parent will join its parent's window group. When rootwindow mode
+ is in effect, all but the first parentless window on a screen will be child windows
+ and join the window group of the first parentless window, the root window.
+
+ If a QWindow has a valid dynamic property called \e qnxInitialWindowGroup at the time the
+ QQnxWindow is created, the window will be created as a child window and, if the
+ qnxInitialWindowGroup property is a non-empty string, an attempt will be made to join that
+ window group. This has an effect only when the QQnxWindow is created, subsequent
+ changes to this property are ignored. Setting the property to an empty string
+ provides a means to create 'top level' child windows without automatically joining
+ any group. Typically when this property is used \e qnxWindowId should be used as well
+ so that the process that owns the window group being joined has some means to
+ identify the window.
+
+ At any point following the creation of the QQnxWindow object, an application can
+ change the window group it has joined. This is done by using the \e
+ setWindowProperty function of the native interface to set the \e qnxWindowGroup property
+ to the desired value, for example:
+
+ \code
+ QQuickView *view = new QQuickView(parent);
+ view->create();
+ QGuiApplication::platformNativeInterface()->setWindowProperty(view->handle(), "qnxWindowGroup",
+ group);
+ \endcode
+
+ To leave the current window group, one passes a null value for the property value,
+ for example:
+
+ \code
+ QQuickView *view = new QQuickView(parent);
+ view->create();
+ QGuiApplication::platformNativeInterface()->setWindowProperty(view->handle(), "qnxWindowGroup",
+ QVariant());
+ \endcode
+
+ \section1 Window Id
+
+ The screen window id string property can be set on a window by assigning the desired
+ value to a dynamic property \e qnxWindowId on the QWindow prior to the QQnxWindow having
+ been created. This is often wanted when one joins a window group belonging to a
+ different process.
+
+*/
QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootWindow)
: QPlatformWindow(window),
m_screenContext(context),
@@ -88,12 +170,16 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
QQnxScreen *platformScreen = static_cast<QQnxScreen *>(window->screen()->handle());
+ // If a qnxInitialWindowGroup property is set on the window we'll take this as an
+ // indication that we want to create a child window and join that window group.
+ const QVariant windowGroup = window->property("qnxInitialWindowGroup");
+
if (window->type() == Qt::CoverWindow || window->type() == Qt::Desktop) {
// Cover windows have to be top level to be accessible to window delegate (i.e. navigator)
// Desktop windows also need to be toplevel because they are not
// supposed to be part of the window hierarchy tree
m_isTopLevel = true;
- } else if (parent() || (window->type() & Qt::Dialog) == Qt::Dialog) {
+ } else if (parent() || windowGroup.isValid()) {
// If we have a parent we are a child window. Sometimes we have to be a child even if we
// don't have a parent e.g. our parent might be in a different process.
m_isTopLevel = false;
@@ -117,6 +203,21 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
}
createWindowGroup();
+
+ // If the window has a qnxWindowId property, set this as the string id property. This generally
+ // needs to be done prior to joining any group as it might be used by the owner of the
+ // group to identify the window.
+ const QVariant windowId = window->property("qnxWindowId");
+ if (windowId.isValid() && windowId.canConvert<QByteArray>()) {
+ QByteArray id = windowId.toByteArray();
+ Q_SCREEN_CHECKERROR(screen_set_window_property_cv(m_window, SCREEN_PROPERTY_ID_STRING,
+ id.size(), id), "Failed to set id");
+ }
+
+ // If a window group has been provided join it now. If it's an empty string that's OK too,
+ // it'll cause us not to join a group (the app will presumably join at some future time).
+ if (windowGroup.isValid() && windowGroup.canConvert<QByteArray>())
+ joinWindowGroup(windowGroup.toByteArray());
}
QQnxWindow::~QQnxWindow()
diff --git a/src/plugins/platforms/windows/qwindows.qdocconf b/src/plugins/platforms/windows/qwindows.qdocconf
deleted file mode 100644
index 1684773b87..0000000000
--- a/src/plugins/platforms/windows/qwindows.qdocconf
+++ /dev/null
@@ -1,25 +0,0 @@
-project = "Qt Windows Lighthouse Plugin"
-description = "Documentation of the Qt Windows Lighthouse Plugin"
-
-language = Cpp
-
-headerdirs = .
-
-sourcedirs = .
-
-showinternal = true
-
-headers.fileextensions = "*.h"
-sources.fileextensions = "*.cpp *.qdoc"
-
-qhp.projects = QtLighthouseWindows
-qhp.QtLighthouseWindowsDev.file = qtlighthousewindows-dev.qhp
-qhp.QtLighthouseWindowsDev.namespace = com.nokia.qt.developer.lighthouse
-qhp.QtLighthouseWindowsDev.virtualFolder = doc
-qhp.QtLighthouseWindowsDev.indexTitle = Qt Windows Lighthouse Plugin
-qhp.QtLighthouseWindowsDev.indexRoot =
-
-# Doxygen compatibility commands
-
-macro.see = "\\sa"
-macro.function = "\\fn"
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
index f12c828d8a..1abf447709 100644
--- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp
+++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
@@ -203,4 +203,17 @@ HDC QWindowsBackingStore::getDC() const
return 0;
}
+#ifndef QT_NO_OPENGL
+
+QImage QWindowsBackingStore::toImage() const
+{
+ if (m_image.isNull()) {
+ qCWarning(lcQpaBackingStore) <<__FUNCTION__ << "Image is null.";
+ return QImage();
+ }
+ return m_image.data()->image();
+}
+
+#endif // !QT_NO_OPENGL
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.h b/src/plugins/platforms/windows/qwindowsbackingstore.h
index b655aca835..758f6c941f 100644
--- a/src/plugins/platforms/windows/qwindowsbackingstore.h
+++ b/src/plugins/platforms/windows/qwindowsbackingstore.h
@@ -67,6 +67,10 @@ public:
HDC getDC() const;
+#ifndef QT_NO_OPENGL
+ QImage toImage() const Q_DECL_OVERRIDE;
+#endif
+
private:
QScopedPointer<QWindowsNativeImage> m_image;
};
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index c35af3623a..a74a7efb41 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -979,8 +979,10 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
#if !defined(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER)
case QtWindows::QueryEndSessionApplicationEvent: {
QWindowsSessionManager *sessionManager = platformSessionManager();
- if (sessionManager->isActive()) // bogus message from windows
+ if (sessionManager->isActive()) { // bogus message from windows
+ *result = sessionManager->wasCanceled() ? 0 : 1;
return true;
+ }
sessionManager->setActive(true);
sessionManager->blocksInteraction();
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
index e025d7e513..d5ca06bb3f 100644
--- a/src/plugins/platforms/windows/qwindowseglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
@@ -124,7 +124,7 @@ QWindowsEGLStaticContext::~QWindowsEGLStaticContext()
QWindowsEGLContext::QWindowsEGLContext(const QWindowsEGLStaticContextPtr &staticContext,
const QSurfaceFormat &format,
QPlatformOpenGLContext *share)
- : QEGLPlatformContext(format, share, staticContext->display(), EGL_OPENGL_ES_API)
+ : QEGLPlatformContext(format, share, staticContext->display())
, m_staticContext(staticContext)
{
}
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index 854444b254..8f9ddc2168 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -1038,11 +1038,17 @@ QWindowsFontDatabase::~QWindowsFontDatabase()
removeApplicationFonts();
}
+QFontEngineMulti *QWindowsFontDatabase::fontEngineMulti(QFontEngine *fontEngine, QChar::Script script)
+{
+ Q_UNUSED(script)
+ return new QWindowsMultiFontEngine(fontEngine, QStringList());
+}
+
QFontEngine * QWindowsFontDatabase::fontEngine(const QFontDef &fontDef, void *handle)
{
- QFontEngine *fe = QWindowsFontDatabase::createEngine(QChar::Script_Common, fontDef,
- 0, QWindowsContext::instance()->defaultDPI(), false,
- QStringList(), sharedFontData());
+ QFontEngine *fe = QWindowsFontDatabase::createEngine(fontDef, 0,
+ QWindowsContext::instance()->defaultDPI(),
+ false, sharedFontData());
qCDebug(lcQpaFonts) << __FUNCTION__ << "FONTDEF" << fontDef << fe << handle;
return fe;
}
@@ -1087,12 +1093,12 @@ QFontEngine *QWindowsFontDatabase::fontEngine(const QByteArray &fontData, qreal
QFontDef request;
request.family = uniqueFamilyName;
request.pixelSize = pixelSize;
- request.styleStrategy = QFont::NoFontMerging | QFont::PreferMatch;
+ request.styleStrategy = QFont::PreferMatch;
request.hintingPreference = hintingPreference;
- fontEngine = QWindowsFontDatabase::createEngine(QChar::Script_Common, request, 0,
- QWindowsContext::instance()->defaultDPI(), false, QStringList(),
- sharedFontData());
+ fontEngine = QWindowsFontDatabase::createEngine(request, 0,
+ QWindowsContext::instance()->defaultDPI(),
+ false, sharedFontData());
if (fontEngine) {
if (request.family != fontEngine->fontDef.family) {
@@ -1623,9 +1629,8 @@ QStringList QWindowsFontDatabase::fallbacksForFamily(const QString &family, QFon
}
-QFontEngine *QWindowsFontDatabase::createEngine(int script, const QFontDef &request,
+QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request,
HDC fontHdc, int dpi, bool rawMode,
- const QStringList &family_list,
const QSharedPointer<QWindowsFontEngineData> &data)
{
LOGFONT lf;
@@ -1769,17 +1774,6 @@ QFontEngine *QWindowsFontDatabase::createEngine(int script, const QFontDef &requ
directWriteFont->Release();
#endif
- if ((script == QChar::Script_Common || script == QChar::Script_Han)
- && !(request.styleStrategy & QFont::NoFontMerging)) {
- const QStringList extraFonts = QWindowsFontDatabase::extraTryFontsForFamily(request.family);
- if (extraFonts.size()) {
- QStringList list = family_list;
- list.append(extraFonts);
- QFontEngine *mfe = new QWindowsMultiFontEngine(fe, list);
- mfe->fontDef = fe->fontDef;
- fe = mfe;
- }
- }
return fe;
}
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.h b/src/plugins/platforms/windows/qwindowsfontdatabase.h
index 1e13fc2559..a2324544d2 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.h
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.h
@@ -78,6 +78,7 @@ public:
~QWindowsFontDatabase();
virtual void populateFontDatabase();
+ virtual QFontEngineMulti *fontEngineMulti(QFontEngine *fontEngine, QChar::Script script);
virtual QFontEngine *fontEngine(const QFontDef &fontDef, void *handle);
virtual QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference);
virtual QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const;
@@ -92,9 +93,8 @@ public:
static QFont systemDefaultFont();
- static QFontEngine *createEngine(int script, const QFontDef &request,
+ static QFontEngine *createEngine(const QFontDef &request,
HDC fontHdc, int dpi, bool rawMode,
- const QStringList &family_list,
const QSharedPointer<QWindowsFontEngineData> &data);
static HFONT systemFont();
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index 86fcb666b0..c3774064e3 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -65,6 +65,7 @@
#include <QtCore/qmath.h>
#include <QtCore/QThreadStorage>
#include <QtCore/private/qsystemlibrary_p.h>
+#include <QtCore/private/qstringiterator_p.h>
#include <QtCore/QDebug>
@@ -205,47 +206,37 @@ void QWindowsFontEngine::getCMap()
}
}
-// ### Qt 5.1: replace with QStringIterator
-inline unsigned int getChar(const QChar *str, int &i, const int len)
-{
- uint uc = str[i].unicode();
- if (QChar::isHighSurrogate(uc) && i < len-1) {
- uint low = str[i+1].unicode();
- if (QChar::isLowSurrogate(low)) {
- uc = QChar::surrogateToUcs4(uc, low);
- ++i;
- }
- }
- return uc;
-}
-
int QWindowsFontEngine::getGlyphIndexes(const QChar *str, int numChars, QGlyphLayout *glyphs) const
{
- int i = 0;
int glyph_pos = 0;
{
#if defined(Q_OS_WINCE)
{
#else
if (symbol) {
- for (; i < numChars; ++i, ++glyph_pos) {
- unsigned int uc = getChar(str, i, numChars);
+ QStringIterator it(str, str + numChars);
+ while (it.hasNext()) {
+ const uint uc = it.next();
glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc);
if(!glyphs->glyphs[glyph_pos] && uc < 0x100)
glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc + 0xf000);
+ ++glyph_pos;
}
} else if (ttf) {
- for (; i < numChars; ++i, ++glyph_pos) {
- unsigned int uc = getChar(str, i, numChars);
+ QStringIterator it(str, str + numChars);
+ while (it.hasNext()) {
+ const uint uc = it.next();
glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc);
+ ++glyph_pos;
}
} else {
#endif
wchar_t first = tm.tmFirstChar;
wchar_t last = tm.tmLastChar;
- for (; i < numChars; ++i, ++glyph_pos) {
- uint uc = getChar(str, i, numChars);
+ QStringIterator it(str, str + numChars);
+ while (it.hasNext()) {
+ const uint uc = it.next();
if (
#ifdef Q_WS_WINCE
tm.tmFirstChar > 60000 ||
@@ -254,6 +245,7 @@ int QWindowsFontEngine::getGlyphIndexes(const QChar *str, int numChars, QGlyphLa
glyphs->glyphs[glyph_pos] = uc;
else
glyphs->glyphs[glyph_pos] = 0;
+ ++glyph_pos;
}
}
}
@@ -272,7 +264,8 @@ int QWindowsFontEngine::getGlyphIndexes(const QChar *str, int numChars, QGlyphLa
QWindowsFontEngine::QWindowsFontEngine(const QString &name,
HFONT _hfont, bool stockFontIn, LOGFONT lf,
- const QSharedPointer<QWindowsFontEngineData> &fontEngineData) :
+ const QSharedPointer<QWindowsFontEngineData> &fontEngineData)
+ : QFontEngine(Win),
m_fontEngineData(fontEngineData),
_name(name),
hfont(_hfont),
@@ -340,6 +333,30 @@ QWindowsFontEngine::~QWindowsFontEngine()
}
}
+glyph_t QWindowsFontEngine::glyphIndex(uint ucs4) const
+{
+ glyph_t glyph;
+
+#if !defined(Q_OS_WINCE)
+ if (symbol) {
+ glyph = getTrueTypeGlyphIndex(cmap, ucs4);
+ if (glyph == 0 && ucs4 < 0x100)
+ glyph = getTrueTypeGlyphIndex(cmap, ucs4 + 0xf000);
+ } else if (ttf) {
+ glyph = getTrueTypeGlyphIndex(cmap, ucs4);
+#else
+ if (tm.tmFirstChar > 60000) {
+ glyph = ucs4;
+#endif
+ } else if (ucs4 >= tm.tmFirstChar && ucs4 <= tm.tmLastChar) {
+ glyph = ucs4;
+ } else {
+ glyph = 0;
+ }
+
+ return glyph;
+}
+
HGDIOBJ QWindowsFontEngine::selectDesignFont() const
{
LOGFONT f = m_logfont;
@@ -351,6 +368,7 @@ HGDIOBJ QWindowsFontEngine::selectDesignFont() const
bool QWindowsFontEngine::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QFontEngine::ShaperFlags flags) const
{
+ Q_ASSERT(glyphs->numGlyphs >= *nglyphs);
if (*nglyphs < len) {
*nglyphs = len;
return false;
@@ -746,46 +764,6 @@ qreal QWindowsFontEngine::minRightBearing() const
#endif // Q_OS_WINCE
}
-
-const char *QWindowsFontEngine::name() const
-{
- return 0;
-}
-
-bool QWindowsFontEngine::canRender(const QChar *string, int len)
-{
- if (symbol) {
- for (int i = 0; i < len; ++i) {
- unsigned int uc = getChar(string, i, len);
- if (getTrueTypeGlyphIndex(cmap, uc) == 0) {
- if (uc < 0x100) {
- if (getTrueTypeGlyphIndex(cmap, uc + 0xf000) == 0)
- return false;
- } else {
- return false;
- }
- }
- }
- } else if (ttf) {
- for (int i = 0; i < len; ++i) {
- unsigned int uc = getChar(string, i, len);
- if (getTrueTypeGlyphIndex(cmap, uc) == 0)
- return false;
- }
- } else {
- while(len--) {
- if (tm.tmFirstChar > string->unicode() || tm.tmLastChar < string->unicode())
- return false;
- }
- }
- return true;
-}
-
-QFontEngine::Type QWindowsFontEngine::type() const
-{
- return QFontEngine::Win;
-}
-
static inline double qt_fixed_to_double(const FIXED &p) {
return ((p.value << 16) + p.fract) / 65536.0;
}
@@ -1032,6 +1010,7 @@ bool QWindowsFontEngine::getSfntTableData(uint tag, uchar *buffer, uint *length)
SelectObject(hdc, hfont);
DWORD t = qbswap<quint32>(tag);
*length = GetFontData(hdc, t, 0, buffer, *length);
+ Q_ASSERT(*length == GDI_ERROR || int(*length) > 0);
return *length != GDI_ERROR;
}
@@ -1254,15 +1233,11 @@ QFontEngine *QWindowsFontEngine::cloneWithSize(qreal pixelSize) const
if (!uniqueFamilyName.isEmpty())
request.family = uniqueFamilyName;
request.pixelSize = pixelSize;
- // Disable font merging, as otherwise createEngine will return a multi-engine
- // instance instead of the specific engine we wish to clone.
- request.styleStrategy |= QFont::NoFontMerging;
QFontEngine *fontEngine =
- QWindowsFontDatabase::createEngine(QChar::Script_Common, request, 0,
+ QWindowsFontDatabase::createEngine(request, 0,
QWindowsContext::instance()->defaultDPI(),
- false,
- QStringList(), m_fontEngineData);
+ false, m_fontEngineData);
if (fontEngine) {
fontEngine->fontDef.family = actualFontName;
if (!uniqueFamilyName.isEmpty()) {
@@ -1305,19 +1280,29 @@ void QWindowsFontEngine::initFontInfo(const QFontDef &request,
*/
QWindowsMultiFontEngine::QWindowsMultiFontEngine(QFontEngine *first, const QStringList &fallbacks)
- : QFontEngineMulti(fallbacks.size()+1),
- fallbacks(fallbacks)
+ : QFontEngineMulti(fallbacks.size() + 1),
+ fallbackFamilies(fallbacks)
{
- qCDebug(lcQpaFonts) << __FUNCTION__ << engines.size() << first << first->fontDef.family << fallbacks;
engines[0] = first;
first->ref.ref();
fontDef = engines[0]->fontDef;
cache_cost = first->cache_cost;
}
-QWindowsMultiFontEngine::~QWindowsMultiFontEngine()
+void QWindowsMultiFontEngine::setFallbackFamiliesList(const QStringList &fallbacks)
{
- qCDebug(lcQpaFonts) << __FUNCTION__;
+ // Original FontEngine to restore after the fill.
+ QFontEngine *fe = engines[0];
+ fallbackFamilies = fallbacks;
+ if (!fallbackFamilies.isEmpty()) {
+ engines.fill(0, fallbackFamilies.size() + 1);
+ engines[0] = fe;
+ } else {
+ // Turns out we lied about having any fallback at all.
+ fallbackFamilies << fe->fontDef.family;
+ engines[1] = fe;
+ fe->ref.ref();
+ }
}
void QWindowsMultiFontEngine::loadEngine(int at)
@@ -1344,7 +1329,7 @@ void QWindowsMultiFontEngine::loadEngine(int at)
data = fe->fontEngineData();
}
- const QString fam = fallbacks.at(at-1);
+ const QString fam = fallbackFamilies.at(at-1);
memcpy(lf.lfFaceName, fam.utf16(), sizeof(wchar_t) * qMin(fam.length() + 1, 32)); // 32 = Windows hard-coded
#ifndef QT_NO_DIRECTWRITE
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.h b/src/plugins/platforms/windows/qwindowsfontengine.h
index e3fb3281a3..7d93484220 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.h
+++ b/src/plugins/platforms/windows/qwindowsfontengine.h
@@ -86,6 +86,7 @@ public:
virtual int synthesized() const;
virtual QFixed emSquareSize() const;
+ virtual glyph_t glyphIndex(uint ucs4) const;
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
virtual void recalcAdvances(QGlyphLayout *glyphs, ShaperFlags) const;
@@ -109,12 +110,6 @@ public:
virtual qreal minLeftBearing() const;
virtual qreal minRightBearing() const;
- virtual const char *name() const;
-
- bool canRender(const QChar *string, int len);
-
- Type type() const;
-
virtual QImage alphaMapForGlyph(glyph_t t) { return alphaMapForGlyph(t, QTransform()); }
virtual QImage alphaMapForGlyph(glyph_t, const QTransform &xform);
virtual QImage alphaRGBMapForGlyph(glyph_t t, QFixed subPixelPosition, const QTransform &xform);
@@ -175,10 +170,11 @@ class QWindowsMultiFontEngine : public QFontEngineMulti
{
public:
QWindowsMultiFontEngine(QFontEngine *first, const QStringList &fallbacks);
- virtual ~QWindowsMultiFontEngine();
+
+ void setFallbackFamiliesList(const QStringList &fallbacks);
void loadEngine(int at);
- QStringList fallbacks;
+ QStringList fallbackFamilies;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
index 1c5e4508ac..8f55e20536 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
@@ -53,6 +53,7 @@
#include <QtCore/QSettings>
#include <QtCore/QtEndian>
#include <QtCore/QVarLengthArray>
+#include <private/qstringiterator_p.h>
#include <dwrite.h>
#include <d2d1.h>
@@ -201,8 +202,8 @@ namespace {
QWindowsFontEngineDirectWrite::QWindowsFontEngineDirectWrite(IDWriteFontFace *directWriteFontFace,
qreal pixelSize,
const QSharedPointer<QWindowsFontEngineData> &d)
-
- : m_fontEngineData(d)
+ : QFontEngine(DirectWrite)
+ , m_fontEngineData(d)
, m_directWriteFontFace(directWriteFontFace)
, m_directWriteBitmapRenderTarget(0)
, m_lineThickness(-1)
@@ -282,8 +283,8 @@ bool QWindowsFontEngineDirectWrite::getSfntTableData(uint tag, uchar *buffer, ui
ret = true;
if (buffer && *length >= tableSize)
memcpy(buffer, tableData, tableSize);
- else
- *length = tableSize;
+ *length = tableSize;
+ Q_ASSERT(int(*length) > 0);
}
m_directWriteFontFace->ReleaseFontTable(tableContext);
} else {
@@ -301,23 +302,23 @@ QFixed QWindowsFontEngineDirectWrite::emSquareSize() const
return QFontEngine::emSquareSize();
}
-// ### Qt 5.1: replace with QStringIterator
-inline unsigned int getChar(const QChar *str, int &i, const int len)
+glyph_t QWindowsFontEngineDirectWrite::glyphIndex(uint ucs4) const
{
- uint uc = str[i].unicode();
- if (QChar::isHighSurrogate(uc) && i < len-1) {
- uint low = str[i+1].unicode();
- if (QChar::isLowSurrogate(low)) {
- uc = QChar::surrogateToUcs4(uc, low);
- ++i;
- }
+ UINT16 glyphIndex;
+
+ HRESULT hr = m_directWriteFontFace->GetGlyphIndicesW(&ucs4, 1, &glyphIndex);
+ if (FAILED(hr)) {
+ qErrnoWarning("%s: glyphIndex failed", __FUNCTION__);
+ glyphIndex = 0;
}
- return uc;
+
+ return glyphIndex;
}
bool QWindowsFontEngineDirectWrite::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs,
int *nglyphs, QFontEngine::ShaperFlags flags) const
{
+ Q_ASSERT(glyphs->numGlyphs >= *nglyphs);
if (*nglyphs < len) {
*nglyphs = len;
return false;
@@ -325,8 +326,9 @@ bool QWindowsFontEngineDirectWrite::stringToCMap(const QChar *str, int len, QGly
QVarLengthArray<UINT32> codePoints(len);
int actualLength = 0;
- for (int i = 0; i < len; ++i)
- codePoints[actualLength++] = getChar(str, i, len);
+ QStringIterator it(str, str + len);
+ while (it.hasNext())
+ codePoints[actualLength++] = it.next();
QVarLengthArray<UINT16> glyphIndices(actualLength);
HRESULT hr = m_directWriteFontFace->GetGlyphIndicesW(codePoints.data(), actualLength,
@@ -628,39 +630,6 @@ QImage QWindowsFontEngineDirectWrite::alphaRGBMapForGlyph(glyph_t t,
: mask.convertToFormat(QImage::Format_RGB32);
}
-const char *QWindowsFontEngineDirectWrite::name() const
-{
- return 0;
-}
-
-bool QWindowsFontEngineDirectWrite::canRender(const QChar *string, int len)
-{
- QVarLengthArray<UINT32> codePoints(len);
- int actualLength = 0;
- for (int i=0; i<len; ++i, actualLength++)
- codePoints[actualLength] = getChar(string, i, len);
-
- QVarLengthArray<UINT16> glyphIndices(actualLength);
- HRESULT hr = m_directWriteFontFace->GetGlyphIndices(codePoints.data(), actualLength,
- glyphIndices.data());
- if (FAILED(hr)) {
- qErrnoWarning("%s: GetGlyphIndices failed", __FUNCTION__);
- return false;
- }
-
- for (int i = 0; i < actualLength; ++i) {
- if (glyphIndices.at(i) == 0)
- return false;
- }
-
- return true;
-}
-
-QFontEngine::Type QWindowsFontEngineDirectWrite::type() const
-{
- return QFontEngine::DirectWrite;
-}
-
QFontEngine *QWindowsFontEngineDirectWrite::cloneWithSize(qreal pixelSize) const
{
QFontEngine *fontEngine = new QWindowsFontEngineDirectWrite(m_directWriteFontFace,
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h
index 399bb5f5ad..2da014ddc3 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h
@@ -74,6 +74,7 @@ public:
bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
QFixed emSquareSize() const;
+ virtual glyph_t glyphIndex(uint ucs4) const;
bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
void recalcAdvances(QGlyphLayout *glyphs, ShaperFlags) const;
@@ -89,8 +90,6 @@ public:
QFixed xHeight() const;
qreal maxCharWidth() const;
- const char *name() const;
-
bool supportsSubPixelPositions() const;
QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition);
@@ -98,9 +97,6 @@ public:
QFontEngine *cloneWithSize(qreal pixelSize) const;
- bool canRender(const QChar *string, int len);
- Type type() const;
-
const QSharedPointer<QWindowsFontEngineData> &fontEngineData() const { return m_fontEngineData; }
static QString fontNameSubstitute(const QString &familyName);
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 9bfe4e6e26..c45c34ae4d 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -1050,7 +1050,7 @@ bool QWindowsGLContext::makeCurrent(QPlatformSurface *surface)
qCDebug(lcQpaGl) << __FUNCTION__ << this << m_windowContexts.size() << "contexts";
#endif // DEBUG_GL
- Q_ASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface);
+ Q_ASSERT(surface->surface()->supportsOpenGL());
// Do we already have a DC entry for that window?
QWindowsWindow *window = static_cast<QWindowsWindow *>(surface);
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 3735865845..e0e8753e14 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -234,7 +234,8 @@ bool QWindowsIntegration::hasCapability(QPlatformIntegration::Capability cap) co
return true;
case ThreadedOpenGL:
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
- return QOpenGLFunctions::isES() ? QWindowsEGLContext::hasThreadedOpenGLCapability() : true;
+ return QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL
+ ? QWindowsEGLContext::hasThreadedOpenGLCapability() : true;
# else
return true;
# endif // QT_OPENGL_ES_2
@@ -245,6 +246,8 @@ bool QWindowsIntegration::hasCapability(QPlatformIntegration::Capability cap) co
return true;
case ForeignWindows:
return true;
+ case RasterGLSurface:
+ return true;
default:
return QPlatformIntegration::hasCapability(cap);
}
@@ -296,7 +299,7 @@ QPlatformOpenGLContext
{
qCDebug(lcQpaGl) << __FUNCTION__ << context->format();
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
- if (QOpenGLFunctions::isES()){
+ if (QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL) {
if (d->m_staticEGLContext.isNull()) {
QWindowsEGLStaticContext *staticContext = QWindowsEGLStaticContext::create();
if (!staticContext)
@@ -307,7 +310,7 @@ QPlatformOpenGLContext
}
#endif
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL) {
if (d->m_staticOpenGLContext.isNull())
d->m_staticOpenGLContext =
QSharedPointer<QOpenGLStaticContext>(QOpenGLStaticContext::create());
@@ -379,7 +382,7 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co
switch (hint) {
case QPlatformIntegration::CursorFlashTime:
if (const unsigned timeMS = GetCaretBlinkTime())
- return QVariant(int(timeMS));
+ return QVariant(int(timeMS) * 2);
break;
#ifdef SPI_GETKEYBOARDSPEED
case KeyboardAutoRepeatRate:
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
index fb1b63084f..7e15be1d19 100644
--- a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
+++ b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
@@ -69,13 +69,18 @@ void *QWindowsNativeInterface::nativeResourceForWindow(const QByteArray &resourc
QWindowsWindow *bw = static_cast<QWindowsWindow *>(window->handle());
if (resource == "handle")
return bw->handle();
- if (window->surfaceType() == QWindow::RasterSurface) {
+ switch (window->surfaceType()) {
+ case QWindow::RasterSurface:
+ case QWindow::RasterGLSurface:
if (resource == "getDC")
return bw->getDC();
if (resource == "releaseDC") {
bw->releaseDC();
return 0;
}
+ break;
+ case QWindow::OpenGLSurface:
+ break;
}
qWarning("%s: Invalid key '%s' requested.", __FUNCTION__, resource.constData());
return 0;
@@ -120,7 +125,7 @@ void *QWindowsNativeInterface::nativeResourceForContext(const QByteArray &resour
return 0;
}
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
- if (QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL) {
QWindowsEGLContext *windowsEglContext = static_cast<QWindowsEGLContext *>(context->handle());
if (resource == QByteArrayLiteral("eglDisplay"))
return windowsEglContext->eglDisplay();
@@ -131,7 +136,7 @@ void *QWindowsNativeInterface::nativeResourceForContext(const QByteArray &resour
}
#endif // QT_OPENGL_ES_2 || QT_OPENGL_DYNAMIC
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL) {
QWindowsGLContext *windowsContext = static_cast<QWindowsGLContext *>(context->handle());
if (resource == QByteArrayLiteral("renderingContext"))
return windowsContext->renderingContext();
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 223ac9ac2d..274366d4fe 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -886,7 +886,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data)
if (aWindow->surfaceType() == QWindow::OpenGLSurface) {
setFlag(OpenGLSurface);
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
- if (QOpenGLFunctions::isES())
+ if (QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL)
setFlag(OpenGL_ES2);
#endif
}
diff --git a/src/plugins/platforms/winrt/qwinrteglcontext.cpp b/src/plugins/platforms/winrt/qwinrteglcontext.cpp
index 014378f896..3a1958a20e 100644
--- a/src/plugins/platforms/winrt/qwinrteglcontext.cpp
+++ b/src/plugins/platforms/winrt/qwinrteglcontext.cpp
@@ -44,7 +44,7 @@
QT_BEGIN_NAMESPACE
QWinRTEGLContext::QWinRTEGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display, EGLSurface surface)
- : QEGLPlatformContext(format, share, display, EGL_OPENGL_ES_API), m_eglSurface(surface)
+ : QEGLPlatformContext(format, share, display), m_eglSurface(surface)
{
}
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index 5bbf73a945..2e38f81499 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -63,6 +63,9 @@
#include <windows.ui.viewmanagement.h>
#include <windows.graphics.display.h>
#include <windows.foundation.h>
+#ifdef Q_OS_WINPHONE
+#include <windows.phone.ui.input.h>
+#endif
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
@@ -75,6 +78,9 @@ using namespace ABI::Windows::UI::Input;
using namespace ABI::Windows::UI::ViewManagement;
using namespace ABI::Windows::Devices::Input;
using namespace ABI::Windows::Graphics::Display;
+#ifdef Q_OS_WINPHONE
+using namespace ABI::Windows::Phone::UI::Input;
+#endif
typedef IEventHandler<IInspectable*> ResumeHandler;
typedef IEventHandler<SuspendingEventArgs*> SuspendHandler;
@@ -87,6 +93,9 @@ typedef ITypedEventHandler<CoreWindow*, PointerEventArgs*> PointerHandler;
typedef ITypedEventHandler<CoreWindow*, WindowSizeChangedEventArgs*> SizeChangedHandler;
typedef ITypedEventHandler<CoreWindow*, VisibilityChangedEventArgs*> VisibilityChangedHandler;
typedef ITypedEventHandler<CoreWindow*, AutomationProviderRequestedEventArgs*> AutomationProviderRequestedHandler;
+#ifdef Q_OS_WINPHONE
+typedef IEventHandler<BackPressedEventArgs*> BackPressedHandler;
+#endif
QT_BEGIN_NAMESPACE
@@ -465,6 +474,11 @@ QWinRTScreen::QWinRTScreen(ICoreWindow *window)
m_coreWindow->add_PointerReleased(Callback<PointerHandler>(this, &QWinRTScreen::onPointerUpdated).Get(), &m_tokens[QEvent::MouseButtonRelease]);
m_coreWindow->add_PointerWheelChanged(Callback<PointerHandler>(this, &QWinRTScreen::onPointerUpdated).Get(), &m_tokens[QEvent::Wheel]);
m_coreWindow->add_SizeChanged(Callback<SizeChangedHandler>(this, &QWinRTScreen::onSizeChanged).Get(), &m_tokens[QEvent::Resize]);
+#ifdef Q_OS_WINPHONE
+ ComPtr<IHardwareButtonsStatics> hardwareButtons;
+ if (SUCCEEDED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Phone_UI_Input_HardwareButtons).Get(), &hardwareButtons)))
+ hardwareButtons->add_BackPressed(Callback<BackPressedHandler>(this, &QWinRTScreen::onBackButtonPressed).Get(), &m_tokens[QEvent::User]);
+#endif // Q_OS_WINPHONE
// Window event handlers
m_coreWindow->add_Activated(Callback<ActivatedHandler>(this, &QWinRTScreen::onActivated).Get(), &m_tokens[QEvent::WindowActivate]);
@@ -984,6 +998,8 @@ HRESULT QWinRTScreen::onVisibilityChanged(ICoreWindow *window, IVisibilityChange
boolean visible;
args->get_Visible(&visible);
QWindowSystemInterface::handleApplicationStateChanged(visible ? Qt::ApplicationActive : Qt::ApplicationHidden);
+ if (visible)
+ handleExpose();
return S_OK;
}
@@ -1000,4 +1016,27 @@ HRESULT QWinRTScreen::onOrientationChanged(IInspectable *)
return S_OK;
}
+#ifdef Q_OS_WINPHONE
+HRESULT QWinRTScreen::onBackButtonPressed(IInspectable *, IBackPressedEventArgs *args)
+{
+ QKeyEvent backPress(QEvent::KeyPress, Qt::Key_Back, Qt::NoModifier);
+ backPress.setAccepted(false);
+
+ QObject *receiver = m_visibleWindows.isEmpty()
+ ? static_cast<QObject *>(QGuiApplication::instance())
+ : static_cast<QObject *>(m_visibleWindows.first());
+
+ // If the event is ignored, the app will suspend
+ QGuiApplication::sendEvent(receiver, &backPress);
+ if (backPress.isAccepted()) {
+ args->put_Handled(true);
+ // If the app accepts the event, send the release for symmetry
+ QKeyEvent backRelease(QEvent::KeyRelease, Qt::Key_Back, Qt::NoModifier);
+ QGuiApplication::sendEvent(receiver, &backRelease);
+ }
+
+ return S_OK;
+}
+#endif // Q_OS_WINPHONE
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.h b/src/plugins/platforms/winrt/qwinrtscreen.h
index 3131f879b5..c6511e9446 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.h
+++ b/src/plugins/platforms/winrt/qwinrtscreen.h
@@ -80,6 +80,15 @@ namespace ABI {
struct IDisplayPropertiesStatics;
}
}
+#ifdef Q_OS_WINPHONE
+ namespace Phone {
+ namespace UI {
+ namespace Input {
+ struct IBackPressedEventArgs;
+ }
+ }
+ }
+#endif
}
}
struct IInspectable;
@@ -149,6 +158,10 @@ private:
HRESULT onOrientationChanged(IInspectable *);
+#ifdef Q_OS_WINPHONE
+ HRESULT onBackButtonPressed(IInspectable *, ABI::Windows::Phone::UI::Input::IBackPressedEventArgs *args);
+#endif
+
ABI::Windows::UI::Core::ICoreWindow *m_coreWindow;
ABI::Windows::UI::ViewManagement::IApplicationViewStatics *m_applicationView;
ABI::Windows::ApplicationModel::Core::ICoreApplication *m_application;
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index ed2f685770..eaa4d05311 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -537,7 +537,7 @@ QGLXPbuffer::QGLXPbuffer(QOffscreenSurface *offscreenSurface)
GLX_PBUFFER_HEIGHT, offscreenSurface->size().height(),
GLX_LARGEST_PBUFFER, False,
GLX_PRESERVED_CONTENTS, False,
- GLX_NONE
+ None
};
m_pbuffer = glXCreatePbuffer(DISPLAY_FROM_XCB(m_screen), config, attributes);
diff --git a/src/plugins/platforms/xcb/main.cpp b/src/plugins/platforms/xcb/qxcbmain.cpp
index f21ea03cf5..54c1629bf0 100644
--- a/src/plugins/platforms/xcb/main.cpp
+++ b/src/plugins/platforms/xcb/qxcbmain.cpp
@@ -62,4 +62,4 @@ QPlatformIntegration* QXcbIntegrationPlugin::create(const QString& system, const
QT_END_NAMESPACE
-#include "main.moc"
+#include "qxcbmain.moc"
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 7d69564c57..b45bd6a82e 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -80,7 +80,8 @@ static int resourceType(const QByteArray &key)
QByteArrayLiteral("glxcontext"), QByteArrayLiteral("apptime"),
QByteArrayLiteral("appusertime"), QByteArrayLiteral("hintstyle"),
QByteArrayLiteral("startupid"), QByteArrayLiteral("traywindow"),
- QByteArrayLiteral("gettimestamp"), QByteArrayLiteral("x11screen")
+ QByteArrayLiteral("gettimestamp"), QByteArrayLiteral("x11screen"),
+ QByteArrayLiteral("rootwindow")
};
const QByteArray *end = names + sizeof(names) / sizeof(names[0]);
const QByteArray *result = std::find(names, end, key);
@@ -142,6 +143,9 @@ void *QXcbNativeInterface::nativeResourceForIntegration(const QByteArray &resour
case X11Screen:
result = x11Screen();
break;
+ case RootWindow:
+ result = rootWindow();
+ break;
default:
break;
}
@@ -264,6 +268,15 @@ void *QXcbNativeInterface::x11Screen()
return 0;
}
+void *QXcbNativeInterface::rootWindow()
+{
+ QXcbIntegration *integration = static_cast<QXcbIntegration *>(QGuiApplicationPrivate::platformIntegration());
+ QXcbConnection *defaultConnection = integration->defaultConnection();
+ if (defaultConnection)
+ return reinterpret_cast<void *>(defaultConnection->rootWindow());
+ return 0;
+}
+
void QXcbNativeInterface::setAppTime(QScreen* screen, xcb_timestamp_t time)
{
static_cast<QXcbScreen *>(screen->handle())->connection()->setTime(time);
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h
index 9c4fa44d3b..fb1a46014c 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.h
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h
@@ -70,7 +70,8 @@ public:
StartupId,
TrayWindow,
GetTimestamp,
- X11Screen
+ X11Screen,
+ RootWindow
};
QXcbNativeInterface();
@@ -94,6 +95,7 @@ public:
void *getTimestamp(const QXcbScreen *screen);
void *startupId();
void *x11Screen();
+ void *rootWindow();
static void setAppTime(QScreen *screen, xcb_timestamp_t time);
static void setAppUserTime(QScreen *screen, xcb_timestamp_t time);
static void *eglContextForContext(QOpenGLContext *context);
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 29f71e6972..aabcb84a08 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -64,9 +64,7 @@
#include <xcb/xcb_icccm.h>
#undef class
#include <xcb/xfixes.h>
-#ifndef QT_NO_SHAPE
-# include <xcb/shape.h>
-#endif // QT_NO_SHAPE
+#include <xcb/shape.h>
// xcb-icccm 3.8 support
#ifdef XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS
@@ -2077,8 +2075,6 @@ void QXcbWindow::handleXEmbedMessage(const xcb_client_message_event_t *event)
}
}
-#if !defined(QT_NO_SHAPE)
-
static inline xcb_rectangle_t qRectToXCBRectangle(const QRect &r)
{
xcb_rectangle_t result;
@@ -2123,8 +2119,6 @@ void QXcbWindow::setMask(const QRegion &region)
}
}
-#endif // !QT_NO_SHAPE
-
void QXcbWindow::setAlertState(bool enabled)
{
if (m_alertState == enabled)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index 45d44b213f..a90ad7b5ed 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -114,10 +114,7 @@ public:
bool startSystemResize(const QPoint &pos, Qt::Corner corner);
void setOpacity(qreal level);
-
-#if !defined(QT_NO_SHAPE)
void setMask(const QRegion &region);
-#endif // !QT_NO_SHAPE
void setAlertState(bool enabled);
bool isAlertState() const { return m_alertState; }
diff --git a/src/plugins/platforms/xcb/xcb-plugin.pro b/src/plugins/platforms/xcb/xcb-plugin.pro
index 4727262f3f..bfbec91e3c 100644
--- a/src/plugins/platforms/xcb/xcb-plugin.pro
+++ b/src/plugins/platforms/xcb/xcb-plugin.pro
@@ -17,7 +17,7 @@ SOURCES = \
qxcbwindow.cpp \
qxcbbackingstore.cpp \
qxcbwmsupport.cpp \
- main.cpp \
+ qxcbmain.cpp \
qxcbnativeinterface.cpp \
qxcbcursor.cpp \
qxcbimage.cpp \
@@ -121,8 +121,7 @@ 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-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr
- !contains(DEFINES, QT_NO_SHAPE):LIBS += -lxcb-shape
+ LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape
contains(DEFINES, QT_NO_XKB) {
LIBS += -lxcb-keysyms
} else {
diff --git a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
index 2fd5519053..19852b74b1 100644
--- a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
+++ b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
@@ -1,6 +1,7 @@
#
# Statically compile in code for
-# libxcb-fixes, libxcb-randr, libxcb-shm, libxcb-sync, libxcb-image, libxcb-keysyms, libxcb-icccm, libxcb-renderutil
+# libxcb-fixes, libxcb-randr, libxcb-shm, libxcb-sync, libxcb-image,
+# libxcb-keysyms, libxcb-icccm, libxcb-renderutil, libxcb-xkb
#
TEMPLATE = lib
TARGET = xcb-static
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 7367f6e7f4..5c73705d4c 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -737,7 +737,7 @@ bool QSqlTableModel::submitAll()
bool success = true;
foreach (int row, d->cache.keys()) {
- // be sure cache *still* contains the row since overriden selectRow() could have called select()
+ // be sure cache *still* contains the row since overridden selectRow() could have called select()
QSqlTableModelPrivate::CacheMap::iterator it = d->cache.find(row);
if (it == d->cache.end())
continue;
diff --git a/src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc b/src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc
index f8e96f0ee4..304a736860 100644
--- a/src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc
+++ b/src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc
@@ -160,7 +160,7 @@ a signal should be documented.
\endlist
For properties that have overloaded signals, QDoc groups the overloaded
-notifiers together. To refer to a specifc version of a notifier or signal,
+notifiers together. To refer to a specific version of a notifier or signal,
simply refer to the property and mention that there are different versions of
the notifier.
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index 71c550d4ab..9b82e80927 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -270,7 +270,7 @@ void Generator::beginSubPage(const InnerNode* node, const QString& fileName)
path += fileName;
QFile* outFile = new QFile(redirectDocumentationToDevNull_ ? QStringLiteral("/dev/null") : path);
- if (outFile->exists())
+ if (!redirectDocumentationToDevNull_ && outFile->exists())
node->location().error(tr("HTML file already exists; overwriting %1").arg(outFile->fileName()));
if (!outFile->open(QFile::WriteOnly))
node->location().fatal(tr("Cannot open output file '%1'").arg(outFile->fileName()));
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 1eef42dc2f..641e59f018 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -1439,11 +1439,7 @@ void HtmlGenerator::generateDocNode(DocNode* dn, CodeMarker* marker)
QString fullTitle = dn->fullTitle();
QString htmlTitle = fullTitle;
- if (dn->subType() == Node::File && !dn->subTitle().isEmpty()) {
- subTitleSize = SmallSubTitle;
- htmlTitle += " (" + dn->subTitle() + QLatin1Char(')');
- }
- else if (dn->subType() == Node::QmlBasicType) {
+ if (dn->subType() == Node::QmlBasicType) {
fullTitle = "QML Basic Type: " + fullTitle;
htmlTitle = fullTitle;
@@ -1668,10 +1664,11 @@ void HtmlGenerator::generateNavigationBar(const QString &title,
if (!cn->name().isEmpty())
navigationbar << Atom(Atom::ListItemLeft)
- << Atom(Atom::String, protectEnc(cn->name()))
+ << Atom(Atom::String, cn->name())
<< Atom(Atom::ListItemRight);
}
else if (node->type() == Node::Document) {
+ const DocNode *dn = static_cast<const DocNode *>(node);
if (node->subType() == Node::QmlClass || node->subType() == Node::QmlBasicType) {
if (!qmltypespage.isEmpty())
navigationbar << Atom(Atom::ListItemLeft)
@@ -1680,16 +1677,19 @@ void HtmlGenerator::generateNavigationBar(const QString &title,
<< Atom(Atom::String, QLatin1String("QML Types"))
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
<< Atom(Atom::ListItemRight);
-
- navigationbar << Atom(Atom::ListItemLeft)
- << Atom(Atom::String, protectEnc(title))
- << Atom(Atom::ListItemRight);
}
- else {
+ else if (dn && dn->isExampleFile()) {
navigationbar << Atom(Atom::ListItemLeft)
- << Atom(Atom::String, protectEnc(title))
- << Atom(Atom::ListItemRight);
+ << Atom(Atom::Link, dn->parent()->name())
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
+ << Atom(Atom::String, dn->parent()->title())
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
+ << Atom(Atom::ListItemRight);
+
}
+ navigationbar << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, title)
+ << Atom(Atom::ListItemRight);
}
generateText(navigationbar, node, marker);
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp
index b5cc630bfe..662504fc25 100644
--- a/src/widgets/dialogs/qprogressdialog.cpp
+++ b/src/widgets/dialogs/qprogressdialog.cpp
@@ -849,7 +849,7 @@ void QProgressDialog::forceShow()
\since 4.5
\overload
- Opens the dialog and connects its accepted() signal to the slot specified
+ Opens the dialog and connects its canceled() signal to the slot specified
by \a receiver and \a member.
The signal will be disconnected from the slot when the dialog is closed.
diff --git a/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc b/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc
index 923362e909..e9d2a94a59 100644
--- a/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc
+++ b/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc
@@ -39,5 +39,7 @@
****************************************************************************/
//! [0]
+\code
foreach(variable, container)
+\endcode
//! [0]
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index 41d4fc925a..bccdb1fbaa 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -5451,13 +5451,13 @@ bool QGraphicsScene::focusNextPrevChild(bool next)
*/
/*!
- \fn QGraphicsScene::focusChanged(QGraphicsItem *newFocusItem, QGraphicsItem *oldFocusItem, Qt::FocusReason reason)
+ \fn QGraphicsScene::focusItemChanged(QGraphicsItem *newFocusItem, QGraphicsItem *oldFocusItem, Qt::FocusReason reason)
This signal is emitted by QGraphicsScene whenever focus changes in the
scene (i.e., when an item gains or loses input focus, or when focus
passes from one item to another). You can connect to this signal if you
need to keep track of when other items gain input focus. It is
- particularily useful for implementing virtual keyboards, input methods,
+ particularly useful for implementing virtual keyboards, input methods,
and cursor items.
\a oldFocusItem is a pointer to the item that previously had focus, or
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index c01b535067..9e221c1bf4 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -3277,30 +3277,6 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
}
break;
#endif
-
- case QEvent::TouchUpdate:
- case QEvent::TouchEnd:
- {
- QWidget *widget = static_cast<QWidget *>(receiver);
- QTouchEvent *touchEvent = static_cast<QTouchEvent *>(e);
- const bool acceptTouchEvents = widget->testAttribute(Qt::WA_AcceptTouchEvents);
-
- if (e->type() != QEvent::TouchUpdate && acceptTouchEvents && e->spontaneous()) {
- const QPoint localPos = touchEvent->touchPoints()[0].pos().toPoint();
- QApplicationPrivate::giveFocusAccordingToFocusPolicy(widget, e, localPos);
- }
-
- touchEvent->setTarget(widget);
- touchEvent->setAccepted(acceptTouchEvents);
-
- res = acceptTouchEvents && d->notify_helper(widget, touchEvent);
-
- // If the touch event wasn't accepted, synthesize a mouse event and see if the widget wants it.
- if (!touchEvent->isAccepted() && QGuiApplicationPrivate::synthesizeMouseFromTouchEventsEnabled())
- res = d->translateTouchToMouse(widget, touchEvent);
- break;
- }
-
case QEvent::TouchBegin:
// Note: TouchUpdate and TouchEnd events are never propagated
{
@@ -3321,15 +3297,6 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
touchEvent->setAccepted(acceptTouchEvents);
QPointer<QWidget> p = widget;
res = acceptTouchEvents && d->notify_helper(widget, touchEvent);
-
- // If the touch event wasn't accepted, synthesize a mouse event and see if the widget wants it.
- if (!touchEvent->isAccepted() && QGuiApplicationPrivate::synthesizeMouseFromTouchEventsEnabled()) {
- res = d->translateTouchToMouse(widget, touchEvent);
- eventAccepted = touchEvent->isAccepted();
- if (eventAccepted)
- break;
- }
-
eventAccepted = touchEvent->isAccepted();
if (p.isNull()) {
// widget was deleted
@@ -3892,67 +3859,6 @@ QWidget *QApplicationPrivate::findClosestTouchPointTarget(QTouchDevice *device,
return static_cast<QWidget *>(closestTarget);
}
-class WidgetAttributeSaver
-{
-public:
- explicit WidgetAttributeSaver(QWidget *widget, Qt::WidgetAttribute attribute, bool forcedValue)
- : m_widget(widget),
- m_attribute(attribute),
- m_savedValue(widget->testAttribute(attribute))
- {
- widget->setAttribute(attribute, forcedValue);
- }
-
- ~WidgetAttributeSaver()
- {
- m_widget->setAttribute(m_attribute, m_savedValue);
- }
-
-private:
- QWidget * const m_widget;
- const Qt::WidgetAttribute m_attribute;
- const bool m_savedValue;
-};
-
-bool QApplicationPrivate::translateTouchToMouse(QWidget *widget, QTouchEvent *event)
-{
- Q_FOREACH (const QTouchEvent::TouchPoint &p, event->touchPoints()) {
- const QEvent::Type eventType = (p.state() & Qt::TouchPointPressed) ? QEvent::MouseButtonPress
- : (p.state() & Qt::TouchPointReleased) ? QEvent::MouseButtonRelease
- : (p.state() & Qt::TouchPointMoved) ? QEvent::MouseMove
- : QEvent::None;
-
- if (eventType == QEvent::None)
- continue;
-
- const QPoint pos = widget->mapFromGlobal(p.screenPos().toPoint());
-
- QMouseEvent mouseEvent(eventType, pos, p.screenPos().toPoint(),
- Qt::LeftButton,
- (eventType == QEvent::MouseButtonRelease) ? Qt::NoButton : Qt::LeftButton,
- event->modifiers());
- mouseEvent.setAccepted(true);
- mouseEvent.setTimestamp(event->timestamp());
-
- // Make sure our synthesized mouse event doesn't propagate
- // we want to control the propagation ourself to get a chance to
- // deliver a proper touch event higher up in the hierarchy if that
- // widget doesn't pick up the mouse event either.
- WidgetAttributeSaver saver(widget, Qt::WA_NoMousePropagation, true);
-
- // Note it has to be a spontaneous event if we want the focus management
- // and input method support to behave properly. Quite some of the code
- // related to those aspect check for the spontaneous flag.
- const bool res = QCoreApplication::sendSpontaneousEvent(widget, &mouseEvent);
- event->setAccepted(mouseEvent.isAccepted());
-
- if (mouseEvent.isAccepted())
- return res;
- }
-
- return false;
-}
-
bool QApplicationPrivate::translateRawTouchEvent(QWidget *window,
QTouchDevice *device,
const QList<QTouchEvent::TouchPoint> &touchPoints,
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index 9cd18d5cd9..e72fe29bdb 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -112,7 +112,7 @@ public:
QT_DEPRECATED static inline void setGraphicsSystem(const QString &) {}
#endif
-#ifdef Q_NO_USING_KEYWORD
+#if defined(Q_NO_USING_KEYWORD) && !defined(Q_QDOC)
static QPalette palette() { return QGuiApplication::palette(); }
#else
using QGuiApplication::palette;
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 93c9ffe002..0284a613d4 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -285,7 +285,6 @@ public:
QWidget *findClosestTouchPointTarget(QTouchDevice *device, const QPointF &screenPos);
void appendTouchPoint(const QTouchEvent::TouchPoint &touchPoint);
void removeTouchPoint(int touchPointId);
- bool translateTouchToMouse(QWidget *widget, QTouchEvent *event);
static bool translateRawTouchEvent(QWidget *widget,
QTouchDevice *device,
const QList<QTouchEvent::TouchPoint> &touchPoints,
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index c1d3e95e7a..239e1ce1e2 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -1683,7 +1683,7 @@ QWidget *QFormLayout::labelForField(QWidget *field) const
Q_D(const QFormLayout);
int row;
- ItemRole role;
+ ItemRole role = LabelRole;
getWidgetPosition(field, &row, &role);
diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/widgets/kernel/qopenglwidget.cpp
index a5f81a9df8..e05c03d952 100644
--- a/src/widgets/kernel/qopenglwidget.cpp
+++ b/src/widgets/kernel/qopenglwidget.cpp
@@ -44,6 +44,7 @@
#include <QtWidgets/private/qwidget_p.h>
#include <QOpenGLFramebufferObject>
+#include <QOpenGLFunctions>
#include <QWindow>
#include <qpa/qplatformwindow.h>
#include <QDebug>
@@ -144,9 +145,10 @@ void QOpenGLWidget::paintGL()
void QOpenGLWidget::updateGL()
{
+ Q_D(QOpenGLWidget);
makeCurrent();
paintGL();
- glFlush();
+ d->context.functions()->glFlush();
doneCurrent();
update();
}
@@ -163,15 +165,16 @@ void QOpenGLWidget::resizeEvent(QResizeEvent *)
delete d->fbo; // recreate when resized
d->fbo = new QOpenGLFramebufferObject(size());
d->fbo->bind();
- glBindTexture(GL_TEXTURE_2D, d->fbo->texture());
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ QOpenGLFunctions *funcs = d->context.functions();
+ funcs->glBindTexture(GL_TEXTURE_2D, d->fbo->texture());
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
resizeGL(width(), height());
paintGL();
- glFlush();
+ funcs->glFlush();
}
void QOpenGLWidget::paintEvent(QPaintEvent *)
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index c52e0d47ce..ab045dd604 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -9600,6 +9600,23 @@ void QWidget::setParent(QWidget *parent)
setParent((QWidget*)parent, windowFlags() & ~Qt::WindowType_Mask);
}
+#ifndef QT_NO_OPENGL
+static void sendWindowChangeToTextureChildrenRecursively(QWidget *widget)
+{
+ QWidgetPrivate *d = QWidgetPrivate::get(widget);
+ if (d->renderToTexture) {
+ QEvent e(QEvent::WindowChangeInternal);
+ QApplication::sendEvent(widget, &e);
+ }
+
+ for (int i = 0; i < d->children.size(); ++i) {
+ QWidget *w = qobject_cast<QWidget *>(d->children.at(i));
+ if (w && !w->isWindow() && !w->isHidden() && QWidgetPrivate::get(w)->textureChildSeen)
+ sendWindowChangeToTextureChildrenRecursively(w);
+ }
+}
+#endif
+
/*!
\overload
@@ -9724,6 +9741,12 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
QEvent e(QEvent::ParentChange);
QApplication::sendEvent(this, &e);
}
+#ifndef QT_NO_OPENGL
+ //renderToTexture widgets also need to know when their top-level window changes
+ if (d->textureChildSeen && oldtlw != window()) {
+ sendWindowChangeToTextureChildrenRecursively(this);
+ }
+#endif
if (!wasCreated) {
if (isWindow() || parentWidget()->isVisible())
@@ -9892,7 +9915,7 @@ void QWidget::repaint(const QRect &rect)
QTLWExtra *tlwExtra = window()->d_func()->maybeTopData();
if (tlwExtra && !tlwExtra->inTopLevelResize && tlwExtra->backingStore) {
tlwExtra->inRepaint = true;
- tlwExtra->backingStoreTracker->markDirty(rect, this, true);
+ tlwExtra->backingStoreTracker->markDirty(rect, this, QWidgetBackingStore::UpdateNow);
tlwExtra->inRepaint = false;
}
} else {
@@ -9921,7 +9944,7 @@ void QWidget::repaint(const QRegion &rgn)
QTLWExtra *tlwExtra = window()->d_func()->maybeTopData();
if (tlwExtra && !tlwExtra->inTopLevelResize && tlwExtra->backingStore) {
tlwExtra->inRepaint = true;
- tlwExtra->backingStoreTracker->markDirty(rgn, this, true);
+ tlwExtra->backingStoreTracker->markDirty(rgn, this, QWidgetBackingStore::UpdateNow);
tlwExtra->inRepaint = false;
}
} else {
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index c2260b6e7d..88a08060c1 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -524,7 +524,10 @@ void QWidgetPrivate::show_sys()
return;
}
- QApplication::postEvent(q, new QUpdateLaterEvent(q->rect()));
+ if (renderToTexture && !q->isWindow())
+ QApplication::postEvent(q->parentWidget(), new QUpdateLaterEvent(q->geometry()));
+ else
+ QApplication::postEvent(q, new QUpdateLaterEvent(q->rect()));
if (!q->isWindow() && !q->testAttribute(Qt::WA_NativeWindow))
return;
@@ -546,12 +549,6 @@ void QWidgetPrivate::show_sys()
window->resize(geomRect.size());
}
- if (QBackingStore *store = q->backingStore()) {
- if (store->size() != geomRect.size()) {
- store->resize(geomRect.size());
- }
- }
-
#ifndef QT_NO_CURSOR
qt_qpa_set_cursor(q, false); // Needed in case cursor was set before show
#endif
@@ -588,7 +585,10 @@ void QWidgetPrivate::hide_sys()
if (!q->isWindow()) {
QWidget *p = q->parentWidget();
if (p &&p->isVisible()) {
- invalidateBuffer(q->rect());
+ if (renderToTexture)
+ p->d_func()->invalidateBuffer(q->geometry());
+ else
+ invalidateBuffer(q->rect());
}
} else {
invalidateBuffer(q->rect());
@@ -663,6 +663,11 @@ void QWidgetPrivate::raise_sys()
Q_Q(QWidget);
if (q->isWindow() || q->testAttribute(Qt::WA_NativeWindow)) {
q->windowHandle()->raise();
+ } else if (renderToTexture) {
+ if (QWidget *p = q->parentWidget()) {
+ setDirtyOpaqueRegion();
+ p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry()));
+ }
}
}
@@ -751,21 +756,21 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
QPoint posInNativeParent = q->mapTo(q->nativeParentWidget(),QPoint());
q->windowHandle()->setGeometry(QRect(posInNativeParent,r.size()));
}
- const QWidgetBackingStore *bs = maybeBackingStore();
- if (bs && bs->store) {
- if (isResize)
- bs->store->resize(r.size());
- }
if (needsShow)
show_sys();
}
if (!q->isWindow()) {
- if (isMove && !isResize)
+ if (renderToTexture) {
+ QRegion updateRegion(q->geometry());
+ updateRegion += QRect(oldPos, olds);
+ q->parentWidget()->d_func()->invalidateBuffer(updateRegion);
+ } else if (isMove && !isResize) {
moveRect(QRect(oldPos, olds), x - oldPos.x(), y - oldPos.y());
- else
+ } else {
invalidateBuffer_resizeHelper(oldPos, olds);
+ }
}
}
@@ -939,6 +944,23 @@ void QWidgetPrivate::createTLSysExtra()
void QWidgetPrivate::deleteTLSysExtra()
{
if (extra && extra->topextra) {
+ //the qplatformbackingstore may hold a reference to the window, so the backingstore
+ //needs to be deleted first. If the backingstore holds GL resources, we need to
+ // make the context current here, since the platform bs does not have a reference
+ // to the widget.
+
+#ifndef QT_NO_OPENGL
+ if (textureChildSeen && extra->topextra->shareContext)
+ extra->topextra->shareContext->makeCurrent(extra->topextra->window);
+#endif
+ extra->topextra->backingStoreTracker.destroy();
+ delete extra->topextra->backingStore;
+ extra->topextra->backingStore = 0;
+#ifndef QT_NO_OPENGL
+ if (textureChildSeen && extra->topextra->shareContext)
+ extra->topextra->shareContext->doneCurrent();
+#endif
+
//the toplevel might have a context with a "qglcontext associated with it. We need to
//delete the qglcontext before we delete the qplatformopenglcontext.
//One unfortunate thing about this is that we potentially create a glContext just to
@@ -950,10 +972,6 @@ void QWidgetPrivate::deleteTLSysExtra()
delete extra->topextra->window;
extra->topextra->window = 0;
- extra->topextra->backingStoreTracker.destroy();
- delete extra->topextra->backingStore;
- extra->topextra->backingStore = 0;
-
#ifndef QT_NO_OPENGL
delete extra->topextra->shareContext;
extra->topextra->shareContext = 0;
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 43e2ccdf0b..221e6825ed 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -443,17 +443,21 @@ QRegion QWidgetBackingStore::staticContents(QWidget *parent, const QRect &within
return region;
}
-void QWidgetBackingStore::sendUpdateRequest(QWidget *widget, bool updateImmediately)
+void QWidgetBackingStore::sendUpdateRequest(QWidget *widget, UpdateTime updateTime)
{
if (!widget)
return;
- if (updateImmediately) {
- QEvent event(QEvent::UpdateRequest);
- QApplication::sendEvent(widget, &event);
- } else {
+ switch (updateTime) {
+ case UpdateLater:
updateRequestSent = true;
QApplication::postEvent(widget, new QEvent(QEvent::UpdateRequest), Qt::LowEventPriority);
+ break;
+ case UpdateNow: {
+ QEvent event(QEvent::UpdateRequest);
+ QApplication::sendEvent(widget, &event);
+ break;
+ }
}
}
@@ -461,17 +465,17 @@ void QWidgetBackingStore::sendUpdateRequest(QWidget *widget, bool updateImmediat
Marks the region of the widget as dirty (if not already marked as dirty) and
posts an UpdateRequest event to the top-level widget (if not already posted).
- If updateImmediately is true, the event is sent immediately instead of posted.
+ If updateTime is UpdateNow, the event is sent immediately instead of posted.
- If invalidateBuffer is true, all widgets intersecting with the region will be dirty.
+ If bufferState is BufferInvalid, all widgets intersecting with the region will be dirty.
If the widget paints directly on screen, the event is sent to the widget
- instead of the top-level widget, and invalidateBuffer is completely ignored.
+ instead of the top-level widget, and bufferState is completely ignored.
### Qt 4.6: Merge into a template function (after MSVC isn't supported anymore).
*/
-void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool updateImmediately,
- bool invalidateBuffer)
+void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget,
+ UpdateTime updateTime, BufferState bufferState)
{
Q_ASSERT(tlw->d_func()->extra);
Q_ASSERT(tlw->d_func()->extra->topextra);
@@ -487,44 +491,44 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
if (widget->d_func()->paintOnScreen()) {
if (widget->d_func()->dirty.isEmpty()) {
widget->d_func()->dirty = rgn;
- sendUpdateRequest(widget, updateImmediately);
+ sendUpdateRequest(widget, updateTime);
return;
} else if (qt_region_strictContains(widget->d_func()->dirty, widget->rect())) {
- if (updateImmediately)
- sendUpdateRequest(widget, updateImmediately);
+ if (updateTime == UpdateNow)
+ sendUpdateRequest(widget, updateTime);
return; // Already dirty.
}
const bool eventAlreadyPosted = !widget->d_func()->dirty.isEmpty();
widget->d_func()->dirty += rgn;
- if (!eventAlreadyPosted || updateImmediately)
- sendUpdateRequest(widget, updateImmediately);
+ if (!eventAlreadyPosted || updateTime == UpdateNow)
+ sendUpdateRequest(widget, updateTime);
return;
}
//### FIXME fullUpdatePending seems to be always false????
if (fullUpdatePending) {
- if (updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
return;
}
const QPoint offset = widget->mapTo(tlw, QPoint());
if (QWidgetPrivate::get(widget)->renderToTexture) {
- if (!updateRequestSent || updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (!updateRequestSent || updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
return;
}
const QRect widgetRect = widget->d_func()->effectiveRectFor(widget->rect());
if (qt_region_strictContains(dirty, widgetRect.translated(offset))) {
- if (updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
return; // Already dirty.
}
- if (invalidateBuffer) {
+ if (bufferState == BufferInvalid) {
const bool eventAlreadyPosted = !dirty.isEmpty() || updateRequestSent;
#ifndef QT_NO_GRAPHICSEFFECT
if (widget->d_func()->graphicsEffect)
@@ -532,14 +536,14 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
else
#endif //QT_NO_GRAPHICSEFFECT
dirty += rgn.translated(offset);
- if (!eventAlreadyPosted || updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (!eventAlreadyPosted || updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
return;
}
if (dirtyWidgets.isEmpty()) {
addDirtyWidget(widget, rgn);
- sendUpdateRequest(tlw, updateImmediately);
+ sendUpdateRequest(tlw, updateTime);
return;
}
@@ -556,8 +560,8 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
addDirtyWidget(widget, rgn);
}
- if (updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
}
/*!
@@ -567,8 +571,8 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
### Qt 4.6: Merge into a template function (after MSVC isn't supported anymore).
*/
-void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget, bool updateImmediately,
- bool invalidateBuffer)
+void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget,
+ UpdateTime updateTime, BufferState bufferState)
{
Q_ASSERT(tlw->d_func()->extra);
Q_ASSERT(tlw->d_func()->extra->topextra);
@@ -584,30 +588,30 @@ void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget, bool upd
if (widget->d_func()->paintOnScreen()) {
if (widget->d_func()->dirty.isEmpty()) {
widget->d_func()->dirty = QRegion(rect);
- sendUpdateRequest(widget, updateImmediately);
+ sendUpdateRequest(widget, updateTime);
return;
} else if (qt_region_strictContains(widget->d_func()->dirty, rect)) {
- if (updateImmediately)
- sendUpdateRequest(widget, updateImmediately);
+ if (updateTime == UpdateNow)
+ sendUpdateRequest(widget, updateTime);
return; // Already dirty.
}
const bool eventAlreadyPosted = !widget->d_func()->dirty.isEmpty();
widget->d_func()->dirty += rect;
- if (!eventAlreadyPosted || updateImmediately)
- sendUpdateRequest(widget, updateImmediately);
+ if (!eventAlreadyPosted || updateTime == UpdateNow)
+ sendUpdateRequest(widget, updateTime);
return;
}
if (fullUpdatePending) {
- if (updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
return;
}
if (QWidgetPrivate::get(widget)->renderToTexture) {
- if (!updateRequestSent || updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (!updateRequestSent || updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
return;
}
@@ -615,22 +619,22 @@ void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget, bool upd
const QRect widgetRect = widget->d_func()->effectiveRectFor(rect);
const QRect translatedRect(widgetRect.translated(widget->mapTo(tlw, QPoint())));
if (qt_region_strictContains(dirty, translatedRect)) {
- if (updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
return; // Already dirty
}
- if (invalidateBuffer) {
+ if (bufferState == BufferInvalid) {
const bool eventAlreadyPosted = !dirty.isEmpty();
dirty += translatedRect;
- if (!eventAlreadyPosted || updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (!eventAlreadyPosted || updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
return;
}
if (dirtyWidgets.isEmpty()) {
addDirtyWidget(widget, rect);
- sendUpdateRequest(tlw, updateImmediately);
+ sendUpdateRequest(tlw, updateTime);
return;
}
@@ -641,8 +645,8 @@ void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget, bool upd
addDirtyWidget(widget, rect);
}
- if (updateImmediately)
- sendUpdateRequest(tlw, updateImmediately);
+ if (updateTime == UpdateNow)
+ sendUpdateRequest(tlw, updateTime);
}
/*!
@@ -936,7 +940,7 @@ void QWidgetBackingStore::sync(QWidget *exposedWidget, const QRegion &exposedReg
}
// Nothing to repaint.
- if (!isDirty()) {
+ if (!isDirty() && store->size().isValid()) {
qt_flush(exposedWidget, exposedRegion, store, tlw, tlwOffset, widgetTextures);
return;
}
@@ -1031,7 +1035,7 @@ void QWidgetBackingStore::doSync()
const QRect tlwRect(topLevelRect());
const QRect surfaceGeometry(tlwRect.topLeft(), store->size());
if ((fullUpdatePending || inTopLevelResize || surfaceGeometry.size() != tlwRect.size()) && !updatesDisabled) {
- if (hasStaticContents()) {
+ if (hasStaticContents() && !store->size().isEmpty() ) {
// Repaint existing dirty area and newly visible area.
const QRect clipRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height());
const QRegion staticRegion(staticContents(0, clipRect));
@@ -1346,7 +1350,8 @@ void QWidgetPrivate::invalidateBuffer(const QRegion &rgn)
if (wrgn.isEmpty())
return;
- tlwExtra->backingStoreTracker->markDirty(wrgn, q, false, true);
+ tlwExtra->backingStoreTracker->markDirty(wrgn, q,
+ QWidgetBackingStore::UpdateLater, QWidgetBackingStore::BufferInvalid);
}
/*!
@@ -1370,7 +1375,8 @@ void QWidgetPrivate::invalidateBuffer(const QRect &rect)
return;
if (graphicsEffect || !extra || !extra->hasMask) {
- tlwExtra->backingStoreTracker->markDirty(wRect, q, false, true);
+ tlwExtra->backingStoreTracker->markDirty(wRect, q,
+ QWidgetBackingStore::UpdateLater, QWidgetBackingStore::BufferInvalid);
return;
}
@@ -1379,7 +1385,8 @@ void QWidgetPrivate::invalidateBuffer(const QRect &rect)
if (wRgn.isEmpty())
return;
- tlwExtra->backingStoreTracker->markDirty(wRgn, q, false, true);
+ tlwExtra->backingStoreTracker->markDirty(wRgn, q,
+ QWidgetBackingStore::UpdateLater, QWidgetBackingStore::BufferInvalid);
}
void QWidgetPrivate::repaint_sys(const QRegion &rgn)
diff --git a/src/widgets/kernel/qwidgetbackingstore_p.h b/src/widgets/kernel/qwidgetbackingstore_p.h
index e362ee4ac1..473e9deef4 100644
--- a/src/widgets/kernel/qwidgetbackingstore_p.h
+++ b/src/widgets/kernel/qwidgetbackingstore_p.h
@@ -93,6 +93,16 @@ private:
class Q_AUTOTEST_EXPORT QWidgetBackingStore
{
public:
+ enum UpdateTime {
+ UpdateNow,
+ UpdateLater
+ };
+
+ enum BufferState{
+ BufferValid,
+ BufferInvalid
+ };
+
QWidgetBackingStore(QWidget *t);
~QWidgetBackingStore();
@@ -112,10 +122,10 @@ public:
}
// ### Qt 4.6: Merge into a template function (after MSVC isn't supported anymore).
- void markDirty(const QRegion &rgn, QWidget *widget, bool updateImmediately = false,
- bool invalidateBuffer = false);
- void markDirty(const QRect &rect, QWidget *widget, bool updateImmediately = false,
- bool invalidateBuffer = false);
+ void markDirty(const QRegion &rgn, QWidget *widget, UpdateTime updateTime = UpdateLater,
+ BufferState bufferState = BufferValid);
+ void markDirty(const QRect &rect, QWidget *widget, UpdateTime updateTime = UpdateLater,
+ BufferState bufferState = BufferValid);
private:
QWidget *tlw;
@@ -134,7 +144,7 @@ private:
QPlatformTextureListWatcher *textureListWatcher;
- void sendUpdateRequest(QWidget *widget, bool updateImmediately);
+ void sendUpdateRequest(QWidget *widget, UpdateTime updateTime);
static bool flushPaint(QWidget *widget, const QRegion &rgn);
static void unflushPaint(QWidget *widget, const QRegion &rgn);
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 3cc48b442d..e50736d6b8 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -59,6 +59,7 @@ Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets();
QWidget *qt_button_down = 0; // widget got last button-down
static QWidget *qt_tablet_target = 0;
+static QWidget *qt_tablet_target_window = 0;
// popup control
QWidget *qt_popup_down = 0; // popup that contains the pressed widget
@@ -103,8 +104,10 @@ QWidgetWindow::QWidgetWindow(QWidget *widget)
QWidgetWindow::~QWidgetWindow()
{
- if (m_widget == qt_tablet_target)
+ if (m_widget == qt_tablet_target_window) {
qt_tablet_target = 0;
+ qt_tablet_target_window = 0;
+ }
}
#ifndef QT_NO_ACCESSIBILITY
@@ -774,6 +777,7 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
widget = m_widget;
qt_tablet_target = widget;
+ qt_tablet_target_window = m_widget;
}
if (qt_tablet_target) {
@@ -786,8 +790,10 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
QGuiApplication::sendSpontaneousEvent(qt_tablet_target, &ev);
}
- if (event->type() == QEvent::TabletRelease)
+ if (event->type() == QEvent::TabletRelease) {
qt_tablet_target = 0;
+ qt_tablet_target_window = 0;
+ }
}
#endif // QT_NO_TABLETEVENT
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 149a5c6674..c4bc5a5e96 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -1026,7 +1026,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
break;
case CE_Splitter:
{
- // Dont draw handle for single pixel splitters
+ // Don't draw handle for single pixel splitters
if (option->rect.width() > 1 && option->rect.height() > 1) {
//draw grips
if (option->state & State_Horizontal) {
diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp
index 105aefb14c..9ad0484bc2 100644
--- a/src/widgets/styles/qgtkstyle.cpp
+++ b/src/widgets/styles/qgtkstyle.cpp
@@ -1032,7 +1032,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
case PE_FrameFocusRect: {
QRect frameRect = option->rect.adjusted(1, 1, -2, -2); // ### this mess should move to subcontrolrect
if (qobject_cast<const QAbstractItemView*>(widget)) {
- // Dont draw anything
+ // Don't draw anything
} else if (qobject_cast<const QTabBar*>(widget)) {
GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook");
style = d->gtk_widget_get_style(gtkNotebook);
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index d8530bca1e..53568f3c53 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -5024,7 +5024,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
int oldState = styleObject->property("_q_stylestate").toInt();
uint oldActiveControls = styleObject->property("_q_stylecontrols").toUInt();
- // a scrollbar is transient when the the scrollbar itself and
+ // a scrollbar is transient when the scrollbar itself and
// its sibling are both inactive (ie. not pressed/hovered/moved)
bool transient = !opt->activeSubControls && !(slider->state & State_On);
@@ -5827,12 +5827,6 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op
switch (sc) {
case SC_ComboBoxEditField:{
ret = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi);
- // hack to posistion the edit feld correctly for QDateTimeEdits
- // in calendarPopup mode.
- if (qobject_cast<const QDateTimeEdit *>(widget)) {
- ret.moveTop(ret.top() - 2);
- ret.setHeight(ret.height() +1);
- }
break; }
case SC_ComboBoxArrow:{
ret = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi);
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index da9b5da2a5..7568ba4e6e 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1585,14 +1585,28 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\table
\header \li Contents Type \li QStyleOption Subclass
- \row \li \l CT_PushButton \li \l QStyleOptionButton
- \row \li \l CT_CheckBox \li \l QStyleOptionButton
- \row \li \l CT_RadioButton \li \l QStyleOptionButton
- \row \li \l CT_ToolButton \li \l QStyleOptionToolButton
- \row \li \l CT_ComboBox \li \l QStyleOptionComboBox
- \row \li \l CT_Splitter \li \l QStyleOption
- \row \li \l CT_ProgressBar \li \l QStyleOptionProgressBar
- \row \li \l CT_MenuItem \li \l QStyleOptionMenuItem
+ \row \li \l CT_CheckBox \li \l QStyleOptionButton
+ \row \li \l CT_ComboBox \li \l QStyleOptionComboBox
+ \row \li \l CT_GroupBox \li \l QStyleOptionGroupBox
+ \row \li \l CT_HeaderSection \li \l QStyleOptionHeader
+ \row \li \l CT_ItemViewItem \li \l QStyleOptionViewItem
+ \row \li \l CT_LineEdit \li \l QStyleOptionFrame
+ \row \li \l CT_MdiControls \li \l QStyleOptionComplex
+ \row \li \l CT_Menu \li \l QStyleOption
+ \row \li \l CT_MenuItem \li \l QStyleOptionMenuItem
+ \row \li \l CT_MenuBar \li \l QStyleOptionMenuItem
+ \row \li \l CT_MenuBarItem \li \l QStyleOptionMenuItem
+ \row \li \l CT_ProgressBar \li \l QStyleOptionProgressBar
+ \row \li \l CT_PushButton \li \l QStyleOptionButton
+ \row \li \l CT_RadioButton \li \l QStyleOptionButton
+ \row \li \l CT_ScrollBar \li \l QStyleOptionSlider
+ \row \li \l CT_SizeGrip \li \l QStyleOption
+ \row \li \l CT_Slider \li \l QStyleOptionSlider
+ \row \li \l CT_SpinBox \li \l QStyleOptionSpinBox
+ \row \li \l CT_Splitter \li \l QStyleOption
+ \row \li \l CT_TabBarTab \li \l QStyleOptionTab
+ \row \li \l CT_TabWidget \li \l QStyleOptionTabWidgetFrame
+ \row \li \l CT_ToolButton \li \l QStyleOptionToolButton
\endtable
\sa ContentsType, QStyleOption
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp
index 6c7b71bd74..3d77e39ce8 100644
--- a/src/widgets/styles/qwindowsvistastyle.cpp
+++ b/src/widgets/styles/qwindowsvistastyle.cpp
@@ -1206,11 +1206,13 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
if (!proxy()->styleHint(SH_UnderlineShortcut, mbi, widget))
alignment |= Qt::TextHideMnemonic;
- //The rect adjustment is a workaround for the menu not really filling its background.
- XPThemeData theme(widget, painter,
- QWindowsXPStylePrivate::MenuTheme,
- MENU_BARBACKGROUND, 0, option->rect.adjusted(-1, 0, 2, 1));
- d->drawBackground(theme);
+ if (widget) { // Not needed for QtQuick Controls
+ //The rect adjustment is a workaround for the menu not really filling its background.
+ XPThemeData theme(widget, painter,
+ QWindowsXPStylePrivate::MenuTheme,
+ MENU_BARBACKGROUND, 0, option->rect.adjusted(-1, 0, 2, 1));
+ d->drawBackground(theme);
+ }
int stateId = MBI_NORMAL;
if (disabled)
@@ -1281,7 +1283,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
}
QRect vCheckRect = visualRect(option->direction, menuitem->rect, QRect(menuitem->rect.x(),
- menuitem->rect.y(), checkcol - 6, menuitem->rect.height()));
+ menuitem->rect.y(), checkcol - (3 + menuitem->rect.x()), menuitem->rect.height()));
if (act) {
stateId = dis ? MBI_DISABLED : MBI_HOT;
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index 7a723c5f1f..770c954c2a 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -993,7 +993,7 @@ QSize QDateTimeEdit::sizeHint() const
QSize hint(w, h);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (d->calendarPopupEnabled()) {
QStyleOptionComboBox opt;
d->cachedSizeHint = style()->sizeFromContents(QStyle::CT_ComboBox, &opt, hint, this);
diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
index a94273c574..965e9301e9 100644
--- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
+++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
@@ -164,7 +164,7 @@ NSView *QMacCocoaViewContainer::cocoaView() const
}
/*!
- Sets the NSView to contain to be \a cocoaViewToWrap and retains it. If this
+ Sets \a view as the NSView to contain and retains it. If this
container already had a view set, it will release the previously set view.
*/
void QMacCocoaViewContainer::setCocoaView(NSView *view)
diff --git a/src/xml/xml.pro b/src/xml/xml.pro
index c4b8b5b229..57bf11e5aa 100644
--- a/src/xml/xml.pro
+++ b/src/xml/xml.pro
@@ -10,7 +10,7 @@ load(qt_module)
HEADERS += qtxmlglobal.h
-PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
+PRECOMPILED_HEADER =
include(dom/dom.pri)
include(sax/sax.pri)